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
5,582
func0
#include <assert.h> #include <math.h>
double func0(int n) { double sum = 0; for (int i = 1; i <= n; i++) { sum += i * i * i; } return round(sum / n * 1000000) / 1000000; }
int main() { assert(func0(2) == 4.5); assert(func0(3) == 12); assert(func0(1) == 1); return 0; }
O2
c
func0: endbr64 sub $0x8,%rsp test %edi,%edi jle 1288 <func0+0x68> lea 0x1(%rdi),%ecx mov $0x1,%eax pxor %xmm0,%xmm0 nopl 0x0(%rax,%rax,1) mov %eax,%edx pxor %xmm1,%xmm1 imul %eax,%edx imul %eax,%edx add $0x1,%eax cvtsi2sd %edx,%xmm1 addsd %xmm1,%xmm0 cmp %ecx,%eax jne 1240 <func0+0x...
func0: endbr64 sub rsp, 8 test edi, edi jle short loc_1288 lea ecx, [rdi+1] mov eax, 1 pxor xmm0, xmm0 nop dword ptr [rax+rax+00000000h] loc_1240: mov edx, eax pxor xmm1, xmm1 imul edx, eax imul edx, eax add eax, 1 cvtsi2sd xmm1, edx addsd xmm0, xmm1 cmp eax, ecx jnz ...
double func0(int a1) { int v1; // eax double v2; // xmm0_8 int v3; // edx if ( a1 <= 0 ) { v2 = 0.0; } else { v1 = 1; v2 = 0.0; do { v3 = v1 * v1 * v1; ++v1; v2 = v2 + (double)v3; } while ( v1 != a1 + 1 ); } return round(v2 / (double)a1 * 1000000.0) / ...
func0: ENDBR64 SUB RSP,0x8 TEST EDI,EDI JLE 0x00101288 LEA ECX,[RDI + 0x1] MOV EAX,0x1 PXOR XMM0,XMM0 NOP dword ptr [RAX + RAX*0x1] LAB_00101240: MOV EDX,EAX PXOR XMM1,XMM1 IMUL EDX,EAX IMUL EDX,EAX ADD EAX,0x1 CVTSI2SD XMM1,EDX ADDSD XMM0,XMM1 CMP EAX,ECX JNZ 0x00101240 LAB_0010125b: PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI D...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1) { int iVar1; int iVar2; double dVar3; if (param_1 < 1) { dVar3 = 0.0; } else { iVar1 = 1; dVar3 = 0.0; do { iVar2 = iVar1 * iVar1 * iVar1; iVar1 = iVar1 + 1; ...
5,583
func0
#include <assert.h> #include <math.h>
double func0(int n) { double sum = 0; for (int i = 1; i <= n; i++) { sum += i * i * i; } return round(sum / n * 1000000) / 1000000; }
int main() { assert(func0(2) == 4.5); assert(func0(3) == 12); assert(func0(1) == 1); return 0; }
O3
c
func0: endbr64 sub $0x8,%rsp test %edi,%edi jle 1288 <func0+0x68> lea 0x1(%rdi),%ecx mov $0x1,%eax pxor %xmm0,%xmm0 nopl 0x0(%rax,%rax,1) mov %eax,%edx pxor %xmm1,%xmm1 imul %eax,%edx imul %eax,%edx add $0x1,%eax cvtsi2sd %edx,%xmm1 addsd %xmm1,%xmm0 cmp %ecx,%eax jne 1240 <func0+0x...
func0: endbr64 sub rsp, 8 test edi, edi jle short loc_1288 lea ecx, [rdi+1] mov eax, 1 pxor xmm0, xmm0 nop dword ptr [rax+rax+00000000h] loc_1240: mov edx, eax pxor xmm1, xmm1 imul edx, eax imul edx, eax add eax, 1 cvtsi2sd xmm1, edx addsd xmm0, xmm1 cmp eax, ecx jnz ...
double func0(int a1) { int v1; // eax double v2; // xmm0_8 int v3; // edx if ( a1 <= 0 ) { v2 = 0.0; } else { v1 = 1; v2 = 0.0; do { v3 = v1 * v1 * v1; ++v1; v2 = v2 + (double)v3; } while ( v1 != a1 + 1 ); } return round(v2 / (double)a1 * 1000000.0) / ...
func0: ENDBR64 SUB RSP,0x8 TEST EDI,EDI JLE 0x00101288 LEA ECX,[RDI + 0x1] MOV EAX,0x1 PXOR XMM0,XMM0 NOP dword ptr [RAX + RAX*0x1] LAB_00101240: MOV EDX,EAX PXOR XMM1,XMM1 IMUL EDX,EAX IMUL EDX,EAX ADD EAX,0x1 CVTSI2SD XMM1,EDX ADDSD XMM0,XMM1 CMP EAX,ECX JNZ 0x00101240 LAB_0010125b: PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI D...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1) { int iVar1; int iVar2; double dVar3; if (param_1 < 1) { dVar3 = 0.0; } else { iVar1 = 1; dVar3 = 0.0; do { iVar2 = iVar1 * iVar1 * iVar1; iVar1 = iVar1 + 1; ...
5,584
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int max_three(int a, int b, int c) { int m = a > b ? a : b; return m > c ? m : c; }
int func0(int** gold, int m, int n) { // Allocate goldTable int** goldTable = (int**)malloc(m * sizeof(int*)); for(int i = 0; i < m; i++) { goldTable[i] = (int*)calloc(n, sizeof(int)); } for(int col = n-1; col >=0; col--) { for(int row = 0; row < m; row++) { int...
int main() { // Test case 1 int gold1_data[4][4] = { {1, 3, 1, 5}, {2, 2, 4, 1}, {5, 0, 2, 3}, {0, 6, 1, 2} }; int* gold1[4]; for(int i=0; i <4; i++) gold1[i] = gold1_data[i]; assert(func0(gold1, 4, 4) == 16); // Test case 2 int gold...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %edx,-0x50(%rbp) mov -0x4c(%rbp),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 10d0 <malloc@plt> mov %rax,-0x18(%rbp) movl $0x0,-0x3c(%rbp) jmp 1257 <func0+0x64> mov -0x50(...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov [rbp+var_4C], esi mov [rbp+var_50], edx mov eax, [rbp+var_4C] cdqe shl rax, 3 mov rdi, rax; size call _malloc mov [rbp+ptr], rax mov [rbp+var_3C], 0 jmp short loc_1259 loc_122A: mov ...
long long func0(long long a1, int a2, int a3) { unsigned int v3; // eax unsigned int v4; // eax unsigned int v5; // eax int v6; // ebx int i; // [rsp+14h] [rbp-3Ch] int j; // [rsp+18h] [rbp-38h] int k; // [rsp+1Ch] [rbp-34h] unsigned int v12; // [rsp+20h] [rbp-30h] int m; // [rsp+24h] [rbp-2Ch] int...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI MOV dword ptr [RBP + -0x50],EDX MOV EAX,dword ptr [RBP + -0x4c] CDQE SHL RAX,0x3 MOV RDI,RAX CALL 0x001010d0 MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x3c],0x0 JMP 0x00101259 LAB_001012...
int func0(long param_1,int param_2,int param_3) { int iVar1; int4 uVar2; int4 uVar3; int4 uVar4; int iVar5; int8 *__ptr; void *pvVar6; int local_44; int local_40; int local_3c; int local_38; int local_34; int local_30; __ptr = (int8 *)malloc((long)param_2 << 3); for (local_44 = 0; loca...
5,585
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int max_three(int a, int b, int c) { int m = a > b ? a : b; return m > c ? m : c; }
int func0(int** gold, int m, int n) { // Allocate goldTable int** goldTable = (int**)malloc(m * sizeof(int*)); for(int i = 0; i < m; i++) { goldTable[i] = (int*)calloc(n, sizeof(int)); } for(int col = n-1; col >=0; col--) { for(int row = 0; row < m; row++) { int...
int main() { // Test case 1 int gold1_data[4][4] = { {1, 3, 1, 5}, {2, 2, 4, 1}, {5, 0, 2, 3}, {0, 6, 1, 2} }; int* gold1[4]; for(int i=0; i <4; i++) gold1[i] = gold1_data[i]; assert(func0(gold1, 4, 4) == 16); // Test case 2 int gold...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbp mov %esi,%r13d mov %edx,%r14d mov %edx,0xc(%rsp) movslq %esi,%rdi shl $0x3,%rdi callq 10d0 <malloc@plt> mov %rax,%rbx test %r13d,%r13d jle 1236 <func0+0x5c> mov %rax,%r12 lea...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbp, rdi mov r13d, esi mov r14d, edx mov [rsp+48h+var_3C], edx movsxd rdi, esi shl rdi, 3 call _malloc mov rbx, rax test r13d, r13d jle short loc_1234 mov r12, rax mov e...
long long func0(long long a1, int a2, int a3) { long long v6; // rax unsigned int **v7; // rbx unsigned int **v8; // r12 long long v9; // rdi int v10; // r11d int v11; // ecx int v12; // eax long long v13; // rdx int v14; // esi unsigned int v15; // r12d unsigned int **v16; // rax long long v17...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBP,RDI MOV R13D,ESI MOV R14D,EDX MOV dword ptr [RSP + 0xc],EDX MOVSXD RDI,ESI SHL RDI,0x3 CALL 0x001010d0 MOV RBX,RAX TEST R13D,R13D JLE 0x00101234 MOV R12,RAX MOV EAX,R13D LEA R15,[RBX + RAX*0x8] MOVSXD R14,R14D LAB_0010121a: MOV ES...
int func0(long param_1,uint param_2,int param_3) { int iVar1; int8 *__ptr; void *pvVar2; int8 *puVar3; int iVar4; ulong uVar5; int iVar6; long lVar7; int iVar8; int iVar9; int iVar10; __ptr = (int8 *)malloc((long)(int)param_2 << 3); if (0 < (int)param_2) { puVar3 = __ptr; do { ...
5,586
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int max_three(int a, int b, int c) { int m = a > b ? a : b; return m > c ? m : c; }
int func0(int** gold, int m, int n) { // Allocate goldTable int** goldTable = (int**)malloc(m * sizeof(int*)); for(int i = 0; i < m; i++) { goldTable[i] = (int*)calloc(n, sizeof(int)); } for(int col = n-1; col >=0; col--) { for(int row = 0; row < m; row++) { int...
int main() { // Test case 1 int gold1_data[4][4] = { {1, 3, 1, 5}, {2, 2, 4, 1}, {5, 0, 2, 3}, {0, 6, 1, 2} }; int* gold1[4]; for(int i=0; i <4; i++) gold1[i] = gold1_data[i]; assert(func0(gold1, 4, 4) == 16); // Test case 2 int gold...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 movslq %esi,%rdi push %rbp push %rbx mov %rdi,%rbx shl $0x3,%rdi sub $0x18,%rsp mov %edx,0xc(%rsp) callq 10d0 <malloc@plt> mov %rax,%rbp test %ebx,%ebx jle 144a <func0+0x5a> mov %rax,%r15 movslq 0xc(%rsp),%r14 le...
func0: endbr64 push r15 movsxd r15, esi push r14 push r13 mov r13, rdi lea rdi, ds:0[r15*8] push r12 push rbp push rbx mov rbx, r15 sub rsp, 18h mov [rsp+48h+var_3C], edx call _malloc mov rbp, rax test r15d, r15d jle short loc_145C mov r12, rax mov eax, r15d ...
long long func0(long long a1, int a2, int a3) { long long v3; // r15 long long v6; // rax unsigned int **v7; // rbp unsigned int **v8; // r12 int v9; // r12d int v10; // r10d int v11; // r11d long long v12; // rdi long long v13; // rax int v14; // ecx int v15; // edx long long v16; // r14 uns...
func0: ENDBR64 PUSH R15 MOVSXD R15,ESI PUSH R14 PUSH R13 MOV R13,RDI LEA RDI,[R15*0x8] PUSH R12 PUSH RBP PUSH RBX MOV RBX,R15 SUB RSP,0x18 MOV dword ptr [RSP + 0xc],EDX CALL 0x001010d0 MOV RBP,RAX TEST R15D,R15D JLE 0x0010145c MOV R12,RAX MOV EAX,R15D MOVSXD R14,dword ptr [RSP + 0xc] LEA RAX,[RBP + RAX*0x8] MOV qword p...
int func0(long param_1,uint param_2,int param_3) { long lVar1; int8 *__ptr; void *pvVar2; long lVar3; int8 *puVar4; int iVar5; int iVar6; long lVar7; long lVar8; int *__ptr_00; long lVar9; int iVar10; int8 *puVar11; __ptr = (int8 *)malloc((long)(int)param_2 * 8); if (0 < (int)param_2) ...
5,587
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int max_three(int a, int b, int c) { int m = a > b ? a : b; return m > c ? m : c; }
int func0(int** gold, int m, int n) { // Allocate goldTable int** goldTable = (int**)malloc(m * sizeof(int*)); for(int i = 0; i < m; i++) { goldTable[i] = (int*)calloc(n, sizeof(int)); } for(int col = n-1; col >=0; col--) { for(int row = 0; row < m; row++) { int...
int main() { // Test case 1 int gold1_data[4][4] = { {1, 3, 1, 5}, {2, 2, 4, 1}, {5, 0, 2, 3}, {0, 6, 1, 2} }; int* gold1[4]; for(int i=0; i <4; i++) gold1[i] = gold1_data[i]; assert(func0(gold1, 4, 4) == 16); // Test case 2 int gold...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 movslq %esi,%rdi push %rbp push %rbx mov %rdi,%rbx shl $0x3,%rdi sub $0x18,%rsp mov %edx,0xc(%rsp) callq 10d0 <malloc@plt> mov %rax,%rbp test %ebx,%ebx jle 140a <func0+0x5a> mov %rax,%r13 movslq 0xc(%rsp),%r15 le...
func0: endbr64 push r15 mov r15d, edx push r14 push r13 movsxd r13, esi push r12 lea r14, ds:0[r13*8] mov r12, rdi push rbp mov rdi, r14; size push rbx sub rsp, 28h mov dword ptr [rsp+58h+ptr], esi call _malloc mov esi, dword ptr [rsp+58h+ptr] mov rbp, rax test e...
long long func0(long long a1, int a2, int a3) { void *v4; // r13 _DWORD **v5; // rax _DWORD **v6; // rbp int v7; // r8d size_t v8; // rax void **v9; // r15 void **v10; // rbx size_t v11; // rbp void **v12; // r12 int v13; // r15d int v14; // r10d long long v15; // rdi int v16; // r11d void ...
func0: ENDBR64 PUSH R15 MOV R15D,EDX PUSH R14 PUSH R13 MOVSXD R13,ESI PUSH R12 LEA R14,[R13*0x8] MOV R12,RDI PUSH RBP MOV RDI,R14 PUSH RBX SUB RSP,0x28 MOV dword ptr [RSP + 0x8],ESI CALL 0x001010d0 MOV ESI,dword ptr [RSP + 0x8] MOV RBP,RAX TEST ESI,ESI JLE 0x001015bb LEA R8D,[R15 + -0x1] MOVSXD RAX,R15D MOV R15,RBP MOV...
int func0(long param_1,int param_2,int param_3) { long lVar1; long *plVar2; long *plVar3; long lVar4; int8 *__ptr; void *pvVar5; size_t sVar6; int8 *puVar7; int iVar8; int iVar9; int iVar10; long lVar11; int iVar12; int iVar13; int8 *puVar14; size_t sVar15; long lVar16; sVar15 = ...
5,588
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char *func0(const char *test_tuple[], int size) { static char res[100]; for (int i = 0; i < size; i++) { int length = strlen(test_tuple[i]); res[i] = test_tuple[i][length - 1]; } res[size] = '\0'; // Null-terminating the string return res; }
int main() { const char *test_tuple1[] = {"Mers", "for", "Vers"}; const char *test_tuple2[] = {"Avenge", "for", "People"}; const char *test_tuple3[] = {"Gotta", "get", "go"}; assert(strcmp(func0(test_tuple1, 3), "srs") == 0); assert(strcmp(func0(test_tuple2, 3), "ere") == 0); assert(strc...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) jmp 1221 <func0+0x78> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%rax mov %rax,%rdi callq 1080 <strlen@plt> mov ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 jmp short loc_1221 loc_11C5: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var_18] add rax, rdx mov rax, [rax] mov rdi, rax; s call _strle...
_BYTE * func0(long long a1, int a2) { int i; // [rsp+18h] [rbp-8h] for ( i = 0; i < a2; ++i ) res_1[i] = *(_BYTE *)((int)strlen(*(const char **)(8LL * i + a1)) - 1LL + *(_QWORD *)(8LL * i + a1)); res_1[a2] = 0; return res_1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101221 LAB_001011c5: MOV EAX,dword ptr [RBP + -0x8] CDQE LEA RDX,[RAX*0x8] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV RAX,qword ptr [RAX] MOV RDI,RAX CALL 0x001010...
int1 * func0(long param_1,int param_2) { size_t sVar1; int local_10; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { sVar1 = strlen(*(char **)(param_1 + (long)local_10 * 8)); res_1[local_10] = *(int *)(*(long *)(param_1 + (long)local_10 * 8) + (long)(int)sVar1 + -1); } r...
5,589
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char *func0(const char *test_tuple[], int size) { static char res[100]; for (int i = 0; i < size; i++) { int length = strlen(test_tuple[i]); res[i] = test_tuple[i][length - 1]; } res[size] = '\0'; // Null-terminating the string return res; }
int main() { const char *test_tuple1[] = {"Mers", "for", "Vers"}; const char *test_tuple2[] = {"Avenge", "for", "People"}; const char *test_tuple3[] = {"Gotta", "get", "go"}; assert(strcmp(func0(test_tuple1, 3), "srs") == 0); assert(strcmp(func0(test_tuple2, 3), "ere") == 0); assert(strc...
O1
c
func0: endbr64 test %esi,%esi jle 11ba <func0+0x51> mov %rdi,%rdx lea 0x2ec5(%rip),%r8 lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%r11 mov $0xffffffffffffffff,%r10 mov $0x0,%eax mov (%rdx),%r9 mov %r10,%rcx mov %r9,%rdi repnz scas %es:(%rdi),%al not %rcx sub $0x1,%rcx movslq %ecx,%rc...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov r14d, esi test esi, esi jle short loc_11F1 mov rbx, rdi lea rbp, res_1 lea eax, [rsi-1] lea r13, [rdi+rax*8+8] loc_11CE: mov r12, [rbx] mov rdi, r12 call _strlen cdqe movzx eax, byte ptr [r12+rax-1] mo...
_BYTE * func0(long long *a1, int a2) { long long *v2; // rbx _BYTE *v3; // rbp long long v4; // r12 _BYTE *result; // rax if ( a2 > 0 ) { v2 = a1; v3 = res_1; do { v4 = *v2; *v3++ = *(_BYTE *)(v4 + (int)strlen(*v2++) - 1); } while ( v2 != &a1[(unsigned int)(a2 - 1) + 1] ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R14D,ESI TEST ESI,ESI JLE 0x001011f1 MOV RBX,RDI LEA RBP,[0x104040] LEA EAX,[RSI + -0x1] LEA R13,[RDI + RAX*0x8 + 0x8] LAB_001011ce: MOV R12,qword ptr [RBX] MOV RDI,R12 CALL 0x00101080 CDQE MOVZX EAX,byte ptr [R12 + RAX*0x1 + -0x1] MOV byte ptr [RBP],AL AD...
void func0(int8 *param_1,int param_2) { int8 *puVar1; char *__s; size_t sVar2; char *pcVar3; if (0 < param_2) { pcVar3 = &res_1; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { __s = (char *)*param_1; sVar2 = strlen(__s); *pcVar3 = __s[(long)(int)sVar2 + -1]; param_1 ...
5,590
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char *func0(const char *test_tuple[], int size) { static char res[100]; for (int i = 0; i < size; i++) { int length = strlen(test_tuple[i]); res[i] = test_tuple[i][length - 1]; } res[size] = '\0'; // Null-terminating the string return res; }
int main() { const char *test_tuple1[] = {"Mers", "for", "Vers"}; const char *test_tuple2[] = {"Avenge", "for", "People"}; const char *test_tuple3[] = {"Gotta", "get", "go"}; assert(strcmp(func0(test_tuple1, 3), "srs") == 0); assert(strcmp(func0(test_tuple2, 3), "ere") == 0); assert(strc...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 lea 0x2d1d(%rip),%r12 push %rbp movslq %esi,%rbp push %rbx sub $0x8,%rsp test %ebp,%ebp jle 1364 <func0+0x54> lea -0x1(%rbp),%eax mov %rdi,%rbx mov %r12,%r14 lea 0x8(%rdi,%rax,8),%r13 xchg %ax,%ax mov (%rbx),%r15 add $0x8,...
func0: endbr64 push r15 push r14 push r13 push r12 lea r12, res_1 push rbp movsxd rbp, esi push rbx sub rsp, 8 test ebp, ebp jle short loc_1364 lea eax, [rbp-1] mov rbx, rdi mov r14, r12 lea r13, [rdi+rax*8+8] xchg ax, ax loc_1340: mov r15, [rbx] add rbx, 8 a...
_BYTE * func0(long long *a1, int a2) { long long *v2; // rbx _BYTE *v3; // r14 long long v4; // r15 if ( a2 > 0 ) { v2 = a1; v3 = res_1; do { v4 = *v2++; *v3++ = *(_BYTE *)(v4 + (int)strlen(v4) - 1); } while ( v2 != &a1[(unsigned int)(a2 - 1) + 1] ); } res_1[a2] = 0; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 LEA R12,[0x104040] PUSH RBP MOVSXD RBP,ESI PUSH RBX SUB RSP,0x8 TEST EBP,EBP JLE 0x00101364 LEA EAX,[RBP + -0x1] MOV RBX,RDI MOV R14,R12 LEA R13,[RDI + RAX*0x8 + 0x8] NOP LAB_00101340: MOV R15,qword ptr [RBX] ADD RBX,0x8 ADD R14,0x1 MOV RDI,R15 CALL 0x00101080 CDQE MOV...
int1 * func0(int8 *param_1,int param_2) { int8 *puVar1; char *__s; size_t sVar2; char *pcVar3; if (0 < param_2) { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; pcVar3 = &res_1; do { __s = (char *)*param_1; param_1 = param_1 + 1; sVar2 = strlen(__s); *pcVar3 = __s[(long)(...
5,591
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char *func0(const char *test_tuple[], int size) { static char res[100]; for (int i = 0; i < size; i++) { int length = strlen(test_tuple[i]); res[i] = test_tuple[i][length - 1]; } res[size] = '\0'; // Null-terminating the string return res; }
int main() { const char *test_tuple1[] = {"Mers", "for", "Vers"}; const char *test_tuple2[] = {"Avenge", "for", "People"}; const char *test_tuple3[] = {"Gotta", "get", "go"}; assert(strcmp(func0(test_tuple1, 3), "srs") == 0); assert(strcmp(func0(test_tuple2, 3), "ere") == 0); assert(strc...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 lea 0x2d0d(%rip),%r12 push %rbp movslq %esi,%rbp push %rbx sub $0x8,%rsp test %ebp,%ebp jle 1374 <func0+0x54> lea -0x1(%rbp),%eax mov %rdi,%rbx mov %r12,%r14 lea 0x8(%rdi,%rax,8),%r13 xchg %ax,%ax mov (%rbx),%r15 add $0x8,...
func0: endbr64 push r15 push r14 push r13 lea r13, res_1 push r12 movsxd r12, esi push rbp push rbx sub rsp, 8 test esi, esi jle short loc_137C lea r13, res_1 movsxd r12, esi mov rbx, rdi mov r14, r13 lea rbp, [rdi+r12*8] nop dword ptr [rax+00h] loc_1358: mov r...
_BYTE * func0(const char **a1, int a2) { long long v2; // r12 const char **v3; // rbx _BYTE *v4; // r14 const char *v5; // r15 v2 = a2; if ( a2 > 0 ) { v2 = a2; v3 = a1; v4 = res_1; do { v5 = *v3++; *v4++ = v5[(int)strlen(v5) - 1]; } while ( &a1[a2] != v3 ); } ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 LEA R13,[0x104040] PUSH R12 MOVSXD R12,ESI PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x0010137c LEA R13,[0x104040] MOVSXD R12,ESI MOV RBX,RDI MOV R14,R13 LEA RBP,[RDI + R12*0x8] NOP dword ptr [RAX] LAB_00101358: MOV R15,qword ptr [RBX] ADD RBX,0x8 ADD R14,0x1 MOV RDI,R15 C...
int1 * func0(int8 *param_1,int param_2) { int8 *puVar1; char *__s; size_t sVar2; char *pcVar3; if (0 < param_2) { puVar1 = param_1 + param_2; pcVar3 = &res_1; do { __s = (char *)*param_1; param_1 = param_1 + 1; sVar2 = strlen(__s); *pcVar3 = __s[(long)(int)sVar2 + -1]; ...
5,592
func0
#include <stdio.h> #include <assert.h>
int func0(char list1[][3][2], int list_length, char x) { int ctr = 0; for (int i = 0; i < list_length; i++) { for (int j = 0; j < 3; j++) { if (list1[i][j][0] == x) { ctr++; break; } } } return ctr; }
int main() { char list1[4][3][2] = {{{'1', '\0'}, {'3', '\0'}}, {{'5', '\0'}, {'7', '\0'}}, {{'1', '\0'}, {'1', '1'}}, {{'1', '\0'}, {'1', '5'}, {'7', '\0'}}}; char list2[4][3][2] = {{{'A', '\0'}, {'B', '\0'}}, {{'A', '\0'}, {'C', '\0'}}, {{'A', '\0'}, {'D', '\0'}, {'E', '\0'}}, {{'B', '\0'}, {'C', '\0'}, {'D...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,%eax mov %al,-0x20(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11d4 <func0+0x6b> movl $0x0,-0x4(%rbp) jmp 11ca <func0+0x61> mov -0x8(%rbp),%eax movslq %eax,%rdx mov %rdx,%rax add %rax,...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov eax, edx mov [rbp+var_20], al mov [rbp+var_C], 0 mov [rbp+var_8], 0 jmp short loc_11D4 loc_118D: mov [rbp+var_4], 0 jmp short loc_11CA loc_1196: mov eax, [rbp+var_8] movsxd rdx, eax mov ...
long long func0(long long a1, int a2, char a3) { unsigned int v4; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] int j; // [rsp+1Ch] [rbp-4h] v4 = 0; for ( i = 0; i < a2; ++i ) { for ( j = 0; j <= 2; ++j ) { if ( a3 == *(_BYTE *)(a1 + 6LL * i + 2LL * j) ) { ++v4; br...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV EAX,EDX MOV byte ptr [RBP + -0x20],AL MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011d4 LAB_0010118d: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ca LAB_00101196: MOV EAX,dword ptr [RBP + -0...
int func0(long param_1,int param_2,char param_3) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_10 = 0; do { if (param_2 <= local_10) { return local_14; } for (local_c = 0; local_c < 3; local_c = local_c + 1) { if (param_3 == *(char *)((long)local_10 * 6 + para...
5,593
func0
#include <stdio.h> #include <assert.h>
int func0(char list1[][3][2], int list_length, char x) { int ctr = 0; for (int i = 0; i < list_length; i++) { for (int j = 0; j < 3; j++) { if (list1[i][j][0] == x) { ctr++; break; } } } return ctr; }
int main() { char list1[4][3][2] = {{{'1', '\0'}, {'3', '\0'}}, {{'5', '\0'}, {'7', '\0'}}, {{'1', '\0'}, {'1', '1'}}, {{'1', '\0'}, {'1', '5'}, {'7', '\0'}}}; char list2[4][3][2] = {{{'A', '\0'}, {'B', '\0'}}, {{'A', '\0'}, {'C', '\0'}}, {{'A', '\0'}, {'D', '\0'}, {'E', '\0'}}, {{'B', '\0'}, {'C', '\0'}, {'D...
O1
c
func0: endbr64 test %esi,%esi jle 11a6 <func0+0x3d> mov %rdi,%rax lea -0x1(%rsi),%ecx lea (%rcx,%rcx,2),%rcx lea 0x6(%rdi,%rcx,2),%rsi mov $0x0,%edi jmp 1193 <func0+0x2a> add $0x1,%edi add $0x6,%rax cmp %rsi,%rax je 11ab <func0+0x42> mov %rax,%rcx cmp (%rax),%dl je 1187 <fu...
func0: endbr64 test esi, esi jle short loc_11A6 mov rax, rdi lea ecx, [rsi-1] lea rcx, [rcx+rcx*2] lea rsi, [rdi+rcx*2+6] mov edi, 0 jmp short loc_1193 loc_1187: add edi, 1 loc_118A: add rax, 6 cmp rax, rsi jz short loc_11AB loc_1193: mov rcx, rax cmp dl, [rax] jz...
long long func0(_BYTE *a1, int a2, char a3) { _BYTE *v3; // rax long long v4; // rsi unsigned int v5; // edi if ( a2 <= 0 ) { return 0; } else { v3 = a1; v4 = (long long)&a1[6 * (a2 - 1) + 6]; v5 = 0; do { if ( a3 == *v3 || a3 == v3[2] || v3[4] == a3 ) ++v5; ...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a6 MOV RAX,RDI LEA ECX,[RSI + -0x1] LEA RCX,[RCX + RCX*0x2] LEA RSI,[RDI + RCX*0x2 + 0x6] MOV EDI,0x0 JMP 0x00101193 LAB_00101187: ADD EDI,0x1 LAB_0010118a: ADD RAX,0x6 CMP RAX,RSI JZ 0x001011ab LAB_00101193: MOV RCX,RAX CMP DL,byte ptr [RAX] JZ 0x00101187 CMP DL,byte ptr [RAX + ...
int func0(char *param_1,int param_2,char param_3) { char *pcVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { pcVar1 = param_1 + (ulong)(param_2 - 1) * 6 + 6; iVar2 = 0; do { if (((param_3 == *param_1) || (param_3 == param_1[2])) || (param_1[4] == param_3)) { iVar2 = iV...
5,594
func0
#include <stdio.h> #include <assert.h>
int func0(char list1[][3][2], int list_length, char x) { int ctr = 0; for (int i = 0; i < list_length; i++) { for (int j = 0; j < 3; j++) { if (list1[i][j][0] == x) { ctr++; break; } } } return ctr; }
int main() { char list1[4][3][2] = {{{'1', '\0'}, {'3', '\0'}}, {{'5', '\0'}, {'7', '\0'}}, {{'1', '\0'}, {'1', '1'}}, {{'1', '\0'}, {'1', '5'}, {'7', '\0'}}}; char list2[4][3][2] = {{{'A', '\0'}, {'B', '\0'}}, {{'A', '\0'}, {'C', '\0'}}, {{'A', '\0'}, {'D', '\0'}, {'E', '\0'}}, {{'B', '\0'}, {'C', '\0'}, {'D...
O2
c
func0: endbr64 test %esi,%esi jle 1386 <func0+0x46> lea -0x1(%rsi),%eax xor %r8d,%r8d lea (%rax,%rax,2),%rax lea 0x6(%rdi,%rax,2),%rax nopw 0x0(%rax,%rax,1) cmp (%rdi),%dl je 1380 <func0+0x40> cmp 0x2(%rdi),%dl je 1380 <func0+0x40> cmp %dl,0x4(%rdi) je 1380 <func0+0x40> add $0...
func0: endbr64 test esi, esi jle short loc_1306 lea eax, [rsi-1] xor r8d, r8d lea rax, [rax+rax*2] lea rax, [rdi+rax*2+6] nop word ptr [rax+rax+00000000h] loc_12E0: cmp dl, [rdi] jz short loc_1300 cmp dl, [rdi+2] jz short loc_1300 cmp [rdi+4], dl jz short loc_1300 l...
long long func0(_BYTE *a1, int a2, char a3) { unsigned int v3; // r8d long long v4; // rax if ( a2 <= 0 ) return 0LL; v3 = 0; v4 = (long long)&a1[6 * (a2 - 1) + 6]; do { if ( a3 == *a1 || a3 == a1[2] || a1[4] == a3 ) ++v3; a1 += 6; } while ( a1 != (_BYTE *)v4 ); return v3; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101306 LEA EAX,[RSI + -0x1] XOR R8D,R8D LEA RAX,[RAX + RAX*0x2] LEA RAX,[RDI + RAX*0x2 + 0x6] NOP word ptr [RAX + RAX*0x1] LAB_001012e0: CMP DL,byte ptr [RDI] JZ 0x00101300 CMP DL,byte ptr [RDI + 0x2] JZ 0x00101300 CMP byte ptr [RDI + 0x4],DL JZ 0x00101300 LAB_001012ee: ADD RDI,0x6 C...
int func0(char *param_1,int param_2,char param_3) { char *pcVar1; int iVar2; if (0 < param_2) { iVar2 = 0; pcVar1 = param_1 + (ulong)(param_2 - 1) * 6 + 6; do { if (((param_3 == *param_1) || (param_3 == param_1[2])) || (param_1[4] == param_3)) { iVar2 = iVar2 + 1; } param...
5,595
func0
#include <stdio.h> #include <assert.h>
int func0(char list1[][3][2], int list_length, char x) { int ctr = 0; for (int i = 0; i < list_length; i++) { for (int j = 0; j < 3; j++) { if (list1[i][j][0] == x) { ctr++; break; } } } return ctr; }
int main() { char list1[4][3][2] = {{{'1', '\0'}, {'3', '\0'}}, {{'5', '\0'}, {'7', '\0'}}, {{'1', '\0'}, {'1', '1'}}, {{'1', '\0'}, {'1', '5'}, {'7', '\0'}}}; char list2[4][3][2] = {{{'A', '\0'}, {'B', '\0'}}, {{'A', '\0'}, {'C', '\0'}}, {{'A', '\0'}, {'D', '\0'}, {'E', '\0'}}, {{'B', '\0'}, {'C', '\0'}, {'D...
O3
c
func0: endbr64 test %esi,%esi jle 1476 <func0+0x46> lea -0x1(%rsi),%eax xor %r8d,%r8d lea (%rax,%rax,2),%rax lea 0x6(%rdi,%rax,2),%rax nopw 0x0(%rax,%rax,1) cmp (%rdi),%dl je 1470 <func0+0x40> cmp 0x2(%rdi),%dl je 1470 <func0+0x40> cmp 0x4(%rdi),%dl je 1470 <func0+0x40> add $0...
func0: endbr64 test esi, esi jle short loc_117D movsxd rsi, esi xor ecx, ecx lea rax, [rsi+rsi*2] lea rax, [rdi+rax*2] nop dword ptr [rax] loc_1158: cmp dl, [rdi] jz short loc_1178 cmp dl, [rdi+2] jz short loc_1178 cmp dl, [rdi+4] jz short loc_1178 loc_1166: add rd...
long long func0(_BYTE *a1, int a2, char a3) { unsigned int v3; // ecx _BYTE *v4; // rax if ( a2 <= 0 ) return 0LL; v3 = 0; v4 = &a1[6 * a2]; do { if ( a3 == *a1 || a3 == a1[2] || a3 == a1[4] ) ++v3; a1 += 6; } while ( v4 != a1 ); return v3; }
func0: ENDBR64 TEST ESI,ESI JLE 0x0010117d MOVSXD RSI,ESI XOR ECX,ECX LEA RAX,[RSI + RSI*0x2] LEA RAX,[RDI + RAX*0x2] NOP dword ptr [RAX] LAB_00101158: CMP DL,byte ptr [RDI] JZ 0x00101178 CMP DL,byte ptr [RDI + 0x2] JZ 0x00101178 CMP DL,byte ptr [RDI + 0x4] JZ 0x00101178 LAB_00101166: ADD RDI,0x6 CMP RAX,RDI JNZ 0x0010...
int func0(char *param_1,int param_2,char param_3) { char *pcVar1; int iVar2; if (0 < param_2) { iVar2 = 0; pcVar1 = param_1 + (long)param_2 * 6; do { if (((param_3 == *param_1) || (param_3 == param_1[2])) || (param_3 == param_1[4])) { iVar2 = iVar2 + 1; } param_1 = param_...
5,596
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int *odd_size) { static int odd_nums[100]; int j = 0; for (int i = 0; i < size; i++) { if (nums[i] % 2 != 0) { odd_nums[j] = nums[i]; j++; } } *odd_size = j; return odd_nums; }
int main() { int odd_size; int array1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int result1[] = {1, 3, 5, 7, 9}; int* filtered1 = func0(array1, 10, &odd_size); assert(odd_size == 5); for (int i = 0; i < odd_size; i++) { assert(filtered1[i] == result1[i]); } int ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11df <func0+0x76> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax and $0x1,%eax tes...
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_8], 0 mov [rbp+var_4], 0 jmp short loc_11DF loc_118C: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] an...
_DWORD * func0(long long a1, int a2, _DWORD *a3) { int v4; // [rsp+20h] [rbp-8h] int i; // [rsp+24h] [rbp-4h] v4 = 0; for ( i = 0; i < a2; ++i ) { if ( (*(_DWORD *)(4LL * i + a1) & 1) != 0 ) odd_nums_1[v4++] = *(_DWORD *)(4LL * i + a1); } *a3 = v4; return odd_nums_1; }
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 + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011df LAB_0010118c: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX...
int1 * func0(long param_1,int param_2,int *param_3) { int local_10; int 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) { *(int4 *)(odd_nums_1 + (long)local_10 * 4) = *(int4 *)(param_1 + (long)lo...
5,597
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int *odd_size) { static int odd_nums[100]; int j = 0; for (int i = 0; i < size; i++) { if (nums[i] % 2 != 0) { odd_nums[j] = nums[i]; j++; } } *odd_size = j; return odd_nums; }
int main() { int odd_size; int array1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int result1[] = {1, 3, 5, 7, 9}; int* filtered1 = func0(array1, 10, &odd_size); assert(odd_size == 5); for (int i = 0; i < odd_size; i++) { assert(filtered1[i] == result1[i]); } int ...
O1
c
func0: endbr64 test %esi,%esi jle 11a6 <func0+0x3d> mov %rdi,%rax lea -0x1(%rsi),%ecx lea 0x4(%rdi,%rcx,4),%rdi mov $0x0,%esi lea 0x2eb8(%rip),%r9 jmp 1193 <func0+0x2a> add $0x4,%rax cmp %rdi,%rax je 11ab <func0+0x42> mov (%rax),%ecx test $0x1,%cl je 118a <func0+0x21> movslq %e...
func0: endbr64 test esi, esi jle short loc_11A6 mov rax, rdi lea ecx, [rsi-1] lea rdi, [rdi+rcx*4+4] mov esi, 0 lea r9, odd_nums_1 jmp short loc_1193 loc_118A: add rax, 4 cmp rax, rdi jz short loc_11AB loc_1193: mov ecx, [rax] test cl, 1 jz short loc_118A movsxd ...
_DWORD * func0(_DWORD *a1, int a2, _DWORD *a3) { _DWORD *v3; // rax long long v4; // rdi int v5; // esi if ( a2 <= 0 ) { v5 = 0; } else { v3 = a1; v4 = (long long)&a1[a2 - 1 + 1]; v5 = 0; do { if ( (*v3 & 1) != 0 ) odd_nums_1[v5++] = *v3; ++v3; } whil...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a6 MOV RAX,RDI LEA ECX,[RSI + -0x1] LEA RDI,[RDI + RCX*0x4 + 0x4] MOV ESI,0x0 LEA R9,[0x104040] JMP 0x00101193 LAB_0010118a: ADD RAX,0x4 CMP RAX,RDI JZ 0x001011ab LAB_00101193: MOV ECX,dword ptr [RAX] TEST CL,0x1 JZ 0x0010118a MOVSXD R8,ESI MOV dword ptr [R9 + R8*0x4],ECX ADD ESI...
int4 * func0(uint *param_1,int param_2,int *param_3) { uint *puVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { if ((*param_1 & 1) != 0) { (&odd_nums_1)[iVar2] = *param_1; iVar2 = iVar2 + 1; } ...
5,598
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int *odd_size) { static int odd_nums[100]; int j = 0; for (int i = 0; i < size; i++) { if (nums[i] % 2 != 0) { odd_nums[j] = nums[i]; j++; } } *odd_size = j; return odd_nums; }
int main() { int odd_size; int array1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int result1[] = {1, 3, 5, 7, 9}; int* filtered1 = func0(array1, 10, &odd_size); assert(odd_size == 5); for (int i = 0; i < odd_size; i++) { assert(filtered1[i] == result1[i]); } int ...
O2
c
func0: endbr64 test %esi,%esi jle 14b8 <func0+0x48> lea -0x1(%rsi),%eax xor %ecx,%ecx lea 0x2bbc(%rip),%r9 lea 0x4(%rdi,%rax,4),%rsi nopl 0x0(%rax) mov (%rdi),%eax test $0x1,%al je 14a0 <func0+0x30> movslq %ecx,%r8 add $0x1,%ecx mov %eax,(%r9,%r8,4) add $0x4,%rdi cmp %rsi,%rdi jn...
func0: endbr64 test esi, esi jle short loc_1460 lea eax, [rsi-1] xor ecx, ecx lea r9, odd_nums_1 lea rsi, [rdi+rax*4+4] nop dword ptr [rax+00000000h] loc_1440: mov eax, [rdi] test al, 1 jz short loc_1450 movsxd r8, ecx add ecx, 1 mov [r9+r8*4], eax loc_1450: add rdi, ...
_DWORD * func0(_DWORD *a1, int a2, _DWORD *a3) { int v3; // ecx long long v4; // rsi long long v5; // r8 if ( a2 <= 0 ) { *a3 = 0; return odd_nums_1; } else { v3 = 0; v4 = (long long)&a1[a2 - 1 + 1]; do { if ( (*a1 & 1) != 0 ) { v5 = v3++; odd_nums_1[...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101460 LEA EAX,[RSI + -0x1] XOR ECX,ECX LEA R9,[0x104040] LEA RSI,[RDI + RAX*0x4 + 0x4] NOP dword ptr [RAX] LAB_00101440: MOV EAX,dword ptr [RDI] TEST AL,0x1 JZ 0x00101450 MOVSXD R8,ECX ADD ECX,0x1 MOV dword ptr [R9 + R8*0x4],EAX LAB_00101450: ADD RDI,0x4 CMP RDI,RSI JNZ 0x00101440 M...
int4 * func0(uint *param_1,int param_2,int *param_3) { uint *puVar1; int iVar2; long lVar3; if (0 < param_2) { iVar2 = 0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if ((*param_1 & 1) != 0) { lVar3 = (long)iVar2; iVar2 = iVar2 + 1; (&odd_nums_1)[lVar3] = *par...
5,599
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int *odd_size) { static int odd_nums[100]; int j = 0; for (int i = 0; i < size; i++) { if (nums[i] % 2 != 0) { odd_nums[j] = nums[i]; j++; } } *odd_size = j; return odd_nums; }
int main() { int odd_size; int array1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int result1[] = {1, 3, 5, 7, 9}; int* filtered1 = func0(array1, 10, &odd_size); assert(odd_size == 5); for (int i = 0; i < odd_size; i++) { assert(filtered1[i] == result1[i]); } int ...
O3
c
func0: endbr64 test %esi,%esi jle 1508 <func0+0x48> lea -0x1(%rsi),%eax xor %ecx,%ecx lea 0x2b6c(%rip),%r9 lea 0x4(%rdi,%rax,4),%rsi nopl 0x0(%rax) mov (%rdi),%eax test $0x1,%al je 14f0 <func0+0x30> movslq %ecx,%r8 add $0x1,%ecx mov %eax,(%r9,%r8,4) add $0x4,%rdi cmp %rsi,%rdi jn...
func0: endbr64 test esi, esi jle short loc_1190 movsxd rsi, esi xor ecx, ecx lea r9, odd_nums_1 lea rsi, [rdi+rsi*4] nop dword ptr [rax+rax+00000000h] loc_1170: mov eax, [rdi] test al, 1 jz short loc_1180 movsxd r8, ecx add ecx, 1 mov [r9+r8*4], eax loc_1180: add rdi, 4 ...
__int128 * func0(_DWORD *a1, int a2, _DWORD *a3) { int v3; // ecx _DWORD *v4; // rsi long long v5; // r8 if ( a2 <= 0 ) { *a3 = 0; return &odd_nums_1; } else { v3 = 0; v4 = &a1[a2]; do { if ( (*a1 & 1) != 0 ) { v5 = v3++; *((_DWORD *)&odd_nums_1 + v5)...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101190 MOVSXD RSI,ESI XOR ECX,ECX LEA R9,[0x104040] LEA RSI,[RDI + RSI*0x4] NOP dword ptr [RAX + RAX*0x1] LAB_00101170: MOV EAX,dword ptr [RDI] TEST AL,0x1 JZ 0x00101180 MOVSXD R8,ECX ADD ECX,0x1 MOV dword ptr [R9 + R8*0x4],EAX LAB_00101180: ADD RDI,0x4 CMP RDI,RSI JNZ 0x00101170 MOV...
int4 * func0(uint *param_1,int param_2,int *param_3) { uint *puVar1; int iVar2; long lVar3; if (0 < param_2) { iVar2 = 0; puVar1 = param_1 + param_2; do { if ((*param_1 & 1) != 0) { lVar3 = (long)iVar2; iVar2 = iVar2 + 1; (&odd_nums_1)[lVar3] = *param_1; } ...
5,600
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* dt) { static char new_date[11]; int year, month, day; sscanf(dt, "%4d-%2d-%2d", &year, &month, &day); sprintf(new_date, "%02d-%02d-%4d", day, month, year); return new_date; }
int main() { assert(strcmp(func0("2026-01-02"), "02-01-2026") == 0); assert(strcmp(func0("2020-11-13"), "13-11-2020") == 0); assert(strcmp(func0("2021-04-26"), "26-04-2021") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0xc(%rbp),%rsi lea -0x10(%rbp),%rcx lea -0x14(%rbp),%rdx mov -0x28(%rbp),%rax mov %rsi,%r8 lea 0xe06(%rip),%rsi mov %rax,%rdi mov $0x0,%eax call...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rsi, [rbp+var_C] lea rcx, [rbp+var_10] lea rdx, [rbp+var_14] mov rax, [rbp+var_28] mov r8, rsi lea rsi, a4d2d2d; "%4d-%2d-%2d" mov rdi, rax...
char * func0(long long a1) { int v2; // [rsp+1Ch] [rbp-14h] BYREF int v3; // [rsp+20h] [rbp-10h] BYREF int v4; // [rsp+24h] [rbp-Ch] BYREF unsigned long long v5; // [rsp+28h] [rbp-8h] v5 = __readfsqword(0x28u); __isoc99_sscanf(a1, "%4d-%2d-%2d", &v2, &v3, &v4); sprintf(new_date_1, "%02d-%02d-%4d", v4, v3...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RSI,[RBP + -0xc] LEA RCX,[RBP + -0x10] LEA RDX,[RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV R8,RSI LEA RSI,[0x102008] MOV RDI,RAX MOV EAX,0x0 CALL 0x001010c0 M...
int1 * func0(int8 param_1) { long in_FS_OFFSET; uint local_1c; uint local_18; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __isoc99_sscanf(param_1,"%4d-%2d-%2d",&local_1c,&local_18,&local_14); sprintf(new_date_1,"%02d-%02d-%4d",(ulong)local_14,(ulong)local_18,(ulong)local...
5,601
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* dt) { static char new_date[11]; int year, month, day; sscanf(dt, "%4d-%2d-%2d", &year, &month, &day); sprintf(new_date, "%02d-%02d-%4d", day, month, year); return new_date; }
int main() { assert(strcmp(func0("2026-01-02"), "02-01-2026") == 0); assert(strcmp(func0("2020-11-13"), "13-11-2020") == 0); assert(strcmp(func0("2021-04-26"), "26-04-2021") == 0); return 0; }
O1
c
func0: endbr64 push %rbx sub $0x20,%rsp mov $0x28,%ebx mov %fs:(%rbx),%rax mov %rax,0x18(%rsp) xor %eax,%eax lea 0x10(%rsp),%rcx lea 0xc(%rsp),%rdx lea 0x14(%rsp),%r8 lea 0xe2c(%rip),%rsi callq 10a0 <__isoc99_sscanf@plt> sub $0x8,%rsp mov 0x14(%rsp),%eax push %rax mov 0x20(%rsp)...
func0: endbr64 push rbx sub rsp, 20h mov rax, fs:28h mov [rsp+28h+var_10], rax xor eax, eax lea rcx, [rsp+28h+var_18] lea rdx, [rsp+28h+var_1C] lea r8, [rsp+28h+var_14] lea rsi, a4d2d2d; "%4d-%2d-%2d" call ___isoc99_sscanf sub rsp, 8 mov eax, [rsp+30h+var_1C] push rax mo...
void * func0(long long a1) { int v2; // [rsp+Ch] [rbp-1Ch] BYREF int v3; // [rsp+10h] [rbp-18h] BYREF int v4; // [rsp+14h] [rbp-14h] BYREF unsigned long long v5; // [rsp+18h] [rbp-10h] v5 = __readfsqword(0x28u); __isoc99_sscanf(a1, "%4d-%2d-%2d", &v2, &v3, &v4); __sprintf_chk(&new_date_1, 1LL, 11LL, "%02...
func0: ENDBR64 PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX LEA RCX,[RSP + 0x10] LEA RDX,[RSP + 0xc] LEA R8,[RSP + 0x14] LEA RSI,[0x102004] CALL 0x001010c0 SUB RSP,0x8 MOV EAX,dword ptr [RSP + 0x14] PUSH RAX MOV R9D,dword ptr [RSP + 0x20] MOV R8D,dword ptr [RSP + 0x24] LE...
int1 * func0(int8 param_1) { long in_FS_OFFSET; int4 local_1c; int4 local_18; int4 local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __isoc99_sscanf(param_1,"%4d-%2d-%2d",&local_1c,&local_18,&local_14); __sprintf_chk(new_date_1,1,0xb,"%02d-%02d-%4d",local_14,local_18,local_1c); i...
5,602
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* dt) { static char new_date[11]; int year, month, day; sscanf(dt, "%4d-%2d-%2d", &year, &month, &day); sprintf(new_date, "%02d-%02d-%4d", day, month, year); return new_date; }
int main() { assert(strcmp(func0("2026-01-02"), "02-01-2026") == 0); assert(strcmp(func0("2020-11-13"), "13-11-2020") == 0); assert(strcmp(func0("2021-04-26"), "26-04-2021") == 0); return 0; }
O2
c
func0: endbr64 sub $0x28,%rsp lea 0xd65(%rip),%rsi mov %fs:0x28,%rax mov %rax,0x18(%rsp) xor %eax,%eax lea 0x10(%rsp),%rcx lea 0xc(%rsp),%rdx lea 0x14(%rsp),%r8 callq 10a0 <__isoc99_sscanf@plt> sub $0x8,%rsp mov $0xb,%edx lea 0xd3d(%rip),%rcx mov 0x14(%rsp),%eax mov $0x1,%esi lea...
func0: endbr64 push r12 lea rsi, a4d2d2d; "%4d-%2d-%2d" lea r12, new_date_1 sub rsp, 20h mov rax, fs:28h mov [rsp+28h+var_10], rax xor eax, eax lea rcx, [rsp+28h+var_18] lea rdx, [rsp+28h+var_1C] lea r8, [rsp+28h+var_14] call ___isoc99_sscanf sub rsp, 8 mov edx, 0Bh mov...
void * func0(long long a1) { int v2; // [rsp+Ch] [rbp-1Ch] BYREF int v3; // [rsp+10h] [rbp-18h] BYREF int v4; // [rsp+14h] [rbp-14h] BYREF unsigned long long v5; // [rsp+18h] [rbp-10h] v5 = __readfsqword(0x28u); __isoc99_sscanf(a1, "%4d-%2d-%2d", &v2, &v3, &v4); __sprintf_chk(&new_date_1, 1LL, 11LL, "%02...
func0: ENDBR64 PUSH R12 LEA RSI,[0x102004] LEA R12,[0x104018] SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX LEA RCX,[RSP + 0x10] LEA RDX,[RSP + 0xc] LEA R8,[RSP + 0x14] CALL 0x001010c0 SUB RSP,0x8 MOV EDX,0xb MOV RDI,R12 MOV EAX,dword ptr [RSP + 0x14] LEA RCX,[0x102010] MOV ESI,0x1...
int1 * func0(int8 param_1) { long in_FS_OFFSET; int4 local_1c; int4 local_18; int4 local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __isoc99_sscanf(param_1,"%4d-%2d-%2d",&local_1c,&local_18,&local_14); __sprintf_chk(new_date_1,1,0xb,"%02d-%02d-%4d",local_14,local_18,local_1c); i...
5,603
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* dt) { static char new_date[11]; int year, month, day; sscanf(dt, "%4d-%2d-%2d", &year, &month, &day); sprintf(new_date, "%02d-%02d-%4d", day, month, year); return new_date; }
int main() { assert(strcmp(func0("2026-01-02"), "02-01-2026") == 0); assert(strcmp(func0("2020-11-13"), "13-11-2020") == 0); assert(strcmp(func0("2021-04-26"), "26-04-2021") == 0); return 0; }
O3
c
func0: endbr64 sub $0x28,%rsp lea 0xd65(%rip),%rsi mov %fs:0x28,%rax mov %rax,0x18(%rsp) xor %eax,%eax lea 0x10(%rsp),%rcx lea 0xc(%rsp),%rdx lea 0x14(%rsp),%r8 callq 10a0 <__isoc99_sscanf@plt> sub $0x8,%rsp mov $0xb,%edx lea 0xd3d(%rip),%rcx mov 0x14(%rsp),%eax mov $0x1,%esi lea...
func0: endbr64 push rbx lea rsi, a4d2d2d; "%4d-%2d-%2d" lea rbx, new_date_1 sub rsp, 20h mov rax, fs:28h mov [rsp+28h+var_10], rax xor eax, eax lea rcx, [rsp+28h+var_18] lea rdx, [rsp+28h+var_1C] lea r8, [rsp+28h+var_14] call ___isoc99_sscanf sub rsp, 8 mov edx, 0Bh mov...
void * func0(long long a1) { int v2; // [rsp+Ch] [rbp-1Ch] BYREF int v3; // [rsp+10h] [rbp-18h] BYREF int v4; // [rsp+14h] [rbp-14h] BYREF unsigned long long v5; // [rsp+18h] [rbp-10h] v5 = __readfsqword(0x28u); __isoc99_sscanf(a1, "%4d-%2d-%2d", &v2, &v3, &v4); __sprintf_chk(&new_date_1, 2LL, 11LL, "%02...
func0: ENDBR64 PUSH RBX LEA RSI,[0x102004] LEA RBX,[0x104018] SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX LEA RCX,[RSP + 0x10] LEA RDX,[RSP + 0xc] LEA R8,[RSP + 0x14] CALL 0x001010c0 SUB RSP,0x8 MOV EDX,0xb MOV RDI,RBX MOV EAX,dword ptr [RSP + 0x14] LEA RCX,[0x102010] MOV ESI,0x2...
int1 * func0(int8 param_1) { long in_FS_OFFSET; int4 local_1c; int4 local_18; int4 local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __isoc99_sscanf(param_1,"%4d-%2d-%2d",&local_1c,&local_18,&local_14); __sprintf_chk(new_date_1,2,0xb,"%02d-%02d-%4d",local_14,local_18,local_1c); i...
5,604
func0
#include <assert.h>
void func0(int my_list[], int length) { int gap = length / 2; while (gap > 0) { for (int i = gap; i < length; i++) { int current_item = my_list[i]; int j = i; while (j >= gap && my_list[j - gap] > current_item) { my_list[j] = my_list[j - gap]; ...
int main() { int list1[] = {12, 23, 4, 5, 3, 2, 12, 81, 56, 95}; int list2[] = {24, 22, 39, 34, 87, 73, 68}; int list3[] = {32, 30, 16, 96, 82, 83, 74}; func0(list1, 10); func0(list2, 7); func0(list3, 7); int sorted1[] = {2, 3, 4, 5, 12, 12, 23, 56, 81, 95}; int sorted2[] = {...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov -0x1c(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax mov %eax,-0x10(%rbp) jmpq 124c <func0+0xe3> mov -0x10(%rbp),%eax mov %eax,-0xc(%rbp) jmpq 1231 <func0+0xc8> mov -0xc(%rbp),%...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov eax, [rbp+var_1C] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 mov [rbp+var_10], eax jmp loc_124C loc_118C: mov eax, [rbp+var_10] mov [rbp+var_C], eax jmp loc_1231 loc_1197: m...
long long func0(long long a1, int a2) { long long result; // rax int i; // [rsp+Ch] [rbp-10h] int j; // [rsp+10h] [rbp-Ch] int k; // [rsp+14h] [rbp-8h] int v6; // [rsp+18h] [rbp-4h] result = (unsigned int)(a2 / 2); for ( i = a2 / 2; i > 0; i /= 2 ) { for ( j = i; j < a2; ++j ) { v6 = *(_...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x0010124c LAB_0010118c: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX JMP 0x00101231 ...
void func0(long param_1,int param_2) { int iVar1; int4 local_18; int4 local_14; int4 local_10; for (local_18 = param_2 / 2; 0 < local_18; local_18 = local_18 / 2) { for (local_14 = local_18; local_14 < param_2; local_14 = local_14 + 1) { iVar1 = *(int *)(param_1 + (long)local_14 * 4); loca...
5,605
func0
#include <assert.h>
void func0(int my_list[], int length) { int gap = length / 2; while (gap > 0) { for (int i = gap; i < length; i++) { int current_item = my_list[i]; int j = i; while (j >= gap && my_list[j - gap] > current_item) { my_list[j] = my_list[j - gap]; ...
int main() { int list1[] = {12, 23, 4, 5, 3, 2, 12, 81, 56, 95}; int list2[] = {24, 22, 39, 34, 87, 73, 68}; int list3[] = {32, 30, 16, 96, 82, 83, 74}; func0(list1, 10); func0(list2, 7); func0(list3, 7); int sorted1[] = {2, 3, 4, 5, 12, 12, 23, 56, 81, 95}; int sorted2[] = {...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbx mov %esi,%ebp shr $0x1f,%esi add %ebp,%esi sar %esi cmp $0x1,%ebp jg 11d6 <func0+0x6d> pop %rbx pop %rbp pop %r12 retq movslq %edi,%rdi mov %r8d,(%rbx,%rdi,4) add $0x1,%r12d add $0x4,%r11 cmp %r12d,%ebp je 11...
func0: endbr64 push r12 push rbp push rbx mov rbx, rdi mov ebp, esi shr esi, 1Fh add esi, ebp sar esi, 1 cmp ebp, 1 jg short loc_11D6 loc_1182: pop rbx pop rbp pop r12 retn loc_1187: movsxd rdi, edi mov [rbx+rdi*4], r8d add r12d, 1 add r11, 4 cmp ebp, r...
void func0(long long a1, int a2) { int v4; // esi int v5; // r12d _DWORD *v6; // r11 int v7; // r8d _DWORD *v8; // rdx int v9; // eax int v10; // edi int v11; // ecx v4 = a2 / 2; if ( a2 > 1 ) { while ( 1 ) { if ( a2 > v4 ) { v6 = (_DWORD *)(a1 + 4LL * v4); v5...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV EBP,ESI SHR ESI,0x1f ADD ESI,EBP SAR ESI,0x1 CMP EBP,0x1 JG 0x001011d6 LAB_00101182: POP RBX POP RBP POP R12 RET LAB_00101187: MOVSXD RDI,EDI MOV dword ptr [RBX + RDI*0x4],R8D ADD R12D,0x1 ADD R11,0x4 CMP EBP,R12D JZ 0x001011c6 LAB_0010119b: MOV R8D,dword ptr [R...
void func0(long param_1,int param_2) { int iVar1; bool bVar2; int iVar3; int *piVar4; int iVar5; int *piVar6; int iVar7; iVar5 = param_2 / 2; if (1 < param_2) { do { if (iVar5 < param_2) { piVar6 = (int *)(param_1 + (long)iVar5 * 4); iVar7 = iVar5; do { ...
5,606
func0
#include <assert.h>
void func0(int my_list[], int length) { int gap = length / 2; while (gap > 0) { for (int i = gap; i < length; i++) { int current_item = my_list[i]; int j = i; while (j >= gap && my_list[j - gap] > current_item) { my_list[j] = my_list[j - gap]; ...
int main() { int list1[] = {12, 23, 4, 5, 3, 2, 12, 81, 56, 95}; int list2[] = {24, 22, 39, 34, 87, 73, 68}; int list3[] = {32, 30, 16, 96, 82, 83, 74}; func0(list1, 10); func0(list2, 7); func0(list3, 7); int sorted1[] = {2, 3, 4, 5, 12, 12, 23, 56, 81, 95}; int sorted2[] = {...
O2
c
func0: endbr64 mov %esi,%r8d shr $0x1f,%r8d add %esi,%r8d sar %r8d cmp $0x1,%esi jle 14f4 <func0+0xc4> push %r14 mov %esi,%r14d push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx nopl 0x0(%rax,%rax,1) cmp %r8d,%r14d jle 14cd <func0+0x9d> mov %r8d,%r9d movslq %r8d,%r12 mov...
func0: endbr64 mov r8d, esi shr r8d, 1Fh add r8d, esi sar r8d, 1 cmp esi, 1 jle locret_14ED push r14 push r13 mov r13d, esi push r12 mov r12, rdi push rbp push rbx nop dword ptr [rax+rax+00000000h] loc_1460: cmp r13d, r8d jle short loc_14C6 mov r9d, r8d mov...
void func0(long long a1, int a2) { int v2; // r8d int v3; // r14d long long v4; // rbp _DWORD *v5; // rbx long long v6; // r9 int v7; // r10d _DWORD *v8; // rcx int v9; // edx _DWORD *v10; // rax _DWORD *v11; // r11 v2 = a2 / 2; if ( a2 > 1 ) { do { if ( a2 > v2 ) { ...
func0: ENDBR64 MOV R8D,ESI SHR R8D,0x1f ADD R8D,ESI SAR R8D,0x1 CMP ESI,0x1 JLE 0x001014ed PUSH R14 PUSH R13 MOV R13D,ESI PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX NOP dword ptr [RAX + RAX*0x1] LAB_00101460: CMP R13D,R8D JLE 0x001014c6 MOV R9D,R8D MOVSXD RBP,R8D MOV R14D,R8D NEG R9D SHL RBP,0x2 MOVSXD R9,R9D LEA RBX,[R12 ...
void func0(long param_1,int param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int iVar5; int *piVar6; int iVar7; int iVar8; iVar7 = param_2 / 2; if (param_2 < 2) { return; } do { if (iVar7 < param_2) { piVar6 = (int *)(param_1 + (long)iVar7 * 4); iVar8 = iVar7;...
5,607
func0
#include <assert.h>
void func0(int my_list[], int length) { int gap = length / 2; while (gap > 0) { for (int i = gap; i < length; i++) { int current_item = my_list[i]; int j = i; while (j >= gap && my_list[j - gap] > current_item) { my_list[j] = my_list[j - gap]; ...
int main() { int list1[] = {12, 23, 4, 5, 3, 2, 12, 81, 56, 95}; int list2[] = {24, 22, 39, 34, 87, 73, 68}; int list3[] = {32, 30, 16, 96, 82, 83, 74}; func0(list1, 10); func0(list2, 7); func0(list3, 7); int sorted1[] = {2, 3, 4, 5, 12, 12, 23, 56, 81, 95}; int sorted2[] = {...
O3
c
func0: endbr64 mov %esi,%r8d shr $0x1f,%r8d add %esi,%r8d sar %r8d cmp $0x1,%esi jle 1514 <func0+0xc4> push %r14 mov %esi,%r14d push %r13 mov %rdi,%r13 push %r12 push %rbp push %rbx nopl 0x0(%rax,%rax,1) cmp %r8d,%r14d jle 14ed <func0+0x9d> mov %r8d,%r9d movslq %r8d,%r12 mov...
func0: endbr64 mov ecx, esi push r13 shr ecx, 1Fh push r12 mov r12d, esi add ecx, esi push rbp mov rbp, rdi push rbx sar ecx, 1 cmp esi, 1 jle short loc_13F7 xchg ax, ax loc_13A0: cmp r12d, ecx jle short loc_1413 movsxd r9, ecx mov r13d, ecx shl r9, 2 lea ...
void func0(long long a1, int a2) { int v3; // ecx int v4; // r13d long long v5; // r9 _DWORD *v6; // rbx int v7; // r10d _DWORD *v8; // rsi int v9; // edx _DWORD *v10; // rax _DWORD *v11; // r11 v3 = a2 / 2; if ( a2 > 1 ) { do { while ( a2 <= v3 ) v3 >>= 1; v4 = v3;...
func0: ENDBR64 MOV ECX,ESI PUSH R13 SHR ECX,0x1f PUSH R12 MOV R12D,ESI ADD ECX,ESI PUSH RBP MOV RBP,RDI PUSH RBX SAR ECX,0x1 CMP ESI,0x1 JLE 0x001013f7 NOP LAB_001013a0: CMP R12D,ECX JLE 0x00101413 MOVSXD R9,ECX MOV R13D,ECX SHL R9,0x2 LEA RBX,[RBP + R9*0x1] LAB_001013b4: MOV RAX,RBX MOV R10D,dword ptr [RBX] MOV RSI,RB...
void func0(long param_1,int param_2) { int iVar1; int *piVar2; int *piVar3; int iVar4; int iVar5; int iVar6; int *piVar7; int *piVar8; long lVar9; int iVar10; iVar5 = param_2 / 2; if (1 < param_2) { do { do { iVar4 = iVar5; iVar5 = iVar4 >> 1; } while (param_2...
5,608
func0
#include <assert.h> #include <stdio.h>
void func0(int test_tup1[], int test_tup2[], int res[], int size) { for (int i = 0; i < size; i++) { res[i] = test_tup1[i] & test_tup2[i]; } }
int main() { int res[4]; int test_tup1_1[4] = {10, 4, 6, 9}; int test_tup2_1[4] = {5, 2, 3, 3}; int expected_1[4] = {0, 0, 2, 1}; func0(test_tup1_1, test_tup2_1, res, 4); for (int i = 0; i < 4; i++) { assert(res[i] == expected_1[i]); } int test_tup1_2[4] = {1, 2,...
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 11d1 <func0+0x68> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%ecx 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_11D1 loc_1189: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov ecx, [rax]...
long long func0(long long a1, long long a2, long long a3, int a4) { long long result; // rax unsigned int i; // [rsp+28h] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a4 ) break; *(_DWORD *)(4LL * (int)i + a3) = *(_DWORD *)(4LL * (int)i + a1) & *(_DWORD *)(4LL * (int)i + a2); ...
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 0x001011d1 LAB_00101189: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RD...
void func0(long param_1,long param_2,long param_3,int param_4) { int4 local_c; for (local_c = 0; local_c < param_4; local_c = local_c + 1) { *(uint *)(param_3 + (long)local_c * 4) = *(uint *)(param_2 + (long)local_c * 4) & *(uint *)(param_1 + (long)local_c * 4); } return; }
5,609
func0
#include <assert.h> #include <stdio.h>
void func0(int test_tup1[], int test_tup2[], int res[], int size) { for (int i = 0; i < size; i++) { res[i] = test_tup1[i] & test_tup2[i]; } }
int main() { int res[4]; int test_tup1_1[4] = {10, 4, 6, 9}; int test_tup2_1[4] = {5, 2, 3, 3}; int expected_1[4] = {0, 0, 2, 1}; func0(test_tup1_1, test_tup2_1, res, 4); for (int i = 0; i < 4; i++) { assert(res[i] == expected_1[i]); } int test_tup1_2[4] = {1, 2,...
O1
c
func0: endbr64 test %ecx,%ecx jle 118f <func0+0x26> lea -0x1(%rcx),%r8d mov $0x0,%eax mov (%rdi,%rax,4),%ecx and (%rsi,%rax,4),%ecx mov %ecx,(%rdx,%rax,4) mov %rax,%rcx add $0x1,%rax cmp %r8,%rcx jne 117a <func0+0x11> retq
func0: endbr64 test ecx, ecx jle short locret_118D mov ecx, ecx mov eax, 0 loc_1178: mov r8d, [rdi+rax*4] and r8d, [rsi+rax*4] mov [rdx+rax*4], r8d add rax, 1 cmp rax, rcx jnz short loc_1178 locret_118D: retn
void func0(long long a1, long long a2, long long a3, int a4) { long long i; // rax if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) *(_DWORD *)(a3 + 4 * i) = *(_DWORD *)(a2 + 4 * i) & *(_DWORD *)(a1 + 4 * i); } }
func0: ENDBR64 TEST ECX,ECX JLE 0x0010118d MOV ECX,ECX MOV EAX,0x0 LAB_00101178: MOV R8D,dword ptr [RDI + RAX*0x4] AND R8D,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDX + RAX*0x4],R8D ADD RAX,0x1 CMP RAX,RCX JNZ 0x00101178 LAB_0010118d: RET
void func0(long param_1,long param_2,long param_3,uint param_4) { ulong uVar1; if (0 < (int)param_4) { uVar1 = 0; do { *(uint *)(param_3 + uVar1 * 4) = *(uint *)(param_1 + uVar1 * 4) & *(uint *)(param_2 + uVar1 * 4); uVar1 = uVar1 + 1; } while (uVar1 != param_4); } return;...
5,610
func0
#include <assert.h> #include <stdio.h>
void func0(int test_tup1[], int test_tup2[], int res[], int size) { for (int i = 0; i < size; i++) { res[i] = test_tup1[i] & test_tup2[i]; } }
int main() { int res[4]; int test_tup1_1[4] = {10, 4, 6, 9}; int test_tup2_1[4] = {5, 2, 3, 3}; int expected_1[4] = {0, 0, 2, 1}; func0(test_tup1_1, test_tup2_1, res, 4); for (int i = 0; i < 4; i++) { assert(res[i] == expected_1[i]); } int test_tup1_2[4] = {1, 2,...
O2
c
func0: endbr64 test %ecx,%ecx jle 1165 <func0+0x25> lea -0x1(%rcx),%r8d xor %eax,%eax xchg %ax,%ax mov (%rdi,%rax,4),%ecx and (%rsi,%rax,4),%ecx mov %ecx,(%rdx,%rax,4) mov %rax,%rcx add $0x1,%rax cmp %r8,%rcx jne 1150 <func0+0x10> retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 test ecx, ecx jle short locret_1425 movsxd rcx, ecx xor eax, eax nop dword ptr [rax] loc_1410: mov r8d, [rdi+rax*4] and r8d, [rsi+rax*4] mov [rdx+rax*4], r8d add rax, 1 cmp rcx, rax jnz short loc_1410 locret_1425: retn
void func0(long long a1, long long a2, long long a3, int a4) { long long i; // rax if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) *(_DWORD *)(a3 + 4 * i) = *(_DWORD *)(a2 + 4 * i) & *(_DWORD *)(a1 + 4 * i); } }
func0: ENDBR64 TEST ECX,ECX JLE 0x00101425 MOVSXD RCX,ECX XOR EAX,EAX NOP dword ptr [RAX] LAB_00101410: MOV R8D,dword ptr [RDI + RAX*0x4] AND R8D,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDX + RAX*0x4],R8D ADD RAX,0x1 CMP RCX,RAX JNZ 0x00101410 LAB_00101425: RET
void func0(long param_1,long param_2,long param_3,int param_4) { long lVar1; if (0 < param_4) { lVar1 = 0; do { *(uint *)(param_3 + lVar1 * 4) = *(uint *)(param_1 + lVar1 * 4) & *(uint *)(param_2 + lVar1 * 4); lVar1 = lVar1 + 1; } while (param_4 != lVar1); } return; }
5,611
func0
#include <assert.h> #include <stdio.h>
void func0(int test_tup1[], int test_tup2[], int res[], int size) { for (int i = 0; i < size; i++) { res[i] = test_tup1[i] & test_tup2[i]; } }
int main() { int res[4]; int test_tup1_1[4] = {10, 4, 6, 9}; int test_tup2_1[4] = {5, 2, 3, 3}; int expected_1[4] = {0, 0, 2, 1}; func0(test_tup1_1, test_tup2_1, res, 4); for (int i = 0; i < 4; i++) { assert(res[i] == expected_1[i]); } int test_tup1_2[4] = {1, 2,...
O3
c
func0: endbr64 test %ecx,%ecx jle 120d <func0+0xcd> lea 0xf(%rdi),%r8 lea -0x1(%rcx),%eax sub %rdx,%r8 cmp $0x1e,%r8 seta %r9b cmp $0x2,%eax seta %r8b test %r8b,%r9b je 11f0 <func0+0xb0> lea 0xf(%rsi),%r8 sub %rdx,%r8 cmp $0x1e,%r8 jbe 11f0 <func0+0xb0> mov %ecx,%r8d xor ...
func0: endbr64 movsxd rax, ecx mov r8, rsi mov rsi, rdx test eax, eax jle locret_122B cmp eax, 1 jz loc_1208 lea rcx, [rdi+4] sub rdx, rcx cmp rdx, 8 jbe loc_1208 lea rcx, [r8+4] mov rdx, rsi sub rdx, rcx cmp rdx, 8 jbe loc_1208 lea edx, [rax-1] mov r...
long long func0(long long a1, long long a2, long long a3, int a4) { long long result; // rax int v7; // r9d long long v8; // rdx int v9; // edx unsigned int v10; // ecx long long v11; // rcx result = a4; if ( a4 > 0 ) { if ( a4 == 1 || (unsigned long long)(a3 - (a1 + 4)) <= 8 || (unsigned long l...
func0: ENDBR64 MOVSXD RAX,ECX MOV R8,RSI MOV RSI,RDX TEST EAX,EAX JLE 0x0010122b CMP EAX,0x1 JZ 0x00101208 LEA RCX,[RDI + 0x4] SUB RDX,RCX CMP RDX,0x8 JBE 0x00101208 LEA RCX,[R8 + 0x4] MOV RDX,RSI SUB RDX,RCX CMP RDX,0x8 JBE 0x00101208 LEA EDX,[RAX + -0x1] MOV R9D,EAX CMP EDX,0x2 JBE 0x0010122c MOV ECX,EAX XOR EDX,EDX ...
void func0(long param_1,long param_2,long param_3,uint param_4) { ulong uVar1; ulong uVar2; uint uVar3; long lVar4; if (0 < (int)param_4) { if (((param_4 == 1) || ((ulong)(param_3 - (param_1 + 4)) < 9)) || ((ulong)(param_3 - (param_2 + 4)) < 9)) { lVar4 = 0; do { *(uint *)(p...
5,612
func0
#include <assert.h>
int func0(int a, int b, int c) { int directrix = c - ((b * b) + 1) * 4 * a; return directrix; }
int main() { assert(func0(5, 3, 2) == -198); assert(func0(9, 8, 4) == -2336); assert(func0(2, 4, 6) == -130); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x18(%rbp),%eax imul %eax,%eax add $0x1,%eax imul -0x14(%rbp),%eax lea 0x0(,%rax,4),%edx mov -0x1c(%rbp),%eax sub %edx,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rb...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov eax, [rbp+var_18] imul eax, eax add eax, 1 imul eax, [rbp+var_14] lea edx, ds:0[rax*4] mov eax, [rbp+var_1C] sub eax, edx mov [rbp+var_4], eax mov eax, [rbp+var...
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 - 4 * a1 * (a2 * a2 + 1)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x18] IMUL EAX,EAX ADD EAX,0x1 IMUL EAX,dword ptr [RBP + -0x14] LEA EDX,[RAX*0x4] MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,EDX MOV dword ptr [RBP + -0x4],EAX MOV E...
int func0(int param_1,int param_2,int param_3) { return param_3 + (param_2 * param_2 + 1) * param_1 * -4; }
5,613
func0
#include <assert.h>
int func0(int a, int b, int c) { int directrix = c - ((b * b) + 1) * 4 * a; return directrix; }
int main() { assert(func0(5, 3, 2) == -198); assert(func0(9, 8, 4) == -2336); assert(func0(2, 4, 6) == -130); return 0; }
O1
c
func0: endbr64 imul %esi,%esi add $0x1,%esi imul %edi,%esi shl $0x2,%esi mov %edx,%eax sub %esi,%eax retq
func0: endbr64 imul esi, esi add esi, 1 imul esi, edi shl esi, 2 mov eax, edx sub eax, esi retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 - 4 * a1 * (a2 * a2 + 1)); }
func0: ENDBR64 IMUL ESI,ESI ADD ESI,0x1 IMUL ESI,EDI SHL ESI,0x2 MOV EAX,EDX SUB EAX,ESI RET
int func0(int param_1,int param_2,int param_3) { return param_3 + (param_2 * param_2 + 1) * param_1 * -4; }
5,614
func0
#include <assert.h>
int func0(int a, int b, int c) { int directrix = c - ((b * b) + 1) * 4 * a; return directrix; }
int main() { assert(func0(5, 3, 2) == -198); assert(func0(9, 8, 4) == -2336); assert(func0(2, 4, 6) == -130); return 0; }
O2
c
func0: endbr64 imul %esi,%esi mov %edx,%eax add $0x1,%esi imul %edi,%esi shl $0x2,%esi sub %esi,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 imul esi, esi mov eax, edx add esi, 1 imul esi, edi shl esi, 2 sub eax, esi retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 - 4 * a1 * (a2 * a2 + 1)); }
func0: ENDBR64 IMUL ESI,ESI MOV EAX,EDX ADD ESI,0x1 IMUL ESI,EDI SHL ESI,0x2 SUB EAX,ESI RET
int func0(int param_1,int param_2,int param_3) { return param_3 + (param_2 * param_2 + 1) * param_1 * -4; }
5,615
func0
#include <assert.h>
int func0(int a, int b, int c) { int directrix = c - ((b * b) + 1) * 4 * a; return directrix; }
int main() { assert(func0(5, 3, 2) == -198); assert(func0(9, 8, 4) == -2336); assert(func0(2, 4, 6) == -130); return 0; }
O3
c
func0: endbr64 imul %esi,%esi mov %edx,%eax add $0x1,%esi imul %edi,%esi shl $0x2,%esi sub %esi,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 imul esi, esi mov eax, edx add esi, 1 imul esi, edi shl esi, 2 sub eax, esi retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 - 4 * a1 * (a2 * a2 + 1)); }
func0: ENDBR64 IMUL ESI,ESI MOV EAX,EDX ADD ESI,0x1 IMUL ESI,EDI SHL ESI,0x2 SUB EAX,ESI RET
int func0(int param_1,int param_2,int param_3) { return param_3 + (param_2 * param_2 + 1) * param_1 * -4; }
5,616
func0
#include <assert.h>
int func0(int* list1, int size1, int* list2, int size2){ for(int i = 0; i < size1; i++){ for(int j = 0; j < size2; j++){ if(list1[i] == list2[j]){ return 1; } } } return 0; }
int main(){ int list1_a[] = {1, 2, 3, 4, 5}; int list2_a[] = {5, 6, 7, 8, 9}; assert(func0(list1_a, 5, list2_a, 5) == 1); int list1_b[] = {1, 2, 3, 4, 5}; int list2_b[] = {6, 7, 8, 9}; assert(func0(list1_b, 5, list2_b, 4) == 0); int list1_c[] = {'a', 'b', 'c'}; int list2_c[] ...
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) movl $0x0,-0x8(%rbp) jmp 11d8 <func0+0x6f> movl $0x0,-0x4(%rbp) jmp 11cc <func0+0x63> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%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_20], ecx mov [rbp+var_8], 0 jmp short loc_11D8 loc_1188: mov [rbp+var_4], 0 jmp short loc_11CC loc_1191: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*4] mov ...
long long func0(long long a1, int a2, long long a3, int a4) { int i; // [rsp+20h] [rbp-8h] int j; // [rsp+24h] [rbp-4h] for ( i = 0; i < a2; ++i ) { for ( j = 0; j < a4; ++j ) { if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * j + a3) ) return 1LL; } } return 0LL; }
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 dword ptr [RBP + -0x8],0x0 JMP 0x001011d8 LAB_00101188: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011cc LAB_00101191: MOV EAX,dword ptr [RBP + -0x8] CDQE ...
int8 func0(long param_1,int param_2,long param_3,int param_4) { int local_10; int local_c; local_10 = 0; do { if (param_2 <= local_10) { return 0; } for (local_c = 0; local_c < param_4; local_c = local_c + 1) { if (*(int *)(param_1 + (long)local_10 * 4) == *(int *)(param_3 + (long)lo...
5,617
func0
#include <assert.h>
int func0(int* list1, int size1, int* list2, int size2){ for(int i = 0; i < size1; i++){ for(int j = 0; j < size2; j++){ if(list1[i] == list2[j]){ return 1; } } } return 0; }
int main(){ int list1_a[] = {1, 2, 3, 4, 5}; int list2_a[] = {5, 6, 7, 8, 9}; assert(func0(list1_a, 5, list2_a, 5) == 1); int list1_b[] = {1, 2, 3, 4, 5}; int list2_b[] = {6, 7, 8, 9}; assert(func0(list1_b, 5, list2_b, 4) == 0); int list1_c[] = {'a', 'b', 'c'}; int list2_c[] ...
O1
c
func0: endbr64 test %esi,%esi jle 11ad <func0+0x44> mov %rdi,%r8 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r9 mov %rdx,%rdi lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rsi test %ecx,%ecx jle 119e <func0+0x35> mov (%r8),%edx mov %rdi,%rax cmp (%rax),%edx je 11b3 <func0+0x4a> add ...
func0: endbr64 test esi, esi jle short loc_11AA mov r8, rdi lea eax, [rsi-1] lea r9, [rdi+rax*4+4] lea eax, [rcx-1] lea rdi, [rdx+rax*4+4] loc_1184: test ecx, ecx jle short loc_119B mov esi, [r8] mov rax, rdx loc_118E: cmp esi, [rax] jz short loc_11B0 add rax, 4 cm...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r8 _DWORD *v5; // rax if ( a2 <= 0 ) return 0LL; v4 = a1; while ( a4 <= 0 ) { LABEL_7: if ( ++v4 == &a1[a2 - 1 + 1] ) return 0LL; } v5 = a3; while ( *v4 != *v5 ) { if ( ++v5 == &a3[a4 - 1 + 1] ) goto L...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011aa MOV R8,RDI LEA EAX,[RSI + -0x1] LEA R9,[RDI + RAX*0x4 + 0x4] LEA EAX,[RCX + -0x1] LEA RDI,[RDX + RAX*0x4 + 0x4] LAB_00101184: TEST ECX,ECX JLE 0x0010119b MOV ESI,dword ptr [R8] MOV RAX,RDX LAB_0010118e: CMP ESI,dword ptr [RAX] JZ 0x001011b0 ADD RAX,0x4 CMP RAX,RDI JNZ 0x001011...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (param_2 < 1) { return 0; } piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (0 < param_4) { piVar2 = param_3; do { if (*param_1 == *piVar2) { return 1; } ...
5,618
func0
#include <assert.h>
int func0(int* list1, int size1, int* list2, int size2){ for(int i = 0; i < size1; i++){ for(int j = 0; j < size2; j++){ if(list1[i] == list2[j]){ return 1; } } } return 0; }
int main(){ int list1_a[] = {1, 2, 3, 4, 5}; int list2_a[] = {5, 6, 7, 8, 9}; assert(func0(list1_a, 5, list2_a, 5) == 1); int list1_b[] = {1, 2, 3, 4, 5}; int list2_b[] = {6, 7, 8, 9}; assert(func0(list1_b, 5, list2_b, 4) == 0); int list1_c[] = {'a', 'b', 'c'}; int list2_c[] ...
O2
c
func0: endbr64 test %esi,%esi jle 1329 <func0+0x49> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r9 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%r8 test %ecx,%ecx jle 1320 <func0+0x40> mov (%rdi),%esi mov %rdx,%rax jmp 1311 <func0+0x31> nopl 0x0(%rax,%rax,1) add $0x4,%rax cmp %r8,%rax j...
func0: endbr64 test esi, esi jle short loc_1369 lea eax, [rsi-1] lea r9, [rdi+rax*4+4] lea eax, [rcx-1] lea r8, [rdx+rax*4+4] loc_1338: test ecx, ecx jle short loc_1360 mov esi, [rdi] mov rax, rdx jmp short loc_1351 loc_1348: add rax, 4 cmp rax, r8 jz short loc_136...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { long long v4; // r9 _DWORD *v5; // rax if ( a2 <= 0 ) return 0LL; v4 = (long long)&a1[a2 - 1 + 1]; while ( a4 <= 0 ) { LABEL_8: if ( ++a1 == (_DWORD *)v4 ) return 0LL; } v5 = a3; while ( *a1 != *v5 ) { if ( ++v5 == &a3[a4 ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101369 LEA EAX,[RSI + -0x1] LEA R9,[RDI + RAX*0x4 + 0x4] LEA EAX,[RCX + -0x1] LEA R8,[RDX + RAX*0x4 + 0x4] LAB_00101338: TEST ECX,ECX JLE 0x00101360 MOV ESI,dword ptr [RDI] MOV RAX,RDX JMP 0x00101351 LAB_00101348: ADD RAX,0x4 CMP RAX,R8 JZ 0x00101360 LAB_00101351: CMP ESI,dword ptr [...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (0 < param_4) { piVar2 = param_3; do { if (*param_1 == *piVar2) { return 1; } ...
5,619
func0
#include <assert.h>
int func0(int* list1, int size1, int* list2, int size2){ for(int i = 0; i < size1; i++){ for(int j = 0; j < size2; j++){ if(list1[i] == list2[j]){ return 1; } } } return 0; }
int main(){ int list1_a[] = {1, 2, 3, 4, 5}; int list2_a[] = {5, 6, 7, 8, 9}; assert(func0(list1_a, 5, list2_a, 5) == 1); int list1_b[] = {1, 2, 3, 4, 5}; int list2_b[] = {6, 7, 8, 9}; assert(func0(list1_b, 5, list2_b, 4) == 0); int list1_c[] = {'a', 'b', 'c'}; int list2_c[] ...
O3
c
func0: endbr64 test %esi,%esi jle 1249 <func0+0x49> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r9 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%r8 test %ecx,%ecx jle 1240 <func0+0x40> mov (%rdi),%esi mov %rdx,%rax jmp 1231 <func0+0x31> nopl 0x0(%rax,%rax,1) add $0x4,%rax cmp %r8,%rax j...
func0: endbr64 test esi, esi jle short loc_1189 movsxd rsi, esi movsxd rax, ecx lea r8, [rdi+rsi*4] lea rsi, [rdx+rax*4] loc_1156: test ecx, ecx jle short loc_1190 loc_115A: mov ecx, [rdi] mov rax, rdx jmp short loc_1171 loc_1168: add rax, 4 cmp rax, rsi jz short loc_118...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r8 _DWORD *v5; // rax if ( a2 > 0 ) { v4 = &a1[a2]; while ( a4 <= 0 ) { if ( ++a1 == v4 ) return 0LL; } do { v5 = a3; do { if ( *a1 == *v5 ) return 1LL; ++...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101189 MOVSXD RSI,ESI MOVSXD RAX,ECX LEA R8,[RDI + RSI*0x4] LEA RSI,[RDX + RAX*0x4] LAB_00101156: TEST ECX,ECX JLE 0x00101190 LAB_0010115a: MOV ECX,dword ptr [RDI] MOV RAX,RDX JMP 0x00101171 LAB_00101168: ADD RAX,0x4 CMP RAX,RSI JZ 0x00101180 LAB_00101171: CMP ECX,dword ptr [RAX] JNZ...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_2) { piVar1 = param_1 + param_2; do { if (0 < param_4) { do { piVar2 = param_3; do { if (*param_1 == *piVar2) { return 1; } ...
5,620
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double median = 0.5 * (base1 + base2); return median; }
int main() { assert(func0(15, 25, 35) == 20); assert(func0(10, 20, 30) == 15); assert(func0(6, 9, 4) == 7.5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x18(%rbp) movsd %xmm1,-0x20(%rbp) movsd %xmm2,-0x28(%rbp) movsd -0x18(%rbp),%xmm0 movapd %xmm0,%xmm1 addsd -0x20(%rbp),%xmm1 movsd 0xf1a(%rip),%xmm0 mulsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%xmm0 pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp movsd [rbp+var_18], xmm0 movsd [rbp+var_20], xmm1 movsd [rbp+var_28], xmm2 movsd xmm0, [rbp+var_18] movapd xmm1, xmm0 addsd xmm1, [rbp+var_20] movsd xmm0, cs:qword_2078 mulsd xmm0, xmm1 movsd [rbp+var_8], xmm0 movsd xmm0, [rbp+var_8] pop rbp retn
double func0(double a1, double a2) { return 0.5 * (a1 + a2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD qword ptr [RBP + -0x20],XMM1 MOVSD qword ptr [RBP + -0x28],XMM2 MOVSD XMM0,qword ptr [RBP + -0x18] MOVAPD XMM1,XMM0 ADDSD XMM1,qword ptr [RBP + -0x20] MOVSD XMM0,qword ptr [0x00102078] MULSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOVSD XM...
double func0(double param_1,double param_2) { return DAT_00102078 * (param_1 + param_2); }
5,621
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double median = 0.5 * (base1 + base2); return median; }
int main() { assert(func0(15, 25, 35) == 20); assert(func0(10, 20, 30) == 15); assert(func0(6, 9, 4) == 7.5); return 0; }
O1
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xecf(%rip),%xmm0 retq
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { return (a1 + a2) * 0.5; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { return (param_1 + param_2) * _DAT_00102008; }
5,622
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double median = 0.5 * (base1 + base2); return median; }
int main() { assert(func0(15, 25, 35) == 20); assert(func0(10, 20, 30) == 15); assert(func0(6, 9, 4) == 7.5); return 0; }
O2
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xeb8(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { return (a1 + a2) * 0.5; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { return (param_1 + param_2) * _DAT_00102008; }
5,623
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double median = 0.5 * (base1 + base2); return median; }
int main() { assert(func0(15, 25, 35) == 20); assert(func0(10, 20, 30) == 15); assert(func0(6, 9, 4) == 7.5); return 0; }
O3
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xeb8(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { return (a1 + a2) * 0.5; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { return (param_1 + param_2) * _DAT_00102008; }
5,624
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h>
void func0(int arr[], int size, int number) { // Sort the array first for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; ...
int main() { int arr1[] = {1, 2, 3, 4, 5}; int arr2[] = {2, 3, 4, 5, 6}; int arr3[] = {9, 7, 4, 8, 6, 1}; func0(arr1, 5, 4); // Expected output: No, entered number is less than those in the array func0(arr2, 5, 8); // Expected output: Yes, the entered number is greater than those in the array...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0xc(%rbp) jmpq 124c <func0+0xe3> movl $0x0,-0x8(%rbp) jmpq 1236 <func0+0xcd> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_C], 0 jmp loc_124C loc_118B: mov [rbp+var_8], 0 jmp loc_1236 loc_1197: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] ...
int func0(long long a1, int a2, int a3) { int i; // [rsp+14h] [rbp-Ch] int j; // [rsp+18h] [rbp-8h] int v6; // [rsp+1Ch] [rbp-4h] for ( i = 0; i < a2 - 1; ++i ) { for ( j = 0; j < a2 - i - 1; ++j ) { if ( *(_DWORD *)(4LL * j + a1) > *(_DWORD *)(4 * (j + 1LL) + a1) ) { v6 = *(_DWO...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010124c LAB_0010118b: MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101236 LAB_00101197: MOV EAX,dword ptr [RBP + -0x8] CDQE LEA RDX,[RAX*0x4] M...
void func0(long param_1,int param_2,int param_3) { int4 uVar1; int local_14; int local_10; for (local_14 = 0; local_14 < param_2 + -1; local_14 = local_14 + 1) { for (local_10 = 0; local_10 < (param_2 - local_14) + -1; local_10 = local_10 + 1) { if (*(int *)(param_1 + ((long)local_10 + 1) * 4) < *...
5,625
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h>
void func0(int arr[], int size, int number) { // Sort the array first for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; ...
int main() { int arr1[] = {1, 2, 3, 4, 5}; int arr2[] = {2, 3, 4, 5, 6}; int arr3[] = {9, 7, 4, 8, 6, 1}; func0(arr1, 5, 4); // Expected output: No, entered number is less than those in the array func0(arr2, 5, 8); // Expected output: Yes, the entered number is greater than those in the array...
O1
c
func0: endbr64 sub $0x8,%rsp lea -0x1(%rsi),%r10d test %r10d,%r10d jle 11b4 <func0+0x4b> lea 0x4(%rdi),%r11 jmp 11a2 <func0+0x39> add $0x4,%rax cmp %r9,%rax je 119c <func0+0x33> mov (%rax),%ecx mov 0x4(%rax),%r8d cmp %r8d,%ecx jle 1180 <func0+0x17> mov %r8d,(%rax) mov %ecx,0...
func0: endbr64 sub rsp, 8 mov r10, rdi lea r9d, [rsi-1] test r9d, r9d jle short loc_11B4 lea r11, [rdi+4] jmp short loc_11A2 loc_1183: add rax, 4 cmp rax, r8 jz short loc_119C loc_118C: mov ecx, [rax] mov edi, [rax+4] cmp ecx, edi jle short loc_1183 mov [rax],...
long long func0(int *a1, int a2, int a3) { int v4; // r9d _DWORD *v5; // r11 int *v6; // rax int v7; // ecx int v8; // edi v4 = a2 - 1; if ( a2 - 1 > 0 ) { v5 = a1 + 1; do { if ( v4 > 0 ) { v6 = a1; do { v7 = *v6; v8 = v6[1]; ...
func0: ENDBR64 SUB RSP,0x8 MOV R10,RDI LEA R9D,[RSI + -0x1] TEST R9D,R9D JLE 0x001011b4 LEA R11,[RDI + 0x4] JMP 0x001011a2 LAB_00101183: ADD RAX,0x4 CMP RAX,R8 JZ 0x0010119c LAB_0010118c: MOV ECX,dword ptr [RAX] MOV EDI,dword ptr [RAX + 0x4] CMP ECX,EDI JLE 0x00101183 MOV dword ptr [RAX],EDI MOV dword ptr [RAX + 0x4],E...
void func0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; int iVar3; iVar3 = param_2 + -1; if (0 < iVar3) { do { if (0 < iVar3) { piVar2 = param_1; do { iVar1 = *piVar2; if (piVar2[1] < iVar1) { *piVar2 = piVar2[1]; piV...
5,626
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h>
void func0(int arr[], int size, int number) { // Sort the array first for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; ...
int main() { int arr1[] = {1, 2, 3, 4, 5}; int arr2[] = {2, 3, 4, 5, 6}; int arr3[] = {9, 7, 4, 8, 6, 1}; func0(arr1, 5, 4); // Expected output: No, entered number is less than those in the array func0(arr2, 5, 8); // Expected output: Yes, the entered number is greater than those in the array...
O2
c
func0: endbr64 lea -0x1(%rsi),%ecx test %ecx,%ecx jle 12a2 <func0+0x42> lea 0x4(%rdi),%r11 sub $0x1,%ecx mov %rdi,%rax mov %rcx,%r10 lea (%r11,%rcx,4),%r9 nopl (%rax) mov (%rax),%ecx mov 0x4(%rax),%r8d cmp %r8d,%ecx jle 1291 <func0+0x31> mov %r8d,(%rax) mov %ecx,0x4(%rax) add ...
func0: endbr64 lea ecx, [rsi-1] mov r10, rdi test ecx, ecx jle short loc_12A7 lea r11, [rdi+4] nop word ptr [rax+rax+00h] loc_1278: sub ecx, 1 mov rax, r10 mov r9, rcx lea r8, [r11+rcx*4] nop dword ptr [rax] loc_1288: mov ecx, [rax] mov edi, [rax+4] cmp ecx, edi jl...
long long func0(int *a1, int a2, int a3) { int v3; // ecx _DWORD *v5; // r11 int *v6; // rax long long v7; // r9 int v8; // ecx int v9; // edi v3 = a2 - 1; if ( a2 - 1 > 0 ) { v5 = a1 + 1; do { v6 = a1; v7 = (unsigned int)(v3 - 1); do { v8 = *v6; v...
func0: ENDBR64 LEA ECX,[RSI + -0x1] MOV R10,RDI TEST ECX,ECX JLE 0x001012a7 LEA R11,[RDI + 0x4] NOP word ptr [RAX + RAX*0x1] LAB_00101278: SUB ECX,0x1 MOV RAX,R10 MOV R9,RCX LEA R8,[R11 + RCX*0x4] NOP dword ptr [RAX] LAB_00101288: MOV ECX,dword ptr [RAX] MOV EDI,dword ptr [RAX + 0x4] CMP ECX,EDI JLE 0x00101296 MOV dwor...
void func0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; uint uVar3; uVar3 = param_2 - 1; if (0 < (int)uVar3) { do { uVar3 = uVar3 - 1; piVar2 = param_1; do { iVar1 = *piVar2; if (piVar2[1] < iVar1) { *piVar2 = piVar2[1]; piVar2[1...
5,627
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h>
void func0(int arr[], int size, int number) { // Sort the array first for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; ...
int main() { int arr1[] = {1, 2, 3, 4, 5}; int arr2[] = {2, 3, 4, 5, 6}; int arr3[] = {9, 7, 4, 8, 6, 1}; func0(arr1, 5, 4); // Expected output: No, entered number is less than those in the array func0(arr2, 5, 8); // Expected output: Yes, the entered number is greater than those in the array...
O3
c
func0: endbr64 lea -0x1(%rsi),%ecx test %ecx,%ecx jle 1272 <func0+0x42> lea 0x4(%rdi),%r11 sub $0x1,%ecx mov %rdi,%rax mov %rcx,%r10 lea (%r11,%rcx,4),%r9 nopl (%rax) mov (%rax),%ecx mov 0x4(%rax),%r8d cmp %r8d,%ecx jle 1261 <func0+0x31> mov %r8d,(%rax) mov %ecx,0x4(%rax) add ...
func0: endbr64 mov r10, rdi cmp esi, 1 jle short loc_1281 mov r9d, esi lea r11, [rdi+4] nop dword ptr [rax+rax+00h] loc_1238: cmp r9d, 1 jle short loc_12A0 lea ecx, [r9-2] mov rax, r10 lea r8, [r11+rcx*4] nop dword ptr [rax+00000000h] loc_1250: movq xmm0, qword ptr [ra...
int func0(__m128i *a1, int a2, __int32 a3) { int i; // r9d __m128i *v4; // rax __m128i v5; // xmm0 if ( a2 > 1 ) { for ( i = a2; i != 1; --i ) { while ( i <= 1 ) --i; v4 = a1; do { v5 = _mm_loadl_epi64(v4); if ( _mm_cvtsi128_si32(_mm_shuffle_epi32(v5, ...
func0: ENDBR64 MOV R10,RDI CMP ESI,0x1 JLE 0x00101281 MOV R9D,ESI LEA R11,[RDI + 0x4] NOP dword ptr [RAX + RAX*0x1] LAB_00101238: CMP R9D,0x1 JLE 0x001012a0 LEA ECX,[R9 + -0x2] MOV RAX,R10 LEA R8,[R11 + RCX*0x4] NOP dword ptr [RAX] LAB_00101250: MOVQ XMM0,qword ptr [RAX] PSHUFD XMM1,XMM0,0xe5 MOVD ECX,XMM0 MOVD EDI,XMM...
void func0(int8 *param_1,int param_2,int param_3) { int8 *puVar1; int iVar2; int iVar3; int iVar4; iVar2 = param_2; if (1 < param_2) { do { for (; iVar2 < 2; iVar2 = iVar2 + -1) { } puVar1 = param_1; do { iVar3 = (int)*puVar1; iVar4 = (int)((ulong)*puVar1 >> 0...
5,628
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
const char* func0(const char* text) { regex_t regex; int ret; // Compile the regular expression pattern ret = regcomp(&regex, "ab+", REG_EXTENDED); if (ret) { return "Regex compilation failed!"; } // Execute the regular expression ret = regexec(&regex, text, 0, NULL,...
int main() { assert(strcmp(func0("ac"), "Not matched!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abba"), "Found a match!") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x70,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x50(%rbp),%rax mov $0x1,%edx lea 0xdf0(%rip),%rsi mov %rax,%rdi callq 10d0 <regcomp@plt> mov %eax,-0x54(%rbp) cmpl $0x0,-0x54(%rbp) je 1232 <func...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 70h mov [rbp+string], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [rbp+preg] mov edx, 1; cflags lea rcx, pattern; "ab+" mov rsi, rcx; pattern mov rdi, rax; preg call _regcomp mov [rbp+var_54], eax cmp ...
const char * func0(const char *a1) { int v2; // [rsp+1Ch] [rbp-54h] regex_t preg; // [rsp+20h] [rbp-50h] BYREF unsigned long long v4; // [rsp+68h] [rbp-8h] v4 = __readfsqword(0x28u); if ( regcomp(&preg, "ab+", 1) ) return "Regex compilation failed!"; v2 = regexec(&preg, a1, 0LL, 0LL, 0); regfree(&pre...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV EDX,0x1 LEA RCX,[0x102008] MOV RSI,RCX MOV RDI,RAX CALL 0x001010d0 MOV dword ptr [RBP + -0x54],EAX CMP dword ptr [RBP + -0x54],0x0 JZ 0x001012...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"ab+",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0); regfree(&local_58); if (iV...
5,629
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
const char* func0(const char* text) { regex_t regex; int ret; // Compile the regular expression pattern ret = regcomp(&regex, "ab+", REG_EXTENDED); if (ret) { return "Regex compilation failed!"; } // Execute the regular expression ret = regexec(&regex, text, 0, NULL,...
int main() { assert(strcmp(func0("ac"), "Not matched!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abba"), "Found a match!") == 0); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x1,%edx lea 0xe45(%rip),%rsi callq 10c0 <regcomp@plt> mov %eax,%edx lea 0xe01(%rip),%rax test %edx,%edx je 121e <func0+0x55> mov 0x48(%rsp),...
func0: endbr64 push rbp push rbx sub rsp, 58h mov rbx, rdi mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov rdi, rsp mov edx, 1 lea rsi, aAb; "ab+" call _regcomp mov edx, eax lea rax, aRegexCompilati; "Regex compilation failed!" test edx, edx jz short l...
const char * func0(long long a1) { int v1; // edx const char *result; // rax int v3; // ebx _QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "ab+", 1LL); result = "Regex compilation failed!"; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL, 0LL); regfree(v4...
5,630
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
const char* func0(const char* text) { regex_t regex; int ret; // Compile the regular expression pattern ret = regcomp(&regex, "ab+", REG_EXTENDED); if (ret) { return "Regex compilation failed!"; } // Execute the regular expression ret = regexec(&regex, text, 0, NULL,...
int main() { assert(strcmp(func0("ac"), "Not matched!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abba"), "Found a match!") == 0); return 0; }
O2
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd78(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10c0 <regcomp@plt> mov %eax,%r8d lea 0xd15(%rip),%rax test %r8d,%r8d jne 1321 <func0+0x71> x...
func0: endbr64 push r12 mov edx, 1 lea rsi, aAb; "ab+" push rbp mov rbp, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov r12, rsp mov rdi, r12 call _regcomp mov r8d, eax lea rax, aRegexCompilati; "Regex compilation failed!" test r8d, r8...
const char * func0(long long a1) { int v1; // r8d const char *result; // rax int v3; // ebp _QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "ab+", 1LL); result = "Regex compilation failed!"; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL); regfree(v4); ...
func0: ENDBR64 PUSH R12 MOV EDX,0x1 LEA RSI,[0x10203a] PUSH RBP MOV RBP,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV R12,RSP MOV RDI,R12 CALL 0x001010d0 MOV R8D,EAX LEA RAX,[0x102004] TEST R8D,R8D JNZ 0x00101331 XOR EDX,EDX XOR ECX,ECX MOV RSI,RBP MOV RDI,R12 CALL 0x001010...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"ab+",1); pcVar2 = "Regex compilation failed!"; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *...
5,631
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
const char* func0(const char* text) { regex_t regex; int ret; // Compile the regular expression pattern ret = regcomp(&regex, "ab+", REG_EXTENDED); if (ret) { return "Regex compilation failed!"; } // Execute the regular expression ret = regexec(&regex, text, 0, NULL,...
int main() { assert(strcmp(func0("ac"), "Not matched!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abba"), "Found a match!") == 0); return 0; }
O3
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd78(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10c0 <regcomp@plt> mov %eax,%r8d lea 0xd15(%rip),%rax test %r8d,%r8d jne 1321 <func0+0x71> x...
func0: endbr64 push rbp mov edx, 1; cflags lea rsi, pattern; "ab+" push rbx mov rbx, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+var_s48], rax xor eax, eax mov rbp, rsp mov rdi, rbp; preg call _regcomp mov edx, eax lea rax, aRegexCompilati; "Regex compilation failed!" ...
const char * func0(char *string) { int v1; // edx const char *result; // rax int v3; // ebx regex_t _0; // [rsp+0h] [rbp+0h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] vars48 = __readfsqword(0x28u); v1 = regcomp(&_0, "ab+", 1); result = "Regex compilation failed!"; if ( !v1 ) { v3 ...
func0: ENDBR64 PUSH RBP MOV EDX,0x1 LEA RSI,[0x10203a] PUSH RBX MOV RBX,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RBP,RSP MOV RDI,RBP CALL 0x001010d0 MOV EDX,EAX LEA RAX,[0x102004] TEST EDX,EDX JNZ 0x00101331 XOR EDX,EDX XOR R8D,R8D XOR ECX,ECX MOV RSI,RBX MOV RDI,RBP C...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"ab+",1); pcVar2 = "Regex compilation failed!"; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *...
5,632
func0
#include <assert.h>
int func0(int n) { return n % 10; }
int main() { assert(func0(123) == 3); assert(func0(25) == 5); assert(func0(30) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%ecx movslq %ecx,%rax imul $0x66666667,%rax,%rax shr $0x20,%rax mov %eax,%edx sar $0x2,%edx mov %ecx,%eax sar $0x1f,%eax sub %eax,%edx mov %edx,%eax shl $0x2,%eax add %edx,%eax add %eax,%eax sub %eax,...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov ecx, [rbp+var_4] movsxd rax, ecx imul rax, 66666667h shr rax, 20h mov edx, eax sar edx, 2 mov eax, ecx sar eax, 1Fh sub edx, eax mov eax, edx shl eax, 2 add eax, edx add eax, eax sub ecx, eax mov...
long long func0(int a1) { return (unsigned int)(a1 % 10); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV ECX,dword ptr [RBP + -0x4] MOVSXD RAX,ECX IMUL RAX,RAX,0x66666667 SHR RAX,0x20 MOV EDX,EAX SAR EDX,0x2 MOV EAX,ECX SAR EAX,0x1f SUB EDX,EAX MOV EAX,EDX SHL EAX,0x2 ADD EAX,EDX ADD EAX,EAX SUB ECX,EAX MOV EDX,ECX MOV EAX,EDX POP RBP RET
int func0(int param_1) { return param_1 % 10; }
5,633
func0
#include <assert.h>
int func0(int n) { return n % 10; }
int main() { assert(func0(123) == 3); assert(func0(25) == 5); assert(func0(30) == 0); return 0; }
O1
c
func0: endbr64 movslq %edi,%rax imul $0x66666667,%rax,%rax sar $0x22,%rax mov %edi,%edx sar $0x1f,%edx sub %edx,%eax lea (%rax,%rax,4),%eax add %eax,%eax sub %eax,%edi mov %edi,%eax retq
func0: endbr64 movsxd rax, edi imul rax, 66666667h sar rax, 22h mov edx, edi sar edx, 1Fh sub eax, edx lea edx, [rax+rax*4] add edx, edx mov eax, edi sub eax, edx retn
long long func0(int a1) { return (unsigned int)(a1 % 10); }
func0: ENDBR64 MOVSXD RAX,EDI IMUL RAX,RAX,0x66666667 SAR RAX,0x22 MOV EDX,EDI SAR EDX,0x1f SUB EAX,EDX LEA EDX,[RAX + RAX*0x4] ADD EDX,EDX MOV EAX,EDI SUB EAX,EDX RET
int func0(int param_1) { return param_1 % 10; }
5,634
func0
#include <assert.h>
int func0(int n) { return n % 10; }
int main() { assert(func0(123) == 3); assert(func0(25) == 5); assert(func0(30) == 0); return 0; }
O2
c
func0: endbr64 movslq %edi,%rax mov %edi,%edx imul $0x66666667,%rax,%rax sar $0x1f,%edx sar $0x22,%rax sub %edx,%eax lea (%rax,%rax,4),%eax add %eax,%eax sub %eax,%edi mov %edi,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 movsxd rax, edi mov edx, edi imul rax, 66666667h sar edx, 1Fh sar rax, 22h sub eax, edx lea edx, [rax+rax*4] mov eax, edi add edx, edx sub eax, edx retn
long long func0(int a1) { return (unsigned int)(a1 % 10); }
func0: ENDBR64 MOVSXD RAX,EDI MOV EDX,EDI IMUL RAX,RAX,0x66666667 SAR EDX,0x1f SAR RAX,0x22 SUB EAX,EDX LEA EDX,[RAX + RAX*0x4] MOV EAX,EDI ADD EDX,EDX SUB EAX,EDX RET
int func0(int param_1) { return param_1 % 10; }
5,635
func0
#include <assert.h>
int func0(int n) { return n % 10; }
int main() { assert(func0(123) == 3); assert(func0(25) == 5); assert(func0(30) == 0); return 0; }
O3
c
func0: endbr64 movslq %edi,%rax mov %edi,%edx imul $0x66666667,%rax,%rax sar $0x1f,%edx sar $0x22,%rax sub %edx,%eax lea (%rax,%rax,4),%eax add %eax,%eax sub %eax,%edi mov %edi,%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 movsxd rax, edi mov edx, edi imul rax, 66666667h sar edx, 1Fh sar rax, 22h sub eax, edx lea edx, [rax+rax*4] mov eax, edi add edx, edx sub eax, edx retn
long long func0(int a1) { return (unsigned int)(a1 % 10); }
func0: ENDBR64 MOVSXD RAX,EDI MOV EDX,EDI IMUL RAX,RAX,0x66666667 SAR EDX,0x1f SAR RAX,0x22 SUB EAX,EDX LEA EDX,[RAX + RAX*0x4] MOV EAX,EDI ADD EDX,EDX SUB EAX,EDX RET
int func0(int param_1) { return param_1 % 10; }
5,636
func0
#include <assert.h>
int func0(int list1[], int size) { for (int i = 0; i < size; i++) { if (list1[i] < 0) { return list1[i]; } } return 0; // returning 0 by default if no negative number is found }
int main() { int list1[] = {-1, 4, 5, -6}; int list2[] = {-1, -2, 3, 4}; int list3[] = {-7, -6, 8, 9}; assert(func0(list1, 4) == -1); assert(func0(list2, 4) == -1); assert(func0(list3, 4) == -7); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x4(%rbp) jmp 11b7 <func0+0x4e> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax test %eax,%eax jns 11b3 <func0+0x4a> mov -0x4(%rbp),%eax cl...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_4], 0 jmp short loc_11B7 loc_1181: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] test eax, eax jns short loc_11B3 mov eax...
long long func0(long long a1, int a2) { int i; // [rsp+18h] [rbp-4h] for ( i = 0; i < a2; ++i ) { if ( *(int *)(4LL * i + a1) < 0 ) return *(unsigned int *)(4LL * i + a1); } return 0LL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011b7 LAB_00101181: 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] TEST EAX,EAX JNS 0x001011b3 MOV EAX,dw...
int4 func0(long param_1,int param_2) { int local_c; local_c = 0; while( true ) { if (param_2 <= local_c) { return 0; } if (*(int *)(param_1 + (long)local_c * 4) < 0) break; local_c = local_c + 1; } return *(int4 *)(param_1 + (long)local_c * 4); }
5,637
func0
#include <assert.h>
int func0(int list1[], int size) { for (int i = 0; i < size; i++) { if (list1[i] < 0) { return list1[i]; } } return 0; // returning 0 by default if no negative number is found }
int main() { int list1[] = {-1, 4, 5, -6}; int list2[] = {-1, -2, 3, 4}; int list3[] = {-7, -6, 8, 9}; assert(func0(list1, 4) == -1); assert(func0(list2, 4) == -1); assert(func0(list3, 4) == -7); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 1193 <func0+0x2a> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rcx mov (%rax),%edx test %edx,%edx js 1190 <func0+0x27> add $0x4,%rax cmp %rcx,%rax jne 117c <func0+0x13> mov $0x0,%edx mov %edx,%eax retq mov $0x0,%edx jmp 1190 <func0...
func0: endbr64 test esi, esi jle short loc_1193 mov rax, rdi lea edx, [rsi-1] lea rcx, [rdi+rdx*4+4] loc_117C: mov edx, [rax] test edx, edx js short loc_1190 add rax, 4 cmp rax, rcx jnz short loc_117C mov edx, 0 loc_1190: mov eax, edx retn loc_1193: mov edx, 0 jmp ...
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // rax unsigned int v3; // edx if ( a2 <= 0 ) { return 0; } else { v2 = a1; while ( 1 ) { v3 = *v2; if ( (*v2 & 0x80000000) != 0 ) break; if ( ++v2 == &a1[a2 - 1 + 1] ) return 0; } } r...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101193 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RCX,[RDI + RDX*0x4 + 0x4] LAB_0010117c: MOV EDX,dword ptr [RAX] TEST EDX,EDX JS 0x00101190 ADD RAX,0x4 CMP RAX,RCX JNZ 0x0010117c MOV EDX,0x0 LAB_00101190: MOV EAX,EDX RET LAB_00101193: MOV EDX,0x0 JMP 0x00101190
int func0(int *param_1,int param_2) { int *piVar1; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (*param_1 < 0) { return *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1); } return 0; }
5,638
func0
#include <assert.h>
int func0(int list1[], int size) { for (int i = 0; i < size; i++) { if (list1[i] < 0) { return list1[i]; } } return 0; // returning 0 by default if no negative number is found }
int main() { int list1[] = {-1, 4, 5, -6}; int list2[] = {-1, -2, 3, 4}; int list3[] = {-7, -6, 8, 9}; assert(func0(list1, 4) == -1); assert(func0(list2, 4) == -1); assert(func0(list3, 4) == -7); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1170 <func0+0x30> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rdx jmp 1161 <func0+0x21> nopw 0x0(%rax,%rax,1) add $0x4,%rdi cmp %rdx,%rdi je 1170 <func0+0x30> mov (%rdi),%eax test %eax,%eax jns 1158 <func0+0x18> retq nopl 0x0(%rax,%rax,1) xor %eax,%...
func0: endbr64 test esi, esi jle short loc_1170 lea eax, [rsi-1] lea rdx, [rdi+rax*4+4] jmp short loc_1161 loc_1158: add rdi, 4 cmp rdi, rdx jz short loc_1170 loc_1161: mov eax, [rdi] test eax, eax jns short loc_1158 retn loc_1170: xor eax, eax retn
long long func0(unsigned int *a1, int a2) { long long v2; // rdx long long result; // rax if ( a2 <= 0 ) return 0LL; v2 = (long long)&a1[a2 - 1 + 1]; while ( 1 ) { result = *a1; if ( (int)result < 0 ) break; if ( ++a1 == (unsigned int *)v2 ) return 0LL; } return result; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101170 LEA EAX,[RSI + -0x1] LEA RDX,[RDI + RAX*0x4 + 0x4] JMP 0x00101161 LAB_00101158: ADD RDI,0x4 CMP RDI,RDX JZ 0x00101170 LAB_00101161: MOV EAX,dword ptr [RDI] TEST EAX,EAX JNS 0x00101158 RET LAB_00101170: XOR EAX,EAX RET
int func0(int *param_1,int param_2) { int *piVar1; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (*param_1 < 0) { return *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1); } return 0; }
5,639
func0
#include <assert.h>
int func0(int list1[], int size) { for (int i = 0; i < size; i++) { if (list1[i] < 0) { return list1[i]; } } return 0; // returning 0 by default if no negative number is found }
int main() { int list1[] = {-1, 4, 5, -6}; int list2[] = {-1, -2, 3, 4}; int list3[] = {-7, -6, 8, 9}; assert(func0(list1, 4) == -1); assert(func0(list2, 4) == -1); assert(func0(list3, 4) == -7); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 1170 <func0+0x30> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rdx jmp 1161 <func0+0x21> nopw 0x0(%rax,%rax,1) add $0x4,%rdi cmp %rdx,%rdi je 1170 <func0+0x30> mov (%rdi),%eax test %eax,%eax jns 1158 <func0+0x18> retq nopl 0x0(%rax,%rax,1) xor %eax,%...
func0: endbr64 test esi, esi jle short loc_1170 movsxd rsi, esi lea rdx, [rdi+rsi*4] jmp short loc_1161 loc_1158: add rdi, 4 cmp rdi, rdx jz short loc_1170 loc_1161: mov eax, [rdi] test eax, eax jns short loc_1158 retn loc_1170: xor eax, eax retn
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // rdx long long result; // rax if ( a2 <= 0 ) return 0LL; v2 = &a1[a2]; while ( 1 ) { result = *a1; if ( (int)result < 0 ) break; if ( ++a1 == v2 ) return 0LL; } return result; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101170 MOVSXD RSI,ESI LEA RDX,[RDI + RSI*0x4] JMP 0x00101161 LAB_00101158: ADD RDI,0x4 CMP RDI,RDX JZ 0x00101170 LAB_00101161: MOV EAX,dword ptr [RDI] TEST EAX,EAX JNS 0x00101158 RET LAB_00101170: XOR EAX,EAX RET
int func0(int *param_1,int param_2) { int *piVar1; if (0 < param_2) { piVar1 = param_1 + param_2; do { if (*param_1 < 0) { return *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1); } return 0; }
5,640
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* str1) { static char str2[100]; int j = 0; for (int i = 1; i <= strlen(str1); i++) { if (i % 2 == 0) { str2[j++] = str1[i - 1]; } } str2[j] = '\0'; return str2; }
int main() { assert(strcmp(func0("python"), "yhn") == 0); assert(strcmp(func0("program"), "rga") == 0); assert(strcmp(func0("language"), "agae") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x18(%rbp) movl $0x1,-0x14(%rbp) jmp 11e1 <func0+0x58> mov -0x14(%rbp),%eax and $0x1,%eax test %eax,%eax jne 11dd <func0+0x54> mov -0x14(%rbp),%eax cltq lea -0x1(%rax),%rdx mov -0x28(%...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+s], rdi mov [rbp+var_18], 0 mov [rbp+var_14], 1 jmp short loc_11E1 loc_11AA: mov eax, [rbp+var_14] and eax, 1 test eax, eax jnz short loc_11DD mov eax, [rbp+var_14] cdqe lea rdx, [rax-1] mov rax,...
_BYTE * func0(const char *a1) { int v1; // eax int v3; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v3 = 0; for ( i = 1; strlen(a1) >= i; ++i ) { if ( (i & 1) == 0 ) { v1 = v3++; str2_1[v1] = a1[i - 1]; } } str2_1[v3] = 0; return str2_1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x1 JMP 0x001011e1 LAB_001011aa: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 TEST EAX,EAX JNZ 0x001011dd MOV EAX,dword ptr [RBP + -0x14] CDQE LEA RDX,[RAX + -0x1] MOV RAX...
int1 * func0(char *param_1) { size_t sVar1; int local_20; uint local_1c; local_20 = 0; local_1c = 1; while( true ) { sVar1 = strlen(param_1); if (sVar1 < (ulong)(long)(int)local_1c) break; if ((local_1c & 1) == 0) { str2_1[local_20] = param_1[(long)(int)local_1c + -1]; local_20 =...
5,641
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* str1) { static char str2[100]; int j = 0; for (int i = 1; i <= strlen(str1); i++) { if (i % 2 == 0) { str2[j++] = str1[i - 1]; } } str2[j] = '\0'; return str2; }
int main() { assert(strcmp(func0("python"), "yhn") == 0); assert(strcmp(func0("program"), "rga") == 0); assert(strcmp(func0("language"), "agae") == 0); return 0; }
O1
c
func0: endbr64 mov %rdi,%r8 mov $0x1,%edx mov $0x0,%esi mov $0xffffffffffffffff,%r9 mov $0x0,%eax lea 0x2ed3(%rip),%r10 jmp 1173 <func0+0x2a> add $0x1,%rdx mov %r9,%rcx mov %r8,%rdi repnz scas %es:(%rdi),%al not %rcx sub $0x1,%rcx cmp %rdx,%rcx jb 119e <func0+0x55> test $0x1...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi mov ebx, 1 mov ebp, 0 lea r13, str2_1 jmp short loc_11B1 loc_11AD: add rbx, 1 loc_11B1: mov rdi, r12 call _strlen cmp rax, rbx jb short loc_11D6 test bl, 1 jnz short loc_11AD movzx ...
_BYTE * func0(long long a1) { unsigned long long v1; // rbx int v2; // ebp _BYTE *result; // rax v1 = 1LL; v2 = 0; while ( strlen(a1) >= v1 ) { if ( (v1 & 1) == 0 ) str2_1[v2++] = *(_BYTE *)(a1 + v1 - 1); ++v1; } result = str2_1; str2_1[v2] = 0; return result; }
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI MOV EBX,0x1 MOV EBP,0x0 LEA R13,[0x104040] JMP 0x001011b1 LAB_001011ad: ADD RBX,0x1 LAB_001011b1: MOV RDI,R12 CALL 0x00101070 CMP RAX,RBX JC 0x001011d6 TEST BL,0x1 JNZ 0x001011ad MOVZX EDX,byte ptr [R12 + RBX*0x1 + -0x1] MOVSXD RAX,EBP MOV byte ...
void func0(char *param_1) { size_t sVar1; ulong uVar2; int iVar3; uVar2 = 1; iVar3 = 0; while( true ) { sVar1 = strlen(param_1); if (sVar1 < uVar2) break; if ((uVar2 & 1) == 0) { (&str2_1)[iVar3] = param_1[uVar2 - 1]; iVar3 = iVar3 + 1; } uVar2 = uVar2 + 1; } (&str2_1...
5,642
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* str1) { static char str2[100]; int j = 0; for (int i = 1; i <= strlen(str1); i++) { if (i % 2 == 0) { str2[j++] = str1[i - 1]; } } str2[j] = '\0'; return str2; }
int main() { assert(strcmp(func0("python"), "yhn") == 0); assert(strcmp(func0("program"), "rga") == 0); assert(strcmp(func0("language"), "agae") == 0); return 0; }
O2
c
func0: endbr64 push %r13 mov %rdi,%r13 push %r12 push %rbp lea 0x2ddd(%rip),%rbp push %rbx mov $0x1,%ebx sub $0x8,%rsp callq 1060 <strlen@plt> xor %edx,%edx jmp 12a2 <func0+0x52> nopw %cs:0x0(%rax,%rax,1) test $0x1,%bl jne 129e <func0+0x4e> movzbl -0x1(%r13,%rbx,1),%eax lea 0x1(%rdx...
func0: endbr64 push r13 lea r13, str2_1 push r12 mov r12, rdi push rbp xor ebp, ebp push rbx mov ebx, 1 sub rsp, 8 jmp short loc_12A2 loc_1288: test bl, 1 jnz short loc_129E movzx edx, byte ptr [r12+rbx-1] movsxd rax, ebp add ebp, 1 mov [r13+rax+0], dl loc_129E: add...
_BYTE * func0(long long a1) { int v1; // ebp unsigned long long i; // rbx long long v3; // rax _BYTE *result; // rax v1 = 0; for ( i = 1LL; strlen(a1) >= i; ++i ) { if ( (i & 1) == 0 ) { v3 = v1++; str2_1[v3] = *(_BYTE *)(a1 + i - 1); } } result = str2_1; str2_1[v1] = 0; r...
func0: ENDBR64 PUSH R13 LEA R13,[0x104040] PUSH R12 MOV R12,RDI PUSH RBP XOR EBP,EBP PUSH RBX MOV EBX,0x1 SUB RSP,0x8 JMP 0x001012a2 LAB_00101288: TEST BL,0x1 JNZ 0x0010129e MOVZX EDX,byte ptr [R12 + RBX*0x1 + -0x1] MOVSXD RAX,EBP ADD EBP,0x1 MOV byte ptr [R13 + RAX*0x1],DL LAB_0010129e: ADD RBX,0x1 LAB_001012a2: MOV R...
int1 * func0(char *param_1) { long lVar1; size_t sVar2; ulong uVar3; int iVar4; iVar4 = 0; uVar3 = 1; while( true ) { sVar2 = strlen(param_1); if (sVar2 < uVar3) break; if ((uVar3 & 1) == 0) { lVar1 = (long)iVar4; iVar4 = iVar4 + 1; (&str2_1)[lVar1] = param_1[uVar3 - 1]; ...
5,643
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* str1) { static char str2[100]; int j = 0; for (int i = 1; i <= strlen(str1); i++) { if (i % 2 == 0) { str2[j++] = str1[i - 1]; } } str2[j] = '\0'; return str2; }
int main() { assert(strcmp(func0("python"), "yhn") == 0); assert(strcmp(func0("program"), "rga") == 0); assert(strcmp(func0("language"), "agae") == 0); return 0; }
O3
c
func0: endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp callq 1060 <strlen@plt> test %rax,%rax je 12d8 <func0+0x88> xor %edx,%edx mov $0x1,%ebx lea 0x2dc7(%rip),%rbp nopl 0x0(%rax) test $0x1,%bl jne 12ac <func0+0x5c> movzbl -0x1(%r12,%rbx,1),%eax mov %r...
func0: endbr64 push r13 lea r13, str2_1 push r12 mov r12, rdi push rbp xor ebp, ebp push rbx mov ebx, 1 sub rsp, 8 jmp short loc_12A2 loc_1288: test bl, 1 jnz short loc_129E movzx edx, byte ptr [r12+rbx-1] movsxd rax, ebp add ebp, 1 mov [r13+rax+0], dl loc_129E: add...
_BYTE * func0(char *s) { int v1; // ebp size_t i; // rbx long long v3; // rax _BYTE *result; // rax v1 = 0; for ( i = 1LL; strlen(s) >= i; ++i ) { if ( (i & 1) == 0 ) { v3 = v1++; str2_1[v3] = s[i - 1]; } } result = str2_1; str2_1[v1] = 0; return result; }
func0: ENDBR64 PUSH R13 LEA R13,[0x104040] PUSH R12 MOV R12,RDI PUSH RBP XOR EBP,EBP PUSH RBX MOV EBX,0x1 SUB RSP,0x8 JMP 0x001012a2 LAB_00101288: TEST BL,0x1 JNZ 0x0010129e MOVZX EDX,byte ptr [R12 + RBX*0x1 + -0x1] MOVSXD RAX,EBP ADD EBP,0x1 MOV byte ptr [R13 + RAX*0x1],DL LAB_0010129e: ADD RBX,0x1 LAB_001012a2: MOV R...
int1 * func0(char *param_1) { long lVar1; size_t sVar2; ulong uVar3; int iVar4; iVar4 = 0; uVar3 = 1; while( true ) { sVar2 = strlen(param_1); if (sVar2 < uVar3) break; if ((uVar3 & 1) == 0) { lVar1 = (long)iVar4; iVar4 = iVar4 + 1; (&str2_1)[lVar1] = param_1[uVar3 - 1]; ...
5,644
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> typedef struct { int first; int second; } pair;
char* func0(pair test_list[], int len){ int res = 0; for(int idx = 0; idx < len; idx++){ for(int iidx = idx +1; iidx < len; iidx++){ if(test_list[iidx].first == test_list[idx].second && test_list[idx].second == test_list[iidx].first){ res +=1; } } ...
int main(){ pair test1[] = { {5,6}, {1,2}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res1 = func0(test1, 6); assert(strcmp(res1, "3") == 0); free(res1); pair test2[] = { {5,6}, {1,3}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res2 = func0(test2, 6); assert(strcmp(res2, "2") == 0); free(res...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x14(%rbp) movl $0x0,-0x10(%rbp) jmpq 1290 <func0+0xa7> mov -0x10(%rbp),%eax add $0x1,%eax mov %eax,-0xc(%rbp) jmp 1284 <func0+0x9b> mov -0xc(%rbp),%eax cltq lea 0x0(,%rax,8),...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_14], 0 mov [rbp+var_10], 0 jmp loc_1290 loc_120F: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_C], eax jmp short loc_1284 loc_121A: mov eax, [rbp+var_C] cdqe lea...
char * func0(long long a1, int a2) { int v3; // [rsp+1Ch] [rbp-14h] int i; // [rsp+20h] [rbp-10h] int j; // [rsp+24h] [rbp-Ch] char *s; // [rsp+28h] [rbp-8h] v3 = 0; for ( i = 0; i < a2; ++i ) { for ( j = i + 1; j < a2; ++j ) { if ( *(_DWORD *)(8LL * j + a1) == *(_DWORD *)(8LL * i + a1 + 4)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0x10],0x0 JMP 0x00101290 LAB_0010120f: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00101284 LAB_0010121a: MOV EAX,dw...
char * func0(long param_1,int param_2) { char *__s; uint local_1c; int local_18; int local_14; local_1c = 0; for (local_18 = 0; local_14 = local_18, local_18 < param_2; local_18 = local_18 + 1) { while (local_14 = local_14 + 1, local_14 < param_2) { if ((*(int *)(param_1 + (long)local_14 * 8) ...
5,645
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> typedef struct { int first; int second; } pair;
char* func0(pair test_list[], int len){ int res = 0; for(int idx = 0; idx < len; idx++){ for(int iidx = idx +1; iidx < len; iidx++){ if(test_list[iidx].first == test_list[idx].second && test_list[idx].second == test_list[iidx].first){ res +=1; } } ...
int main(){ pair test1[] = { {5,6}, {1,2}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res1 = func0(test1, 6); assert(strcmp(res1, "3") == 0); free(res1); pair test2[] = { {5,6}, {1,3}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res2 = func0(test2, 6); assert(strcmp(res2, "2") == 0); free(res...
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp test %esi,%esi jle 122d <func0+0x64> lea -0x1(%rsi),%r10d mov %r10d,%r11d add $0x1,%r11 mov %rdi,%r9 mov $0x1,%r8d mov $0x0,%ebx add $0x8,%rdi cmp %r11,%r8 je 1232 <func0+0x69> mov 0x4(%r9),%esi mov %r10d,%eax sub %r8d,%ea...
func0: endbr64 push rbp push rbx sub rsp, 8 test esi, esi jle short loc_1248 lea r11d, [rsi-1] mov r9, rdi mov r8d, 0 mov ebx, 0 lea r10d, [rsi-2] add rdi, 8 loc_1211: cmp r8, r11 jz short loc_124D mov esi, [r9+4] mov eax, r10d sub eax, r8d add rax, r8 l...
long long func0(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // r11 unsigned int v7; // ebx int v8; // r10d long long v9; // rdi long long v10; // rax long long v11; // rbp if ( (int)a2 <= 0 ) { v7 = 0; } else { v6 = (unsigned int)(a...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x00101248 LEA R11D,[RSI + -0x1] MOV R9,RDI MOV R8D,0x0 MOV EBX,0x0 LEA R10D,[RSI + -0x2] ADD RDI,0x8 LAB_00101211: CMP R8,R11 JZ 0x0010124d MOV ESI,dword ptr [R9 + 0x4] MOV EAX,R10D SUB EAX,R8D ADD RAX,R8 LEA RCX,[RDI + RAX*0x8] MOV RAX,R9 LAB_0010122a: CMP...
void * func0(long param_1,int param_2) { long lVar1; void *pvVar2; int iVar3; long lVar4; ulong uVar5; if (param_2 < 1) { iVar3 = 0; } else { iVar3 = 0; lVar4 = param_1 + 8; for (uVar5 = 0; uVar5 != param_2 - 1; uVar5 = uVar5 + 1) { lVar1 = param_1; do { iVar3 = i...
5,646
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> typedef struct { int first; int second; } pair;
char* func0(pair test_list[], int len){ int res = 0; for(int idx = 0; idx < len; idx++){ for(int iidx = idx +1; iidx < len; iidx++){ if(test_list[iidx].first == test_list[idx].second && test_list[idx].second == test_list[iidx].first){ res +=1; } } ...
int main(){ pair test1[] = { {5,6}, {1,2}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res1 = func0(test1, 6); assert(strcmp(res1, "3") == 0); free(res1); pair test2[] = { {5,6}, {1,3}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res2 = func0(test2, 6); assert(strcmp(res2, "2") == 0); free(res...
O2
c
func0: endbr64 push %r12 push %rbx sub $0x8,%rsp test %esi,%esi jle 1436 <func0+0xa6> lea -0x1(%rsi),%r10d mov %rdi,%r8 mov $0x1,%edi xor %ebx,%ebx mov %r10,%r9 add $0x1,%r10 lea 0x8(%r8),%r11 cmp %r10,%rdi je 1400 <func0+0x70> nopl 0x0(%rax) mov %r9d,%eax mov 0x4(%r8),%e...
func0: endbr64 push r12 push rbx sub rsp, 8 test esi, esi jle loc_142E lea r10d, [rsi-1] xor r8d, r8d lea r9d, [rsi-2] xor ebx, ebx lea r11, [rdi+8] cmp r8, r10 jz short loc_13F8 nop dword ptr [rax+00000000h] loc_13C0: mov eax, r9d mov esi, [rdi+4] sub eax, ...
long long func0(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // r10 unsigned int v7; // ebx long long v8; // r11 long long v9; // rax long long v10; // r12 if ( (int)a2 <= 0 ) { v7 = 0; } else { v6 = (unsigned int)(a2 - 1); a5 = 0L...
func0: ENDBR64 PUSH R12 PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x0010142e LEA R10D,[RSI + -0x1] XOR R8D,R8D LEA R9D,[RSI + -0x2] XOR EBX,EBX LEA R11,[RDI + 0x8] CMP R8,R10 JZ 0x001013f8 NOP dword ptr [RAX] LAB_001013c0: MOV EAX,R9D MOV ESI,dword ptr [RDI + 0x4] SUB EAX,R8D ADD RAX,R8 LEA RCX,[R11 + RAX*0x8] MOV RAX,RDI ...
void * func0(long param_1,int param_2) { long lVar1; int *piVar2; long lVar3; void *pvVar4; int iVar5; ulong uVar6; if (param_2 < 1) { iVar5 = 0; } else { uVar6 = 0; iVar5 = 0; lVar1 = param_1 + 8; if ((ulong)(param_2 - 1) != 0) { do { lVar3 = param_1; do ...
5,647
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> typedef struct { int first; int second; } pair;
char* func0(pair test_list[], int len){ int res = 0; for(int idx = 0; idx < len; idx++){ for(int iidx = idx +1; iidx < len; iidx++){ if(test_list[iidx].first == test_list[idx].second && test_list[idx].second == test_list[iidx].first){ res +=1; } } ...
int main(){ pair test1[] = { {5,6}, {1,2}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res1 = func0(test1, 6); assert(strcmp(res1, "3") == 0); free(res1); pair test2[] = { {5,6}, {1,3}, {6,5}, {9,1}, {6,5}, {2,1} }; char* res2 = func0(test2, 6); assert(strcmp(res2, "2") == 0); free(res...
O3
c
func0: endbr64 push %r12 push %rbp push %rbx test %esi,%esi jle 14a2 <func0+0x152> cmp $0x1,%esi je 14a2 <func0+0x152> lea 0x8(%rdi),%r9 xor %ebx,%ebx lea -0x1(%rsi),%r11d mov $0x1,%ecx mov $0x1,%r10d xchg %ax,%ax mov %esi,%eax mov %r11d,%edx mov -0x4(%r9),%r8d sub %ecx,%e...
func0: endbr64 push rbp push rbx sub rsp, 8 test esi, esi jle loc_14A7 cmp esi, 1 jz loc_14A7 mov r8, rdi lea r9, [rdi+8] xor ebx, ebx mov ecx, 1 lea r11d, [rsi-1] mov r10d, 1 nop dword ptr [rax+rax+00h] loc_1388: mov eax, esi mov edx, r11d mov edi, [r9-...
void * func0(long long a1, int a2) { const __m128i *v3; // r9 unsigned int v4; // ebx int i; // ecx unsigned int v6; // edi int v7; // eax unsigned int v8; // edx __m128i v9; // xmm1 const __m128i *v10; // rax __m128i v11; // xmm2 __m128 v12; // xmm0 __m128 v13; // xmm3 __m128i v14; // xmm1 in...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x001014a7 CMP ESI,0x1 JZ 0x001014a7 MOV R8,RDI LEA R9,[RDI + 0x8] XOR EBX,EBX MOV ECX,0x1 LEA R11D,[RSI + -0x1] MOV R10D,0x1 NOP dword ptr [RAX + RAX*0x1] LAB_00101388: MOV EAX,ESI MOV EDX,R11D MOV EDI,dword ptr [R9 + -0x4] SUB EAX,ECX CMP ESI,ECX CMOVLE EA...
void * func0(long param_1,int param_2) { int *piVar1; long lVar2; int iVar3; int iVar4; int *piVar5; int *piVar6; int iVar7; int *piVar8; void *pvVar9; int iVar10; int iVar11; int *piVar12; int iVar13; int iVar14; int iVar15; int iVar16; if ((param_2 < 1) || (param_2 == 1)) { i...
5,648
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(int* L, int size) { char temp[256] = {0}; char numStr[20]; for (int i = 0; i < size; i++) { sprintf(numStr, "%d", L[i]); strcat(temp, numStr); } return atoi(temp); }
int main() { int arr1[] = {11, 33, 50}; assert(func0(arr1, 3) == 113350); int arr2[] = {-1, 2, 3, 4, 5, 6}; assert(func0(arr2, 6) == -123456); int arr3[] = {10, 15, 20, 25}; assert(func0(arr3, 4) == 10152025); printf("All test cases passed!\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x150,%rsp mov %rdi,-0x148(%rbp) mov %esi,-0x14c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movq $0x0,-0x110(%rbp) movq $0x0,-0x108(%rbp) movq $0x0,-0x100(%rbp) movq $0x0,-0xf8(%rbp) movq $0x0,-0xf0(%rbp) movq $0x0,-0xe8(%rbp)...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 150h mov [rbp+var_148], rdi mov [rbp+var_14C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov qword ptr [rbp+dest], 0 mov [rbp+var_108], 0 mov [rbp+var_100], 0 mov [rbp+var_F8], 0 mov [rbp+var_F0], 0 mov [rbp...
int func0(long long a1, int a2) { int i; // [rsp+1Ch] [rbp-134h] char s[32]; // [rsp+20h] [rbp-130h] BYREF char dest[8]; // [rsp+40h] [rbp-110h] BYREF long long v6; // [rsp+48h] [rbp-108h] long long v7; // [rsp+50h] [rbp-100h] long long v8; // [rsp+58h] [rbp-F8h] long long v9; // [rsp+60h] [rbp-F0h] lo...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV qword ptr [RBP + -0x148],RDI MOV dword ptr [RBP + -0x14c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x110],0x0 MOV qword ptr [RBP + -0x108],0x0 MOV qword ptr [RBP + -0x100],0x0 MOV qword ptr [RBP + -0xf8],0x0 MO...
void func0(long param_1,int param_2) { long in_FS_OFFSET; int local_13c; char local_138 [32]; char local_118 [264]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_118[0] = '\0'; local_118[1] = '\0'; local_118[2] = '\0'; local_118[3] = '\0'; local_118[4] = '\0'; local_118[5] ...
5,649
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(int* L, int size) { char temp[256] = {0}; char numStr[20]; for (int i = 0; i < size; i++) { sprintf(numStr, "%d", L[i]); strcat(temp, numStr); } return atoi(temp); }
int main() { int arr1[] = {11, 33, 50}; assert(func0(arr1, 3) == 113350); int arr2[] = {-1, 2, 3, 4, 5, 6}; assert(func0(arr2, 6) == -123456); int arr3[] = {10, 15, 20, 25}; assert(func0(arr3, 4) == 10152025); printf("All test cases passed!\n"); return 0; }
O1
c
func0: endbr64 push %r12 push %rbp push %rbx sub $0x130,%rsp mov %fs:0x28,%rax mov %rax,0x128(%rsp) xor %eax,%eax movq $0x0,0x20(%rsp) movq $0x0,0x28(%rsp) movq $0x0,0x30(%rsp) movq $0x0,0x38(%rsp) movq $0x0,0x40(%rsp) movq $0x0,0x48(%rsp) movq $0x0,0x50(%rsp) movq $0x0,0x58(%rsp) movq...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 138h mov rax, fs:28h mov [rsp+158h+var_30], rax xor eax, eax mov [rsp+158h+var_138], 0 mov [rsp+158h+var_130], 0 mov [rsp+158h+var_128], 0 mov [rsp+158h+var_120], 0 mov [rsp+158h+var_118], 0 mov [rsp+158h+var...
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // rbx _BYTE v4[32]; // [rsp+0h] [rbp-158h] BYREF _QWORD v5[39]; // [rsp+20h] [rbp-138h] BYREF v5[33] = __readfsqword(0x28u); memset(v5, 0, 256); if ( a2 > 0 ) { v2 = a1; do { __sprintf_chk(v4, 1LL, 20LL, &unk_2004, *v2); ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x138 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x128],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0...
void func0(int4 *param_1,int param_2) { int4 *puVar1; long in_FS_OFFSET; int1 auStack_158 [32]; char local_138 [264]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); local_138[0] = '\0'; local_138[1] = '\0'; local_138[2] = '\0'; local_138[3] = '\0'; local_138[4] = '\0'; local_138[5...
5,650
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(int* L, int size) { char temp[256] = {0}; char numStr[20]; for (int i = 0; i < size; i++) { sprintf(numStr, "%d", L[i]); strcat(temp, numStr); } return atoi(temp); }
int main() { int arr1[] = {11, 33, 50}; assert(func0(arr1, 3) == 113350); int arr2[] = {-1, 2, 3, 4, 5, 6}; assert(func0(arr2, 6) == -123456); int arr3[] = {10, 15, 20, 25}; assert(func0(arr3, 4) == 10152025); printf("All test cases passed!\n"); return 0; }
O2
c
func0: endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 push %rbp push %rbx sub $0x130,%rsp mov %fs:0x28,%rax mov %rax,0x128(%rsp) xor %eax,%eax lea 0x20(%rsp),%r12 movaps %xmm0,0x20(%rsp) movaps %xmm0,0x30(%rsp) movaps %xmm0,0x40(%rsp) movaps %xmm0,0x50(%rsp) movaps %xmm0,0x60(%rsp) mo...
func0: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 push rbp push rbx sub rsp, 130h mov rax, fs:28h mov [rsp+158h+var_30], rax xor eax, eax lea r12, [rsp+158h+var_138] movaps [rsp+158h+var_138], xmm0 movaps [rsp+158h+var_128], xmm0 movaps [rsp+158h+var_118], xmm0 movaps [...
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // rbx long long v3; // r8 _BYTE v5[32]; // [rsp-8h] [rbp-158h] BYREF _OWORD v6[16]; // [rsp+18h] [rbp-138h] BYREF unsigned long long v7; // [rsp+120h] [rbp-30h] v7 = __readfsqword(0x28u); memset(v6, 0, sizeof(v6)); if ( a2 > 0 ) { v2...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x130 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x128],RAX XOR EAX,EAX LEA R12,[RSP + 0x20] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0...
void func0(int4 *param_1,int param_2) { int4 *puVar1; int4 uVar2; long in_FS_OFFSET; int1 auStack_158 [32]; int1 local_138 [16]; int1 local_128 [16]; int1 local_118 [16]; int1 local_108 [16]; int1 local_f8 [16]; int1 local_e8 [16]; int1 local_d8 [16]; int1 local_c8 [16]; int1 local_b8 [16]; ...
5,651
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(int* L, int size) { char temp[256] = {0}; char numStr[20]; for (int i = 0; i < size; i++) { sprintf(numStr, "%d", L[i]); strcat(temp, numStr); } return atoi(temp); }
int main() { int arr1[] = {11, 33, 50}; assert(func0(arr1, 3) == 113350); int arr2[] = {-1, 2, 3, 4, 5, 6}; assert(func0(arr2, 6) == -123456); int arr3[] = {10, 15, 20, 25}; assert(func0(arr3, 4) == 10152025); printf("All test cases passed!\n"); return 0; }
O3
c
func0: endbr64 push %r14 pxor %xmm0,%xmm0 push %r13 push %r12 push %rbp push %rbx sub $0x130,%rsp mov %fs:0x28,%rax mov %rax,0x128(%rsp) xor %eax,%eax lea 0x20(%rsp),%r12 movaps %xmm0,0x20(%rsp) movaps %xmm0,0x30(%rsp) movaps %xmm0,0x40(%rsp) movaps %xmm0,0x50(%rsp) movaps %xmm0,0x60(%rsp) mo...
func0: endbr64 push r14 pxor xmm0, xmm0 push r13 push r12 push rbp push rbx sub rsp, 130h mov rax, fs:28h mov [rsp+158h+var_30], rax xor eax, eax lea r12, [rsp+158h+nptr] movaps xmmword ptr [rsp+158h+nptr], xmm0 movaps [rsp+158h+var_128], xmm0 movaps [rsp+158h+var_118], xmm0 mov...
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // rbx long long v3; // r8 _BYTE v5[32]; // [rsp-8h] [rbp-158h] BYREF char nptr[16]; // [rsp+18h] [rbp-138h] BYREF __int128 v7; // [rsp+28h] [rbp-128h] __int128 v8; // [rsp+38h] [rbp-118h] __int128 v9; // [rsp+48h] [rbp-108h] __int128 v10; /...
func0: ENDBR64 PUSH R14 PXOR XMM0,XMM0 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x130 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x128],RAX XOR EAX,EAX LEA R12,[RSP + 0x20] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0...
void func0(int4 *param_1,int param_2) { int4 *puVar1; int4 uVar2; long in_FS_OFFSET; int auStack_158 [32]; int local_138 [16]; int local_128 [16]; int local_118 [16]; int local_108 [16]; int local_f8 [16]; int local_e8 [16]; int local_d8 [16]; int local_c8 [16]; int local_b8 [16]; int local...
5,652
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
int func0(const char *text, int *start, int *end, char *matched) { regex_t regex; regmatch_t match; if (regcomp(&regex, "\\w+ly", REG_EXTENDED) != 0) { return 0; // Failed to compile } if (regexec(&regex, text, 1, &match, 0) == 0) { *start = match.rm_so; *end = ma...
int main() { int start, end; char matched[100]; assert(func0("clearly!! we can see the sky", &start, &end, matched) && start == 0 && end == 7 && strcmp(matched, "clearly") == 0); assert(func0("seriously!! there are many roses", &start, &end, matched) && start == 0 && end == 9 && strcmp(matched...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp add $0xffffffffffffff80,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %rdx,-0x78(%rbp) mov %rcx,-0x80(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x50(%rbp),%rax mov $0x1,%edx lea 0xdc4(%rip),%rsi mov %rax,%rdi callq...
func0: endbr64 push rbp mov rbp, rsp add rsp, 0FFFFFFFFFFFFFF80h mov [rbp+string], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+dest], rcx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [rbp+preg] mov edx, 1; cflags lea rcx, pattern; "\\w+ly" mo...
long long func0(const char *a1, regoff_t *a2, regoff_t *a3, char *a4) { regmatch_t pmatch; // [rsp+28h] [rbp-58h] BYREF regex_t preg; // [rsp+30h] [rbp-50h] BYREF unsigned long long v9; // [rsp+78h] [rbp-8h] v9 = __readfsqword(0x28u); if ( regcomp(&preg, "\\w+ly", 1) ) return 0LL; if ( regexec(&preg, ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP ADD RSP,-0x80 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV EDX,0x1 LEA RCX,[0x102008] MOV RSI,RCX MOV RD...
int8 func0(char *param_1,int *param_2,int *param_3,char *param_4) { int iVar1; int8 uVar2; long in_FS_OFFSET; regmatch_t local_60; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"\\w+ly",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,para...
5,653
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
int func0(const char *text, int *start, int *end, char *matched) { regex_t regex; regmatch_t match; if (regcomp(&regex, "\\w+ly", REG_EXTENDED) != 0) { return 0; // Failed to compile } if (regexec(&regex, text, 1, &match, 0) == 0) { *start = match.rm_so; *end = ma...
int main() { int start, end; char matched[100]; assert(func0("clearly!! we can see the sky", &start, &end, matched) && start == 0 && end == 7 && strcmp(matched, "clearly") == 0); assert(func0("seriously!! there are many roses", &start, &end, matched) && start == 0 && end == 9 && strcmp(matched...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x60,%rsp mov %rdi,%rbp mov %rsi,%r14 mov %rdx,%r13 mov %rcx,%r12 mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%rdi mov $0x1,%edx lea 0xdde(%rip),%rsi callq 10e0 <regcomp@plt> mov $...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 60h mov rbp, rdi mov r14, rsi mov r13, rdx mov r12, rcx mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea rdi, [rsp+88h+var_78] mov edx, 1 lea rsi, aWLy; "\\w+ly" call _regcomp mov...
long long func0(long long a1, _DWORD *a2, _DWORD *a3, long long a4) { unsigned int v6; // ebx int v8; // eax int v9; // ebx int v10; // ebx int v11; // [rsp+8h] [rbp-80h] BYREF int v12; // [rsp+Ch] [rbp-7Ch] _BYTE v13[72]; // [rsp+10h] [rbp-78h] BYREF unsigned long long v14; // [rsp+58h] [rbp-30h] v...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x60 MOV RBP,RDI MOV R14,RSI MOV R13,RDX MOV R12,RCX 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 0x001010f0 MOV EBX,0x0 TEST EAX,EAX JZ 0x00101273 LAB_00101254: MOV RAX...
int8 func0(char *param_1,int *param_2,int *param_3,char *param_4) { int iVar1; int8 uVar2; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_78,"\\w+ly",1); uVar2 = 0; if (iVar1 == 0) { uVar2 = 0; iV...
5,654
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
int func0(const char *text, int *start, int *end, char *matched) { regex_t regex; regmatch_t match; if (regcomp(&regex, "\\w+ly", REG_EXTENDED) != 0) { return 0; // Failed to compile } if (regexec(&regex, text, 1, &match, 0) == 0) { *start = match.rm_so; *end = ma...
int main() { int start, end; char matched[100]; assert(func0("clearly!! we can see the sky", &start, &end, matched) && start == 0 && end == 7 && strcmp(matched, "clearly") == 0); assert(func0("seriously!! there are many roses", &start, &end, matched) && start == 0 && end == 9 && strcmp(matched...
O2
c
func0: endbr64 push %r15 push %r14 mov %rsi,%r14 lea 0xc92(%rip),%rsi push %r13 mov %rdx,%r13 mov $0x1,%edx push %r12 xor %r12d,%r12d push %rbp mov %rcx,%rbp push %rbx mov %rdi,%rbx sub $0x68,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r15 mov...
func0: endbr64 push r15 push r14 mov r14, rsi lea rsi, aWLy; "\\w+ly" push r13 mov r13, rdx mov edx, 1 push r12 xor r12d, r12d push rbp mov rbp, rcx push rbx mov rbx, rdi sub rsp, 68h mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea r15, [rsp+9...
long long func0(long long a1, _DWORD *a2, _DWORD *a3, long long a4) { unsigned int v5; // r12d long long v8; // rax int v9; // r12d int v10; // r12d _DWORD v11[2]; // [rsp+8h] [rbp-90h] BYREF _BYTE v12[72]; // [rsp+10h] [rbp-88h] BYREF unsigned long long v13; // [rsp+58h] [rbp-40h] v5 = 0; v13 = __r...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RSI LEA RSI,[0x102004] PUSH R13 MOV R13,RDX MOV EDX,0x1 PUSH R12 XOR R12D,R12D PUSH RBP MOV RBP,RCX PUSH RBX MOV RBX,RDI SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R15,[RSP + 0x10] MOV RDI,R15 CALL 0x001010e0 TEST EAX,EAX JZ 0x001013d...
int8 func0(char *param_1,int *param_2,int *param_3,char *param_4) { int iVar1; int8 uVar2; long in_FS_OFFSET; regmatch_t local_90; regex_t local_88; long local_40; uVar2 = 0; local_40 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_88,"\\w+ly",1); if (iVar1 == 0) { uVar2 = 0; iV...
5,655
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
int func0(const char *text, int *start, int *end, char *matched) { regex_t regex; regmatch_t match; if (regcomp(&regex, "\\w+ly", REG_EXTENDED) != 0) { return 0; // Failed to compile } if (regexec(&regex, text, 1, &match, 0) == 0) { *start = match.rm_so; *end = ma...
int main() { int start, end; char matched[100]; assert(func0("clearly!! we can see the sky", &start, &end, matched) && start == 0 && end == 7 && strcmp(matched, "clearly") == 0); assert(func0("seriously!! there are many roses", &start, &end, matched) && start == 0 && end == 9 && strcmp(matched...
O3
c
func0: endbr64 push %r15 push %r14 mov %rsi,%r14 lea 0xc92(%rip),%rsi push %r13 mov %rdx,%r13 mov $0x1,%edx push %r12 xor %r12d,%r12d push %rbp mov %rcx,%rbp push %rbx mov %rdi,%rbx sub $0x68,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r15 mov...
func0: endbr64 push r14 push r13 mov r13, rsi lea rsi, pattern; "\\w+ly" push r12 mov r12, rdx mov edx, 1; cflags push rbp mov rbp, rcx push rbx mov rbx, rdi sub rsp, 60h mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea r14, [rsp+88h+preg] mov rdi...
long long func0(char *string, regoff_t *a2, regoff_t *a3, char *a4) { long long rm_so; // rdx regoff_t rm_eo; // eax size_t v9; // r12 regmatch_t pmatch; // [rsp+8h] [rbp-80h] BYREF regex_t preg; // [rsp+10h] [rbp-78h] BYREF unsigned long long v12; // [rsp+58h] [rbp-30h] v12 = __readfsqword(0x28u); if...
func0: ENDBR64 PUSH R14 PUSH R13 MOV R13,RSI LEA RSI,[0x102004] PUSH R12 MOV R12,RDX MOV EDX,0x1 PUSH RBP MOV RBP,RCX PUSH RBX MOV RBX,RDI SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x001010e0 TEST EAX,EAX JZ 0x001013d0 LAB_001013a9: XOR EAX...
int8 func0(char *param_1,int *param_2,int *param_3,char *param_4) { int iVar1; int8 uVar2; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_78,"\\w+ly",1); if (iVar1 == 0) { iVar1 = regexec(&local_78,para...
5,656
func0
#include <assert.h>
int func0(int l) { int surfacearea = 6 * l * l; return surfacearea; }
int main() { assert(func0(5) == 150); assert(func0(3) == 54); assert(func0(10) == 600); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax imul %eax,%eax mov %eax,%edx mov %edx,%eax add %eax,%eax add %edx,%eax add %eax,%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 mov edx, eax mov eax, edx add eax, eax add eax, edx add eax, eax mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1) { return (unsigned int)(6 * a1 * a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] IMUL EAX,EAX MOV EDX,EAX MOV EAX,EDX ADD EAX,EAX ADD EAX,EDX ADD EAX,EAX 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 * 6; }
5,657
func0
#include <assert.h>
int func0(int l) { int surfacearea = 6 * l * l; return surfacearea; }
int main() { assert(func0(5) == 150); assert(func0(3) == 54); assert(func0(10) == 600); return 0; }
O1
c
func0: endbr64 imul %edi,%edi lea (%rdi,%rdi,2),%eax add %eax,%eax retq
func0: endbr64 imul edi, edi lea eax, [rdi+rdi*2] add eax, eax retn
long long func0(int a1) { return (unsigned int)(6 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI + RDI*0x2] ADD EAX,EAX RET
int func0(int param_1) { return param_1 * param_1 * 6; }
5,658
func0
#include <assert.h>
int func0(int l) { int surfacearea = 6 * l * l; return surfacearea; }
int main() { assert(func0(5) == 150); assert(func0(3) == 54); assert(func0(10) == 600); return 0; }
O2
c
func0: endbr64 imul %edi,%edi lea (%rdi,%rdi,2),%eax add %eax,%eax retq nopl (%rax)
func0: endbr64 imul edi, edi lea eax, [rdi+rdi*2] add eax, eax retn
long long func0(int a1) { return (unsigned int)(6 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI + RDI*0x2] ADD EAX,EAX RET
int func0(int param_1) { return param_1 * param_1 * 6; }
5,659
func0
#include <assert.h>
int func0(int l) { int surfacearea = 6 * l * l; return surfacearea; }
int main() { assert(func0(5) == 150); assert(func0(3) == 54); assert(func0(10) == 600); return 0; }
O3
c
func0: endbr64 imul %edi,%edi lea (%rdi,%rdi,2),%eax add %eax,%eax retq nopl (%rax)
func0: endbr64 imul edi, edi lea eax, [rdi+rdi*2] add eax, eax retn
long long func0(int a1) { return (unsigned int)(6 * a1 * a1); }
func0: ENDBR64 IMUL EDI,EDI LEA EAX,[RDI + RDI*0x2] ADD EAX,EAX RET
int func0(int param_1) { return param_1 * param_1 * 6; }
5,660
func0
#include <stdio.h> #include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] > 0) { n1 += 1; } } double result = ((double)n1 / n); result = round(result * 100) / 100; return result; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.54); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.69); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.56); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 11ce <func0+0x45> mov -0xc(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax test %eax,%eax jle 1...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short loc_11CE loc_11AC: mov eax, [rbp+var_C] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] test ea...
double func0(long long a1, int a2) { int v3; // [rsp+10h] [rbp-10h] int i; // [rsp+14h] [rbp-Ch] v3 = 0; for ( i = 0; i < a2; ++i ) { if ( *(int *)(4LL * i + a1) > 0 ) ++v3; } return round((double)v3 / (double)a2 * 100.0) / 100.0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP 0x001011ce LAB_001011ac: MOV EAX,dword ptr [RBP + -0xc] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr...
double func0(long param_1,int param_2) { double dVar1; int4 local_18; int4 local_14; local_18 = 0; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { if (0 < *(int *)(param_1 + (long)local_14 * 4)) { local_18 = local_18 + 1; } } dVar1 = round(((double)local_18 / (double)pa...
5,661
func0
#include <stdio.h> #include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] > 0) { n1 += 1; } } double result = ((double)n1 / n); result = round(result * 100) / 100; return result; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.54); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.69); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.56); ...
O1
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 11e7 <func0+0x5e> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rdi mov $0x0,%edx cmpl $0x0,(%rax) setg %cl movzbl %cl,%ecx add %ecx,%edx add $0x4,%rax cmp %rdi,%rax jne 11a5 <func0+0x1c> pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0...
func0: endbr64 sub rsp, 8 test esi, esi jle short loc_11E7 mov rax, rdi lea edx, [rsi-1] lea rdi, [rdi+rdx*4+4] mov edx, 0 loc_11A5: cmp dword ptr [rax], 0 setnle cl movzx ecx, cl add edx, ecx add rax, 4 cmp rax, rdi jnz short loc_11A5 loc_11B9: pxor xmm0, xmm0 cvtsi...
double func0(_DWORD *a1, int a2) { _DWORD *v2; // rax long long v3; // rdi int v4; // edx if ( a2 <= 0 ) { v4 = 0; } else { v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; v4 = 0; do v4 += *v2++ > 0; while ( v2 != (_DWORD *)v3 ); } return round((double)v4 / (double)a2 * 100...
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x001011e7 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RDI,[RDI + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_001011a5: CMP dword ptr [RAX],0x0 SETG CL MOVZX ECX,CL ADD EDX,ECX ADD RAX,0x4 CMP RAX,RDI JNZ 0x001011a5 LAB_001011b9: PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,ESI ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int *param_1,int param_2) { int *piVar1; int iVar2; double dVar3; if (param_2 < 1) { iVar2 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = iVar2 + (...
5,662
func0
#include <stdio.h> #include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] > 0) { n1 += 1; } } double result = ((double)n1 / n); result = round(result * 100) / 100; return result; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.54); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.69); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.56); ...
O2
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 13f8 <func0+0x68> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rcx xor %eax,%eax nopw %cs:0x0(%rax,%rax,1) mov (%rdi),%r8d xor %edx,%edx test %r8d,%r8d setg %dl add $0x4,%rdi add %edx,%eax cmp %rdi,%rcx jne 13b0 <func0+0x20> pxor %x...
func0: endbr64 sub rsp, 8 test esi, esi jle short loc_13F8 lea eax, [rsi-1] lea rcx, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00000000h] loc_13B0: mov r8d, [rdi] xor edx, edx test r8d, r8d setnle dl add rdi, 4 add eax, edx cmp rcx, rdi jnz short loc_13B0 px...
double func0(_DWORD *a1, int a2) { long long v2; // rcx int v3; // eax int v4; // edx double v5; // xmm0_8 if ( a2 <= 0 ) { v5 = 0.0; } else { v2 = (long long)&a1[a2 - 1 + 1]; v3 = 0; do { v4 = *a1++ > 0; v3 += v4; } while ( (_DWORD *)v2 != a1 ); v5 = (dou...
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x001013f8 LEA EAX,[RSI + -0x1] LEA RCX,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr CS:[RAX + RAX*0x1] LAB_001013b0: MOV R8D,dword ptr [RDI] XOR EDX,EDX TEST R8D,R8D SETG DL ADD RDI,0x4 ADD EAX,EDX CMP RCX,RDI JNZ 0x001013b0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX LAB_001013ce: P...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int *param_1,int param_2) { int *piVar1; int iVar2; int iVar3; double dVar4; if (param_2 < 1) { dVar4 = 0.0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar3 = 0; do { iV...
5,663
func0
#include <stdio.h> #include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] > 0) { n1 += 1; } } double result = ((double)n1 / n); result = round(result * 100) / 100; return result; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.54); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.69); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.56); ...
O3
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 1418 <func0+0xf8> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 141e <func0+0xfe> mov %esi,%edx pxor %xmm0,%xmm0 mov %rdi,%rax shr $0x2,%edx movdqa %xmm0,%xmm2 shl $0x4,%rdx add %rdi,%rdx nopl 0x0(%rax,%rax,1) movdqu (%rax),%xmm1 add $0x10,%...
func0: endbr64 sub rsp, 8 test esi, esi jle loc_1410 lea eax, [rsi-1] mov rcx, rdi cmp eax, 2 jbe loc_1416 mov edx, esi pxor xmm0, xmm0 mov rax, rdi shr edx, 2 movdqa xmm2, xmm0 shl rdx, 4 add rdx, rdi nop word ptr [rax+rax+00000000h] loc_1360: movdqu xmm1, xmmwor...
double func0(const __m128i *a1, int a2) { __m128i v2; // xmm0 const __m128i *v3; // rax __m128i v4; // xmm1 int v5; // edx __m128i v6; // xmm0 int v7; // eax long long v8; // r8 double v9; // xmm0_8 if ( a2 <= 0 ) { v9 = 0.0; return round(v9 / (double)a2 * 100.0) / 100.0; } if ( (unsig...
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x00101410 LEA EAX,[RSI + -0x1] MOV RCX,RDI CMP EAX,0x2 JBE 0x00101416 MOV EDX,ESI PXOR XMM0,XMM0 MOV RAX,RDI SHR EDX,0x2 MOVDQA XMM2,XMM0 SHL RDX,0x4 ADD RDX,RDI NOP word ptr CS:[RAX + RAX*0x1] LAB_00101360: MOVDQU XMM1,xmmword ptr [RAX] ADD RAX,0x10 PCMPGTD XMM1,XMM2 PSUBD ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int *param_1,uint param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; uint uVar6; int iVar7; int iVar9; double dVar8; int iVar10; int iVar11; if ((int)param_2 < 1) { d...
5,664
func0
#include <assert.h>
int func0(int list1[], int size) { int max = list1[0]; for (int i = 0; i < size; i++) { if (list1[i] < max) { max = list1[i]; } } return max; }
int main() { int arr1[] = {1, 2, 3, -4, -6}; int arr2[] = {1, 2, 3, -8, -9}; int arr3[] = {1, 2, 3, 4, -1}; assert(func0(arr1, 5) == -6); assert(func0(arr2, 5) == -9); assert(func0(arr3, 5) == -1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov -0x18(%rbp),%rax mov (%rax),%eax mov %eax,-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 c...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_8], eax mov [rbp+var_4], 0 jmp short loc_11C2 loc_118A: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx ...
long long func0(unsigned int *a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = *a1; for ( i = 0; i < a2; ++i ) { if ( (int)v3 > (int)a1[i] ) v3 = a1[i]; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x8],EAX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011c2 LAB_0010118a: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [...
int func0(int *param_1,int param_2) { int local_10; int local_c; local_10 = *param_1; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (param_1[local_c] < local_10) { local_10 = param_1[local_c]; } } return local_10; }
5,665
func0
#include <assert.h>
int func0(int list1[], int size) { int max = list1[0]; for (int i = 0; i < size; i++) { if (list1[i] < max) { max = list1[i]; } } return max; }
int main() { int arr1[] = {1, 2, 3, -4, -6}; int arr2[] = {1, 2, 3, -8, -9}; int arr3[] = {1, 2, 3, 4, -1}; assert(func0(arr1, 5) == -6); assert(func0(arr2, 5) == -9); assert(func0(arr3, 5) == -1); return 0; }
O1
c
func0: endbr64 mov (%rdi),%edx test %esi,%esi jle 118e <func0+0x25> mov %rdi,%rax lea -0x1(%rsi),%ecx lea 0x4(%rdi,%rcx,4),%rsi mov (%rax),%ecx cmp %ecx,%edx cmovg %ecx,%edx add $0x4,%rax cmp %rsi,%rax jne 117e <func0+0x15> mov %edx,%eax retq
func0: endbr64 mov edx, [rdi] test esi, esi jle short loc_118E mov rax, rdi lea ecx, [rsi-1] lea rsi, [rdi+rcx*4+4] loc_117E: mov ecx, [rax] cmp edx, ecx cmovg edx, ecx add rax, 4 cmp rax, rsi jnz short loc_117E loc_118E: mov eax, edx retn
long long func0(unsigned int *a1, int a2) { unsigned int v2; // edx unsigned int *v3; // rax long long v4; // rsi v2 = *a1; if ( a2 > 0 ) { v3 = a1; v4 = (long long)&a1[a2 - 1 + 1]; do { if ( (int)v2 > (int)*v3 ) v2 = *v3; ++v3; } while ( v3 != (unsigned int *)v...
func0: ENDBR64 MOV EDX,dword ptr [RDI] TEST ESI,ESI JLE 0x0010118e MOV RAX,RDI LEA ECX,[RSI + -0x1] LEA RSI,[RDI + RCX*0x4 + 0x4] LAB_0010117e: MOV ECX,dword ptr [RAX] CMP EDX,ECX CMOVG EDX,ECX ADD RAX,0x4 CMP RAX,RSI JNZ 0x0010117e LAB_0010118e: MOV EAX,EDX RET
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; iVar2 = *param_1; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (*param_1 < iVar2) { iVar2 = *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1); } return iVar2; }
5,666
func0
#include <assert.h>
int func0(int list1[], int size) { int max = list1[0]; for (int i = 0; i < size; i++) { if (list1[i] < max) { max = list1[i]; } } return max; }
int main() { int arr1[] = {1, 2, 3, -4, -6}; int arr2[] = {1, 2, 3, -8, -9}; int arr3[] = {1, 2, 3, 4, -1}; assert(func0(arr1, 5) == -6); assert(func0(arr2, 5) == -9); assert(func0(arr3, 5) == -1); return 0; }
O2
c
func0: endbr64 mov (%rdi),%eax test %esi,%esi jle 1170 <func0+0x30> lea -0x1(%rsi),%edx add $0x4,%rdi lea (%rdi,%rdx,4),%rcx mov %eax,%edx jmp 1166 <func0+0x26> nopl 0x0(%rax) mov (%rdi),%edx add $0x4,%rdi cmp %edx,%eax cmovg %edx,%eax cmp %rcx,%rdi jne 1160 <func0+0x20> retq no...
func0: endbr64 mov eax, [rdi] test esi, esi jle short locret_1170 lea edx, [rsi-1] add rdi, 4 lea rcx, [rdi+rdx*4] mov edx, eax jmp short loc_1166 loc_1160: mov edx, [rdi] add rdi, 4 loc_1166: cmp eax, edx cmovg eax, edx cmp rdi, rcx jnz short loc_1160 locret_1170: r...
long long func0(unsigned int *a1, int a2) { long long result; // rax int *v3; // rdi int *v4; // rcx int i; // edx result = *a1; if ( a2 > 0 ) { v3 = (int *)(a1 + 1); v4 = &v3[a2 - 1]; for ( i = result; ; i = *v3++ ) { if ( (int)result > i ) result = (unsigned int)i; ...
func0: ENDBR64 MOV EAX,dword ptr [RDI] TEST ESI,ESI JLE 0x00101170 LEA EDX,[RSI + -0x1] ADD RDI,0x4 LEA RCX,[RDI + RDX*0x4] MOV EDX,EAX JMP 0x00101166 LAB_00101160: MOV EDX,dword ptr [RDI] ADD RDI,0x4 LAB_00101166: CMP EAX,EDX CMOVG EAX,EDX CMP RDI,RCX JNZ 0x00101160 LAB_00101170: RET
void func0(int *param_1,int param_2) { int *piVar1; int iVar2; int iVar3; iVar2 = *param_1; if (0 < param_2) { param_1 = param_1 + 1; piVar1 = param_1 + (param_2 - 1); iVar3 = iVar2; while( true ) { if (iVar3 < iVar2) { iVar2 = iVar3; } if (param_1 == piVar1) brea...
5,667
func0
#include <assert.h>
int func0(int list1[], int size) { int max = list1[0]; for (int i = 0; i < size; i++) { if (list1[i] < max) { max = list1[i]; } } return max; }
int main() { int arr1[] = {1, 2, 3, -4, -6}; int arr2[] = {1, 2, 3, -8, -9}; int arr3[] = {1, 2, 3, 4, -1}; assert(func0(arr1, 5) == -6); assert(func0(arr2, 5) == -9); assert(func0(arr3, 5) == -1); return 0; }
O3
c
func0: endbr64 mov (%rdi),%eax test %esi,%esi jle 1211 <func0+0xd1> lea -0x1(%rsi),%edx cmp $0x2,%edx jbe 1219 <func0+0xd9> mov %esi,%edx movd %eax,%xmm4 mov %rdi,%rax shr $0x2,%edx pshufd $0x0,%xmm4,%xmm0 shl $0x4,%rdx add %rdi,%rdx nopw 0x0(%rax,%rax,1) movdqu (%rax),%xmm1 movdqu (...
func0: endbr64 mov eax, [rdi] mov ecx, esi test esi, esi jle locret_1216 lea edx, [rsi-1] cmp edx, 2 jbe loc_1221 mov edx, esi movd xmm4, eax mov rax, rdi shr edx, 2 pshufd xmm0, xmm4, 0 shl rdx, 4 add rdx, rdi nop dword ptr [rax+00h] loc_1178: movdqu xmm1, xmmwor...
long long func0(const __m128i *a1, int a2) { long long result; // rax __m128i v4; // xmm4 const __m128i *v5; // rax __m128i v6; // xmm0 __m128i v7; // xmm1 __m128i v8; // xmm3 __m128i v9; // xmm1 __m128i v10; // xmm2 signed int v11; // edx __m128i v12; // xmm1 __m128i v13; // xmm0 __m128i v14; ...
func0: ENDBR64 MOV EAX,dword ptr [RDI] MOV ECX,ESI TEST ESI,ESI JLE 0x00101216 LEA EDX,[RSI + -0x1] CMP EDX,0x2 JBE 0x00101221 MOV EDX,ESI MOVD XMM4,EAX MOV RAX,RDI SHR EDX,0x2 PSHUFD XMM0,XMM4,0x0 SHL RDX,0x4 ADD RDX,RDI NOP dword ptr [RAX] LAB_00101178: MOVDQU XMM1,xmmword ptr [RAX] MOVDQU XMM3,xmmword ptr [RAX] ADD ...
uint func0(uint *param_1,uint param_2) { uint *puVar1; uint *puVar2; uint *puVar3; uint uVar4; uint *puVar5; uint *puVar6; uint *puVar7; uint uVar8; uint *puVar9; uint uVar10; uint uVar11; uint uVar12; uint uVar13; uVar8 = *param_1; if (0 < (int)param_2) { if (param_2 - 1 < 3) { ...
5,668
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h>
char* func0(int test_list[][5], int rows, int K, int N) { char* result = (char*)malloc(1000 * sizeof(char)); // Allocate ample memory for the output strcpy(result, ""); // Initialize result string strcat(result, "["); for (int i = 0; i < rows; i++) { // N is the number of elements in each tup...
int main() { int list1[4][5] = {{5, 3, 2, 1, 4}, {3, 4, 9, 2, 1}, {9, 1, 2, 3, 5}, {4, 8, 2, 1, 7}}; int list2[4][5] = {{7, 8, 4, 9}, {11, 8, 12, 4}, {4, 1, 7, 8}, {3, 6, 9, 7}}; char* res1 = func0(list1, 4, 2, 5); char* res2 = func0(list1, 4, 1, 5); char* res3 = func0(list2, 4, 1, 4); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x50,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %edx,-0x40(%rbp) mov %ecx,-0x44(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov $0x3e8,%edi callq 10f0 <malloc@plt> mov %rax,-0x20(%rbp) mov -0x20(%rbp),%rax movb $0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov [rbp+var_44], ecx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov edi, 3E8h; size call _malloc mov [rbp+s], rax mov rax, [rbp+s] mov byt...
char * func0(long long a1, int a2, int a3, int a4) { int i; // [rsp+28h] [rbp-28h] int j; // [rsp+2Ch] [rbp-24h] char *s; // [rsp+30h] [rbp-20h] char src[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v11; // [rsp+48h] [rbp-8h] v11 = __readfsqword(0x28u); s = (char *)malloc(0x3E8uLL); *s = 0; *...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV dword ptr [RBP + -0x44],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV EDI,0x3e8 CALL 0x00101110 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qw...
char * func0(long param_1,int param_2,int param_3,int param_4) { char *__s; size_t sVar1; char *pcVar2; long in_FS_OFFSET; int local_30; int local_2c; char local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __s = (char *)malloc(1000); *__s = '\0'; sVar1 = strlen(__s); ...
5,669
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h>
char* func0(int test_list[][5], int rows, int K, int N) { char* result = (char*)malloc(1000 * sizeof(char)); // Allocate ample memory for the output strcpy(result, ""); // Initialize result string strcat(result, "["); for (int i = 0; i < rows; i++) { // N is the number of elements in each tup...
int main() { int list1[4][5] = {{5, 3, 2, 1, 4}, {3, 4, 9, 2, 1}, {9, 1, 2, 3, 5}, {4, 8, 2, 1, 7}}; int list2[4][5] = {{7, 8, 4, 9}, {11, 8, 12, 4}, {4, 1, 7, 8}, {3, 6, 9, 7}}; char* res1 = func0(list1, 4, 2, 5); char* res2 = func0(list1, 4, 1, 5); char* res3 = func0(list2, 4, 1, 4); ...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,%rbx mov %esi,%r15d mov %esi,0x8(%rsp) mov %edx,%r14d mov %edx,0xc(%rsp) mov %ecx,%ebp mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax mov $0x3e8,%edi callq 10e0 <malloc@p...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 48h mov rbx, rdi mov r14d, esi mov [rsp+78h+var_6C], esi mov [rsp+78h+var_60], edx mov [rsp+78h+var_5C], ecx mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax mov edi, 3E8h call ...
_BYTE * func0(long long a1, int a2, int a3, int a4) { _BYTE *v4; // r12 long long v5; // rbx int v6; // r13d int i; // [rsp+8h] [rbp-70h] _BYTE v12[10]; // [rsp+2Eh] [rbp-4Ah] BYREF unsigned long long v13; // [rsp+38h] [rbp-40h] v13 = __readfsqword(0x28u); v4 = (_BYTE *)malloc(1000LL); *v4 = 0; __s...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV R14D,ESI MOV dword ptr [RSP + 0xc],ESI MOV dword ptr [RSP + 0x18],EDX MOV dword ptr [RSP + 0x1c],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV EDI,0x3e8 CALL 0x00101100 MOV R12,RAX MOV byte...
int1 * func0(long param_1,int param_2,int param_3,int param_4) { int1 *puVar1; long lVar2; int iVar3; long in_FS_OFFSET; int local_70; long local_68; int1 local_4a [10]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = (int1 *)malloc(1000); *puVar1 = 0; __strcat_chk(puVar1,...
5,670
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h>
char* func0(int test_list[][5], int rows, int K, int N) { char* result = (char*)malloc(1000 * sizeof(char)); // Allocate ample memory for the output strcpy(result, ""); // Initialize result string strcat(result, "["); for (int i = 0; i < rows; i++) { // N is the number of elements in each tup...
int main() { int list1[4][5] = {{5, 3, 2, 1, 4}, {3, 4, 9, 2, 1}, {9, 1, 2, 3, 5}, {4, 8, 2, 1, 7}}; int list2[4][5] = {{7, 8, 4, 9}, {11, 8, 12, 4}, {4, 1, 7, 8}, {3, 6, 9, 7}}; char* res1 = func0(list1, 4, 2, 5); char* res2 = func0(list1, 4, 1, 5); char* res3 = func0(list2, 4, 1, 4); ...
O2
c
func0: endbr64 push %r15 push %r14 mov %ecx,%r14d push %r13 mov %rdi,%r13 mov $0x3e8,%edi push %r12 push %rbp push %rbx mov %esi,%ebx sub $0x48,%rsp mov %edx,0x14(%rsp) mov %esi,0x1c(%rsp) mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax callq 1120 <malloc@plt> mov $0x5b...
func0: endbr64 push r15 push r14 push r13 mov r13d, ecx push r12 push rbp mov rbp, rdi mov edi, 3E8h push rbx mov ebx, esi sub rsp, 48h mov [rsp+78h+var_64], esi mov [rsp+78h+var_60], edx mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax call _malloc mov...
char * func0(long long a1, int a2, int a3, int a4) { char *v6; // rax char *v7; // r12 int v8; // r13d long long v9; // r15 long long v10; // rax long long v11; // rax char *v12; // rax int i; // [rsp+10h] [rbp-68h] _BYTE v16[10]; // [rsp+2Eh] [rbp-4Ah] BYREF unsigned long long v17; // [rsp+38h] [rb...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13D,ECX PUSH R12 PUSH RBP MOV RBP,RDI MOV EDI,0x3e8 PUSH RBX MOV EBX,ESI SUB RSP,0x48 MOV dword ptr [RSP + 0x14],ESI MOV dword ptr [RSP + 0x18],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX CALL 0x00101160 MOV ECX,0x5b MOV word ptr [RAX],CX MOV...
char * func0(long param_1,int param_2,int param_3,int param_4) { char *__s; long lVar1; size_t sVar2; char *pcVar3; long lVar4; long in_FS_OFFSET; int local_68; int1 local_4a [10]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); __s = (char *)malloc(1000); __s[0] = '['; __s[1] = ...
5,671
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h>
char* func0(int test_list[][5], int rows, int K, int N) { char* result = (char*)malloc(1000 * sizeof(char)); // Allocate ample memory for the output strcpy(result, ""); // Initialize result string strcat(result, "["); for (int i = 0; i < rows; i++) { // N is the number of elements in each tup...
int main() { int list1[4][5] = {{5, 3, 2, 1, 4}, {3, 4, 9, 2, 1}, {9, 1, 2, 3, 5}, {4, 8, 2, 1, 7}}; int list2[4][5] = {{7, 8, 4, 9}, {11, 8, 12, 4}, {4, 1, 7, 8}, {3, 6, 9, 7}}; char* res1 = func0(list1, 4, 2, 5); char* res2 = func0(list1, 4, 1, 5); char* res3 = func0(list2, 4, 1, 4); ...
O3
c
func0: endbr64 push %r15 push %r14 mov %ecx,%r14d push %r13 push %r12 push %rbp mov %rdi,%rbp mov $0x3e8,%edi push %rbx mov %esi,%ebx sub $0x48,%rsp mov %edx,0xc(%rsp) mov %esi,0x14(%rsp) mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax callq 1120 <malloc@plt> mov $0x5b,...
func0: endbr64 push r15 push r14 push r13 mov r13d, ecx push r12 mov r12, rdi mov edi, 3E8h; size push rbp push rbx mov ebx, esi sub rsp, 48h mov [rsp+78h+var_6C], esi mov [rsp+78h+var_70], edx mov rax, fs:28h mov [rsp+78h+var_40], rax xor eax, eax call _mall...
const char * func0(long long a1, int a2, int a3, int a4) { char *v6; // rax const char *v7; // r14 int v8; // r13d int v9; // ebp unsigned int *v10; // r15 long long v11; // rbp long long v12; // r8 char *v13; // rax long long i; // r15 size_t v16; // rax long long v17; // rax int v18; // [rsp+4...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13D,ECX PUSH R12 MOV R12,RDI MOV EDI,0x3e8 PUSH RBP PUSH RBX MOV EBX,ESI SUB RSP,0x48 MOV dword ptr [RSP + 0xc],ESI MOV dword ptr [RSP + 0x8],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX CALL 0x00101160 MOV ECX,0x5b MOV word ptr [RAX],CX MOV R...
char * func0(long param_1,int param_2,int param_3,int param_4) { int4 *puVar1; char *__s; size_t sVar2; char *pcVar3; long lVar4; int iVar5; long lVar6; long in_FS_OFFSET; int local_74; int local_4a [10]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); __s = (char *)malloc(1000);...
5,672
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int res[][2], int num_tuples) { for (int i = 0; i < num_tuples; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] * test_tup2[i][j]; } } }
int main() { int res[4][2]; 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 expected[4][2] = {{6, 21}, {12, 45}, {2, 9}, {7, 30}}; func0(test_tup1, test_tup2, res, 4); for (int i = 0; i < 4; i++) { for (int...
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,-0x8(%rbp) jmp 11f8 <func0+0x8f> movl $0x0,-0x4(%rbp) jmp 11ee <func0+0x85> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add ...
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_8], 0 jmp short loc_11F8 loc_1189: mov [rbp+var_4], 0 jmp short loc_11EE loc_1192: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*8] mov ...
long long func0(long long a1, long long a2, long long a3, int a4) { long long result; // rax unsigned int i; // [rsp+24h] [rbp-8h] int j; // [rsp+28h] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a4 ) break; for ( j = 0; j <= 1; ++j ) *(_DWORD *)(8LL * (int)i + a3 + 4LL...
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 + -0x8],0x0 JMP 0x001011f8 LAB_00101189: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ee LAB_00101192: MOV EAX,dword ptr [RBP + -0x8] CDQE ...
void func0(long param_1,long param_2,long param_3,int param_4) { int4 local_10; int4 local_c; for (local_10 = 0; local_10 < param_4; local_10 = local_10 + 1) { for (local_c = 0; local_c < 2; local_c = local_c + 1) { *(int *)(param_3 + (long)local_10 * 8 + (long)local_c * 4) = *(int *)((lo...
5,673
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int res[][2], int num_tuples) { for (int i = 0; i < num_tuples; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] * test_tup2[i][j]; } } }
int main() { int res[4][2]; 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 expected[4][2] = {{6, 21}, {12, 45}, {2, 9}, {7, 30}}; func0(test_tup1, test_tup2, res, 4); for (int i = 0; i < 4; i++) { for (int...
O1
c
func0: endbr64 test %ecx,%ecx jle 119d <func0+0x34> lea -0x1(%rcx),%r8d mov $0x0,%eax mov (%rdi,%rax,8),%ecx imul (%rsi,%rax,8),%ecx mov %ecx,(%rdx,%rax,8) mov 0x4(%rdi,%rax,8),%ecx imul 0x4(%rsi,%rax,8),%ecx mov %ecx,0x4(%rdx,%rax,8) mov %rax,%rcx add $0x1,%rax cmp %r8,%rcx jne 1...
func0: endbr64 test ecx, ecx jle short locret_1199 mov r8d, ecx mov eax, 0 loc_1179: mov ecx, [rdi+rax*8] imul ecx, [rsi+rax*8] mov [rdx+rax*8], ecx mov ecx, [rdi+rax*8+4] imul ecx, [rsi+rax*8+4] mov [rdx+rax*8+4], ecx add rax, 1 cmp rax, r8 jnz short loc_1179 locret_119...
void func0(long long a1, long long a2, long long a3, int a4) { long long i; // rax if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) { *(_DWORD *)(a3 + 8 * i) = *(_DWORD *)(a2 + 8 * i) * *(_DWORD *)(a1 + 8 * i); *(_DWORD *)(a3 + 8 * i + 4) = *(_DWORD *)(a2 + 8 * i + 4) * *(_DWORD *)(a1 + 8 * i +...
func0: ENDBR64 TEST ECX,ECX JLE 0x00101199 MOV R8D,ECX MOV EAX,0x0 LAB_00101179: MOV ECX,dword ptr [RDI + RAX*0x8] IMUL ECX,dword ptr [RSI + RAX*0x8] MOV dword ptr [RDX + RAX*0x8],ECX MOV ECX,dword ptr [RDI + RAX*0x8 + 0x4] IMUL ECX,dword ptr [RSI + RAX*0x8 + 0x4] MOV dword ptr [RDX + RAX*0x8 + 0x4],ECX ADD RAX,0x1 CMP...
void func0(long param_1,long param_2,long param_3,uint param_4) { ulong uVar1; if (0 < (int)param_4) { uVar1 = 0; do { *(int *)(param_3 + uVar1 * 8) = *(int *)(param_1 + uVar1 * 8) * *(int *)(param_2 + uVar1 * 8); *(int *)(param_3 + 4 + uVar1 * 8) = *(int *)(param_1 + 4 + uVar1 * ...
5,674
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int res[][2], int num_tuples) { for (int i = 0; i < num_tuples; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] * test_tup2[i][j]; } } }
int main() { int res[4][2]; 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 expected[4][2] = {{6, 21}, {12, 45}, {2, 9}, {7, 30}}; func0(test_tup1, test_tup2, res, 4); for (int i = 0; i < 4; i++) { for (int...
O2
c
func0: endbr64 test %ecx,%ecx jle 1583 <func0+0x33> lea -0x1(%rcx),%r8d xor %eax,%eax xchg %ax,%ax mov (%rdi,%rax,8),%ecx imul (%rsi,%rax,8),%ecx mov %ecx,(%rdx,%rax,8) mov 0x4(%rdi,%rax,8),%ecx imul 0x4(%rsi,%rax,8),%ecx mov %ecx,0x4(%rdx,%rax,8) mov %rax,%rcx add $0x1,%rax cmp %r...
func0: endbr64 test ecx, ecx jle short locret_1570 movsxd r8, ecx xor eax, eax nop dword ptr [rax] loc_1550: mov ecx, [rdi+rax*8] imul ecx, [rsi+rax*8] mov [rdx+rax*8], ecx mov ecx, [rdi+rax*8+4] imul ecx, [rsi+rax*8+4] mov [rdx+rax*8+4], ecx add rax, 1 cmp r8, rax jnz ...
void func0(long long a1, long long a2, long long a3, int a4) { long long i; // rax if ( a4 > 0 ) { for ( i = 0LL; i != a4; ++i ) { *(_DWORD *)(a3 + 8 * i) = *(_DWORD *)(a2 + 8 * i) * *(_DWORD *)(a1 + 8 * i); *(_DWORD *)(a3 + 8 * i + 4) = *(_DWORD *)(a2 + 8 * i + 4) * *(_DWORD *)(a1 + 8 * i +...
func0: ENDBR64 TEST ECX,ECX JLE 0x00101570 MOVSXD R8,ECX XOR EAX,EAX NOP dword ptr [RAX] LAB_00101550: MOV ECX,dword ptr [RDI + RAX*0x8] IMUL ECX,dword ptr [RSI + RAX*0x8] MOV dword ptr [RDX + RAX*0x8],ECX MOV ECX,dword ptr [RDI + RAX*0x8 + 0x4] IMUL ECX,dword ptr [RSI + RAX*0x8 + 0x4] MOV dword ptr [RDX + RAX*0x8 + 0x...
void func0(long param_1,long param_2,long param_3,int param_4) { long lVar1; if (0 < param_4) { lVar1 = 0; do { *(int *)(param_3 + lVar1 * 8) = *(int *)(param_1 + lVar1 * 8) * *(int *)(param_2 + lVar1 * 8); *(int *)(param_3 + 4 + lVar1 * 8) = *(int *)(param_1 + 4 + lVar1 * 8) * *(...
5,675
func0
#include <assert.h>
void func0(int test_tup1[][2], int test_tup2[][2], int res[][2], int num_tuples) { for (int i = 0; i < num_tuples; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] * test_tup2[i][j]; } } }
int main() { int res[4][2]; 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 expected[4][2] = {{6, 21}, {12, 45}, {2, 9}, {7, 30}}; func0(test_tup1, test_tup2, res, 4); for (int i = 0; i < 4; i++) { for (int...
O3
c
func0: endbr64 test %ecx,%ecx jle 155b <func0+0xeb> lea 0xf(%rsi),%rax sub %rdx,%rax cmp $0x1e,%rax seta %r8b cmp $0x1,%ecx setne %al test %al,%r8b je 152f <func0+0xbf> lea 0xf(%rdi),%rax sub %rdx,%rax cmp $0x1e,%rax jbe 152f <func0+0xbf> mov %ecx,%eax xor %r8d,%r8d shr %e...
func0: endbr64 test ecx, ecx jle locret_1220 cmp ecx, 1 jz loc_11F0 lea rax, [rdi+0Fh] sub rax, rdx cmp rax, 1Eh jbe loc_11F0 lea rax, [rsi+0Fh] sub rax, rdx cmp rax, 1Eh jbe short loc_11F0 mov r8d, ecx xor eax, eax shr r8d, 1 shl r8, 4 nop loc_1180: movdq...
void func0(long long a1, long long a2, long long a3, int a4) { long long v4; // rax long long v5; // rax _DWORD *v6; // rdi _DWORD *v7; // rsi _DWORD *v8; // rax long long v9; // rax if ( a4 > 0 ) { if ( a4 == 1 || (unsigned long long)(a1 + 15 - a3) <= 0x1E || (unsigned long long)(a2 + 15 - a3) <=...
func0: ENDBR64 TEST ECX,ECX JLE 0x00101220 CMP ECX,0x1 JZ 0x001011f0 LEA RAX,[RDI + 0xf] SUB RAX,RDX CMP RAX,0x1e JBE 0x001011f0 LEA RAX,[RSI + 0xf] SUB RAX,RDX CMP RAX,0x1e JBE 0x001011f0 MOV R8D,ECX XOR EAX,EAX SHR R8D,0x1 SHL R8,0x4 NOP LAB_00101180: MOVDQU XMM0,xmmword ptr [RDI + RAX*0x1] MOVDQU XMM2,xmmword ptr [R...
void func0(long param_1,long param_2,long param_3,uint param_4) { int8 *puVar1; ulong uVar2; ulong uVar3; uint uVar4; ulong uVar5; long lVar6; if (0 < (int)param_4) { if (((param_4 == 1) || ((ulong)((param_1 + 0xf) - param_3) < 0x1f)) || ((ulong)((param_2 + 0xf) - param_3) < 0x1f)) { ...
5,676
func0
#include <assert.h>
int func0(const int *tup, int tup_size, const int *lst, int lst_size) { int count = 0; for (int i = 0; i < tup_size; i++) { for (int j = 0; j < lst_size; j++) { if (tup[i] == lst[j]) { count++; break; } } } return count; ...
int main() { int tup1[] = {'a', 'a', 'c', 'b', 'd'}; int lst1[] = {'a', 'b'}; assert(func0(tup1, 5, lst1, 2) == 3); int tup2[] = {1, 2, 3, 1, 4, 6, 7, 1, 4}; int lst2[] = {1, 4, 7}; assert(func0(tup2, 9, lst2, 3) == 6); int tup3[] = {1, 2, 3, 4, 5, 6}; int lst3[] = {1, 2}; ...
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) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11de <func0+0x75> movl $0x0,-0x4(%rbp) jmp 11d2 <func0+0x69> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -...
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_C], 0 mov [rbp+var_8], 0 jmp short loc_11DE loc_118F: mov [rbp+var_4], 0 jmp short loc_11D2 loc_1198: mov eax, [rbp+var_8] cdqe lea ...
long long func0(long long a1, int a2, long long a3, int a4) { unsigned int v5; // [rsp+1Ch] [rbp-Ch] int i; // [rsp+20h] [rbp-8h] int j; // [rsp+24h] [rbp-4h] v5 = 0; for ( i = 0; i < a2; ++i ) { for ( j = 0; j < a4; ++j ) { if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * j + 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 + -0x20],ECX MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011de LAB_0010118f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011d2 LAB_00101198: MOV E...
int func0(long param_1,int param_2,long param_3,int param_4) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; local_10 = 0; do { if (param_2 <= local_10) { return local_14; } for (local_c = 0; local_c < param_4; local_c = local_c + 1) { if (*(int *)(param_1 + (long)loc...
5,677
func0
#include <assert.h>
int func0(const int *tup, int tup_size, const int *lst, int lst_size) { int count = 0; for (int i = 0; i < tup_size; i++) { for (int j = 0; j < lst_size; j++) { if (tup[i] == lst[j]) { count++; break; } } } return count; ...
int main() { int tup1[] = {'a', 'a', 'c', 'b', 'd'}; int lst1[] = {'a', 'b'}; assert(func0(tup1, 5, lst1, 2) == 3); int tup2[] = {1, 2, 3, 1, 4, 6, 7, 1, 4}; int lst2[] = {1, 4, 7}; assert(func0(tup2, 9, lst2, 3) == 6); int tup3[] = {1, 2, 3, 4, 5, 6}; int lst3[] = {1, 2}; ...
O1
c
func0: endbr64 test %esi,%esi jle 11b3 <func0+0x4a> mov %rdi,%r8 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r9 mov %rdx,%r10 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rsi mov $0x0,%edi jmp 119a <func0+0x31> add $0x1,%edi add $0x4,%r8 cmp %r9,%r8 je 11b8 <func0+0x4f> test %ecx,...
func0: endbr64 test esi, esi jle short loc_11B2 mov r8, rdi lea eax, [rsi-1] lea r10, [rdi+rax*4+4] lea eax, [rcx-1] lea rdi, [rdx+rax*4+4] mov r9d, 0 jmp short loc_1199 loc_118C: add r9d, 1 loc_1190: add r8, 4 cmp r8, r10 jz short loc_11B8 loc_1199: test ecx, ecx ...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r8 unsigned int v5; // r9d _DWORD *v6; // rax if ( a2 <= 0 ) { return 0; } else { v4 = a1; v5 = 0; do { if ( a4 > 0 ) { v6 = a3; while ( *v4 != *v6 ) { if ( ++v6 =...
5,678
func0
#include <assert.h>
int func0(const int *tup, int tup_size, const int *lst, int lst_size) { int count = 0; for (int i = 0; i < tup_size; i++) { for (int j = 0; j < lst_size; j++) { if (tup[i] == lst[j]) { count++; break; } } } return count; ...
int main() { int tup1[] = {'a', 'a', 'c', 'b', 'd'}; int lst1[] = {'a', 'b'}; assert(func0(tup1, 5, lst1, 2) == 3); int tup2[] = {1, 2, 3, 1, 4, 6, 7, 1, 4}; int lst2[] = {1, 4, 7}; assert(func0(tup2, 9, lst2, 3) == 6); int tup3[] = {1, 2, 3, 4, 5, 6}; int lst3[] = {1, 2}; ...
O2
c
func0: endbr64 test %esi,%esi jle 139e <func0+0x4e> lea -0x1(%rsi),%eax mov %rdi,%r8 xor %r9d,%r9d lea 0x4(%rdi,%rax,4),%r10 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rdi xchg %ax,%ax test %ecx,%ecx jle 1391 <func0+0x41> mov (%r8),%esi mov %rdx,%rax jmp 1389 <func0+0x39> nopl 0x...
func0: endbr64 test esi, esi jle short loc_137E lea eax, [rsi-1] xor r9d, r9d lea r10, [rdi+rax*4+4] lea eax, [rcx-1] lea r8, [rdx+rax*4+4] nop dword ptr [rax+rax+00h] loc_1350: test ecx, ecx jle short loc_1371 mov esi, [rdi] mov rax, rdx jmp short loc_1369 loc_1360: ad...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { unsigned int v4; // r9d long long v5; // r10 _DWORD *v6; // rax if ( a2 <= 0 ) return 0LL; v4 = 0; v5 = (long long)&a1[a2 - 1 + 1]; do { if ( a4 > 0 ) { v6 = a3; while ( *a1 != *v6 ) { if ( ++v6 == &a3[a4 -...
func0: ENDBR64 TEST ESI,ESI JLE 0x0010137e LEA EAX,[RSI + -0x1] XOR R9D,R9D LEA R10,[RDI + RAX*0x4 + 0x4] LEA EAX,[RCX + -0x1] LEA R8,[RDX + RAX*0x4 + 0x4] NOP dword ptr [RAX + RAX*0x1] LAB_00101350: TEST ECX,ECX JLE 0x00101371 MOV ESI,dword ptr [RDI] MOV RAX,RDX JMP 0x00101369 LAB_00101360: ADD RAX,0x4 CMP RAX,R8 JZ 0...
int func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; int iVar3; if (param_2 < 1) { return 0; } iVar3 = 0; piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (0 < param_4) { piVar2 = param_3; do { if (*param_1 == *piVar2) { i...
5,679
func0
#include <assert.h>
int func0(const int *tup, int tup_size, const int *lst, int lst_size) { int count = 0; for (int i = 0; i < tup_size; i++) { for (int j = 0; j < lst_size; j++) { if (tup[i] == lst[j]) { count++; break; } } } return count; ...
int main() { int tup1[] = {'a', 'a', 'c', 'b', 'd'}; int lst1[] = {'a', 'b'}; assert(func0(tup1, 5, lst1, 2) == 3); int tup2[] = {1, 2, 3, 1, 4, 6, 7, 1, 4}; int lst2[] = {1, 4, 7}; assert(func0(tup2, 9, lst2, 3) == 6); int tup3[] = {1, 2, 3, 4, 5, 6}; int lst3[] = {1, 2}; ...
O3
c
func0: endbr64 test %esi,%esi jle 132e <func0+0x4e> lea -0x1(%rsi),%eax mov %rdi,%r8 xor %r9d,%r9d lea 0x4(%rdi,%rax,4),%r10 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rdi xchg %ax,%ax test %ecx,%ecx jle 1321 <func0+0x41> mov (%r8),%esi mov %rdx,%rax jmp 1319 <func0+0x39> nopl 0x...
func0: endbr64 test esi, esi jle short loc_115C movsxd rsi, esi lea r9, [rdi+rsi*4] loc_114F: test ecx, ecx jg short loc_1163 add rdi, 4 cmp rdi, r9 jnz short loc_114F loc_115C: xor r8d, r8d mov eax, r8d retn loc_1163: movsxd rcx, ecx xor r8d, r8d lea rsi, [rdx+rcx*4] no...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r9 unsigned int v6; // r8d _DWORD *v7; // rax if ( a2 <= 0 ) return 0LL; v4 = &a1[a2]; while ( a4 <= 0 ) { if ( ++a1 == v4 ) return 0LL; } v6 = 0; LABEL_7: while ( 2 ) { v7 = a3; do { if ( *a...
func0: ENDBR64 TEST ESI,ESI JLE 0x0010115c MOVSXD RSI,ESI LEA R9,[RDI + RSI*0x4] LAB_0010114f: TEST ECX,ECX JG 0x00101163 ADD RDI,0x4 CMP RDI,R9 JNZ 0x0010114f LAB_0010115c: XOR R8D,R8D MOV EAX,R8D RET LAB_00101163: MOVSXD RCX,ECX XOR R8D,R8D LEA RSI,[RDX + RCX*0x4] NOP dword ptr [RAX] LAB_00101170: MOV ECX,dword ptr [...
int func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; int iVar3; if (0 < param_2) { piVar1 = param_1 + param_2; do { if (0 < param_4) { iVar3 = 0; LAB_00101170: do { piVar2 = param_3; do { if (*param_1 == *piVar...
5,680
func0
#include <assert.h> #include <stdio.h>
int* func0(int nums[], int size) { static int cubes[100]; for (int i = 0; i < size; i++) { cubes[i] = nums[i] * nums[i] * nums[i]; } return cubes; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int expected1[] = {1, 8, 27, 64, 125, 216, 343, 512, 729, 1000}; int* result1 = func0(arr1, 10); for (int i = 0; i < 10; i++) { assert(result1[i] == expected1[i]); } int arr2[] = {10, 20, 30}; int expected2[] = ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x4(%rbp) jmp 1205 <func0+0x7c> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%edx mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rcx mov -0x18(%...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_4], 0 jmp short loc_1205 loc_11A1: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov edx, [rax] mov eax, [rbp+var_4] cdqe lea rcx, ds:0[rax...
_DWORD * func0(long long a1, int a2) { int i; // [rsp+18h] [rbp-4h] for ( i = 0; i < a2; ++i ) cubes_1[i] = *(_DWORD *)(4LL * i + a1) * *(_DWORD *)(4LL * i + a1) * *(_DWORD *)(4LL * i + a1); return cubes_1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101205 LAB_001011a1: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EDX,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x4] CDQE LE...
int1 * func0(long param_1,int param_2) { int local_c; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { *(int *)(cubes_1 + (long)local_c * 4) = *(int *)(param_1 + (long)local_c * 4) * *(int *)(param_1 + (long)local_c * 4) * *(int *)(param_1 + (long)local_c * 4); } return cu...
5,681
func0
#include <assert.h> #include <stdio.h>
int* func0(int nums[], int size) { static int cubes[100]; for (int i = 0; i < size; i++) { cubes[i] = nums[i] * nums[i] * nums[i]; } return cubes; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int expected1[] = {1, 8, 27, 64, 125, 216, 343, 512, 729, 1000}; int* result1 = func0(arr1, 10); for (int i = 0; i < 10; i++) { assert(result1[i] == expected1[i]); } int arr2[] = {10, 20, 30}; int expected2[] = ...
O1
c
func0: endbr64 test %esi,%esi jle 11bb <func0+0x32> lea -0x1(%rsi),%r8d mov $0x0,%eax lea 0x2e9f(%rip),%rsi mov (%rdi,%rax,4),%ecx mov %ecx,%edx imul %ecx,%edx imul %ecx,%edx mov %edx,(%rsi,%rax,4) mov %rax,%rdx add $0x1,%rax cmp %r8,%rdx jne 11a1 <func0+0x18> lea 0x2e7e(%rip),...
func0: endbr64 test esi, esi jle short loc_11B7 mov esi, esi mov eax, 0 lea r8, cubes_1 loc_119F: mov ecx, [rdi+rax*4] mov edx, ecx imul edx, ecx imul edx, ecx mov [r8+rax*4], edx add rax, 1 cmp rax, rsi jnz short loc_119F loc_11B7: lea rax, cubes_1 retn
_DWORD * func0(long long a1, int a2) { long long i; // rax if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) cubes_1[i] = *(_DWORD *)(a1 + 4 * i) * *(_DWORD *)(a1 + 4 * i) * *(_DWORD *)(a1 + 4 * i); } return cubes_1; }
func0: ENDBR64 TEST ESI,ESI JLE 0x001011b7 MOV ESI,ESI MOV EAX,0x0 LEA R8,[0x104040] LAB_0010119f: MOV ECX,dword ptr [RDI + RAX*0x4] MOV EDX,ECX IMUL EDX,ECX IMUL EDX,ECX MOV dword ptr [R8 + RAX*0x4],EDX ADD RAX,0x1 CMP RAX,RSI JNZ 0x0010119f LAB_001011b7: LEA RAX,[0x104040] RET
int4 * func0(long param_1,uint param_2) { int iVar1; ulong uVar2; if (0 < (int)param_2) { uVar2 = 0; do { iVar1 = *(int *)(param_1 + uVar2 * 4); (&cubes_1)[uVar2] = iVar1 * iVar1 * iVar1; uVar2 = uVar2 + 1; } while (uVar2 != param_2); } return &cubes_1; }