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
7,282
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int compare_arrays(int* arr1, int* arr2, int len) { for (int i = 0; i < len; i++) { if (arr1[i] != arr2[i]) { return 0; } } return 1; }
int* func0(int* xs, int length) { int* copy = malloc(length * sizeof(int)); for (int i = 0; i < length; i++) { copy[i] = xs[i]; } return copy; }
int main() { int xs1[] = {1, 2, 3}; int* result1 = func0(xs1, 3); assert(compare_arrays(result1, xs1, 3)); int xs2[] = {4, 8, 2, 10, 15, 18}; int* result2 = func0(xs2, 6); assert(compare_arrays(result2, xs2, 6)); int xs3[] = {4, 5, 6}; int* result3 = func0(xs3, 3); asser...
O2
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x2,%rdi sub $0x8,%rsp callq 10b0 <malloc@plt> test %ebp,%ebp jle 12fa <func0+0x3a> lea -0x1(%rbp),%esi xor %edx,%edx nopl (%rax) mov (%rbx,%rdx,4),%ecx mov %ecx,(%rax,%rdx,4) mov %rdx,%rcx add ...
func0: endbr64 push r12 movsxd r12, esi push rbp mov rbp, rdi push rbx mov rbx, r12 shl r12, 2 mov rdi, r12 call _malloc mov r8, rax test ebx, ebx jle short loc_13E5 mov rdx, r12 mov rsi, rbp mov rdi, rax call _memcpy mov r8, rax loc_13E5: pop rbx mov r...
long long func0(long long a1, int a2) { long long v2; // rax long long v3; // rcx long long v4; // r8 v2 = malloc(4LL * a2); v4 = v2; if ( a2 > 0 ) return memcpy(v2, a1, 4LL * a2, v3, v2); return v4; }
func0: ENDBR64 PUSH R12 MOVSXD R12,ESI PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,R12 SHL R12,0x2 MOV RDI,R12 CALL 0x001010d0 MOV R8,RAX TEST EBX,EBX JLE 0x001013e5 MOV RDX,R12 MOV RSI,RBP MOV RDI,RAX CALL 0x001010c0 MOV R8,RAX LAB_001013e5: POP RBX MOV RAX,R8 POP RBP POP R12 RET
void * func0(void *param_1,int param_2) { void *__dest; __dest = malloc((long)param_2 << 2); if (0 < param_2) { __dest = memcpy(__dest,param_1,(long)param_2 << 2); } return __dest; }
7,283
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int compare_arrays(int* arr1, int* arr2, int len) { for (int i = 0; i < len; i++) { if (arr1[i] != arr2[i]) { return 0; } } return 1; }
int* func0(int* xs, int length) { int* copy = malloc(length * sizeof(int)); for (int i = 0; i < length; i++) { copy[i] = xs[i]; } return copy; }
int main() { int xs1[] = {1, 2, 3}; int* result1 = func0(xs1, 3); assert(compare_arrays(result1, xs1, 3)); int xs2[] = {4, 8, 2, 10, 15, 18}; int* result2 = func0(xs2, 6); assert(compare_arrays(result2, xs2, 6)); int xs3[] = {4, 5, 6}; int* result3 = func0(xs3, 3); asser...
O3
c
func0: endbr64 push %rbp mov %rdi,%rbp movslq %esi,%rdi push %rbx mov %rdi,%rbx shl $0x2,%rdi sub $0x8,%rsp callq 10d0 <malloc@plt> mov %rax,%r8 test %ebx,%ebx jle 130c <func0+0x3c> lea -0x1(%rbx),%eax mov %r8,%rdi mov %rbp,%rsi lea 0x4(,%rax,4),%rdx callq 10c0 <memcpy@plt> mov ...
func0: endbr64 push rbp mov rbp, rdi movsxd rdi, esi push rbx mov rbx, rdi shl rdi, 2; size sub rsp, 8 call _malloc mov rcx, rax test ebx, ebx jle short loc_12F7 mov edx, ebx mov rsi, rbp; src mov rdi, rax; dest shl rdx, 2; n call _memcpy mov rcx, rax loc_12F7...
void * func0(void *src, int a2) { void *v2; // rax void *v3; // rcx v2 = malloc(4LL * a2); v3 = v2; if ( a2 > 0 ) return memcpy(v2, src, 4LL * (unsigned int)a2); return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RDI MOVSXD RDI,ESI PUSH RBX MOV RBX,RDI SHL RDI,0x2 SUB RSP,0x8 CALL 0x001010d0 MOV RCX,RAX TEST EBX,EBX JLE 0x001012f7 MOV EDX,EBX MOV RSI,RBP MOV RDI,RAX SHL RDX,0x2 CALL 0x001010c0 MOV RCX,RAX LAB_001012f7: ADD RSP,0x8 MOV RAX,RCX POP RBX POP RBP RET
void * func0(void *param_1,uint param_2) { void *__dest; __dest = malloc((long)(int)param_2 << 2); if (0 < (int)param_2) { __dest = memcpy(__dest,param_1,(ulong)param_2 << 2); } return __dest; }
7,284
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double area = 0.5 * (base1 + base2) * height; return area; }
int main() { assert(func0(6, 9, 4) == 30); assert(func0(10, 20, 30) == 450); assert(func0(15, 25, 35) == 700); 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 -0x28(%rbp),%xmm1 mulsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%x...
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 xmm1, [rbp+var_28] mulsd xmm0, xmm1 movsd [rbp+var_8], xmm0 mov...
double func0(double a1, double a2, double a3) { return 0.5 * (a1 + a2) * a3; }
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 XMM1,qword ptr [RBP + -0x28] MULSD X...
double func0(double param_1,double param_2,double param_3) { return DAT_00102078 * (param_1 + param_2) * param_3; }
7,285
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double area = 0.5 * (base1 + base2) * height; return area; }
int main() { assert(func0(6, 9, 4) == 30); assert(func0(10, 20, 30) == 450); assert(func0(15, 25, 35) == 700); return 0; }
O1
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xecf(%rip),%xmm0 mulsd %xmm2,%xmm0 retq
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm2 retn
double func0(double a1, double a2, double a3) { return (a1 + a2) * 0.5 * a3; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM2 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2,double param_3) { return (param_1 + param_2) * _DAT_00102008 * param_3; }
7,286
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double area = 0.5 * (base1 + base2) * height; return area; }
int main() { assert(func0(6, 9, 4) == 30); assert(func0(10, 20, 30) == 450); assert(func0(15, 25, 35) == 700); return 0; }
O2
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xeb8(%rip),%xmm0 mulsd %xmm2,%xmm0 retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm2 retn
double func0(double a1, double a2, double a3) { return (a1 + a2) * 0.5 * a3; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM2 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2,double param_3) { return (param_1 + param_2) * _DAT_00102008 * param_3; }
7,287
func0
#include <assert.h>
double func0(double base1, double base2, double height) { double area = 0.5 * (base1 + base2) * height; return area; }
int main() { assert(func0(6, 9, 4) == 30); assert(func0(10, 20, 30) == 450); assert(func0(15, 25, 35) == 700); return 0; }
O3
c
func0: endbr64 addsd %xmm1,%xmm0 mulsd 0xeb8(%rip),%xmm0 mulsd %xmm2,%xmm0 retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 addsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm2 retn
double func0(double a1, double a2, double a3) { return (a1 + a2) * 0.5 * a3; }
func0: ENDBR64 ADDSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM2 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2,double param_3) { return (param_1 + param_2) * _DAT_00102008 * param_3; }
7,288
func0
#include <stdio.h> #include <assert.h>
int func0(int N) { int SumOfPrimeDivisors[N + 1]; for (int i = 0; i <= N; i++) { SumOfPrimeDivisors[i] = 0; } for (int i = 2; i <= N; i++) { if (SumOfPrimeDivisors[i] == 0) { for (int j = i; j <= N; j += i) { SumOfPrimeDivisors[j] += i; ...
int main() { assert(func0(60) == 10); assert(func0(39) == 16); assert(func0(40) == 7); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %edi,-0x44(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x44(%rbp),%eax add $0x1,%eax movslq %eax,%rdx sub $0x1,%rdx mov %rdx,-0x28(%rbp) movslq %eax,%rdx mov %rd...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_34], edi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax mov eax, [rbp+var_34] add eax, 1 movsxd rdx, eax sub rdx, 1 mov [rbp+var_18], rdx cdqe lea rdx, ds:0[rax*4] mov ...
long long func0(int a1) { unsigned long long v1; // rax void *v2; // rsp _BYTE v4[12]; // [rsp+8h] [rbp-40h] BYREF int v5; // [rsp+14h] [rbp-34h] int i; // [rsp+24h] [rbp-24h] int j; // [rsp+28h] [rbp-20h] int k; // [rsp+2Ch] [rbp-1Ch] long long v9; // [rsp+30h] [rbp-18h] _BYTE *v10; // [rsp+38h] [rb...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV dword ptr [RBP + -0x34],EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,RSP MOV RSI,RAX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOVSXD RDX,EAX SUB RDX,0x1 MOV qword ptr [RBP + -0x18],RDX CDQE LEA RDX,[RAX*0x4] MOV EAX,0x10 SUB R...
int4 func0(int param_1) { long lVar1; ulong uVar2; int *puVar3; long in_FS_OFFSET; int auStack_48 [12]; int local_3c; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; local_3c = param_1; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = (long)(...
7,289
func0
#include <stdio.h> #include <assert.h>
int func0(int N) { int SumOfPrimeDivisors[N + 1]; for (int i = 0; i <= N; i++) { SumOfPrimeDivisors[i] = 0; } for (int i = 2; i <= N; i++) { if (SumOfPrimeDivisors[i] == 0) { for (int j = i; j <= N; j += i) { SumOfPrimeDivisors[j] += i; ...
int main() { assert(func0(60) == 10); assert(func0(39) == 16); assert(func0(40) == 7); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffffff0,%rdx and $0xfffffffffffff000,%rax mov %rsp,%rsi sub %rax,%rsi mov %rsi,%rax cmp %rax,%...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov esi, edi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rdi+1] cdqe lea rax, ds:0Fh[rax*4] mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFFFFFFFF000h mov rdx, rsp sub rdx, rax loc_11A6: cm...
long long func0(int a1) { signed long long v1; // rax void *v2; // rsp _DWORD *v3; // rax long long v4; // rdx long long v5; // rax _DWORD v8[2]; // [rsp+8h] [rbp-10h] BYREF unsigned long long v9; // [rsp+10h] [rbp-8h] v9 = __readfsqword(0x28u); while ( v8 != (_DWORD *)((char *)v8 - ((4LL * (a1 + 1)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV ESI,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA EAX,[RDI + 0x1] CDQE LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RCX,-0x10 AND RAX,-0x1000 MOV RDX,RSP SUB RDX,RAX LAB_001011a6: CMP RSP,RDX JZ 0x001011bd SUB RSP,0x1000 OR qword ptr [RSP ...
int4 func0(int param_1) { long lVar1; int iVar2; int4 *puVar3; ulong uVar4; ulong uVar5; int1 *puVar6; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar5 = (long)(param_1 + 1) * 4 + 0xf; for (puVar6 = auStack_18; puVar6 != auStack_18 + -(u...
7,290
func0
#include <stdio.h> #include <assert.h>
int func0(int N) { int SumOfPrimeDivisors[N + 1]; for (int i = 0; i <= N; i++) { SumOfPrimeDivisors[i] = 0; } for (int i = 2; i <= N; i++) { if (SumOfPrimeDivisors[i] == 0) { for (int j = i; j <= N; j += i) { SumOfPrimeDivisors[j] += i; ...
int main() { assert(func0(60) == 10); assert(func0(39) == 16); assert(func0(40) == 7); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax mov %rsp,%rsi cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rsi and $0xfffffffffffffff0,%rdx mov %rsi,%rax cmp %rax,%...
func0: endbr64 push rbp mov rbp, rsp push r13 push r12 lea r12d, [rdi+1] push rbx mov ebx, edi sub rsp, 18h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax movsxd rax, r12d mov rcx, rsp lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rc...
long long func0(int a1) { int v1; // r12d long long v3; // rdx _BYTE *v4; // rcx __int16 v5; // dx signed long long v6; // rdx void *v7; // rsp _BYTE *v8; // rdi long long v9; // rcx int v10; // edx long long i; // rax _BYTE v14[4088]; // [rsp+8h] [rbp-1030h] BYREF _QWORD v15[6]; // [rsp+1008h]...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R13 PUSH R12 LEA R12D,[RDI + 0x1] PUSH RBX MOV EBX,EDI SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOVSXD RAX,R12D MOV RCX,RSP LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x0010128e LAB_001...
int4 func0(int param_1) { long lVar1; int1 *puVar2; ulong uVar3; ulong uVar4; int iVar5; int1 *puVar6; uint uVar8; long in_FS_OFFSET; int1 auStack_38 [8]; long local_30; int1 *puVar7; uVar8 = param_1 + 1; puVar6 = auStack_38; local_30 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = (long)(in...
7,291
func0
#include <stdio.h> #include <assert.h>
int func0(int N) { int SumOfPrimeDivisors[N + 1]; for (int i = 0; i <= N; i++) { SumOfPrimeDivisors[i] = 0; } for (int i = 2; i <= N; i++) { if (SumOfPrimeDivisors[i] == 0) { for (int j = i; j <= N; j += i) { SumOfPrimeDivisors[j] += i; ...
int main() { assert(func0(60) == 10); assert(func0(39) == 16); assert(func0(40) == 7); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx mov %edi,%ebx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax mov %rsp,%rdi cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rdi and $0xffffffffff...
func0: endbr64 push rbp mov rbp, rsp push r13 push r12 lea r12d, [rdi+1] push rbx mov ebx, edi sub rsp, 18h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax movsxd rax, r12d mov rcx, rsp lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rc...
long long func0(int a1) { long long v1; // rdx _BYTE *v2; // rcx __int16 v3; // dx signed long long v4; // rdx void *v5; // rsp _BYTE *v6; // rcx long long v7; // rdx long long v9; // rax _BYTE v11[4088]; // [rsp+8h] [rbp-1030h] BYREF _QWORD v12[6]; // [rsp+1008h] [rbp-30h] BYREF v12[1] = __read...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R13 PUSH R12 LEA R12D,[RDI + 0x1] PUSH RBX MOV EBX,EDI SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOVSXD RAX,R12D MOV RCX,RSP LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x0010128e LAB_001...
int4 func0(int param_1) { long lVar1; int *puVar2; ulong uVar3; ulong uVar4; int *puVar5; long in_FS_OFFSET; int auStack_38 [8]; long local_30; int *puVar6; puVar5 = auStack_38; local_30 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = (long)(int)(param_1 + 1U) * 4 + 0xf; puVar6 = auStack_38; p...
7,292
func0
#include <assert.h>
int func0(int a, int b, int c) { if (a != 0 && b != 0 && c != 0 && (a + b + c) == 180) { if ((a + b) >= c || (b + c) >= a || (a + c) >= b) { return 1; } else { return 0; } } else { return 0; } }
int main() { assert(func0(50, 60, 70) == 1); assert(func0(90, 45, 45) == 1); assert(func0(150, 30, 70) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov %edx,-0xc(%rbp) cmpl $0x0,-0x4(%rbp) je 11b5 <func0+0x6c> cmpl $0x0,-0x8(%rbp) je 11b5 <func0+0x6c> cmpl $0x0,-0xc(%rbp) je 11b5 <func0+0x6c> mov -0x4(%rbp),%edx mov -0x8(%rbp),%eax add %eax,%edx ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], edx cmp [rbp+var_4], 0 jz short loc_11B5 cmp [rbp+var_8], 0 jz short loc_11B5 cmp [rbp+var_C], 0 jz short loc_11B5 mov edx, [rbp+var_4] mov eax, [rbp+var_8] add edx, ...
_BOOL8 func0(int a1, int a2, int a3) { if ( !a1 || !a2 || !a3 || a2 + a1 + a3 != 180 ) return 0LL; return a3 <= a1 + a2 || a1 <= a2 + a3 || a2 <= a1 + a3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],EDX CMP dword ptr [RBP + -0x4],0x0 JZ 0x001011b5 CMP dword ptr [RBP + -0x8],0x0 JZ 0x001011b5 CMP dword ptr [RBP + -0xc],0x0 JZ 0x001011b5 MOV EDX,dword ptr [RBP + -0x4] MOV EAX,dword ptr [RBP + ...
int8 func0(int param_1,int param_2,int param_3) { int8 uVar1; if ((((param_1 == 0) || (param_2 == 0)) || (param_3 == 0)) || (param_3 + param_1 + param_2 != 0xb4)) { uVar1 = 0; } else if (((param_2 + param_1 < param_3) && (param_3 + param_2 < param_1)) && (param_3 + param_1 < param_2)) { ...
7,293
func0
#include <assert.h>
int func0(int a, int b, int c) { if (a != 0 && b != 0 && c != 0 && (a + b + c) == 180) { if ((a + b) >= c || (b + c) >= a || (a + c) >= b) { return 1; } else { return 0; } } else { return 0; } }
int main() { assert(func0(50, 60, 70) == 1); assert(func0(90, 45, 45) == 1); assert(func0(150, 30, 70) == 0); return 0; }
O1
c
func0: endbr64 test %esi,%esi setne %cl test %edx,%edx setne %al test %al,%cl je 116f <func0+0x46> test %edi,%edi je 116f <func0+0x46> lea (%rdi,%rsi,1),%ecx lea (%rcx,%rdx,1),%r8d mov $0x0,%eax cmp $0xb4,%r8d jne 1174 <func0+0x4b> mov $0x1,%eax cmp %edx,%ecx jge 1174 <func0+0x...
func0: endbr64 test esi, esi setnz cl test edx, edx setnz al test cl, al jz short loc_116F test edi, edi jz short loc_116F lea ecx, [rdi+rsi] lea r8d, [rcx+rdx] mov eax, 0 cmp r8d, 0B4h jnz short locret_1174 mov eax, 1 cmp ecx, edx jge short locret_1174 lea ...
_BOOL8 func0(int a1, int a2, int a3) { _BOOL8 result; // rax if ( a3 == 0 || a2 == 0 || !a1 ) return 0LL; result = 0LL; if ( a1 + a2 + a3 == 180 ) { result = 1LL; if ( a1 + a2 < a3 && a2 + a3 < a1 ) return a3 + a1 >= a2; } return result; }
func0: ENDBR64 TEST ESI,ESI SETNZ CL TEST EDX,EDX SETNZ AL TEST CL,AL JZ 0x0010116f TEST EDI,EDI JZ 0x0010116f LEA ECX,[RDI + RSI*0x1] LEA R8D,[RCX + RDX*0x1] MOV EAX,0x0 CMP R8D,0xb4 JNZ 0x00101174 MOV EAX,0x1 CMP ECX,EDX JGE 0x00101174 LEA ECX,[RSI + RDX*0x1] CMP ECX,EDI JGE 0x00101174 ADD EDI,EDX CMP EDI,ESI SETGE A...
bool func0(int param_1,int param_2,int param_3) { bool bVar1; if ((param_2 == 0 || param_3 == 0) || (param_1 == 0)) { bVar1 = false; } else { bVar1 = false; if (((param_1 + param_2 + param_3 == 0xb4) && (bVar1 = true, param_1 + param_2 < param_3)) && (param_2 + param_3 < param_1)) { ...
7,294
func0
#include <assert.h>
int func0(int a, int b, int c) { if (a != 0 && b != 0 && c != 0 && (a + b + c) == 180) { if ((a + b) >= c || (b + c) >= a || (a + c) >= b) { return 1; } else { return 0; } } else { return 0; } }
int main() { assert(func0(50, 60, 70) == 1); assert(func0(90, 45, 45) == 1); assert(func0(150, 30, 70) == 0); return 0; }
O2
c
func0: endbr64 test %esi,%esi setne %cl test %edx,%edx setne %al test %al,%cl je 1188 <func0+0x48> test %edi,%edi je 1188 <func0+0x48> lea (%rdi,%rsi,1),%ecx xor %eax,%eax lea (%rcx,%rdx,1),%r8d cmp $0xb4,%r8d jne 118a <func0+0x4a> mov $0x1,%eax cmp %edx,%ecx jge 118a <func0+0x...
func0: endbr64 test esi, esi setnz cl test edx, edx setnz al test cl, al jz short loc_1188 test edi, edi jz short loc_1188 lea ecx, [rdi+rsi] xor eax, eax lea r8d, [rcx+rdx] cmp r8d, 0B4h jnz short locret_118A mov eax, 1 cmp ecx, edx jge short locret_118A lea ...
_BOOL8 func0(int a1, int a2, int a3) { _BOOL8 result; // rax if ( a3 == 0 || a2 == 0 || !a1 ) return 0LL; result = 0LL; if ( a1 + a2 + a3 == 180 ) { result = 1LL; if ( a1 + a2 < a3 && a2 + a3 < a1 ) return a3 + a1 >= a2; } return result; }
func0: ENDBR64 TEST ESI,ESI SETNZ CL TEST EDX,EDX SETNZ AL TEST CL,AL JZ 0x00101188 TEST EDI,EDI JZ 0x00101188 LEA ECX,[RDI + RSI*0x1] XOR EAX,EAX LEA R8D,[RCX + RDX*0x1] CMP R8D,0xb4 JNZ 0x0010118a MOV EAX,0x1 CMP ECX,EDX JGE 0x0010118a LEA ECX,[RSI + RDX*0x1] CMP ECX,EDI JGE 0x0010118a ADD EDI,EDX XOR EAX,EAX CMP EDI...
bool func0(int param_1,int param_2,int param_3) { bool bVar1; if ((param_2 == 0 || param_3 == 0) || (param_1 == 0)) { bVar1 = false; } else { bVar1 = false; if (((param_1 + param_2 + param_3 == 0xb4) && (bVar1 = true, param_1 + param_2 < param_3)) && (param_2 + param_3 < param_1)) { ...
7,295
func0
#include <assert.h>
int func0(int a, int b, int c) { if (a != 0 && b != 0 && c != 0 && (a + b + c) == 180) { if ((a + b) >= c || (b + c) >= a || (a + c) >= b) { return 1; } else { return 0; } } else { return 0; } }
int main() { assert(func0(50, 60, 70) == 1); assert(func0(90, 45, 45) == 1); assert(func0(150, 30, 70) == 0); return 0; }
O3
c
func0: endbr64 test %esi,%esi setne %cl test %edx,%edx setne %al test %al,%cl je 1188 <func0+0x48> test %edi,%edi je 1188 <func0+0x48> lea (%rdi,%rsi,1),%ecx xor %eax,%eax lea (%rcx,%rdx,1),%r8d cmp $0xb4,%r8d jne 118a <func0+0x4a> mov $0x1,%eax cmp %edx,%ecx jge 118a <func0+0x...
func0: endbr64 test esi, esi setnz cl test edx, edx setnz al test cl, al jz short loc_1188 test edi, edi jz short loc_1188 lea ecx, [rdi+rsi] xor eax, eax lea r8d, [rcx+rdx] cmp r8d, 0B4h jnz short locret_118A mov eax, 1 cmp ecx, edx jge short locret_118A lea ...
_BOOL8 func0(int a1, int a2, int a3) { _BOOL8 result; // rax if ( a3 == 0 || a2 == 0 || !a1 ) return 0LL; result = 0LL; if ( a1 + a2 + a3 == 180 ) { result = 1LL; if ( a1 + a2 < a3 && a2 + a3 < a1 ) return a3 + a1 >= a2; } return result; }
func0: ENDBR64 TEST ESI,ESI SETNZ CL TEST EDX,EDX SETNZ AL TEST CL,AL JZ 0x00101188 TEST EDI,EDI JZ 0x00101188 LEA ECX,[RDI + RSI*0x1] XOR EAX,EAX LEA R8D,[RCX + RDX*0x1] CMP R8D,0xb4 JNZ 0x0010118a MOV EAX,0x1 CMP ECX,EDX JGE 0x0010118a LEA ECX,[RSI + RDX*0x1] CMP ECX,EDI JGE 0x0010118a ADD EDI,EDX XOR EAX,EAX CMP EDI...
bool func0(int param_1,int param_2,int param_3) { bool bVar1; if ((param_2 == 0 || param_3 == 0) || (param_1 == 0)) { bVar1 = false; } else { bVar1 = false; if (((param_1 + param_2 + param_3 == 0xb4) && (bVar1 = true, param_1 + param_2 < param_3)) && (param_2 + param_3 < param_1)) { ...
7,296
func0
#include <assert.h> #include <math.h>
double func0(int N, int Sum) { double ans = (double)Sum / (double)N; return round(ans * 100) / 100; }
int main() { assert(func0(6, 12) == 2); assert(fabs(func0(9, 13) - 1.44) < 0.01); assert(func0(1, 4) == 4); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) cvtsi2sdl -0x18(%rbp),%xmm0 cvtsi2sdl -0x14(%rbp),%xmm1 divsd %xmm1,%xmm0 movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%xmm1 movsd 0xefd(%rip),%xmm0 mulsd %xmm1,%xmm0 callq 1060 <round@plt> movsd 0xeec(%rip),...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov [rbp+var_18], esi pxor xmm0, xmm0 cvtsi2sd xmm0, [rbp+var_18] pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_14] divsd xmm0, xmm1 movsd [rbp+var_8], xmm0 movsd xmm1, [rbp+var_8] movsd xmm0, cs:qword_2078 mulsd xmm1, ...
__int128 __usercall func0@<xmm0>(int a1@<edi>, int a2@<esi>) { double v2; // rax __int128 v3; // xmm1 v2 = round((double)a2 / (double)a1 * 100.0); v3 = *(unsigned long long *)&v2; *(double *)&v3 = v2 / 100.0; return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI PXOR XMM0,XMM0 CVTSI2SD XMM0,dword ptr [RBP + -0x18] PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x14] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM0,qword ...
double func0(int param_1,int param_2) { double dVar1; dVar1 = round(((double)param_2 / (double)param_1) * DAT_00102078); return dVar1 / DAT_00102078; }
7,297
func0
#include <assert.h> #include <math.h>
double func0(int N, int Sum) { double ans = (double)Sum / (double)N; return round(ans * 100) / 100; }
int main() { assert(func0(6, 12) == 2); assert(fabs(func0(9, 13) - 1.44) < 0.01); assert(func0(1, 4) == 4); return 0; }
O1
c
func0: endbr64 sub $0x8,%rsp pxor %xmm0,%xmm0 cvtsi2sd %esi,%xmm0 pxor %xmm1,%xmm1 cvtsi2sd %edi,%xmm1 divsd %xmm1,%xmm0 mulsd 0xe9b(%rip),%xmm0 callq 1050 <round@plt> divsd 0xe8e(%rip),%xmm0 add $0x8,%rsp retq
func0: endbr64 sub rsp, 8 pxor xmm0, xmm0 cvtsi2sd xmm0, esi pxor xmm1, xmm1 cvtsi2sd xmm1, edi divsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 call _round divsd xmm0, cs:qword_2008 add rsp, 8 retn
double func0(int a1, int a2) { return round((double)a2 / (double)a1 * 100.0) / 100.0; }
func0: ENDBR64 SUB RSP,0x8 PXOR XMM0,XMM0 CVTSI2SD XMM0,ESI PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI DIVSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] CALL 0x00101050 DIVSD XMM0,qword ptr [0x00102008] ADD RSP,0x8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1,int param_2) { double dVar1; dVar1 = round(((double)param_2 / (double)param_1) * _DAT_00102008); return dVar1 / _DAT_00102008; }
7,298
func0
#include <assert.h> #include <math.h>
double func0(int N, int Sum) { double ans = (double)Sum / (double)N; return round(ans * 100) / 100; }
int main() { assert(func0(6, 12) == 2); assert(fabs(func0(9, 13) - 1.44) < 0.01); assert(func0(1, 4) == 4); return 0; }
O2
c
func0: endbr64 pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 sub $0x8,%rsp cvtsi2sd %esi,%xmm0 cvtsi2sd %edi,%xmm1 divsd %xmm1,%xmm0 mulsd 0xe84(%rip),%xmm0 callq 1050 <round@plt> divsd 0xe77(%rip),%xmm0 add $0x8,%rsp retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 pxor xmm0, xmm0 pxor xmm1, xmm1 sub rsp, 8 cvtsi2sd xmm0, esi cvtsi2sd xmm1, edi divsd xmm0, xmm1 mulsd xmm0, cs:qword_2008 call _round divsd xmm0, cs:qword_2008 add rsp, 8 retn
double func0(int a1, int a2) { return round((double)a2 / (double)a1 * 100.0) / 100.0; }
func0: ENDBR64 PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB RSP,0x8 CVTSI2SD XMM0,ESI CVTSI2SD XMM1,EDI DIVSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] CALL 0x00101050 DIVSD XMM0,qword ptr [0x00102008] ADD RSP,0x8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1,int param_2) { double dVar1; dVar1 = round(((double)param_2 / (double)param_1) * _DAT_00102008); return dVar1 / _DAT_00102008; }
7,299
func0
#include <assert.h> #include <math.h>
double func0(int N, int Sum) { double ans = (double)Sum / (double)N; return round(ans * 100) / 100; }
int main() { assert(func0(6, 12) == 2); assert(fabs(func0(9, 13) - 1.44) < 0.01); assert(func0(1, 4) == 4); return 0; }
O3
c
func0: endbr64 pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 sub $0x8,%rsp cvtsi2sd %esi,%xmm0 cvtsi2sd %edi,%xmm1 divsd %xmm1,%xmm0 mulsd 0xe84(%rip),%xmm0 callq 1050 <round@plt> divsd 0xe77(%rip),%xmm0 add $0x8,%rsp retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 pxor xmm0, xmm0 pxor xmm1, xmm1 sub rsp, 8 cvtsi2sd xmm0, esi cvtsi2sd xmm1, edi divsd xmm0, xmm1 mulsd xmm0, cs:qword_2008; x call _round divsd xmm0, cs:qword_2008 add rsp, 8 retn
double func0(int a1, int a2) { return round((double)a2 / (double)a1 * 100.0) / 100.0; }
func0: ENDBR64 PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB RSP,0x8 CVTSI2SD XMM0,ESI CVTSI2SD XMM1,EDI DIVSD XMM0,XMM1 MULSD XMM0,qword ptr [0x00102008] CALL 0x00101050 DIVSD XMM0,qword ptr [0x00102008] ADD RSP,0x8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int param_1,int param_2) { double dVar1; dVar1 = round(((double)param_2 / (double)param_1) * _DAT_00102008); return dVar1 / _DAT_00102008; }
7,300
func0
#include <assert.h> #include <stdlib.h>
int* func0(int num_list[], int num_elems, int* result_size) { int* new_list = (int*)malloc(num_elems * sizeof(int)); int j = 0; for (int i = 0; i < num_elems; i++) { if (num_list[i] >= 0) { new_list[j++] = num_list[i]; } } *result_size = j; return new...
int main() { int size; int list1[] = {1, -2, 3, -4}; int* result1 = func0(list1, 4, &size); assert(size == 2 && result1[0] == 1 && result1[1] == 3); free(result1); int list2[] = {1, 2, 3, -4}; int* result2 = func0(list2, 4, &size); assert(size == 3 && result2[0] == 1 && resul...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov -0x1c(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x8(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 1236 <func0+0x8d> mov...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov eax, [rbp+var_1C] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+var_8], rax mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short loc_1236 l...
_DWORD * func0(long long a1, int a2, _DWORD *a3) { int v3; // eax int v6; // [rsp+20h] [rbp-10h] int i; // [rsp+24h] [rbp-Ch] _DWORD *v8; // [rsp+28h] [rbp-8h] v8 = malloc(4LL * a2); v6 = 0; for ( i = 0; i < a2; ++i ) { if ( *(int *)(4LL * i + a1) >= 0 ) { v3 = v6++; v8[v3] = *(_DWO...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV EAX,dword ptr [RBP + -0x1c] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP ...
void * func0(long param_1,int param_2,int *param_3) { void *pvVar1; int4 local_18; int4 local_14; pvVar1 = malloc((long)param_2 << 2); local_18 = 0; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { if (-1 < *(int *)(param_1 + (long)local_14 * 4)) { *(int4 *)((long)local_18 * 4...
7,301
func0
#include <assert.h> #include <stdlib.h>
int* func0(int num_list[], int num_elems, int* result_size) { int* new_list = (int*)malloc(num_elems * sizeof(int)); int j = 0; for (int i = 0; i < num_elems; i++) { if (num_list[i] >= 0) { new_list[j++] = num_list[i]; } } *result_size = j; return new...
int main() { int size; int list1[] = {1, -2, 3, -4}; int* result1 = func0(list1, 4, &size); assert(size == 2 && result1[0] == 1 && result1[1] == 3); free(result1); int list2[] = {1, 2, 3, -4}; int* result2 = func0(list2, 4, &size); assert(size == 3 && result2[0] == 1 && resul...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %esi,%ebp mov %rdx,%rbx movslq %esi,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 11f5 <func0+0x4c> mov %r12,%rdx lea -0x1(%rbp),%ecx lea 0x4(%r12,%rcx,4),%r8 mov $0x0,%esi jmp 11e4 <func0+0x3b> add ...
func0: endbr64 push r12 push rbp push rbx mov r12, rdi mov ebp, esi mov rbx, rdx movsxd rdi, esi shl rdi, 2 call _malloc test ebp, ebp jle short loc_11F5 mov rdx, r12 lea ecx, [rbp-1] lea r8, [r12+rcx*4+4] mov esi, 0 jmp short loc_11ED loc_11DB: movsxd rdi, esi m...
long long func0(_DWORD *a1, int a2, _DWORD *a3) { long long result; // rax _DWORD *v6; // rdx int v7; // esi result = malloc(4LL * a2); if ( a2 <= 0 ) { v7 = 0; } else { v6 = a1; v7 = 0; do { if ( (int)*v6 >= 0 ) *(_DWORD *)(result + 4LL * v7++) = *v6; ++v6; ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV EBP,ESI MOV RBX,RDX MOVSXD RDI,ESI SHL RDI,0x2 CALL 0x001010b0 TEST EBP,EBP JLE 0x001011f5 MOV RDX,R12 LEA ECX,[RBP + -0x1] LEA R8,[R12 + RCX*0x4 + 0x4] MOV ESI,0x0 JMP 0x001011ed LAB_001011db: MOVSXD RDI,ESI MOV dword ptr [RAX + RDI*0x4],ECX LEA ESI,[RSI + 0x1]...
void func0(int *param_1,int param_2,int *param_3) { int *piVar1; void *pvVar2; int iVar3; pvVar2 = malloc((long)param_2 << 2); if (param_2 < 1) { iVar3 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar3 = 0; do { if (-1 < *param_1) { *(int *)((long)pvVar2 + ...
7,302
func0
#include <assert.h> #include <stdlib.h>
int* func0(int num_list[], int num_elems, int* result_size) { int* new_list = (int*)malloc(num_elems * sizeof(int)); int j = 0; for (int i = 0; i < num_elems; i++) { if (num_list[i] >= 0) { new_list[j++] = num_list[i]; } } *result_size = j; return new...
int main() { int size; int list1[] = {1, -2, 3, -4}; int* result1 = func0(list1, 4, &size); assert(size == 2 && result1[0] == 1 && result1[1] == 3); free(result1); int list2[] = {1, 2, 3, -4}; int* result2 = func0(list2, 4, &size); assert(size == 3 && result2[0] == 1 && resul...
O2
c
func0: endbr64 push %r12 mov %rdx,%r12 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x2,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 13a8 <func0+0x58> lea -0x1(%rbp),%edx mov %rbx,%rdi xor %esi,%esi lea 0x4(%rbx,%rdx,4),%r9 xchg %ax,%ax mov (%rdi),%ec...
func0: endbr64 push r12 mov r12, rdx push rbp push rbx mov rbx, rdi movsxd rdi, esi mov rbp, rdi shl rdi, 2 call _malloc test ebp, ebp jle short loc_13A8 lea edx, [rbp-1] mov rcx, rbx xor edi, edi lea r9, [rbx+rdx*4+4] xchg ax, ax loc_1380: mov esi, [rcx] test ...
long long func0(_DWORD *a1, int a2, _DWORD *a3) { long long result; // rax _DWORD *v6; // rcx int v7; // edi long long v8; // r8 result = malloc(4LL * a2); if ( a2 <= 0 ) { *a3 = 0; } else { v6 = a1; v7 = 0; do { if ( (int)*v6 >= 0 ) { v8 = v7++; *(_...
func0: ENDBR64 PUSH R12 MOV R12,RDX PUSH RBP PUSH RBX MOV RBX,RDI MOVSXD RDI,ESI MOV RBP,RDI SHL RDI,0x2 CALL 0x001010b0 TEST EBP,EBP JLE 0x001013a8 LEA EDX,[RBP + -0x1] MOV RCX,RBX XOR EDI,EDI LEA R9,[RBX + RDX*0x4 + 0x4] NOP LAB_00101380: MOV ESI,dword ptr [RCX] TEST ESI,ESI JS 0x00101390 MOVSXD R8,EDI ADD EDI,0x1 MO...
void func0(int *param_1,int param_2,int *param_3) { int *piVar1; void *pvVar2; int iVar3; long lVar4; pvVar2 = malloc((long)param_2 << 2); if (0 < param_2) { iVar3 = 0; piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (-1 < *param_1) { lVar4 = (long)iVar3; iVar3 = i...
7,303
func0
#include <assert.h> #include <stdlib.h>
int* func0(int num_list[], int num_elems, int* result_size) { int* new_list = (int*)malloc(num_elems * sizeof(int)); int j = 0; for (int i = 0; i < num_elems; i++) { if (num_list[i] >= 0) { new_list[j++] = num_list[i]; } } *result_size = j; return new...
int main() { int size; int list1[] = {1, -2, 3, -4}; int* result1 = func0(list1, 4, &size); assert(size == 2 && result1[0] == 1 && result1[1] == 3); free(result1); int list2[] = {1, 2, 3, -4}; int* result2 = func0(list2, 4, &size); assert(size == 3 && result2[0] == 1 && resul...
O3
c
func0: endbr64 push %r12 mov %rdx,%r12 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x2,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 1378 <func0+0x58> lea -0x1(%rbp),%edx mov %rbx,%rdi xor %esi,%esi lea 0x4(%rbx,%rdx,4),%r9 xchg %ax,%ax mov (%rdi),%ec...
func0: endbr64 push r13 movsxd r8, esi mov r13, rdx push r12 mov r12, r8 push rbp lea rbp, ds:0[r8*4] push rbx mov rbx, rdi mov rdi, rbp; size sub rsp, 8 call _malloc test r12d, r12d jle short loc_1390 mov rcx, rbx lea r8, [rbx+rbp] xor edi, edi nop dword p...
_DWORD * func0(_DWORD *a1, int a2, _DWORD *a3) { _DWORD *result; // rax _DWORD *v6; // rcx int v7; // edi long long v8; // r9 result = malloc(4LL * a2); if ( a2 <= 0 ) { *a3 = 0; } else { v6 = a1; v7 = 0; do { if ( (int)*v6 >= 0 ) { v8 = v7++; result[...
func0: ENDBR64 PUSH R13 MOVSXD R8,ESI MOV R13,RDX PUSH R12 MOV R12,R8 PUSH RBP LEA RBP,[R8*0x4] PUSH RBX MOV RBX,RDI MOV RDI,RBP SUB RSP,0x8 CALL 0x001010b0 TEST R12D,R12D JLE 0x00101390 MOV RCX,RBX LEA R8,[RBX + RBP*0x1] XOR EDI,EDI NOP dword ptr [RAX + RAX*0x1] LAB_00101360: MOV ESI,dword ptr [RCX] TEST ESI,ESI JS 0x...
void func0(int *param_1,int param_2,int *param_3) { int *piVar1; void *pvVar2; int iVar3; long lVar4; pvVar2 = malloc((long)param_2 * 4); if (0 < param_2) { piVar1 = param_1 + param_2; iVar3 = 0; do { if (-1 < *param_1) { lVar4 = (long)iVar3; iVar3 = iVar3 + 1; ...
7,304
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { int res = 1; while (n % 2 == 0) { n /= 2; } for (int i = 3; i <= sqrt(n) + 1; i += 2) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n /= i; curr_term *= i; ...
int main() { assert(func0(30) == 24); assert(func0(18) == 13); assert(func0(2) == 1); printf("All test cases passed.\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %edi,-0x24(%rbp) movl $0x1,-0x14(%rbp) jmp 11b0 <func0+0x27> mov -0x24(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax mov %eax,-0x24(%rbp) mov -0x24(%rbp),%eax and $0x1,%eax test %eax,%eax je 11a1 <fu...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_24], edi mov [rbp+var_14], 1 jmp short loc_11B0 loc_11A1: mov eax, [rbp+var_24] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 mov [rbp+var_24], eax loc_11B0: mov eax, [rbp+var_24] and eax, 1 test ...
long long func0(int a1) { unsigned int v3; // [rsp+1Ch] [rbp-14h] int i; // [rsp+20h] [rbp-10h] int v5; // [rsp+24h] [rbp-Ch] int v6; // [rsp+28h] [rbp-8h] int v7; // [rsp+2Ch] [rbp-4h] v3 = 1; while ( (a1 & 1) == 0 ) a1 /= 2; for ( i = 3; sqrt((double)a1) + 1.0 >= (double)i; i += 2 ) { v5 =...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x24],EDI MOV dword ptr [RBP + -0x14],0x1 JMP 0x001011b0 LAB_001011a1: MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV dword ptr [RBP + -0x24],EAX LAB_001011b0: MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x1 TEST EA...
int func0(uint param_1) { double dVar1; int4 local_2c; int4 local_1c; int4 local_18; int4 local_10; int4 local_c; local_1c = 1; for (local_2c = param_1; (local_2c & 1) == 0; local_2c = (int)local_2c / 2) { } local_18 = 3; while( true ) { dVar1 = sqrt((double)(int)local_2c); if (dVar1 +...
7,305
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { int res = 1; while (n % 2 == 0) { n /= 2; } for (int i = 3; i <= sqrt(n) + 1; i += 2) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n /= i; curr_term *= i; ...
int main() { assert(func0(30) == 24); assert(func0(18) == 13); assert(func0(2) == 1); printf("All test cases passed.\n"); return 0; }
O1
c
func0: endbr64 push %r12 push %rbp push %rbx sub $0x10,%rsp mov %edi,%ebx test $0x1,%dil jne 11ae <func0+0x25> mov %ebx,%edi shr $0x1f,%edi add %ebx,%edi sar %edi mov %edi,%ebx test $0x1,%dil je 119d <func0+0x14> mov $0x3,%ebp mov $0x1,%r12d jmp 11d5 <func0+0x4c> mov %e...
func0: endbr64 push r12 push rbp push rbx sub rsp, 10h mov ebx, edi test dil, 1 jnz short loc_11AC loc_119D: mov eax, ebx shr eax, 1Fh add eax, ebx sar eax, 1 mov ebx, eax test al, 1 jz short loc_119D loc_11AC: mov ebp, 3 mov r12d, 1 jmp short loc_11D3 loc...
long long func0(int a1) { int i; // ebx int v2; // ebp unsigned int v3; // r12d int v4; // ecx int j; // esi double v6; // xmm0_8 double v7; // xmm0_8 for ( i = a1; (i & 1) == 0; i /= 2 ) ; v2 = 3; v3 = 1; while ( 1 ) { v6 = (double)i; v7 = (double)i < 0.0 ? sqrt(v6) : sqrt(v6); ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x10 MOV EBX,EDI TEST DIL,0x1 JNZ 0x001011ac LAB_0010119d: MOV EAX,EBX SHR EAX,0x1f ADD EAX,EBX SAR EAX,0x1 MOV EBX,EAX TEST AL,0x1 JZ 0x0010119d LAB_001011ac: MOV EBP,0x3 MOV R12D,0x1 JMP 0x001011d3 LAB_001011b9: MOV EAX,EBX CDQ IDIV EBP MOV EBX,EAX IMUL ECX,EBP ADD ES...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint param_1) { long lVar1; uint uVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; double dVar8; uVar2 = param_1 & 1; while (uVar2 == 0) { param_1 = (int)param_1 / 2; uVar2 = param...
7,306
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { int res = 1; while (n % 2 == 0) { n /= 2; } for (int i = 3; i <= sqrt(n) + 1; i += 2) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n /= i; curr_term *= i; ...
int main() { assert(func0(30) == 24); assert(func0(18) == 13); assert(func0(2) == 1); printf("All test cases passed.\n"); return 0; }
O2
c
func0: endbr64 push %r12 push %rbx sub $0x28,%rsp test $0x1,%dil jne 1267 <func0+0x27> nopl 0x0(%rax) mov %edi,%eax shr $0x1f,%eax add %edi,%eax mov %eax,%edi sar %edi test $0x2,%al je 1258 <func0+0x18> pxor %xmm2,%xmm2 mov $0x3,%ebx mov $0x1,%r12d movsd 0xe12(%rip),%xmm4 cvt...
func0: endbr64 push r12 push rbp push rbx sub rsp, 20h test dil, 1 jnz short loc_1267 nop word ptr [rax+rax+00h] loc_1258: mov eax, edi shr eax, 1Fh add eax, edi mov edi, eax sar edi, 1 test al, 2 jz short loc_1258 loc_1267: pxor xmm1, xmm1 mov ebp, 3 mov r...
long long func0(int a1) { unsigned int v1; // eax int v2; // ebp unsigned int v3; // r12d double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm0_8 int v7; // ecx int v8; // esi int v9; // edx if ( (a1 & 1) == 0 ) { do { v1 = a1 + ((unsigned int)a1 >> 31); a1 /= 2; }...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x20 TEST DIL,0x1 JNZ 0x00101267 NOP word ptr [RAX + RAX*0x1] LAB_00101258: MOV EAX,EDI SHR EAX,0x1f ADD EAX,EDI MOV EDI,EAX SAR EDI,0x1 TEST AL,0x2 JZ 0x00101258 LAB_00101267: PXOR XMM1,XMM1 MOV EBP,0x3 MOV R12D,0x1 MOVSD XMM3,qword ptr [0x00102070] CVTSI2SD XMM1,EDI P...
int func0(ulong param_1) { ulong uVar1; uint uVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; double dVar8; double __x; double dVar9; if ((param_1 & 1) == 0) { do { uVar2 = ((uint)(param_1 >> 0x1f) & 1) + (int)param_1; param_1 = (ulong)(uint)((int)uVar2 >> 1); ...
7,307
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { int res = 1; while (n % 2 == 0) { n /= 2; } for (int i = 3; i <= sqrt(n) + 1; i += 2) { int count = 0; int curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n /= i; curr_term *= i; ...
int main() { assert(func0(30) == 24); assert(func0(18) == 13); assert(func0(2) == 1); printf("All test cases passed.\n"); return 0; }
O3
c
func0: endbr64 push %r12 push %rbx sub $0x28,%rsp test $0x1,%dil jne 1267 <func0+0x27> nopl 0x0(%rax) mov %edi,%eax shr $0x1f,%eax add %edi,%eax mov %eax,%edi sar %edi test $0x2,%al je 1258 <func0+0x18> pxor %xmm2,%xmm2 mov $0x3,%ebx mov $0x1,%r12d movsd 0xe12(%rip),%xmm4 cvt...
func0: endbr64 push r12 push rbp push rbx sub rsp, 20h test dil, 1 jnz short loc_1267 nop word ptr [rax+rax+00h] loc_1258: mov eax, edi shr eax, 1Fh add eax, edi mov edi, eax sar edi, 1 test al, 2 jz short loc_1258 loc_1267: pxor xmm1, xmm1 mov ebp, 3 mov r...
long long func0(int a1) { unsigned int v1; // eax int v2; // ebp unsigned int v3; // r12d double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm0_8 int v7; // ecx int v8; // esi int v9; // edx if ( (a1 & 1) == 0 ) { do { v1 = a1 + ((unsigned int)a1 >> 31); a1 /= 2; }...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x20 TEST DIL,0x1 JNZ 0x00101267 NOP word ptr [RAX + RAX*0x1] LAB_00101258: MOV EAX,EDI SHR EAX,0x1f ADD EAX,EDI MOV EDI,EAX SAR EDI,0x1 TEST AL,0x2 JZ 0x00101258 LAB_00101267: PXOR XMM1,XMM1 MOV EBP,0x3 MOV R12D,0x1 MOVSD XMM4,qword ptr [0x00102070] CVTSI2SD XMM1,EDI P...
int func0(ulong param_1) { ulong uVar1; uint uVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; double dVar8; double __x; double dVar9; if ((param_1 & 1) == 0) { do { uVar2 = ((uint)(param_1 >> 0x1f) & 1) + (int)param_1; param_1 = (ulong)(uint)((int)uVar2 >> 1); ...
7,308
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int rawheap[], int size) { int i, j, temp; for (i = size / 2 - 1; i >= 0; i--) { for (j = 2 * i + 1; j < size; j = 2 * j + 1) { if (j + 1 < size && rawheap[j] > rawheap[j + 1]) { j++; } if (rawheap[i] <= rawheap[j]) { ...
int main() { int array1[] = {25, 44, 68, 21, 39, 23, 89}; int size1 = sizeof(array1) / sizeof(array1[0]); func0(array1, size1); int expected1[] = {21, 25, 23, 44, 39, 68, 89}; for (int i = 0; i < size1; i++) { assert(array1[i] == expected1[i]); } int array2[] = {25, 35,...
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 sub $0x1,%eax mov %eax,-0xc(%rbp) jmpq 129c <func0+0x133> mov -0xc(%rbp),%eax add %eax,%eax add $0x1,%eax mov %eax,-0x8(...
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 sub eax, 1 mov [rbp+var_C], eax jmp loc_129C loc_118F: mov eax, [rbp+var_C] add eax, eax add eax, 1 mov ...
long long func0(long long a1, int a2) { long long result; // rax int i; // [rsp+10h] [rbp-Ch] int j; // [rsp+14h] [rbp-8h] int v5; // [rsp+18h] [rbp-4h] result = (unsigned int)(a2 / 2 - 1); for ( i = a2 / 2 - 1; i >= 0; --i ) { for ( j = 2 * i + 1; ; j = 2 * j + 1 ) { result = (unsigned in...
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 SUB EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0010129c LAB_0010118f: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,EAX ADD EAX,0x1 MOV dword pt...
void func0(long param_1,int param_2) { int4 uVar1; int iVar2; int local_14; int local_10; local_14 = param_2 / 2; do { local_14 = local_14 + -1; local_10 = local_14; if (local_14 < 0) { return; } while( true ) { iVar2 = local_10 * 2; local_10 = iVar2 + 1; if (...
7,309
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int rawheap[], int size) { int i, j, temp; for (i = size / 2 - 1; i >= 0; i--) { for (j = 2 * i + 1; j < size; j = 2 * j + 1) { if (j + 1 < size && rawheap[j] > rawheap[j + 1]) { j++; } if (rawheap[i] <= rawheap[j]) { ...
int main() { int array1[] = {25, 44, 68, 21, 39, 23, 89}; int size1 = sizeof(array1) / sizeof(array1[0]); func0(array1, size1); int expected1[] = {21, 25, 23, 44, 39, 68, 89}; for (int i = 0; i < size1; i++) { assert(array1[i] == expected1[i]); } int array2[] = {25, 35,...
O1
c
func0: endbr64 mov %esi,%r10d shr $0x1f,%r10d add %esi,%r10d sar %r10d sub $0x1,%r10d jns 11c9 <func0+0x60> retq movslq %r10d,%rdx lea (%rdi,%rdx,4),%r8 mov (%r8),%ecx movslq %eax,%rdx lea (%rdi,%rdx,4),%rdx mov (%rdx),%r9d cmp %r9d,%ecx jle 11c3 <func0+0x5a> mov %r9d,(%r8) mov ...
func0: endbr64 mov rdx, rdi mov r10d, esi shr r10d, 1Fh add r10d, esi sar r10d, 1 sub r10d, 1 jns short loc_11CC locret_1183: retn loc_1184: movsxd rcx, r10d lea r8, [rdx+rcx*4] mov edi, [r8] movsxd rcx, eax lea rcx, [rdx+rcx*4] mov r9d, [rcx] cmp edi, r9d jle short...
void func0(long long a1, int a2) { int i; // r10d int *v4; // r8 int v5; // edi int *v6; // rcx int j; // eax for ( i = a2 / 2 - 1; i >= 0; --i ) { for ( j = 2 * i + 1; a2 > j; j = 2 * j + 1 ) { if ( j + 1 < a2 && *(_DWORD *)(a1 + 4LL * j) > *(_DWORD *)(a1 + 4LL * j + 4) ) ++j; ...
func0: ENDBR64 MOV RDX,RDI MOV R10D,ESI SHR R10D,0x1f ADD R10D,ESI SAR R10D,0x1 SUB R10D,0x1 JNS 0x001011cc LAB_00101183: RET LAB_00101184: MOVSXD RCX,R10D LEA R8,[RDX + RCX*0x4] MOV EDI,dword ptr [R8] MOVSXD RCX,EAX LEA RCX,[RDX + RCX*0x4] MOV R9D,dword ptr [RCX] CMP EDI,R9D JLE 0x001011c6 MOV dword ptr [R8],R9D MOV d...
void func0(long param_1,int param_2) { int *piVar1; int *piVar2; int iVar3; int iVar4; int iVar5; int iVar6; iVar6 = param_2 / 2; do { do { iVar6 = iVar6 + -1; if (iVar6 < 0) { return; } iVar5 = iVar6 * 2 + 1; } while (param_2 <= iVar5); do { if ((iV...
7,310
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int rawheap[], int size) { int i, j, temp; for (i = size / 2 - 1; i >= 0; i--) { for (j = 2 * i + 1; j < size; j = 2 * j + 1) { if (j + 1 < size && rawheap[j] > rawheap[j + 1]) { j++; } if (rawheap[i] <= rawheap[j]) { ...
int main() { int array1[] = {25, 44, 68, 21, 39, 23, 89}; int size1 = sizeof(array1) / sizeof(array1[0]); func0(array1, size1); int expected1[] = {21, 25, 23, 44, 39, 68, 89}; for (int i = 0; i < size1; i++) { assert(array1[i] == expected1[i]); } int array2[] = {25, 35,...
O2
c
func0: endbr64 mov %esi,%r10d shr $0x1f,%r10d add %esi,%r10d sar %r10d sub $0x1,%r10d js 1457 <func0+0x87> nopw 0x0(%rax,%rax,1) lea 0x1(%r10,%r10,1),%eax cmp %eax,%esi jg 1412 <func0+0x42> jmp 144d <func0+0x7d> nopl 0x0(%rax,%rax,1) lea -0x1(%rax),%r10d lea 0x1(%rax,%rax,1),%e...
func0: endbr64 mov r9d, esi mov r8, rdi mov r10d, esi shr r9d, 1Fh add r9d, esi sar r9d, 1 sub r9d, 1 js short locret_145E nop dword ptr [rax] loc_1400: lea eax, [r9+r9+1] cmp r10d, eax jg short loc_1421 jmp short loc_1458 loc_1410: lea r9d, [rax-1] lea eax,...
void func0(long long a1, int a2) { int v4; // r9d int i; // eax long long v6; // rdx _DWORD *v7; // rsi int v8; // ecx _DWORD *v9; // rdx int *v10; // rdi int v11; // edx v4 = a2 / 2 - 1; if ( v4 >= 0 ) { do { for ( i = 2 * v4 + 1; a2 > i; *v7 = v11 ) { v6 = 4LL * i; ...
func0: ENDBR64 MOV R9D,ESI MOV R8,RDI MOV R10D,ESI SHR R9D,0x1f ADD R9D,ESI SAR R9D,0x1 SUB R9D,0x1 JS 0x0010145e NOP dword ptr [RAX] LAB_00101400: LEA EAX,[R9 + R9*0x1 + 0x1] CMP R10D,EAX JG 0x00101421 JMP 0x00101458 LAB_00101410: LEA R9D,[RAX + -0x1] LEA EAX,[RAX + RAX*0x1 + 0x1] MOV dword ptr [RDI],ECX MOV dword ptr...
void func0(long param_1,int param_2) { int *piVar1; int iVar2; int iVar3; int iVar4; int *piVar5; int iVar6; int iVar7; bool bVar8; iVar7 = param_2 / 2 + -1; iVar4 = iVar7; if (-1 < iVar7) { joined_r0x00101408: do { iVar3 = iVar4 * 2 + 1; if (iVar3 < param_2) { iVar6 = ...
7,311
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int rawheap[], int size) { int i, j, temp; for (i = size / 2 - 1; i >= 0; i--) { for (j = 2 * i + 1; j < size; j = 2 * j + 1) { if (j + 1 < size && rawheap[j] > rawheap[j + 1]) { j++; } if (rawheap[i] <= rawheap[j]) { ...
int main() { int array1[] = {25, 44, 68, 21, 39, 23, 89}; int size1 = sizeof(array1) / sizeof(array1[0]); func0(array1, size1); int expected1[] = {21, 25, 23, 44, 39, 68, 89}; for (int i = 0; i < size1; i++) { assert(array1[i] == expected1[i]); } int array2[] = {25, 35,...
O3
c
func0: endbr64 mov %esi,%r10d shr $0x1f,%r10d add %esi,%r10d sar %r10d sub $0x1,%r10d js 1437 <func0+0x87> nopw 0x0(%rax,%rax,1) lea 0x1(%r10,%r10,1),%eax cmp %eax,%esi jg 13f2 <func0+0x42> jmp 142d <func0+0x7d> nopl 0x0(%rax,%rax,1) lea -0x1(%rax),%r10d lea 0x1(%rax,%rax,1),%e...
func0: endbr64 mov r9d, esi mov r8, rdi mov r10d, esi shr r9d, 1Fh add r9d, esi sar r9d, 1 nop word ptr [rax+rax+00000000h] loc_1350: sub r9d, 1 js short locret_13AE loc_1356: lea eax, [r9+r9+1] cmp r10d, eax jle short loc_1350 loc_1360: movsxd rdx, eax lea edi, [ra...
void func0(long long a1, int a2) { int v4; // r9d int v5; // eax long long v6; // rdx _DWORD *v7; // rsi int v8; // ecx _DWORD *v9; // rdx int *v10; // rdi int v11; // edx v4 = a2 / 2; while ( --v4 >= 0 ) { LABEL_3: v5 = 2 * v4 + 1; if ( a2 > v5 ) { while ( 1 ) { ...
func0: ENDBR64 MOV R9D,ESI MOV R8,RDI MOV R10D,ESI SHR R9D,0x1f ADD R9D,ESI SAR R9D,0x1 NOP word ptr [RAX + RAX*0x1] LAB_00101350: SUB R9D,0x1 JS 0x001013ae LAB_00101356: LEA EAX,[R9 + R9*0x1 + 0x1] CMP R10D,EAX JLE 0x00101350 LAB_00101360: MOVSXD RDX,EAX LEA EDI,[RAX + 0x1] SHL RDX,0x2 LEA RSI,[R8 + RDX*0x1] MOV ECX,d...
void func0(long param_1,int param_2) { int *piVar1; int iVar2; int iVar3; int iVar4; int iVar5; int *piVar6; int iVar7; iVar7 = param_2 / 2; LAB_00101350: do { iVar7 = iVar7 + -1; while( true ) { if (iVar7 < 0) { return; } iVar3 = iVar7 * 2 + 1; if (param_2 ...
7,312
func0
#include <assert.h> #include <stdbool.h>
bool func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 0); }
int main() { assert(func0(10) == true); assert(func0(11) == false); assert(func0(18) == true); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) jmp 116a <func0+0x21> mov -0x14(%rbp),%eax sub $0x1,%eax and %eax,-0x14(%rbp) addl $0x1,-0x4(%rbp) cmpl $0x0,-0x14(%rbp) jne 115d <func0+0x14> mov -0x4(%rbp),%eax and $0x1,%eax test %eax,%eax sete %al...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 jmp short loc_116A loc_115D: mov eax, [rbp+var_14] sub eax, 1 and [rbp+var_14], eax add [rbp+var_4], 1 loc_116A: cmp [rbp+var_14], 0 jnz short loc_115D mov eax, [rbp+var_4] and eax, 1 test ...
bool func0(int a1) { char v3; // [rsp+10h] [rbp-4h] v3 = 0; while ( a1 ) { a1 &= a1 - 1; ++v3; } return (v3 & 1) == 0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010116a LAB_0010115d: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 AND dword ptr [RBP + -0x14],EAX ADD dword ptr [RBP + -0x4],0x1 LAB_0010116a: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0010115d MOV EAX,dword ptr [RBP +...
bool func0(uint param_1) { bool bVar1; int4 local_1c; bVar1 = false; for (local_1c = param_1; local_1c != 0; local_1c = local_1c & local_1c - 1) { bVar1 = (bool)(bVar1 ^ 1); } return !bVar1; }
7,313
func0
#include <assert.h> #include <stdbool.h>
bool func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 0); }
int main() { assert(func0(10) == true); assert(func0(11) == false); assert(func0(18) == true); return 0; }
O1
c
func0: endbr64 test %edi,%edi je 1167 <func0+0x1e> mov $0x0,%eax lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1156 <func0+0xd> xor $0x1,%eax and $0x1,%eax retq mov %edi,%eax jmp 1160 <func0+0x17>
func0: endbr64 test edi, edi jz short loc_1167 mov eax, 0 loc_1156: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1156 loc_1160: xor eax, 1 and eax, 1 retn loc_1167: mov eax, edi jmp short loc_1160
long long func0(int a1) { unsigned __int8 v1; // al if ( a1 ) { v1 = 0; do { ++v1; a1 &= a1 - 1; } while ( a1 ); } else { v1 = 0; } return (v1 ^ 1) & 1; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101167 MOV EAX,0x0 LAB_00101156: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101156 LAB_00101160: XOR EAX,0x1 AND EAX,0x1 RET LAB_00101167: MOV EAX,EDI JMP 0x00101160
uint func0(uint param_1) { uint uVar1; if (param_1 == 0) { uVar1 = 0; } else { uVar1 = 0; do { uVar1 = uVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); } return (uVar1 ^ 1) & 1; }
7,314
func0
#include <assert.h> #include <stdbool.h>
bool func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 0); }
int main() { assert(func0(10) == true); assert(func0(11) == false); assert(func0(18) == true); return 0; }
O2
c
func0: endbr64 test %edi,%edi je 1160 <func0+0x20> xor %eax,%eax nopw 0x0(%rax,%rax,1) lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1150 <func0+0x10> not %eax and $0x1,%eax retq mov $0x1,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 test edi, edi jz short loc_1160 xor eax, eax nop word ptr [rax+rax+00h] loc_1150: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1150 not eax and eax, 1 retn loc_1160: mov eax, 1 retn
_BOOL8 func0(int a1) { char v1; // al if ( !a1 ) return 1LL; v1 = 0; do { ++v1; a1 &= a1 - 1; } while ( a1 ); return (v1 & 1) == 0; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101160 XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_00101150: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101150 NOT EAX AND EAX,0x1 RET LAB_00101160: MOV EAX,0x1 RET
uint func0(uint param_1) { uint uVar1; if (param_1 != 0) { uVar1 = 0; do { uVar1 = uVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); return ~uVar1 & 1; } return 1; }
7,315
func0
#include <assert.h> #include <stdbool.h>
bool func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 0); }
int main() { assert(func0(10) == true); assert(func0(11) == false); assert(func0(18) == true); return 0; }
O3
c
func0: endbr64 test %edi,%edi je 1160 <func0+0x20> xor %eax,%eax nopw 0x0(%rax,%rax,1) lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1150 <func0+0x10> not %eax and $0x1,%eax retq mov $0x1,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 test edi, edi jz short loc_1160 xor eax, eax nop word ptr [rax+rax+00h] loc_1150: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1150 not eax and eax, 1 retn loc_1160: mov eax, 1 retn
_BOOL8 func0(int a1) { char v1; // al if ( !a1 ) return 1LL; v1 = 0; do { ++v1; a1 &= a1 - 1; } while ( a1 ); return (v1 & 1) == 0; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101160 XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_00101150: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101150 NOT EAX AND EAX,0x1 RET LAB_00101160: MOV EAX,0x1 RET
uint func0(uint param_1) { uint uVar1; if (param_1 != 0) { uVar1 = 0; do { uVar1 = uVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); return ~uVar1 & 1; } return 1; }
7,316
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int noOfZeroes[n]; int count = 0; noOfZeroes[n - 1] = 1 - arr[n - 1]; for (int i = n - 2; i >= 0; i--) { noOfZeroes[i] = noOfZeroes[i + 1]; if (arr[i] == 0) { noOfZeroes[i]++; } } for (int i = 0; i < n; i++) { ...
int main() { int arr1[] = {1, 0, 1, 0}; int arr2[] = {0, 1, 0}; int arr3[] = {0, 0, 1, 1, 0}; assert(func0(arr1, 4) == 3); assert(func0(arr2, 3) == 1); assert(func0(arr3, 5) == 2); printf("All test cases passed!\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x4c(%rbp),%eax movslq %eax,%rdx sub $0x1,%rdx mov %rdx,-0x28(%rbp) movslq %eax,%rdx mov...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax mov eax, [rbp+var_3C] movsxd rdx, eax sub rdx, 1 mov [rbp+var_18], rdx cdqe lea rdx, ds:0[rax*...
long long func0(long long a1, int a2) { unsigned long long v2; // rax void *v3; // rsp _BYTE v5[4]; // [rsp+8h] [rbp-40h] BYREF int v6; // [rsp+Ch] [rbp-3Ch] long long v7; // [rsp+10h] [rbp-38h] unsigned int v8; // [rsp+24h] [rbp-24h] int i; // [rsp+28h] [rbp-20h] int j; // [rsp+2Ch] [rbp-1Ch] long l...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,RSP MOV RSI,RAX MOV EAX,dword ptr [RBP + -0x3c] MOVSXD RDX,EAX SUB RDX,0x1 MOV qword ptr [RBP + -0x18],RDX CDQE LEA RDX,[RAX*0x4...
int func0(long param_1,int param_2) { long lVar1; ulong uVar2; int *puVar3; long in_FS_OFFSET; int auStack_48 [4]; int local_44; long local_40; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; local_40 = param_1; local_44 = param_2; local_10 = *(...
7,317
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int noOfZeroes[n]; int count = 0; noOfZeroes[n - 1] = 1 - arr[n - 1]; for (int i = n - 2; i >= 0; i--) { noOfZeroes[i] = noOfZeroes[i + 1]; if (arr[i] == 0) { noOfZeroes[i]++; } } for (int i = 0; i < n; i++) { ...
int main() { int arr1[] = {1, 0, 1, 0}; int arr2[] = {0, 1, 0}; int arr3[] = {0, 0, 1, 1, 0}; assert(func0(arr1, 4) == 3); assert(func0(arr2, 3) == 1); assert(func0(arr3, 5) == 2); printf("All test cases passed!\n"); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movslq %esi,%rdx shl $0x2,%rdx lea 0xf(%rdx),%rax mov %rax,%rcx and $0xfffffffffffffff0,%rcx and $0xfffffffffffff000,%rax mov %rsp,%r10 sub %rax,%r10 mov %r10,%rax cmp %r...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax movsxd rdx, esi shl rdx, 2 lea rax, [rdx+0Fh] mov r8, rax and r8, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFFFFFFFF000h mov rcx, rsp sub rcx, rax loc_11C2: cmp rsp, rcx jz...
long long func0(long long a1, int a2) { long long v2; // rdx signed long long v3; // rax void *v4; // rsp long long v5; // rax int v6; // edx long long v7; // rdx long long v8; // rax unsigned int v9; // esi _DWORD v12[2]; // [rsp+8h] [rbp-10h] BYREF unsigned long long v13; // [rsp+10h] [rbp-8h] ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOVSXD RDX,ESI SHL RDX,0x2 LEA RAX,[RDX + 0xf] MOV R8,RAX AND R8,-0x10 AND RAX,-0x1000 MOV RCX,RSP SUB RCX,RAX LAB_001011c2: CMP RSP,RCX JZ 0x001011d9 SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0x0 JMP...
int func0(long param_1,uint param_2) { long lVar1; long lVar2; ulong uVar3; int1 *puVar4; int iVar5; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = (long)(int)param_2 * 4 + 0xf; for (puVar4 = auStack_18; puVar4 != auStack_18 + -(uVar3 ...
7,318
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int noOfZeroes[n]; int count = 0; noOfZeroes[n - 1] = 1 - arr[n - 1]; for (int i = n - 2; i >= 0; i--) { noOfZeroes[i] = noOfZeroes[i + 1]; if (arr[i] == 0) { noOfZeroes[i]++; } } for (int i = 0; i < n; i++) { ...
int main() { int arr1[] = {1, 0, 1, 0}; int arr2[] = {0, 1, 0}; int arr3[] = {0, 0, 1, 1, 0}; assert(func0(arr1, 4) == 3); assert(func0(arr2, 3) == 1); assert(func0(arr3, 5) == 2); printf("All test cases passed!\n"); return 0; }
O2
c
func0: endbr64 push %rbp movslq %esi,%rsi mov %rsi,%r8 shl $0x2,%rsi mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0xf(%rsi),%rax mov %rsp,%rcx mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rcx and $0xfffffffffffffff0,%rdx mov %rc...
func0: endbr64 push rbp movsxd rsi, esi lea r9, ds:0[rsi*4] mov r8, rsi mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [r9+0Fh] mov rcx, rsp mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rcx, rax and rdx, 0FFFFFFFFFFFFFFF0h cmp...
long long func0(long long a1, int a2) { long long v2; // r9 _DWORD *v3; // rcx signed long long v4; // rdx void *v5; // rsp int v6; // edx long long i; // rax int v8; // r9d long long v9; // rax unsigned int v10; // r8d _DWORD v13[1022]; // [rsp+8h] [rbp-1010h] BYREF _QWORD v14[2]; // [rsp+1008h]...
func0: ENDBR64 PUSH RBP MOVSXD RSI,ESI LEA R9,[RSI*0x4] MOV R8,RSI MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[R9 + 0xf] MOV RCX,RSP MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x0010130a LAB_001012f5: SUB RSP,0x1000 OR qword ptr [RSP...
int func0(long param_1,int param_2) { int iVar1; long lVar2; int1 *puVar3; long lVar4; int iVar5; ulong uVar6; int1 *puVar7; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; int1 *puVar8; lVar4 = (long)param_2 * 4; puVar7 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); u...
7,319
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int noOfZeroes[n]; int count = 0; noOfZeroes[n - 1] = 1 - arr[n - 1]; for (int i = n - 2; i >= 0; i--) { noOfZeroes[i] = noOfZeroes[i + 1]; if (arr[i] == 0) { noOfZeroes[i]++; } } for (int i = 0; i < n; i++) { ...
int main() { int arr1[] = {1, 0, 1, 0}; int arr2[] = {0, 1, 0}; int arr3[] = {0, 0, 1, 1, 0}; assert(func0(arr1, 4) == 3); assert(func0(arr2, 3) == 1); assert(func0(arr3, 5) == 2); printf("All test cases passed!\n"); return 0; }
O3
c
func0: endbr64 push %rbp movslq %esi,%rdx mov %rdx,%r8 shl $0x2,%rdx mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0xf(%rdx),%rax mov %rsp,%rsi mov %rax,%rcx and $0xfffffffffffff000,%rax sub %rax,%rsi and $0xfffffffffffffff0,%rcx mov %rs...
func0: endbr64 push rbp movsxd rsi, esi mov rdx, rsi shl rsi, 2 mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [rsi+0Fh] mov r8, rsp mov rcx, rax and rax, 0FFFFFFFFFFFFF000h sub r8, rax and rcx, 0FFFFFFFFFFFFFFF0h cmp rsp,...
long long func0(long long a1, int a2) { long long v3; // rsi _BYTE *v4; // r8 signed long long v5; // rcx void *v6; // rsp long long v7; // rax int v8; // edx int v9; // r8d long long v10; // rax unsigned int v11; // edx _BYTE v14[4088]; // [rsp+8h] [rbp-1010h] BYREF _QWORD v15[2]; // [rsp+1008h]...
func0: ENDBR64 PUSH RBP MOVSXD RSI,ESI MOV RDX,RSI SHL RSI,0x2 MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[RSI + 0xf] MOV R8,RSP MOV RCX,RAX AND RAX,-0x1000 SUB R8,RAX AND RCX,-0x10 CMP RSP,R8 JZ 0x001012f6 LAB_001012e1: SUB RSP,0x1000 OR qword ptr [RSP + 0xf...
int func0(long param_1,int param_2) { long lVar1; int *puVar2; long lVar3; ulong uVar4; int iVar5; int *puVar6; long lVar8; long in_FS_OFFSET; int auStack_18 [8]; long local_10; int *puVar7; lVar8 = (long)param_2 * 4; puVar6 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); puVa...
7,320
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h>
char** func0(char** list1, int num_elements, int* sizes) { char** result = (char**)malloc(num_elements * sizeof(char*)); for (int i = 0; i < num_elements; i++) { int len = strlen(list1[i]); sizes[i] = len; result[i] = (char*)malloc((len + 1) * sizeof(char)); for (int j = 0;...
int main() { int sizes1[5], sizes2[1], sizes3[6]; char* list1[] = {"Red", "Blue", "Black", "White", "Pink"}; char** result1 = func0(list1, 5, sizes1); assert(sizes1[0] == 3 && sizes1[1] == 4); assert(strcmp(result1[0], "Red") == 0 && strcmp(result1[1], "Blue") == 0); char* list2[] ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %rdx,-0x48(%rbp) mov -0x3c(%rbp),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 10f0 <malloc@plt> mov %rax,-0x18(%rbp) movl $0x0,-0x24(%rbp) jmpq 1306 <func0+0x11d> mov -0x24...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_48], rdx mov eax, [rbp+var_3C] cdqe shl rax, 3 mov rdi, rax; size call _malloc mov [rbp+var_18], rax mov [rbp+var_24], 0 jmp loc_1306 loc_1222: mov ...
_QWORD * func0(long long a1, int a2, long long a3) { int i; // [rsp+2Ch] [rbp-24h] int j; // [rsp+30h] [rbp-20h] int v7; // [rsp+34h] [rbp-1Ch] _QWORD *v8; // [rsp+38h] [rbp-18h] v8 = malloc(8LL * a2); for ( i = 0; i < a2; ++i ) { v7 = strlen(*(const char **)(8LL * i + a1)); *(_DWORD *)(a3 + 4LL ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV qword ptr [RBP + -0x48],RDX MOV EAX,dword ptr [RBP + -0x3c] CDQE SHL RAX,0x3 MOV RDI,RAX CALL 0x001010f0 MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x24],0x0 JMP 0x00101306 LAB_001012...
void * func0(long param_1,int param_2,long param_3) { int iVar1; void *pvVar2; size_t sVar3; void *pvVar4; int4 local_2c; int4 local_28; pvVar2 = malloc((long)param_2 << 3); for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) { sVar3 = strlen(*(char **)(param_1 + (long)local_2c * 8))...
7,321
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h>
char** func0(char** list1, int num_elements, int* sizes) { char** result = (char**)malloc(num_elements * sizeof(char*)); for (int i = 0; i < num_elements; i++) { int len = strlen(list1[i]); sizes[i] = len; result[i] = (char*)malloc((len + 1) * sizeof(char)); for (int j = 0;...
int main() { int sizes1[5], sizes2[1], sizes3[6]; char* list1[] = {"Red", "Blue", "Black", "White", "Pink"}; char** result1 = func0(list1, 5, sizes1); assert(sizes1[0] == 3 && sizes1[1] == 4); assert(strcmp(result1[0], "Red") == 0 && strcmp(result1[1], "Blue") == 0); char* list2[] ...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbp mov %esi,%ebx mov %rdx,%r14 movslq %esi,%rdi shl $0x3,%rdi callq 10b0 <malloc@plt> mov %rax,0x8(%rsp) test %ebx,%ebx jle 1263 <func0+0xba> mov %rbp,%r12 mov %rax,%r13 lea ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi mov r13d, esi mov r15, rdx movsxd rdi, esi shl rdi, 3 call _malloc mov r14, rax test r13d, r13d jle short loc_1272 mov r13d, r13d mov ebp, 0 loc_1220: mov rdi, [r...
long long func0(long long a1, int a2, long long a3) { long long v5; // r14 long long i; // rbp int v7; // ebx long long v8; // rax long long v9; // rdi long long v10; // rdx long long v11; // rcx v5 = malloc(8LL * a2); if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) { v7 = strlen(*(_QW...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI MOV R13D,ESI MOV R15,RDX MOVSXD RDI,ESI SHL RDI,0x3 CALL 0x001010f0 MOV R14,RAX TEST R13D,R13D JLE 0x00101272 MOV R13D,R13D MOV EBP,0x0 LAB_00101220: MOV RDI,qword ptr [R12 + RBP*0x8] CALL 0x001010b0 MOV RBX,RAX MOV dword ptr [...
void * func0(long param_1,uint param_2,long param_3) { long lVar1; int iVar2; void *pvVar3; size_t sVar4; void *pvVar5; ulong uVar6; ulong uVar7; bool bVar8; pvVar3 = malloc((long)(int)param_2 << 3); if (0 < (int)param_2) { uVar7 = 0; do { sVar4 = strlen(*(char **)(param_1 + uVar7 ...
7,322
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h>
char** func0(char** list1, int num_elements, int* sizes) { char** result = (char**)malloc(num_elements * sizeof(char*)); for (int i = 0; i < num_elements; i++) { int len = strlen(list1[i]); sizes[i] = len; result[i] = (char*)malloc((len + 1) * sizeof(char)); for (int j = 0;...
int main() { int sizes1[5], sizes2[1], sizes3[6]; char* list1[] = {"Red", "Blue", "Black", "White", "Pink"}; char** result1 = func0(list1, 5, sizes1); assert(sizes1[0] == 3 && sizes1[1] == 4); assert(strcmp(result1[0], "Red") == 0 && strcmp(result1[1], "Blue") == 0); char* list2[] ...
O2
c
func0: endbr64 push %r15 push %r14 mov %rdi,%r14 movslq %esi,%rdi push %r13 push %r12 push %rbp mov %rdi,%rbp shl $0x3,%rdi push %rbx mov %rdx,%rbx sub $0x18,%rsp callq 10d0 <malloc@plt> mov %rax,0x8(%rsp) test %ebp,%ebp jle 1586 <func0+0xa6> mov %rax,%r15 lea -0x1(%rbp),%eax l...
func0: endbr64 push r15 movsxd rax, esi push r14 mov r14, rax push r13 push r12 push rbp mov rbp, rdx push rbx mov rbx, rdi lea rdi, ds:0[rax*8] sub rsp, 18h mov [rsp+48h+var_40], rax call _malloc mov r12, rax test r14d, r14d jle short loc_1577 xor r13d, r13d...
long long func0(long long a1, int a2, long long a3) { long long v4; // r12 long long i; // r13 long long v6; // r14 int v7; // eax int v8; // r15d long long v9; // rax long long v10; // rdx long long v11; // rcx v4 = malloc(8LL * a2); if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) { ...
func0: ENDBR64 PUSH R15 MOVSXD RAX,ESI PUSH R14 MOV R14,RAX PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDX PUSH RBX MOV RBX,RDI LEA RDI,[RAX*0x8] SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RAX CALL 0x001010f0 MOV R12,RAX TEST R14D,R14D JLE 0x00101577 XOR R13D,R13D NOP dword ptr [RAX + RAX*0x1] LAB_00101520: MOV R14,qword ptr [RBX ...
void * func0(long param_1,int param_2,long param_3) { char *__s; int iVar1; void *pvVar2; size_t sVar3; void *pvVar4; ulong uVar5; long lVar6; bool bVar7; pvVar2 = malloc((long)param_2 * 8); if (0 < param_2) { lVar6 = 0; do { __s = *(char **)(param_1 + lVar6 * 8); sVar3 = str...
7,323
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h>
char** func0(char** list1, int num_elements, int* sizes) { char** result = (char**)malloc(num_elements * sizeof(char*)); for (int i = 0; i < num_elements; i++) { int len = strlen(list1[i]); sizes[i] = len; result[i] = (char*)malloc((len + 1) * sizeof(char)); for (int j = 0;...
int main() { int sizes1[5], sizes2[1], sizes3[6]; char* list1[] = {"Red", "Blue", "Black", "White", "Pink"}; char** result1 = func0(list1, 5, sizes1); assert(sizes1[0] == 3 && sizes1[1] == 4); assert(strcmp(result1[0], "Red") == 0 && strcmp(result1[1], "Blue") == 0); char* list2[] ...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 movslq %esi,%rdi push %r12 push %rbp mov %rdi,%rbp shl $0x3,%rdi push %rbx mov %rdx,%rbx sub $0x18,%rsp callq 10d0 <malloc@plt> mov %rax,0x8(%rsp) test %ebp,%ebp jle 15bb <func0+0xbb> mov %rax,%r14 lea -0x1(%rbp),%eax l...
func0: endbr64 push r15 movsxd rax, esi push r14 mov r14, rax push r13 push r12 mov r12, rdx push rbp mov rbp, rdi lea rdi, ds:0[rax*8]; size push rbx sub rsp, 18h mov [rsp+48h+var_40], rax call _malloc mov rbx, rax test r14d, r14d jle short loc_15C7 xor r13d...
_QWORD * func0(long long a1, int a2, long long a3) { _QWORD *v5; // rbx long long i; // r13 const char *v7; // r15 int v8; // eax int v9; // r14d _BYTE *v10; // rax _BYTE *v11; // rdx long long v12; // rdi int v13; // r8d long long v14; // rax long long v15; // rcx long long v17; // rax long l...
func0: ENDBR64 PUSH R15 MOVSXD RAX,ESI PUSH R14 MOV R14,RAX PUSH R13 PUSH R12 MOV R12,RDX PUSH RBP MOV RBP,RDI LEA RDI,[RAX*0x8] PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RAX CALL 0x001010f0 MOV RBX,RAX TEST R14D,R14D JLE 0x001015c7 XOR R13D,R13D NOP dword ptr [RAX + RAX*0x1] LAB_00101550: MOV R15,qword ptr [RBP ...
void * func0(long param_1,int param_2,long param_3) { char *__s; int8 uVar1; uint uVar2; int iVar3; void *pvVar4; size_t sVar5; void *pvVar6; ulong uVar7; long lVar8; uint uVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; pvVar4 = malloc((long)param_2 * 8); if (0 < param_2) {...
7,324
func0
#include <assert.h>
int func0(int input_list[], int size) { return size * size; }
int main() { int test1[] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}; int test2[] = {1, 3, 5, 7, 9, 11, 13, 15, 17}; int test3[] = {2, 4, 6, 8, 4, 5, 8, 10, 12, 14}; assert(func0(test1, 5) == 25); assert(func0(test2, 4) == 16); assert(func0(test3, 3) == 9); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x8(%rbp) mov %esi,-0xc(%rbp) mov -0xc(%rbp),%eax imul %eax,%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov eax, [rbp+var_C] imul eax, eax pop rbp retn
long long func0(long long a1, int a2) { return (unsigned int)(a2 * a2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV EAX,dword ptr [RBP + -0xc] IMUL EAX,EAX POP RBP RET
int func0(int8 param_1,int param_2) { return param_2 * param_2; }
7,325
func0
#include <assert.h>
int func0(int input_list[], int size) { return size * size; }
int main() { int test1[] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}; int test2[] = {1, 3, 5, 7, 9, 11, 13, 15, 17}; int test3[] = {2, 4, 6, 8, 4, 5, 8, 10, 12, 14}; assert(func0(test1, 5) == 25); assert(func0(test2, 4) == 16); assert(func0(test3, 3) == 9); return 0; }
O1
c
func0: endbr64 imul %esi,%esi mov %esi,%eax retq
func0: endbr64 imul esi, esi mov eax, esi retn
long long func0(long long a1, int a2) { return (unsigned int)(a2 * a2); }
func0: ENDBR64 IMUL ESI,ESI MOV EAX,ESI RET
int func0(int8 param_1,int param_2) { return param_2 * param_2; }
7,326
func0
#include <assert.h>
int func0(int input_list[], int size) { return size * size; }
int main() { int test1[] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}; int test2[] = {1, 3, 5, 7, 9, 11, 13, 15, 17}; int test3[] = {2, 4, 6, 8, 4, 5, 8, 10, 12, 14}; assert(func0(test1, 5) == 25); assert(func0(test2, 4) == 16); assert(func0(test3, 3) == 9); return 0; }
O2
c
func0: endbr64 mov %esi,%eax imul %esi,%eax retq nopw 0x0(%rax,%rax,1)
func0: endbr64 mov eax, esi imul eax, esi retn
long long func0(long long a1, int a2) { return (unsigned int)(a2 * a2); }
func0: ENDBR64 MOV EAX,ESI IMUL EAX,ESI RET
int func0(int8 param_1,int param_2) { return param_2 * param_2; }
7,327
func0
#include <assert.h>
int func0(int input_list[], int size) { return size * size; }
int main() { int test1[] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}; int test2[] = {1, 3, 5, 7, 9, 11, 13, 15, 17}; int test3[] = {2, 4, 6, 8, 4, 5, 8, 10, 12, 14}; assert(func0(test1, 5) == 25); assert(func0(test2, 4) == 16); assert(func0(test3, 3) == 9); return 0; }
O3
c
func0: endbr64 mov %esi,%eax imul %esi,%eax retq nopw 0x0(%rax,%rax,1)
func0: endbr64 imul esi, esi mov eax, esi retn
long long func0(long long a1, int a2) { return (unsigned int)(a2 * a2); }
func0: ENDBR64 IMUL ESI,ESI MOV EAX,ESI RET
int func0(int8 param_1,int param_2) { return param_2 * param_2; }
7,328
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int my_list[], int list_size, int ***output, int *output_size, int **output_element_sizes) { int total_sublists = 1 << list_size; int **subs = malloc(total_sublists * sizeof(int *)); int *sizes = malloc(total_sublists * sizeof(int)); int count = 0; for (int mask = 0; mask < total_s...
int main() { int list1[] = {10, 20, 30, 40}; int list_size1 = 4; int **output1; int output_size1; int *output_element_sizes1; func0(list1, list_size1, &output1, &output_size1, &output_element_sizes1); assert(output_size1 == 16); // replace specific list comparison for simplicity ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x68,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %rdx,-0x58(%rbp) mov %rcx,-0x60(%rbp) mov %r8,-0x68(%rbp) mov -0x4c(%rbp),%eax mov $0x1,%edx mov %eax,%ecx shl %cl,%edx mov %edx,%eax mov %eax,-0x24(%rbp) mov -0x24...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 68h mov [rbp+var_48], rdi mov [rbp+var_4C], esi mov [rbp+var_58], rdx mov [rbp+var_60], rcx mov [rbp+var_68], r8 mov eax, [rbp+var_4C] mov edx, 1 mov ecx, eax shl edx, cl mov eax, edx mov [rbp+var_24], eax m...
_QWORD * func0(long long a1, int a2, _QWORD *a3, int *a4, _QWORD *a5) { _QWORD *result; // rax int v9; // [rsp+38h] [rbp-38h] int i; // [rsp+3Ch] [rbp-34h] int j; // [rsp+40h] [rbp-30h] int v12; // [rsp+44h] [rbp-2Ch] int k; // [rsp+48h] [rbp-28h] int v14; // [rsp+4Ch] [rbp-24h] _QWORD *v15; // [rsp+50h...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RBP + -0x60],RCX MOV qword ptr [RBP + -0x68],R8 MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,0x1 MOV ECX,EAX SHL EDX,CL MOV EAX,EDX MOV dword ptr [RBP + -0x...
void func0(long param_1,int param_2,int8 *param_3,int *param_4,int8 *param_5) { void *pvVar1; void *pvVar2; int *piVar3; void *pvVar4; int iVar5; int4 local_40; int4 local_3c; int4 local_38; int4 local_34; int4 local_30; iVar5 = 1 << ((byte)param_2 & 0x1f); pvVar1 = malloc((long)iVar5 << 3);...
7,329
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int my_list[], int list_size, int ***output, int *output_size, int **output_element_sizes) { int total_sublists = 1 << list_size; int **subs = malloc(total_sublists * sizeof(int *)); int *sizes = malloc(total_sublists * sizeof(int)); int count = 0; for (int mask = 0; mask < total_s...
int main() { int list1[] = {10, 20, 30, 40}; int list_size1 = 4; int **output1; int output_size1; int *output_element_sizes1; func0(list1, list_size1, &output1, &output_size1, &output_element_sizes1); assert(output_size1 == 16); // replace specific list comparison for simplicity ...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,%r13 mov %esi,%r12d mov %rdx,0x18(%rsp) mov %rcx,0x20(%rsp) mov %r8,0x28(%rsp) mov $0x1,%eax mov %esi,%ecx shl %cl,%eax mov %eax,%ebp mov %eax,0x4(%rsp) movslq %eax,%rbx lea ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov r13, rdi mov r12d, esi mov [rsp+68h+var_50], rdx mov [rsp+68h+var_48], rcx mov [rsp+68h+var_40], r8 mov eax, 1 mov ecx, esi shl eax, cl mov ebp, eax mov [rsp+68h+var_64], e...
long long * func0(long long a1, int a2, _QWORD *a3, int *a4, long long *a5) { long long v5; // rbx _QWORD *v6; // r15 long long v7; // rax int *v8; // r14 int v9; // ebp unsigned int i; // ebx long long v11; // rax int v12; // ecx long long *result; // rax int v14; // [rsp+4h] [rbp-64h] _QWORD *v1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV R13,RDI MOV R12D,ESI MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x28],R8 MOV EAX,0x1 MOV ECX,ESI SHL EAX,CL MOV EBP,EAX MOV dword ptr [RSP + 0x4],EAX MOVSXD RBX,EAX LEA RDI,[RBX*0x8] CALL 0x0010...
void func0(long param_1,uint param_2,int8 *param_3,uint *param_4,int8 *param_5) { uint uVar1; uint uVar2; long *plVar3; int *piVar4; ulong uVar5; void *pvVar6; int iVar7; uint uVar8; uint uVar9; int *piVar10; long *plVar11; bool bVar12; uVar2 = 1 << ((byte)param_2 & 0x1f); plVar3 = (long...
7,330
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int my_list[], int list_size, int ***output, int *output_size, int **output_element_sizes) { int total_sublists = 1 << list_size; int **subs = malloc(total_sublists * sizeof(int *)); int *sizes = malloc(total_sublists * sizeof(int)); int count = 0; for (int mask = 0; mask < total_s...
int main() { int list1[] = {10, 20, 30, 40}; int list_size1 = 4; int **output1; int output_size1; int *output_element_sizes1; func0(list1, list_size1, &output1, &output_size1, &output_element_sizes1); assert(output_size1 == 16); // replace specific list comparison for simplicity ...
O2
c
func0: endbr64 push %r15 mov $0x1,%eax push %r14 push %r13 push %r12 mov %esi,%r12d push %rbp push %rbx mov %rdi,%rbx sub $0x38,%rsp mov %rcx,0x20(%rsp) mov %esi,%ecx shl %cl,%eax mov %rdx,0x18(%rsp) movslq %eax,%rbp mov %r8,0x28(%rsp) lea 0x0(,%rbp,8),%rdi mov %ebp,0x14(%rs...
func0: endbr64 push r15 mov eax, 1 push r14 push r13 push r12 mov r12d, esi push rbp push rbx mov rbx, rdi sub rsp, 38h mov [rsp+68h+var_48], rcx mov ecx, esi shl eax, cl mov [rsp+68h+var_50], rdx movsxd r14, eax mov [rsp+68h+var_40], r8 lea rdi, ds:0[r14*8] mo...
long long * func0(long long a1, int a2, long long *a3, _DWORD *a4, long long *a5) { long long v6; // r14 long long v7; // rax long long v8; // r13 long long v9; // r15 long long i; // r12 int v11; // ebp int v12; // edi unsigned int j; // eax long long v14; // rax long long v15; // rdx int v16; //...
func0: ENDBR64 PUSH R15 MOV EAX,0x1 PUSH R14 PUSH R13 PUSH R12 MOV R12D,ESI PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x38 MOV qword ptr [RSP + 0x20],RCX MOV ECX,ESI SHL EAX,CL MOV qword ptr [RSP + 0x18],RDX MOVSXD R14,EAX MOV qword ptr [RSP + 0x28],R8 LEA RDI,[R14*0x8] MOV dword ptr [RSP + 0x14],R14D MOV qword ptr [RSP + ...
void func0(long param_1,uint param_2,int8 *param_3,int *param_4,int8 *param_5) { byte bVar1; int iVar2; uint uVar3; void *pvVar4; void *pvVar5; void *pvVar6; long lVar7; long lVar8; int iVar9; long lVar10; long lVar11; bVar1 = (byte)param_2 & 0x1f; iVar2 = 1 << bVar1; lVar11 = (long)iVar...
7,331
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
void func0(int my_list[], int list_size, int ***output, int *output_size, int **output_element_sizes) { int total_sublists = 1 << list_size; int **subs = malloc(total_sublists * sizeof(int *)); int *sizes = malloc(total_sublists * sizeof(int)); int count = 0; for (int mask = 0; mask < total_s...
int main() { int list1[] = {10, 20, 30, 40}; int list_size1 = 4; int **output1; int output_size1; int *output_element_sizes1; func0(list1, list_size1, &output1, &output_size1, &output_element_sizes1); assert(output_size1 == 16); // replace specific list comparison for simplicity ...
O3
c
func0: endbr64 push %r15 mov $0x1,%eax push %r14 push %r13 push %r12 mov %esi,%r12d push %rbp push %rbx mov %rdi,%rbx sub $0x38,%rsp mov %rcx,0x20(%rsp) mov %esi,%ecx shl %cl,%eax mov %rdx,0x18(%rsp) movslq %eax,%rbp mov %r8,0x28(%rsp) lea 0x0(,%rbp,8),%rdi mov %ebp,0x14(%rs...
func0: endbr64 push r15 mov eax, 1 push r14 push r13 push r12 mov r12d, esi push rbp push rbx mov rbx, rdi sub rsp, 38h mov [rsp+68h+var_48], rcx mov ecx, esi shl eax, cl mov [rsp+68h+var_50], rdx movsxd r15, eax mov [rsp+68h+var_40], r8 lea rdi, ds:0[r15*8]; s...
_QWORD * func0(long long a1, int a2, _QWORD *a3, _DWORD *a4, _QWORD *a5) { long long v5; // r15 _DWORD *v6; // rax _DWORD *v7; // r13 int v8; // r15d long long v9; // r12 _DWORD *v11; // rbx int v12; // edi unsigned int i; // eax _DWORD *v14; // rax long long v15; // rdx int v16; // edi long lon...
func0: ENDBR64 PUSH R15 MOV EAX,0x1 PUSH R14 PUSH R13 PUSH R12 MOV R12D,ESI PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x38 MOV qword ptr [RSP + 0x20],RCX MOV ECX,ESI SHL EAX,CL MOV qword ptr [RSP + 0x18],RDX MOVSXD R15,EAX MOV qword ptr [RSP + 0x28],R8 LEA RDI,[R15*0x8] MOV dword ptr [RSP + 0x14],R15D MOV qword ptr [RSP + ...
void func0(long param_1,uint param_2,int8 *param_3,int *param_4,int8 *param_5) { byte bVar1; int iVar2; uint uVar3; int8 *puVar4; int4 *puVar5; void *pvVar6; long lVar7; long lVar8; int iVar9; uint uVar10; long lVar11; long lVar12; bVar1 = (byte)param_2 & 0x1f; iVar2 = 1 << bVar1; lVar...
7,332
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char *string) { regex_t reg; const char *regex = "[a-zA-Z0-9]$"; int ret; ret = regcomp(&reg, regex, REG_EXTENDED); if (ret) { return "Error compiling regex"; } regmatch_t matches[1]; ret = regexec(&reg, string, 1, matches, 0); regfre...
int main() { assert(strcmp(func0("dawood@"), "Discard") == 0); assert(strcmp(func0("skdmsam326"), "Accept") == 0); assert(strcmp(func0("cooltricks@"), "Discard") == 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 0xdf9(%rip),%rax mov %rax,-0x58(%rbp) mov -0x58(%rbp),%rcx lea -0x50(%rbp),%rax mov $0x1,%edx mov %rcx,%rsi mov %rax,%rdi callq 10d0 <regcomp@plt> ...
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, aAZaZ09; "[a-zA-Z0-9]$" mov [rbp+pattern], rax mov rcx, [rbp+pattern] lea rax, [rbp+preg] mov edx, 1; cflags mov rsi, rcx; pattern mov ...
const char * func0(const char *a1) { int v2; // [rsp+14h] [rbp-5Ch] regex_t preg; // [rsp+20h] [rbp-50h] BYREF regmatch_t pmatch; // [rsp+60h] [rbp-10h] BYREF unsigned long long v5; // [rsp+68h] [rbp-8h] v5 = __readfsqword(0x28u); if ( regcomp(&preg, "[a-zA-Z0-9]$", 1) ) return "Error compiling regex";...
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,[0x102008] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] LEA RAX,[RBP + -0x50] MOV EDX,0x1 MOV RSI,RCX MOV RDI,RAX CALL 0x001010d0 MOV dword p...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t local_58; regmatch_t local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"[a-zA-Z0-9]$",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,param_1,1,&local_18,0); regfre...
7,333
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char *string) { regex_t reg; const char *regex = "[a-zA-Z0-9]$"; int ret; ret = regcomp(&reg, regex, REG_EXTENDED); if (ret) { return "Error compiling regex"; } regmatch_t matches[1]; ret = regexec(&reg, string, 1, matches, 0); regfre...
int main() { assert(strcmp(func0("dawood@"), "Discard") == 0); assert(strcmp(func0("skdmsam326"), "Accept") == 0); assert(strcmp(func0("cooltricks@"), "Discard") == 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 0xe34(%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, aAZaZ09; "[a-zA-Z0-9]$" call _regcomp mov edx, eax lea rax, aErrorCompiling; "Error compiling regex" test edx, edx jz ...
const char * func0(long long a1) { int v1; // edx const char *result; // rax int v3; // ebx _BYTE v4[64]; // [rsp+0h] [rbp-68h] BYREF _BYTE v5[8]; // [rsp+40h] [rbp-28h] BYREF unsigned long long v6; // [rsp+48h] [rbp-20h] v6 = __readfsqword(0x28u); v1 = regcomp(v4, "[a-zA-Z0-9]$", 1LL); result = "Err...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x1 LEA RSI,[0x102029] CALL 0x001010d0 MOV EDX,EAX LEA RAX,[0x102004] TEST EDX,EDX JZ 0x0010123e LAB_00101227: MOV RDX,qword ptr [RSP + 0x48] SUB RDX,qword ptr FS:[0x28] J...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; regmatch_t local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"[a-zA-Z0-9]$",1); pcVar2 = "Error compiling regex"; if (iVar1 == 0) { iVar1 = regexec(&rStac...
7,334
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char *string) { regex_t reg; const char *regex = "[a-zA-Z0-9]$"; int ret; ret = regcomp(&reg, regex, REG_EXTENDED); if (ret) { return "Error compiling regex"; } regmatch_t matches[1]; ret = regexec(&reg, string, 1, matches, 0); regfre...
int main() { assert(strcmp(func0("dawood@"), "Discard") == 0); assert(strcmp(func0("skdmsam326"), "Accept") == 0); assert(strcmp(func0("cooltricks@"), "Discard") == 0); return 0; }
O2
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd67(%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 1327 <func0+0x77> m...
func0: endbr64 push r12 mov edx, 1 mov r12, rdi lea rsi, aAZaZ09; "[a-zA-Z0-9]$" push rbp sub rsp, 58h mov rax, fs:28h mov [rsp+var_s48], rax xor eax, eax mov rbp, rsp mov rdi, rbp call _regcomp mov r8d, eax lea rax, aErrorCompiling; "Error compiling regex" test r...
const char * func0(long long a1) { int v1; // r8d const char *result; // rax int v3; // r12d _BYTE _0[64]; // [rsp+0h] [rbp+0h] BYREF char vars40; // [rsp+40h] [rbp+40h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] vars48 = __readfsqword(0x28u); v1 = regcomp(_0, "[a-zA-Z0-9]$", 1LL); resul...
func0: ENDBR64 PUSH R12 MOV EDX,0x1 MOV R12,RDI LEA RSI,[0x102029] PUSH RBP 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 R8D,EAX LEA RAX,[0x102004] TEST R8D,R8D JNZ 0x00101339 MOV EDX,0x1 MOV RSI,R12 LEA RCX,[RSP + 0x40] MOV RDI,RBP CALL...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; regmatch_t local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"[a-zA-Z0-9]$",1); pcVar2 = "Error compiling regex"; if (iVar1 == 0) { iVar1 = regexec(&rStac...
7,335
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char *string) { regex_t reg; const char *regex = "[a-zA-Z0-9]$"; int ret; ret = regcomp(&reg, regex, REG_EXTENDED); if (ret) { return "Error compiling regex"; } regmatch_t matches[1]; ret = regexec(&reg, string, 1, matches, 0); regfre...
int main() { assert(strcmp(func0("dawood@"), "Discard") == 0); assert(strcmp(func0("skdmsam326"), "Accept") == 0); assert(strcmp(func0("cooltricks@"), "Discard") == 0); return 0; }
O3
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd67(%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 1327 <func0+0x77> m...
func0: endbr64 push rbp mov edx, 1; cflags lea rsi, pattern; "[a-zA-Z0-9]$" 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, aErrorCompiling; "Error compiling re...
const char * func0(char *string) { int v1; // edx const char *result; // rax int v3; // ebx regex_t vars0; // [rsp+0h] [rbp+0h] BYREF regmatch_t pmatch; // [rsp+40h] [rbp+40h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] vars48 = __readfsqword(0x28u); v1 = regcomp(&vars0, "[a-zA-Z0-9]$", 1);...
func0: ENDBR64 PUSH RBP MOV EDX,0x1 LEA RSI,[0x102029] 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 0x00101337 XOR R8D,R8D MOV EDX,0x1 MOV RSI,RBX MOV RDI,RBP LEA RCX,[RSP ...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; regmatch_t local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"[a-zA-Z0-9]$",1); pcVar2 = "Error compiling regex"; if (iVar1 == 0) { iVar1 = regexec(&rStac...
7,336
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int is_anagram(const char *str1, const char *str2) { int count1[256] = {0}; int count2[256] = {0}; while (*str1) { count1[(unsigned char)*str1++]++; } while (*str2) { count2[(unsigned char)*...
int func0(char* texts[], int texts_size, char* str, char* result[]) { int result_size = 0; for(int i=0;i<texts_size;i++) { if(is_anagram(texts[i], str)) { result[result_size++] = texts[i]; } } return result_size; }
int main() { // Test case 1 char* texts1[] = {"bcda", "abce", "cbda", "cbea", "adcb"}; char* str1 = "abcd"; char* expected1[] = {"bcda", "cbda", "adcb"}; char* result1[5]; int size1 = func0(texts1, 5, str1, result1); assert(size1 == 3); assert(strcmp(result1[0], expected1[0]) == ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov %rcx,-0x30(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 1350 <func0+0x8e> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add %rdx,%r...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_30], rcx mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_1350 loc_12ED: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var...
long long func0(long long a1, int a2, long long a3, long long a4) { int v4; // eax unsigned int v8; // [rsp+28h] [rbp-8h] int i; // [rsp+2Ch] [rbp-4h] v8 = 0; for ( i = 0; i < a2; ++i ) { if ( (unsigned int)is_anagram(*(_QWORD *)(8LL * i + a1), a3) ) { v4 = v8++; *(_QWORD *)(a4 + 8LL *...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x30],RCX MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101350 LAB_001012ed: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x8...
int func0(long param_1,int param_2,int8 param_3,long param_4) { int iVar1; int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { iVar1 = is_anagram(*(int8 *)(param_1 + (long)local_c * 8),param_3); if (iVar1 != 0) { *(int8 *)((long)local_10 *...
7,337
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int is_anagram(const char *str1, const char *str2) { int count1[256] = {0}; int count2[256] = {0}; while (*str1) { count1[(unsigned char)*str1++]++; } while (*str2) { count2[(unsigned char)*...
int func0(char* texts[], int texts_size, char* str, char* result[]) { int result_size = 0; for(int i=0;i<texts_size;i++) { if(is_anagram(texts[i], str)) { result[result_size++] = texts[i]; } } return result_size; }
int main() { // Test case 1 char* texts1[] = {"bcda", "abce", "cbda", "cbea", "adcb"}; char* str1 = "abcd"; char* expected1[] = {"bcda", "cbda", "adcb"}; char* result1[5]; int size1 = func0(texts1, 5, str1, result1); assert(size1 == 3); assert(strcmp(result1[0], expected1[0]) == ...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp test %esi,%esi jle 1280 <func0+0x58> mov %rdx,%r13 mov %rcx,%r15 mov %rdi,%rbx lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%r14 mov $0x0,%r12d jmp 1260 <func0+0x38> add $0x8,%rbx cmp %r14...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 test esi, esi jle short loc_12A0 mov r13, rdx mov r15, rcx mov rbx, rdi lea eax, [rsi-1] lea r14, [rdi+rax*8+8] mov r12d, 0 jmp short loc_1280 loc_1277: add rbx, 8 cmp rbx, r1...
long long func0(_QWORD *a1, int a2, long long a3, long long a4) { _QWORD *v6; // rbx unsigned int v7; // r12d long long v8; // rbp if ( a2 <= 0 ) { return 0; } else { v6 = a1; v7 = 0; do { v8 = *v6; if ( (unsigned int)is_anagram(*v6, a3) ) *(_QWORD *)(a4 + 8LL *...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x001012a0 MOV R13,RDX MOV R15,RCX MOV RBX,RDI LEA EAX,[RSI + -0x1] LEA R14,[RDI + RAX*0x8 + 0x8] MOV R12D,0x0 JMP 0x00101280 LAB_00101277: ADD RBX,0x8 CMP RBX,R14 JZ 0x001012a6 LAB_00101280: MOV RBP,qword ptr [RBX] MOV RS...
int func0(int8 *param_1,int param_2,int8 param_3,long param_4) { int8 *puVar1; int8 uVar2; int iVar3; int iVar4; if (param_2 < 1) { iVar4 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar4 = 0; do { uVar2 = *param_1; iVar3 = is_anagram(uVar2,param_3); if...
7,338
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int is_anagram(const char *str1, const char *str2) { int count1[256] = {0}; int count2[256] = {0}; while (*str1) { count1[(unsigned char)*str1++]++; } while (*str2) { count2[(unsigned char)*...
int func0(char* texts[], int texts_size, char* str, char* result[]) { int result_size = 0; for(int i=0;i<texts_size;i++) { if(is_anagram(texts[i], str)) { result[result_size++] = texts[i]; } } return result_size; }
int main() { // Test case 1 char* texts1[] = {"bcda", "abce", "cbda", "cbea", "adcb"}; char* str1 = "abcd"; char* expected1[] = {"bcda", "cbda", "adcb"}; char* result1[5]; int size1 = func0(texts1, 5, str1, result1); assert(size1 == 3); assert(strcmp(result1[0], expected1[0]) == ...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp test %esi,%esi jle 1580 <func0+0x70> lea -0x1(%rsi),%eax mov %rdx,%r13 mov %rcx,%r14 mov %rdi,%rbx lea 0x8(%rdi,%rax,8),%r15 xor %r12d,%r12d nopw 0x0(%rax,%rax,1) mov (%rbx),%rbp mov %r...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 test esi, esi jle short loc_1570 lea eax, [rsi-1] mov r13, rdx mov r14, rcx mov rbx, rdi lea r15, [rdi+rax*8+8] xor r12d, r12d nop word ptr [rax+rax+00h] loc_1530: mov rbp, [rbx] ...
long long func0(_QWORD *a1, int a2, long long a3, long long a4) { _QWORD *v6; // rbx unsigned int v7; // r12d long long v8; // rbp long long v9; // rax if ( a2 <= 0 ) { return 0; } else { v6 = a1; v7 = 0; do { v8 = *v6; if ( (unsigned int)is_anagram(*v6, a3) ) {...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x00101570 LEA EAX,[RSI + -0x1] MOV R13,RDX MOV R14,RCX MOV RBX,RDI LEA R15,[RDI + RAX*0x8 + 0x8] XOR R12D,R12D NOP word ptr [RAX + RAX*0x1] LAB_00101530: MOV RBP,qword ptr [RBX] MOV RSI,R13 MOV RDI,RBP CALL 0x00101430 TES...
int func0(int8 *param_1,int param_2,int8 param_3,long param_4) { int8 *puVar1; int8 uVar2; int iVar3; long lVar4; int iVar5; if (param_2 < 1) { iVar5 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar5 = 0; do { uVar2 = *param_1; iVar3 = is_anagram(uVar2,para...
7,339
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int is_anagram(const char *str1, const char *str2) { int count1[256] = {0}; int count2[256] = {0}; while (*str1) { count1[(unsigned char)*str1++]++; } while (*str2) { count2[(unsigned char)*...
int func0(char* texts[], int texts_size, char* str, char* result[]) { int result_size = 0; for(int i=0;i<texts_size;i++) { if(is_anagram(texts[i], str)) { result[result_size++] = texts[i]; } } return result_size; }
int main() { // Test case 1 char* texts1[] = {"bcda", "abce", "cbda", "cbea", "adcb"}; char* str1 = "abcd"; char* expected1[] = {"bcda", "cbda", "adcb"}; char* result1[5]; int size1 = func0(texts1, 5, str1, result1); assert(size1 == 3); assert(strcmp(result1[0], expected1[0]) == ...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp test %esi,%esi jle 15a0 <func0+0x70> lea -0x1(%rsi),%eax mov %rdx,%r13 mov %rcx,%r14 mov %rdi,%rbx lea 0x8(%rdi,%rax,8),%r15 xor %r12d,%r12d nopw 0x0(%rax,%rax,1) mov (%rbx),%rbp mov %r...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 test esi, esi jle short loc_15B0 movsxd rsi, esi mov r13, rdx mov r14, rcx mov rbx, rdi lea r15, [rdi+rsi*8] xor r12d, r12d nop dword ptr [rax+00000000h] loc_1570: mov rbp, [rbx] mov...
long long func0(_QWORD *a1, int a2, long long a3, long long a4) { _QWORD *v6; // rbx unsigned int v7; // r12d long long v8; // rbp long long v9; // rax if ( a2 <= 0 ) { return 0; } else { v6 = a1; v7 = 0; do { v8 = *v6; if ( (unsigned int)is_anagram(*v6, a3) ) {...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x001015b0 MOVSXD RSI,ESI MOV R13,RDX MOV R14,RCX MOV RBX,RDI LEA R15,[RDI + RSI*0x8] XOR R12D,R12D NOP dword ptr [RAX] LAB_00101570: MOV RBP,qword ptr [RBX] MOV RSI,R13 MOV RDI,RBP CALL 0x00101470 TEST EAX,EAX JZ 0x001015...
int func0(int8 *param_1,int param_2,int8 param_3,long param_4) { int8 *puVar1; int8 uVar2; int iVar3; long lVar4; int iVar5; if (param_2 < 1) { iVar5 = 0; } else { puVar1 = param_1 + param_2; iVar5 = 0; do { uVar2 = *param_1; iVar3 = is_anagram(uVar2,param_3); if (i...
7,340
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h> typedef struct { char *word; int frequency; } WordFreq; int compare(const void *a, const void *b) { WordFreq *wordFreq1 = (WordFreq *)a; WordFreq *wordFreq2 = (WordFreq *)b; return wordF...
WordFreq* func0(char *text, int n, int *returnSize) { char *token; int size = 0, capacity = 10; WordFreq *freqs = (WordFreq*)malloc(capacity * sizeof(WordFreq)); char *text_copy = strdup(text); for (token = strtok(text_copy, " ,.-"); token != NULL; token = strtok(NULL, " ,.-")) { int...
int main() { int size; WordFreq *result; result = func0("python is a programming language", 1, &size); assert(size == 1 && strcmp(result[0].word, "python") == 0 && result[0].frequency == 1); free(result); result = func0("python is a programming language", 2, &size); assert(siz...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %rdx,-0x58(%rbp) movl $0x0,-0x38(%rbp) movl $0xa,-0x34(%rbp) mov -0x34(%rbp),%eax cltq shl $0x4,%rax mov %rax,%rdi callq 1120 <malloc@plt> mov %rax,-0x20(%rbp) mov -0x48(%...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+s], rdi mov [rbp+var_4C], esi mov [rbp+var_58], rdx mov [rbp+var_38], 0 mov [rbp+var_34], 0Ah mov eax, [rbp+var_34] cdqe shl rax, 4 mov rdi, rax; size call _malloc mov [rbp+ptr], rax mov rax, [rb...
_DWORD * func0(const char *a1, int a2, int *a3) { int v3; // edx int v6; // [rsp+28h] [rbp-38h] int v7; // [rsp+2Ch] [rbp-34h] int v8; // [rsp+30h] [rbp-30h] int i; // [rsp+34h] [rbp-2Ch] const char *s2; // [rsp+38h] [rbp-28h] _DWORD *ptr; // [rsp+40h] [rbp-20h] char *v12; // [rsp+48h] [rbp-18h] v6 =...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI MOV qword ptr [RBP + -0x58],RDX MOV dword ptr [RBP + -0x38],0x0 MOV dword ptr [RBP + -0x34],0xa MOV EAX,dword ptr [RBP + -0x34] CDQE SHL RAX,0x4 MOV RDI,RAX CALL 0x00101120 MOV qword ptr [RBP + -0x2...
void * func0(char *param_1,int param_2,int *param_3) { bool bVar1; int iVar2; char *__s; char *pcVar3; int local_40; int local_3c; int local_34; char *local_30; void *local_28; local_40 = 0; local_3c = 10; local_28 = malloc(0xa0); __s = strdup(param_1); local_30 = strtok(__s," ,.-"); d...
7,341
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h> typedef struct { char *word; int frequency; } WordFreq; int compare(const void *a, const void *b) { WordFreq *wordFreq1 = (WordFreq *)a; WordFreq *wordFreq2 = (WordFreq *)b; return wordF...
WordFreq* func0(char *text, int n, int *returnSize) { char *token; int size = 0, capacity = 10; WordFreq *freqs = (WordFreq*)malloc(capacity * sizeof(WordFreq)); char *text_copy = strdup(text); for (token = strtok(text_copy, " ,.-"); token != NULL; token = strtok(NULL, " ,.-")) { int...
int main() { int size; WordFreq *result; result = func0("python is a programming language", 1, &size); assert(size == 1 && strcmp(result[0].word, "python") == 0 && result[0].frequency == 1); free(result); result = func0("python is a programming language", 2, &size); assert(siz...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,%rbx mov %esi,0x14(%rsp) mov %rdx,0x18(%rsp) mov $0xa0,%edi callq 1120 <malloc@plt> mov %rax,%r15 mov %rbx,%rdi callq 1150 <strdup@plt> mov %rax,0x8(%rsp) lea 0xd71(%rip),%rsi mov ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov rbx, rdi mov [rsp+58h+var_44], esi mov [rsp+58h+var_40], rdx mov edi, 0A0h call _malloc mov r15, rax mov rdi, rbx call _strdup mov [rsp+58h+var_50], rax lea rsi, asc_2004; " ...
long long func0(long long a1, int a2, int *a3) { long long v3; // r15 long long v4; // rbp int i; // r14d int v6; // eax long long v8; // rbx long long v9; // rbx long long v10; // [rsp+8h] [rbp-50h] int v11; // [rsp+10h] [rbp-48h] v3 = malloc(160LL); v10 = strdup(a1); v4 = strtok(v10, " ,.-"); ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x18],RDX MOV EDI,0xa0 CALL 0x00101120 MOV R15,RAX MOV RDI,RBX CALL 0x00101150 MOV qword ptr [RSP + 0x8],RAX LEA RSI,[0x102004] MOV RDI,RAX CALL 0x00101140 MOV RBP,RAX MOV dw...
int8 * func0(char *param_1,int param_2,int *param_3) { int iVar1; int8 *__ptr; char *__s; char *pcVar2; int8 *puVar3; int iVar4; int local_48; __ptr = (int8 *)malloc(0xa0); __s = strdup(param_1); pcVar2 = strtok(__s," ,.-"); local_48 = 10; iVar4 = 0; do { if (pcVar2 == (char *)0x0) { ...
7,342
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h> typedef struct { char *word; int frequency; } WordFreq; int compare(const void *a, const void *b) { WordFreq *wordFreq1 = (WordFreq *)a; WordFreq *wordFreq2 = (WordFreq *)b; return wordF...
WordFreq* func0(char *text, int n, int *returnSize) { char *token; int size = 0, capacity = 10; WordFreq *freqs = (WordFreq*)malloc(capacity * sizeof(WordFreq)); char *text_copy = strdup(text); for (token = strtok(text_copy, " ,.-"); token != NULL; token = strtok(NULL, " ,.-")) { int...
int main() { int size; WordFreq *result; result = func0("python is a programming language", 1, &size); assert(size == 1 && strcmp(result[0].word, "python") == 0 && result[0].frequency == 1); free(result); result = func0("python is a programming language", 2, &size); assert(siz...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 xor %r13d,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0xa0,%edi push %rbx sub $0x28,%rsp mov %esi,0x14(%rsp) mov %rdx,0x18(%rsp) callq 1120 <malloc@plt> mov %rbp,%rdi xor %ebp,%ebp mov %rax,%r12 callq 1150 <strdup@plt> lea 0xba5(%...
func0: endbr64 push r15 push r14 push r13 lea r13, asc_2004; " ,.-" push r12 push rbp mov rbp, rdi mov edi, 0A0h push rbx sub rsp, 28h mov [rsp+58h+var_44], esi mov [rsp+58h+var_40], rdx call _malloc mov rdi, rbp xor ebp, ebp mov r12, rax call _strdup mov ...
long long func0(long long a1, int a2, int *a3) { int v3; // ebp long long v4; // r12 long long v5; // r15 long long v6; // r14 long long v7; // r13 int v8; // eax long long v10; // rbx long long v11; // rbx long long v12; // [rsp+8h] [rbp-50h] int v13; // [rsp+10h] [rbp-48h] v3 = 0; v4 = mallo...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 LEA R13,[0x102004] PUSH R12 PUSH RBP MOV RBP,RDI MOV EDI,0xa0 PUSH RBX SUB RSP,0x28 MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x18],RDX CALL 0x00101120 MOV RDI,RBP XOR EBP,EBP MOV R12,RAX CALL 0x00101150 MOV RSI,R13 MOV RDI,RAX MOV qword ptr [RSP + 0x8],RAX CALL 0x001...
int8 * func0(char *param_1,int param_2,int *param_3) { int iVar1; int8 *__ptr; char *__s; char *pcVar2; long lVar3; int iVar4; size_t __nmemb; int8 *puVar5; int local_48; __ptr = (int8 *)malloc(0xa0); iVar4 = 0; __s = strdup(param_1); pcVar2 = strtok(__s," ,.-"); local_48 = 10; if (pcV...
7,343
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h> typedef struct { char *word; int frequency; } WordFreq; int compare(const void *a, const void *b) { WordFreq *wordFreq1 = (WordFreq *)a; WordFreq *wordFreq2 = (WordFreq *)b; return wordF...
WordFreq* func0(char *text, int n, int *returnSize) { char *token; int size = 0, capacity = 10; WordFreq *freqs = (WordFreq*)malloc(capacity * sizeof(WordFreq)); char *text_copy = strdup(text); for (token = strtok(text_copy, " ,.-"); token != NULL; token = strtok(NULL, " ,.-")) { int...
int main() { int size; WordFreq *result; result = func0("python is a programming language", 1, &size); assert(size == 1 && strcmp(result[0].word, "python") == 0 && result[0].frequency == 1); free(result); result = func0("python is a programming language", 2, &size); assert(siz...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 xor %r13d,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0xa0,%edi push %rbx sub $0x28,%rsp mov %esi,0x14(%rsp) mov %rdx,0x18(%rsp) callq 1120 <malloc@plt> mov %rbp,%rdi xor %ebp,%ebp mov %rax,%r12 callq 1150 <strdup@plt> lea 0xbb5(%...
func0: endbr64 push r15 push r14 xor r14d, r14d push r13 push r12 xor r12d, r12d push rbp push rbx mov rbx, rdi mov edi, 0A0h; size sub rsp, 28h mov [rsp+58h+var_44], esi mov [rsp+58h+var_40], rdx call _malloc mov rdi, rbx; s mov r13, rax call _strdup lea ...
const char ** func0(char *s, int a2, int *a3) { int v3; // r14d size_t v4; // r12 const char **v5; // r13 char *i; // rbx const char **v7; // r15 int v8; // eax char *v10; // r12 char *ptr; // [rsp+8h] [rbp-50h] int v12; // [rsp+10h] [rbp-48h] v3 = 0; v4 = 0LL; v5 = (const char **)malloc(0xA0uL...
func0: ENDBR64 PUSH R15 PUSH R14 XOR R14D,R14D PUSH R13 PUSH R12 XOR R12D,R12D PUSH RBP PUSH RBX MOV RBX,RDI MOV EDI,0xa0 SUB RSP,0x28 MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x18],RDX CALL 0x00101120 MOV RDI,RBX MOV R13,RAX CALL 0x00101150 LEA RSI,[0x102004] MOV RDI,RAX MOV qword ptr [RSP + 0x8],RAX CALL 0...
int8 * func0(char *param_1,int param_2,int *param_3) { int iVar1; int8 *__ptr; char *__s; char *pcVar2; size_t __nmemb; int iVar3; int8 *puVar4; int local_48; iVar3 = 0; __nmemb = 0; __ptr = (int8 *)malloc(0xa0); __s = strdup(param_1); pcVar2 = strtok(__s," ,.-"); local_48 = 10; do { ...
7,344
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int func0(int arr[], int n) { int ans = 0, count = 0; int i, j; // Sort the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; ...
int main() { assert(func0((int[]){1, 2, 2, 3}, 4) == 3); assert(func0((int[]){1, 9, 3, 10, 4, 20, 2}, 7) == 4); assert(func0((int[]){36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42}, 11) == 5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x20(%rbp) movl $0x0,-0x1c(%rbp) movl $0x0,-0x18(%rbp) jmpq 1297 <func0+0xee> movl $0x0,-0x14(%rbp) jmpq 1281 <func0+0xd8> mov -0x14(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_20], 0 mov [rbp+var_1C], 0 mov [rbp+var_18], 0 jmp loc_1297 loc_11D6: mov [rbp+var_14], 0 jmp loc_1281 loc_11E2: mov eax, [rbp+var_14] cdqe lea rdx, ds:0[rax*4] m...
long long func0(_DWORD *a1, int a2) { int v2; // eax int v4; // [rsp+10h] [rbp-20h] int v5; // [rsp+14h] [rbp-1Ch] int i; // [rsp+18h] [rbp-18h] int k; // [rsp+18h] [rbp-18h] int m; // [rsp+18h] [rbp-18h] int j; // [rsp+1Ch] [rbp-14h] int v10; // [rsp+20h] [rbp-10h] int v11; // [rsp+24h] [rbp-Ch] _...
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 + -0x20],0x0 MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 JMP 0x00101297 LAB_001011d6: MOV dword ptr [RBP + -0x14],0x0 JMP 0x00101281 LAB_001011e2: MOV EAX,dword ptr [RB...
int func0(int4 *param_1,int param_2) { int4 uVar1; int4 *__ptr; int local_28; int local_24; int local_20; int local_1c; int local_18; local_28 = 0; local_24 = 0; for (local_20 = 0; local_20 < param_2 + -1; local_20 = local_20 + 1) { for (local_1c = 0; local_1c < (param_2 - local_20) + -1; lo...
7,345
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int func0(int arr[], int n) { int ans = 0, count = 0; int i, j; // Sort the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; ...
int main() { assert(func0((int[]){1, 2, 2, 3}, 4) == 3); assert(func0((int[]){1, 9, 3, 10, 4, 20, 2}, 7) == 4); assert(func0((int[]){36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42}, 11) == 5); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %esi,%ebp lea -0x1(%rsi),%edi test %edi,%edi jle 11f3 <func0+0x4a> lea 0x4(%rbx),%r8 jmp 11e3 <func0+0x3a> add $0x4,%rax cmp %rsi,%rax je 11de <func0+0x35> mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jl...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbx, rdi mov ebp, esi lea edi, [rsi-1] test edi, edi jle short loc_11F3 lea r8, [rbx+4] jmp short loc_11E3 loc_11C5: add rax, 4 cmp rax, rsi jz short loc_11DE loc_11CE: mov edx, [rax] mov ecx, [rax+4] cmp edx, ...
long long func0(int *a1, int a2) { int v4; // edi int *v5; // rax int v6; // edx int v7; // ecx int *v8; // rax int *v9; // rdx int v10; // esi int v11; // ecx long long v12; // rdx int v13; // ecx int v14; // ebx v4 = a2 - 1; if ( a2 - 1 > 0 ) { do { if ( v4 > 0 ) { ...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV EBP,ESI LEA EDI,[RSI + -0x1] TEST EDI,EDI JLE 0x001011f3 LEA R8,[RBX + 0x4] JMP 0x001011e3 LAB_001011c5: ADD RAX,0x4 CMP RAX,RSI JZ 0x001011de LAB_001011ce: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] CMP EDX,ECX JLE 0x001011c5 MOV dword ptr [RAX],E...
int func0(int *param_1,int param_2) { int *piVar1; int *piVar2; int iVar3; long lVar4; int iVar5; int iVar6; iVar6 = param_2 + -1; if (0 < iVar6) { do { if (0 < iVar6) { piVar2 = param_1; do { iVar5 = *piVar2; if (piVar2[1] < iVar5) { *piVar2...
7,346
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int func0(int arr[], int n) { int ans = 0, count = 0; int i, j; // Sort the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; ...
int main() { assert(func0((int[]){1, 2, 2, 3}, 4) == 3); assert(func0((int[]){1, 9, 3, 10, 4, 20, 2}, 7) == 4); assert(func0((int[]){36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42}, 11) == 5); return 0; }
O2
c
func0: endbr64 push %r12 lea -0x1(%rsi),%edx mov %esi,%r12d push %rbx mov %rdi,%rbx sub $0x8,%rsp test %edx,%edx jle 137f <func0+0x4f> lea 0x4(%rdi),%rsi nopl 0x0(%rax) sub $0x1,%edx mov %rbx,%rax mov %rdx,%r8 lea (%rsi,%rdx,4),%rdi nopl (%rax) mov (%rax),%edx mov 0x4(%rax)...
func0: endbr64 push r12 lea edx, [rsi-1] mov r12d, esi push rbx mov rbx, rdi sub rsp, 8 test edx, edx jle short loc_137D lea r8, [rdi+4] nop dword ptr [rax+00h] loc_1350: sub edx, 1 mov rax, rbx mov rdi, rdx lea rsi, [r8+rdx*4] nop dword ptr [rax] loc_1360: mov ...
long long func0(int *a1, int a2) { int v2; // edx _DWORD *v5; // r8 int *v6; // rax int v7; // edi int *v8; // rsi int v9; // edx int v10; // ecx int *v11; // rax int v12; // esi int *v13; // rdi int *v14; // rax int v15; // ecx int v16; // edx long long v17; // rsi int *v18; // rax int...
func0: ENDBR64 PUSH R12 LEA EDX,[RSI + -0x1] MOV R12D,ESI PUSH RBX MOV RBX,RDI SUB RSP,0x8 TEST EDX,EDX JLE 0x0010137d LEA R8,[RDI + 0x4] NOP dword ptr [RAX] LAB_00101350: SUB EDX,0x1 MOV RAX,RBX MOV RDI,RDX LEA RSI,[R8 + RDX*0x4] NOP dword ptr [RAX] LAB_00101360: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] C...
int func0(int *param_1,int param_2) { int *piVar1; int *piVar2; int iVar3; uint uVar4; int iVar5; int iVar6; long lVar7; uVar4 = param_2 - 1; if (0 < (int)uVar4) { do { uVar4 = uVar4 - 1; piVar1 = param_1; do { iVar6 = *piVar1; if (piVar1[1] < iVar6) { ...
7,347
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int func0(int arr[], int n) { int ans = 0, count = 0; int i, j; // Sort the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; ...
int main() { assert(func0((int[]){1, 2, 2, 3}, 4) == 3); assert(func0((int[]){1, 9, 3, 10, 4, 20, 2}, 7) == 4); assert(func0((int[]){36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42}, 11) == 5); return 0; }
O3
c
func0: endbr64 lea -0x1(%rsi),%edx push %r12 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx test %edx,%edx jle 133f <func0+0x4f> lea 0x4(%rdi),%rsi nopl 0x0(%rax,%rax,1) sub $0x1,%edx mov %rbx,%rax mov %rdx,%r8 lea (%rsi,%rdx,4),%rdi nopl (%rax) mov (%rax),%edx mov 0x4(%rax...
func0: endbr64 push rbp movsxd r9, esi push rbx mov rbp, r9 mov rbx, rdi shl r9, 2 sub rsp, 8 cmp ebp, 1 jle loc_1438 mov edi, ebp lea r8, [rbx+4] nop word ptr [rax+rax+00000000h] loc_1310: cmp edi, 1 jle loc_1420 lea edx, [rdi-2] mov rax, rbx lea rsi, [r8+...
long long func0(__m128i *a1, int a2) { int i; // edi __m128i *v5; // rax __m128i v6; // xmm0 _DWORD *v7; // rax __int32 v8; // ecx _DWORD *v9; // rdi int v10; // edx long long j; // rax __int32 v12; // r8d long long v13; // rcx long long v14; // r8 __int32 v15; // ecx long long v16; // rsi ...
func0: ENDBR64 PUSH RBP MOVSXD R9,ESI PUSH RBX MOV RBP,R9 MOV RBX,RDI SHL R9,0x2 SUB RSP,0x8 CMP EBP,0x1 JLE 0x00101438 MOV EDI,EBP LEA R8,[RBX + 0x4] NOP word ptr CS:[RAX + RAX*0x1] LAB_00101310: CMP EDI,0x1 JLE 0x00101420 LEA EDX,[RDI + -0x2] MOV RAX,RBX LEA RSI,[R8 + RDX*0x4] NOP dword ptr [RAX + RAX*0x1] LAB_001013...
int func0(int *param_1,int param_2) { int *piVar1; long lVar2; int iVar3; long lVar4; int iVar5; int iVar6; iVar5 = param_2; if (param_2 < 2) { piVar1 = (int *)malloc((long)param_2 << 2); iVar5 = 1; *piVar1 = *param_1; } else { do { for (; iVar5 < 2; iVar5 = iVar5 + -1) { ...
7,348
func0
#include <assert.h> #include <stdbool.h> #include <string.h> #include <stdio.h> bool is_palindrome(const char* text) { int length = strlen(text); for (int i = 0; i < length / 2; i++) { if (text[i] != text[length - 1 - i]) { return false; } } return true; }
int func0(const char *texts[], int size, const char* result[]) { int count = 0; for (int i = 0; i < size; i++) { if (is_palindrome(texts[i])) { result[count++] = texts[i]; } } return count; }
int main() { const char* input1[] = {"php", "res", "Python", "abcd", "Java", "aaa"}; const char* expected1[] = {"php", "aaa"}; const char* results1[6]; int count1 = func0(input1, 6, results1); assert(count1 == 2); for (int i = 0; i < count1; i++) { assert(strcmp(results1[i], expec...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 12a1 <func0+0x83> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%rax mo...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_12A1 loc_1245: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var_18] add rax, rdx mov ...
long long func0(long long a1, int a2, long long a3) { int v3; // eax unsigned int v6; // [rsp+28h] [rbp-8h] int i; // [rsp+2Ch] [rbp-4h] v6 = 0; for ( i = 0; i < a2; ++i ) { if ( (unsigned __int8)is_palindrome(*(_QWORD *)(8LL * i + a1)) ) { v3 = v6++; *(_QWORD *)(a3 + 8LL * v3) = *(_QW...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001012a1 LAB_00101245: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x8] MOV RAX,qword ptr [RBP + -0x18...
int func0(long param_1,int param_2,long param_3) { char cVar1; int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { cVar1 = is_palindrome(*(int8 *)(param_1 + (long)local_c * 8)); if (cVar1 != '\0') { *(int8 *)((long)local_10 * 8 + param_3) ...
7,349
func0
#include <assert.h> #include <stdbool.h> #include <string.h> #include <stdio.h> bool is_palindrome(const char* text) { int length = strlen(text); for (int i = 0; i < length / 2; i++) { if (text[i] != text[length - 1 - i]) { return false; } } return true; }
int func0(const char *texts[], int size, const char* result[]) { int count = 0; for (int i = 0; i < size; i++) { if (is_palindrome(texts[i])) { result[count++] = texts[i]; } } return count; }
int main() { const char* input1[] = {"php", "res", "Python", "abcd", "Java", "aaa"}; const char* expected1[] = {"php", "aaa"}; const char* results1[6]; int count1 = func0(input1, 6, results1); assert(count1 == 2); for (int i = 0; i < count1; i++) { assert(strcmp(results1[i], expec...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx test %esi,%esi jle 1235 <func0+0x4c> mov %rdx,%r14 mov %rdi,%rbx lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%r13 mov $0x0,%r12d jmp 1218 <func0+0x2f> add $0x8,%rbx cmp %r13,%rbx je 123b <func0+0x52> mov (%rbx),%...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx test esi, esi jle short loc_1246 mov r14, rdx mov rbx, rdi lea eax, [rsi-1] lea r13, [rdi+rax*8+8] mov r12d, 0 jmp short loc_1229 loc_1220: add rbx, 8 cmp rbx, r13 jz short loc_124C loc_1229: mov r...
long long func0(_QWORD *a1, int a2, long long a3) { _QWORD *v4; // rbx unsigned int v5; // r12d long long v6; // rbp if ( a2 <= 0 ) { return 0; } else { v4 = a1; v5 = 0; do { v6 = *v4; if ( (unsigned __int8)is_palindrome(*v4) ) *(_QWORD *)(a3 + 8LL * (int)v5++) ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX TEST ESI,ESI JLE 0x00101246 MOV R14,RDX MOV RBX,RDI LEA EAX,[RSI + -0x1] LEA R13,[RDI + RAX*0x8 + 0x8] MOV R12D,0x0 JMP 0x00101229 LAB_00101220: ADD RBX,0x8 CMP RBX,R13 JZ 0x0010124c LAB_00101229: MOV RBP,qword ptr [RBX] MOV RDI,RBP CALL 0x001011a9 TEST AL,AL ...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; int8 uVar2; char cVar3; int iVar4; if (param_2 < 1) { iVar4 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar4 = 0; do { uVar2 = *param_1; cVar3 = is_palindrome(uVar2); if (cVar3 != '\0') ...
7,350
func0
#include <assert.h> #include <stdbool.h> #include <string.h> #include <stdio.h> bool is_palindrome(const char* text) { int length = strlen(text); for (int i = 0; i < length / 2; i++) { if (text[i] != text[length - 1 - i]) { return false; } } return true; }
int func0(const char *texts[], int size, const char* result[]) { int count = 0; for (int i = 0; i < size; i++) { if (is_palindrome(texts[i])) { result[count++] = texts[i]; } } return count; }
int main() { const char* input1[] = {"php", "res", "Python", "abcd", "Java", "aaa"}; const char* expected1[] = {"php", "aaa"}; const char* results1[6]; int count1 = func0(input1, 6, results1); assert(count1 == 2); for (int i = 0; i < count1; i++) { assert(strcmp(results1[i], expec...
O2
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx test %esi,%esi jle 1530 <func0+0x60> lea -0x1(%rsi),%eax mov %rdx,%r13 mov %rdi,%rbx xor %r12d,%r12d lea 0x8(%rdi,%rax,8),%r14 nopl 0x0(%rax) mov (%rbx),%rbp mov %rbp,%rdi callq 1470 <is_palindrome> test %al,%al je...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx test esi, esi jle loc_1547 lea eax, [rsi-1] mov rbp, rdx mov r13, rdi xor r12d, r12d lea rbx, [rdi+rax*8+8] nop dword ptr [rax] loc_14D8: mov r14, [r13+0] mov rdi, r14 call _strlen mov ecx, eax shr ...
long long func0(_QWORD *a1, int a2, long long a3) { _QWORD *v4; // r13 unsigned int v5; // r12d long long v6; // rbx long long v7; // r14 int v8; // eax int v9; // ecx long long v10; // rdx _BYTE *v11; // rax long long v13; // rax if ( a2 <= 0 ) return 0LL; v4 = a1; v5 = 0; v6 = (long lo...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX TEST ESI,ESI JLE 0x00101547 LEA EAX,[RSI + -0x1] MOV RBP,RDX MOV R13,RDI XOR R12D,R12D LEA RBX,[RDI + RAX*0x8 + 0x8] NOP dword ptr [RAX] LAB_001014d8: MOV R14,qword ptr [R13] MOV RDI,R14 CALL 0x00101080 MOV ECX,EAX SHR ECX,0x1f ADD ECX,EAX SAR ECX,0x1 CMP EAX,...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; char *__s; int iVar2; size_t sVar3; char *pcVar4; long lVar5; int iVar6; if (param_2 < 1) { return 0; } iVar6 = 0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { __s = (char *)*param_1; sVar3 = strlen(__s); ...
7,351
func0
#include <assert.h> #include <stdbool.h> #include <string.h> #include <stdio.h> bool is_palindrome(const char* text) { int length = strlen(text); for (int i = 0; i < length / 2; i++) { if (text[i] != text[length - 1 - i]) { return false; } } return true; }
int func0(const char *texts[], int size, const char* result[]) { int count = 0; for (int i = 0; i < size; i++) { if (is_palindrome(texts[i])) { result[count++] = texts[i]; } } return count; }
int main() { const char* input1[] = {"php", "res", "Python", "abcd", "Java", "aaa"}; const char* expected1[] = {"php", "aaa"}; const char* results1[6]; int count1 = func0(input1, 6, results1); assert(count1 == 2); for (int i = 0; i < count1; i++) { assert(strcmp(results1[i], expec...
O3
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx test %esi,%esi jle 15a0 <func0+0xa0> lea -0x1(%rsi),%eax mov %rdx,%rbp mov %rdi,%r13 xor %r12d,%r12d lea 0x8(%rdi,%rax,8),%rbx nopl (%rax) mov 0x0(%r13),%r14 mov %r14,%rdi callq 1080 <strlen@plt> mov %eax,%edx shr...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx test esi, esi jle loc_1595 movsxd rsi, esi mov r12, rdx mov r13, rdi xor ebx, ebx lea rbp, [rdi+rsi*8] nop dword ptr [rax+rax+00h] loc_1528: mov r14, [r13+0] mov rdi, r14; s call _strlen mov ecx, eax sh...
long long func0(const char **a1, int a2, long long a3) { const char **v4; // r13 unsigned int v5; // ebx const char **v6; // rbp const char *v7; // r14 int v8; // eax int v9; // ecx long long v10; // rdx const char *v11; // rax long long v13; // rax if ( a2 <= 0 ) return 0LL; v4 = a1; v5 =...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX TEST ESI,ESI JLE 0x00101595 MOVSXD RSI,ESI MOV R12,RDX MOV R13,RDI XOR EBX,EBX LEA RBP,[RDI + RSI*0x8] NOP dword ptr [RAX + RAX*0x1] LAB_00101528: MOV R14,qword ptr [R13] MOV RDI,R14 CALL 0x00101080 MOV ECX,EAX SHR ECX,0x1f ADD ECX,EAX SAR ECX,0x1 CMP EAX,0x1 ...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; char *__s; int iVar2; size_t sVar3; char *pcVar4; long lVar5; int iVar6; if (param_2 < 1) { return 0; } iVar6 = 0; puVar1 = param_1 + param_2; do { __s = (char *)*param_1; sVar3 = strlen(__s); iVar2 = (int)sVar...
7,352
func0
#include <stdio.h> #include <assert.h>
void func0(int nums[], int n, int size, int result[]) { for (int i = 0; i < size; i++) { result[i] = n * nums[i]; } }
int main() { int nums1[] = {1, 2, 3, 4, 5, 6, 7}; int size1 = sizeof(nums1) / sizeof(nums1[0]); int result1[7]; func0(nums1, 3, size1, result1); int expected1[] = {3, 6, 9, 12, 15, 18, 21}; for (int i = 0; i < size1; i++) { assert(result1[i] == expected1[i]); } int num...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov %rcx,-0x28(%rbp) movl $0x0,-0x4(%rbp) jmp 11bd <func0+0x54> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax mov -0x4(%rbp),%...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_28], rcx mov [rbp+var_4], 0 jmp short loc_11BD loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax]...
long long func0(long long a1, int a2, int a3, long long a4) { long long result; // rax unsigned int i; // [rsp+24h] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a3 ) break; *(_DWORD *)(4LL * (int)i + a4) = a2 * *(_DWORD *)(4LL * (int)i + a1); } return result; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011bd LAB_00101188: 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,int param_2,int param_3,long param_4) { int4 local_c; for (local_c = 0; local_c < param_3; local_c = local_c + 1) { *(int *)(param_4 + (long)local_c * 4) = *(int *)(param_1 + (long)local_c * 4) * param_2; } return; }
7,353
func0
#include <stdio.h> #include <assert.h>
void func0(int nums[], int n, int size, int result[]) { for (int i = 0; i < size; i++) { result[i] = n * nums[i]; } }
int main() { int nums1[] = {1, 2, 3, 4, 5, 6, 7}; int size1 = sizeof(nums1) / sizeof(nums1[0]); int result1[7]; func0(nums1, 3, size1, result1); int expected1[] = {3, 6, 9, 12, 15, 18, 21}; for (int i = 0; i < size1; i++) { assert(result1[i] == expected1[i]); } int num...
O1
c
func0: endbr64 test %edx,%edx jle 118f <func0+0x26> lea -0x1(%rdx),%r8d mov $0x0,%eax mov %esi,%edx imul (%rdi,%rax,4),%edx mov %edx,(%rcx,%rax,4) mov %rax,%rdx add $0x1,%rax cmp %r8,%rdx jne 117a <func0+0x11> retq
func0: endbr64 test edx, edx jle short locret_118D mov edx, edx mov eax, 0 loc_1178: mov r8d, esi imul r8d, [rdi+rax*4] mov [rcx+rax*4], r8d add rax, 1 cmp rax, rdx jnz short loc_1178 locret_118D: retn
void func0(long long a1, int a2, int a3, long long a4) { long long i; // rax if ( a3 > 0 ) { for ( i = 0LL; i != a3; ++i ) *(_DWORD *)(a4 + 4 * i) = *(_DWORD *)(a1 + 4 * i) * a2; } }
func0: ENDBR64 TEST EDX,EDX JLE 0x0010118d MOV EDX,EDX MOV EAX,0x0 LAB_00101178: MOV R8D,ESI IMUL R8D,dword ptr [RDI + RAX*0x4] MOV dword ptr [RCX + RAX*0x4],R8D ADD RAX,0x1 CMP RAX,RDX JNZ 0x00101178 LAB_0010118d: RET
void func0(long param_1,int param_2,uint param_3,long param_4) { ulong uVar1; if (0 < (int)param_3) { uVar1 = 0; do { *(int *)(param_4 + uVar1 * 4) = param_2 * *(int *)(param_1 + uVar1 * 4); uVar1 = uVar1 + 1; } while (uVar1 != param_3); } return; }
7,354
func0
#include <stdio.h> #include <assert.h>
void func0(int nums[], int n, int size, int result[]) { for (int i = 0; i < size; i++) { result[i] = n * nums[i]; } }
int main() { int nums1[] = {1, 2, 3, 4, 5, 6, 7}; int size1 = sizeof(nums1) / sizeof(nums1[0]); int result1[7]; func0(nums1, 3, size1, result1); int expected1[] = {3, 6, 9, 12, 15, 18, 21}; for (int i = 0; i < size1; i++) { assert(result1[i] == expected1[i]); } int num...
O2
c
func0: endbr64 test %edx,%edx jle 1465 <func0+0x25> lea -0x1(%rdx),%r8d xor %eax,%eax xchg %ax,%ax mov (%rdi,%rax,4),%edx imul %esi,%edx mov %edx,(%rcx,%rax,4) mov %rax,%rdx add $0x1,%rax cmp %rdx,%r8 jne 1450 <func0+0x10> retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 test edx, edx jle short locret_1465 movsxd rdx, edx xor eax, eax nop dword ptr [rax] loc_1450: mov r8d, [rdi+rax*4] imul r8d, esi mov [rcx+rax*4], r8d add rax, 1 cmp rdx, rax jnz short loc_1450 locret_1465: retn
void func0(long long a1, int a2, int a3, long long a4) { long long i; // rax if ( a3 > 0 ) { for ( i = 0LL; i != a3; ++i ) *(_DWORD *)(a4 + 4 * i) = a2 * *(_DWORD *)(a1 + 4 * i); } }
func0: ENDBR64 TEST EDX,EDX JLE 0x00101465 MOVSXD RDX,EDX XOR EAX,EAX NOP dword ptr [RAX] LAB_00101450: MOV R8D,dword ptr [RDI + RAX*0x4] IMUL R8D,ESI MOV dword ptr [RCX + RAX*0x4],R8D ADD RAX,0x1 CMP RDX,RAX JNZ 0x00101450 LAB_00101465: RET
void func0(long param_1,int param_2,int param_3,long param_4) { long lVar1; if (0 < param_3) { lVar1 = 0; do { *(int *)(param_4 + lVar1 * 4) = *(int *)(param_1 + lVar1 * 4) * param_2; lVar1 = lVar1 + 1; } while (param_3 != lVar1); } return; }
7,355
func0
#include <stdio.h> #include <assert.h>
void func0(int nums[], int n, int size, int result[]) { for (int i = 0; i < size; i++) { result[i] = n * nums[i]; } }
int main() { int nums1[] = {1, 2, 3, 4, 5, 6, 7}; int size1 = sizeof(nums1) / sizeof(nums1[0]); int result1[7]; func0(nums1, 3, size1, result1); int expected1[] = {3, 6, 9, 12, 15, 18, 21}; for (int i = 0; i < size1; i++) { assert(result1[i] == expected1[i]); } int num...
O3
c
func0: endbr64 test %edx,%edx jle 1478 <func0+0xe8> lea 0xf(%rdi),%r8 lea -0x1(%rdx),%eax sub %rcx,%r8 cmp $0x1e,%r8 jbe 1458 <func0+0xc8> cmp $0x3,%eax jbe 1458 <func0+0xc8> movd %esi,%xmm4 mov %edx,%r8d xor %eax,%eax pshufd $0x0,%xmm4,%xmm2 shr $0x2,%r8d movdqa %xmm2,%xmm3 shl ...
func0: endbr64 movsxd rax, edx mov r8, rcx test eax, eax jle short locret_1183 lea edx, [rax-1] cmp edx, 2 jbe short loc_1166 lea rcx, [rdi+4] mov rdx, r8 sub rdx, rcx cmp rdx, 8 ja short loc_1188 loc_1166: lea rdx, ds:0[rax*4] xor eax, eax loc_1170: mov ecx, [rd...
long long func0(long long a1, unsigned int a2, int a3, long long a4) { long long result; // rax long long v6; // rdx long long v7; // rdx __m128i v8; // xmm2 __m128i v9; // xmm3 unsigned int v10; // edx long long v11; // rcx result = a3; if ( a3 > 0 ) { if ( (unsigned int)(a3 - 1) > 2 && (unsi...
func0: ENDBR64 MOVSXD RAX,EDX MOV R8,RCX TEST EAX,EAX JLE 0x00101183 LEA EDX,[RAX + -0x1] CMP EDX,0x2 JBE 0x00101166 LEA RCX,[RDI + 0x4] MOV RDX,R8 SUB RDX,RCX CMP RDX,0x8 JA 0x00101188 LAB_00101166: LEA RDX,[RAX*0x4] XOR EAX,EAX LAB_00101170: MOV ECX,dword ptr [RDI + RAX*0x1] IMUL ECX,ESI MOV dword ptr [R8 + RAX*0x1],...
void func0(long param_1,uint param_2,uint param_3,long param_4) { int8 *puVar1; int auVar2 [16]; ulong uVar3; long lVar4; uint uVar5; ulong uVar6; if (0 < (int)param_3) { if ((param_3 - 1 < 3) || ((ulong)(param_4 - (param_1 + 4)) < 9)) { lVar4 = 0; do { *(uint *)(param_4 + lVar...
7,356
func0
#include <assert.h> #include <stdbool.h> #include <string.h>
bool func0(const char* monthname2) { if (strcmp(monthname2, "January") == 0 || strcmp(monthname2, "March") == 0 || strcmp(monthname2, "May") == 0 || strcmp(monthname2, "July") == 0 || strcmp(monthname2, "Augest") == 0 || strcmp(monthname2, "October") == 0 || strcmp(monthname2, "December") == 0)...
int main() { assert(func0("February") == false); assert(func0("January") == true); assert(func0("March") == true); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %rdi,-0x8(%rbp) mov -0x8(%rbp),%rax lea 0xe84(%rip),%rsi mov %rax,%rdi callq 1070 <strcmp@plt> test %eax,%eax je 121e <func0+0xb5> mov -0x8(%rbp),%rax lea 0xe71(%rip),%rsi mov %rax,%rdi callq 1070 <strcmp@plt> test %eax,%ea...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+s1], rdi mov rax, [rbp+s1] lea rdx, s2; "January" mov rsi, rdx; s2 mov rdi, rax; s1 call _strcmp test eax, eax jz loc_1237 mov rax, [rbp+s1] lea rdx, aMarch; "March" mov rsi, rdx; s2 mov rdi, rax; s1 cal...
_BOOL8 func0(const char *a1) { return !strcmp(a1, "January") || !strcmp(a1, "March") || !strcmp(a1, "May") || !strcmp(a1, "July") || !strcmp(a1, "Augest") || !strcmp(a1, "October") || !strcmp(a1, "December"); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] LEA RDX,[0x102004] MOV RSI,RDX MOV RDI,RAX CALL 0x00101070 TEST EAX,EAX JZ 0x00101237 MOV RAX,qword ptr [RBP + -0x8] LEA RDX,[0x10200c] MOV RSI,RDX MOV RDI,RAX CALL 0x00101070 TEST EAX,EAX JZ 0x00101237 MOV RA...
int8 func0(char *param_1) { int iVar1; iVar1 = strcmp(param_1,"January"); if ((((iVar1 != 0) && (iVar1 = strcmp(param_1,"March"), iVar1 != 0)) && (iVar1 = strcmp(param_1,"May"), iVar1 != 0)) && (((iVar1 = strcmp(param_1,"July"), iVar1 != 0 && (iVar1 = strcmp(param_1,"Augest"), iVar1 != 0) ) ...
7,357
func0
#include <assert.h> #include <stdbool.h> #include <string.h>
bool func0(const char* monthname2) { if (strcmp(monthname2, "January") == 0 || strcmp(monthname2, "March") == 0 || strcmp(monthname2, "May") == 0 || strcmp(monthname2, "July") == 0 || strcmp(monthname2, "Augest") == 0 || strcmp(monthname2, "October") == 0 || strcmp(monthname2, "December") == 0)...
int main() { assert(func0("February") == false); assert(func0("January") == true); assert(func0("March") == true); return 0; }
O1
c
func0: endbr64 mov %rdi,%rax mov $0x8,%ecx lea 0xea8(%rip),%rdi mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0,%dl mov $0x1,%ecx test %dl,%dl je 1233 <func0+0xea> mov $0x6,%ecx lea 0xe8c(%rip),%rdi mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0...
func0: endbr64 push rbx mov rbx, rdi lea rsi, aJanuary; "January" call _strcmp mov edx, eax mov eax, 1 test edx, edx jz loc_1222 lea rsi, aMarch; "March" mov rdi, rbx call _strcmp mov edx, eax mov eax, 1 test edx, edx jz short loc_1222 lea rsi, aMay; "May" mo...
bool func0(long long a1) { int v1; // edx bool result; // al int v3; // edx int v4; // edx int v5; // edx int v6; // edx int v7; // edx v1 = strcmp(a1, "January"); result = 1; if ( v1 ) { v3 = strcmp(a1, "March"); result = 1; if ( v3 ) { v4 = strcmp(a1, "May"); result...
func0: ENDBR64 PUSH RBX MOV RBX,RDI LEA RSI,[0x102004] CALL 0x00101070 MOV EDX,EAX MOV EAX,0x1 TEST EDX,EDX JZ 0x00101222 LEA RSI,[0x10200c] MOV RDI,RBX CALL 0x00101070 MOV EDX,EAX MOV EAX,0x1 TEST EDX,EDX JZ 0x00101222 LEA RSI,[0x102012] MOV RDI,RBX CALL 0x00101070 MOV EDX,EAX MOV EAX,0x1 TEST EDX,EDX JZ 0x00101222 LE...
int8 func0(char *param_1) { int iVar1; int8 uVar2; int4 extraout_var; iVar1 = strcmp(param_1,"January"); uVar2 = 1; if (iVar1 != 0) { iVar1 = strcmp(param_1,"March"); uVar2 = 1; if (iVar1 != 0) { iVar1 = strcmp(param_1,"May"); uVar2 = 1; if (iVar1 != 0) { iVar1 = st...
7,358
func0
#include <assert.h> #include <stdbool.h> #include <string.h>
bool func0(const char* monthname2) { if (strcmp(monthname2, "January") == 0 || strcmp(monthname2, "March") == 0 || strcmp(monthname2, "May") == 0 || strcmp(monthname2, "July") == 0 || strcmp(monthname2, "Augest") == 0 || strcmp(monthname2, "October") == 0 || strcmp(monthname2, "December") == 0)...
int main() { assert(func0("February") == false); assert(func0("January") == true); assert(func0("March") == true); return 0; }
O2
c
func0: endbr64 mov %rdi,%rax mov $0x8,%ecx lea 0xe01(%rip),%rdi mov $0x1,%r8d mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0,%dl test %dl,%dl je 12c3 <func0+0xd3> mov $0x6,%ecx lea 0xde4(%rip),%rdi mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0...
func0: endbr64 push r12 lea rsi, aJanuary; "January" mov r12d, 1 push rbp mov rbp, rdi sub rsp, 8 call _strcmp test eax, eax jz short loc_12A8 lea rsi, aMarch; "March" mov rdi, rbp call _strcmp test eax, eax jz short loc_12A8 lea rsi, aMay; "May" mov rdi, rbp ...
long long func0(long long a1) { unsigned int v1; // r12d v1 = 1; if ( (unsigned int)strcmp(a1, "January") && (unsigned int)strcmp(a1, "March") && (unsigned int)strcmp(a1, "May") && (unsigned int)strcmp(a1, "July") && (unsigned int)strcmp(a1, "Augest") && (unsigned int)strcmp(a1, "October") )...
func0: ENDBR64 PUSH R12 LEA RSI,[0x102004] MOV R12D,0x1 PUSH RBP MOV RBP,RDI SUB RSP,0x8 CALL 0x00101070 TEST EAX,EAX JZ 0x001012a8 LEA RSI,[0x10200c] MOV RDI,RBP CALL 0x00101070 TEST EAX,EAX JZ 0x001012a8 LEA RSI,[0x102012] MOV RDI,RBP CALL 0x00101070 TEST EAX,EAX JZ 0x001012a8 LEA RSI,[0x102016] MOV RDI,RBP CALL 0x00...
bool func0(char *param_1) { int iVar1; bool bVar2; bVar2 = true; iVar1 = strcmp(param_1,"January"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"March"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"May"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"July"); if (iVar1 != 0) { ...
7,359
func0
#include <assert.h> #include <stdbool.h> #include <string.h>
bool func0(const char* monthname2) { if (strcmp(monthname2, "January") == 0 || strcmp(monthname2, "March") == 0 || strcmp(monthname2, "May") == 0 || strcmp(monthname2, "July") == 0 || strcmp(monthname2, "Augest") == 0 || strcmp(monthname2, "October") == 0 || strcmp(monthname2, "December") == 0)...
int main() { assert(func0("February") == false); assert(func0("January") == true); assert(func0("March") == true); return 0; }
O3
c
func0: endbr64 mov %rdi,%rax mov $0x8,%ecx lea 0xe01(%rip),%rdi mov $0x1,%r8d mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0,%dl test %dl,%dl je 12c3 <func0+0xd3> mov $0x6,%ecx lea 0xde4(%rip),%rdi mov %rax,%rsi repz cmpsb %es:(%rdi),%ds:(%rsi) seta %dl sbb $0x0...
func0: endbr64 push rbp lea rsi, s2; "January" mov ebp, 1 push rbx mov rbx, rdi sub rsp, 8 call _strcmp test eax, eax jz short loc_12A6 lea rsi, aMarch; "March" mov rdi, rbx; s1 call _strcmp test eax, eax jz short loc_12A6 lea rsi, aMay; "May" mov rdi, rbx; s1...
long long func0(char *s1) { unsigned int v1; // ebp v1 = 1; if ( strcmp(s1, "January") && strcmp(s1, "March") && strcmp(s1, "May") && strcmp(s1, "July") && strcmp(s1, "Augest") && strcmp(s1, "October") ) { LOBYTE(v1) = strcmp(s1, "December") == 0; } return v1; }
func0: ENDBR64 PUSH RBP LEA RSI,[0x102004] MOV EBP,0x1 PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x00101070 TEST EAX,EAX JZ 0x001012a6 LEA RSI,[0x10200c] MOV RDI,RBX CALL 0x00101070 TEST EAX,EAX JZ 0x001012a6 LEA RSI,[0x102012] MOV RDI,RBX CALL 0x00101070 TEST EAX,EAX JZ 0x001012a6 LEA RSI,[0x102016] MOV RDI,RBX CALL 0x001...
bool func0(char *param_1) { int iVar1; bool bVar2; bVar2 = true; iVar1 = strcmp(param_1,"January"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"March"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"May"); if (iVar1 != 0) { iVar1 = strcmp(param_1,"July"); if (iVar1 != 0) { ...
7,360
func0
#include <assert.h>
int func0(int arr[], int n) { int odd = 0; for (int i = 0; i < n; i++) { if (arr[i] % 2) { odd += 1; } } if (odd % 2) { return 1; } return 2; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8}; int arr3[] = {1, 2, 3}; assert(func0(arr1, 9) == 1); assert(func0(arr2, 8) == 2); assert(func0(arr3, 3) == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11ad <func0+0x44> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax and $0x1,%eax test %eax,%eax je 11a...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11AD loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] and eax, 1 test eax, ...
long long func0(long long a1, int a2) { char v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; ++i ) { if ( (*(_DWORD *)(4LL * i + a1) & 1) != 0 ) ++v3; } if ( (v3 & 1) != 0 ) return 1LL; else return 2LL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ad LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] AND EAX...
int8 func0(long param_1,int param_2) { byte bVar1; int8 uVar2; int4 local_c; bVar1 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if ((*(uint *)(param_1 + (long)local_c * 4) & 1) != 0) { bVar1 = bVar1 + 1; } } if ((bool)(bVar1 & 1)) { uVar2 = 1; } else { u...
7,361
func0
#include <assert.h>
int func0(int arr[], int n) { int odd = 0; for (int i = 0; i < n; i++) { if (arr[i] % 2) { odd += 1; } } if (odd % 2) { return 1; } return 2; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8}; int arr3[] = {1, 2, 3}; assert(func0(arr1, 9) == 1); assert(func0(arr2, 8) == 2); assert(func0(arr3, 3) == 2); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 11a0 <func0+0x37> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rsi mov $0x0,%ecx mov (%rax),%edx and $0x1,%edx cmp $0x1,%edx sbb $0xffffffff,%ecx add $0x4,%rax cmp %rsi,%rax jne 1181 <func0+0x18> and $0x1,%ecx mov $0x2,%eax sub ...
func0: endbr64 test esi, esi jle short loc_11A0 mov rax, rdi lea edx, [rsi-1] lea rsi, [rdi+rdx*4+4] mov ecx, 0 loc_1181: mov edx, [rax] and edx, 1 cmp edx, 1 sbb ecx, 0FFFFFFFFh add rax, 4 cmp rax, rsi jnz short loc_1181 and ecx, 1 mov eax, 2 sub eax, ecx ...
long long func0(_DWORD *a1, int a2) { _DWORD *v2; // rax long long v3; // rsi char v4; // cl if ( a2 <= 0 ) return 2LL; v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; v4 = 0; do v4 -= ((*v2++ & 1) == 0) - 1; while ( v2 != (_DWORD *)v3 ); return 2 - (v4 & 1u); }
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a0 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RSI,[RDI + RDX*0x4 + 0x4] MOV ECX,0x0 LAB_00101181: MOV EDX,dword ptr [RAX] AND EDX,0x1 CMP EDX,0x1 SBB ECX,-0x1 ADD RAX,0x4 CMP RAX,RSI JNZ 0x00101181 AND ECX,0x1 MOV EAX,0x2 SUB EAX,ECX RET LAB_001011a0: MOV EAX,0x2 RET
int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; if (0 < param_2) { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; uVar2 = 0; do { uVar2 = (uVar2 + 1) - (uint)((*param_1 & 1) == 0); param_1 = param_1 + 1; } while (param_1 != puVar1); return 2 - (uVar2 & 1); } ...
7,362
func0
#include <assert.h>
int func0(int arr[], int n) { int odd = 0; for (int i = 0; i < n; i++) { if (arr[i] % 2) { odd += 1; } } if (odd % 2) { return 1; } return 2; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8}; int arr3[] = {1, 2, 3}; assert(func0(arr1, 9) == 1); assert(func0(arr2, 8) == 2); assert(func0(arr3, 3) == 2); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 12e0 <func0+0x40> lea -0x1(%rsi),%eax xor %edx,%edx lea 0x4(%rdi,%rax,4),%rcx nopw 0x0(%rax,%rax,1) mov (%rdi),%eax and $0x1,%eax cmp $0x1,%eax sbb $0xffffffff,%edx add $0x4,%rdi cmp %rdi,%rcx jne 12b8 <func0+0x18> and $0x1,%edx mov $0x2,%eax ...
func0: endbr64 test esi, esi jle short loc_12E0 lea eax, [rsi-1] xor edx, edx lea rcx, [rdi+rax*4+4] nop word ptr [rax+rax+00h] loc_12B8: mov eax, [rdi] and eax, 1 cmp eax, 1 sbb edx, 0FFFFFFFFh add rdi, 4 cmp rcx, rdi jnz short loc_12B8 and edx, 1 mov eax, 2 s...
long long func0(_DWORD *a1, int a2) { char v2; // dl long long v3; // rcx if ( a2 <= 0 ) return 2LL; v2 = 0; v3 = (long long)&a1[a2 - 1 + 1]; do v2 -= ((*a1++ & 1) == 0) - 1; while ( (_DWORD *)v3 != a1 ); return 2 - (v2 & 1u); }
func0: ENDBR64 TEST ESI,ESI JLE 0x001012e0 LEA EAX,[RSI + -0x1] XOR EDX,EDX LEA RCX,[RDI + RAX*0x4 + 0x4] NOP word ptr [RAX + RAX*0x1] LAB_001012b8: MOV EAX,dword ptr [RDI] AND EAX,0x1 CMP EAX,0x1 SBB EDX,-0x1 ADD RDI,0x4 CMP RCX,RDI JNZ 0x001012b8 AND EDX,0x1 MOV EAX,0x2 SUB EAX,EDX RET LAB_001012e0: MOV EAX,0x2 RET
int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; if (0 < param_2) { uVar2 = 0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { uVar2 = (uVar2 + 1) - (uint)((*param_1 & 1) == 0); param_1 = param_1 + 1; } while (puVar1 != param_1); return 2 - (uVar2 & 1); } ...
7,363
func0
#include <assert.h>
int func0(int arr[], int n) { int odd = 0; for (int i = 0; i < n; i++) { if (arr[i] % 2) { odd += 1; } } if (odd % 2) { return 1; } return 2; }
int main() { int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8}; int arr3[] = {1, 2, 3}; assert(func0(arr1, 9) == 1); assert(func0(arr2, 8) == 2); assert(func0(arr3, 3) == 2); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 1228 <func0+0xe8> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 122e <func0+0xee> mov %esi,%edx pxor %xmm1,%xmm1 pcmpeqd %xmm2,%xmm2 mov %rdi,%rax shr $0x2,%edx movdqa 0xea0(%rip),%xmm4 movdqa %xmm1,%xmm3 shl $0x4,%rdx add %rdi,%rdx nopl 0x0(%rax,%rax,1) movdqu...
func0: endbr64 mov ecx, esi test esi, esi jle loc_1218 lea eax, [rsi-1] cmp eax, 2 jbe loc_1220 mov edx, esi pxor xmm1, xmm1 movdqa xmm3, cs:xmmword_2010 mov rax, rdi shr edx, 2 movdqa xmm2, xmm1 shl rdx, 4 add rdx, rdi nop dword ptr [rax+00000000h] loc_1180: movdqu ...
long long func0(const __m128i *a1, int a2) { __m128i v2; // xmm1 __m128i si128; // xmm3 const __m128i *v4; // rax __m128i v5; // xmm0 signed int v6; // edx __m128i v7; // xmm1 char v8; // al long long v9; // r8 if ( a2 > 0 ) { if ( (unsigned int)(a2 - 1) <= 2 ) { v6 = 0; v8 = 0...
func0: ENDBR64 MOV ECX,ESI TEST ESI,ESI JLE 0x00101218 LEA EAX,[RSI + -0x1] CMP EAX,0x2 JBE 0x00101220 MOV EDX,ESI PXOR XMM1,XMM1 MOVDQA XMM3,xmmword ptr [0x00102010] MOV RAX,RDI SHR EDX,0x2 MOVDQA XMM2,XMM1 SHL RDX,0x4 ADD RDX,RDI NOP dword ptr [RAX] LAB_00101180: MOVDQU XMM0,xmmword ptr [RAX] ADD RAX,0x10 PAND XMM0,X...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint *param_1,uint param_2) { uint *puVar1; uint *puVar2; uint *puVar3; uint *puVar4; uint uVar5; int iVar6; uint uVar7; int iVar8; int iVar9; int iVar10; if ((int)param_2 < 1) { return 2; } ...
7,364
func0
#include <assert.h> #include <string.h>
int func0(char *a) { int l = 0; char *x = a; while (*x == ' ') x++; // Trim leading spaces for (int i = 0; i < strlen(x); i++) { if (x[i] == ' ') { l = 0; } else { l++; } } return l; }
int main() { assert(func0("python language") == 8); assert(func0("PHP") == 3); assert(func0("") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x20(%rbp) mov -0x28(%rbp),%rax mov %rax,-0x18(%rbp) jmp 1190 <func0+0x27> addq $0x1,-0x18(%rbp) mov -0x18(%rbp),%rax movzbl (%rax),%eax cmp $0x20,%al je 118b <func0+0x22> movl $0x0,-0x1...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_20], 0 mov rax, [rbp+var_28] mov [rbp+s], rax jmp short loc_1190 loc_118B: add [rbp+s], 1 loc_1190: mov rax, [rbp+s] movzx eax, byte ptr [rax] cmp al, 20h ; ' ' jz short loc...
long long func0(const char *a1) { unsigned int v2; // [rsp+10h] [rbp-20h] int i; // [rsp+14h] [rbp-1Ch] v2 = 0; while ( *a1 == 32 ) ++a1; for ( i = 0; i < strlen(a1); ++i ) { if ( a1[i] == 32 ) v2 = 0; else ++v2; } return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX JMP 0x00101190 LAB_0010118b: ADD qword ptr [RBP + -0x18],0x1 LAB_00101190: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CM...
int func0(char *param_1) { size_t sVar1; int local_28; int local_24; char *local_20; local_28 = 0; for (local_20 = param_1; *local_20 == ' '; local_20 = local_20 + 1) { } local_24 = 0; while( true ) { sVar1 = strlen(local_20); if (sVar1 <= (ulong)(long)local_24) break; if (local_20[loc...
7,365
func0
#include <assert.h> #include <string.h>
int func0(char *a) { int l = 0; char *x = a; while (*x == ' ') x++; // Trim leading spaces for (int i = 0; i < strlen(x); i++) { if (x[i] == ' ') { l = 0; } else { l++; } } return l; }
int main() { assert(func0("python language") == 8); assert(func0("PHP") == 3); assert(func0("") == 0); return 0; }
O1
c
func0: endbr64 mov %rdi,%rsi cmpb $0x20,(%rdi) jne 115e <func0+0x15> add $0x1,%rsi cmpb $0x20,(%rsi) je 1155 <func0+0xc> mov $0xffffffffffffffff,%rcx mov $0x0,%eax mov %rsi,%rdi repnz scas %es:(%rdi),%al not %rcx mov %rsi,%rdx lea -0x1(%rsi,%rcx,1),%rcx mov $0x0,%eax mov $0x0,%e...
func0: endbr64 push rbx mov rbx, rdi cmp byte ptr [rdi], 20h ; ' ' jnz short loc_117F loc_1176: add rbx, 1 cmp byte ptr [rbx], 20h ; ' ' jz short loc_1176 loc_117F: mov rdi, rbx call _strlen mov rdx, rbx add rbx, rax mov eax, 0 mov ecx, 0 jmp short loc_11A6 loc_119...
long long func0(_BYTE *a1) { _BYTE *i; // rbx long long v2; // rax _BYTE *v3; // rdx _BYTE *v4; // rbx long long result; // rax for ( i = a1; *i == 32; ++i ) ; v2 = strlen(i); v3 = i; v4 = &i[v2]; result = 0LL; while ( v3 != v4 ) { result = (unsigned int)(result + 1); if ( *v3 == 3...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CMP byte ptr [RDI],0x20 JNZ 0x0010117f LAB_00101176: ADD RBX,0x1 CMP byte ptr [RBX],0x20 JZ 0x00101176 LAB_0010117f: MOV RDI,RBX CALL 0x00101060 MOV RDX,RBX ADD RBX,RAX MOV EAX,0x0 MOV ECX,0x0 JMP 0x001011a6 LAB_00101199: ADD EAX,0x1 CMP byte ptr [RDX],0x20 CMOVZ EAX,ECX ADD RDX,0x1 ...
int func0(char *param_1) { char cVar1; int iVar2; size_t sVar3; char *pcVar4; cVar1 = *param_1; while (cVar1 == ' ') { param_1 = param_1 + 1; cVar1 = *param_1; } sVar3 = strlen(param_1); pcVar4 = param_1 + sVar3; iVar2 = 0; for (; param_1 != pcVar4; param_1 = param_1 + 1) { iVar2 =...
7,366
func0
#include <assert.h> #include <string.h>
int func0(char *a) { int l = 0; char *x = a; while (*x == ' ') x++; // Trim leading spaces for (int i = 0; i < strlen(x); i++) { if (x[i] == ' ') { l = 0; } else { l++; } } return l; }
int main() { assert(func0("python language") == 8); assert(func0("PHP") == 3); assert(func0("") == 0); return 0; }
O2
c
func0: endbr64 push %rbx cmpb $0x20,(%rdi) mov %rdi,%rbx jne 1229 <func0+0x19> nopl (%rax) add $0x1,%rbx cmpb $0x20,(%rbx) je 1220 <func0+0x10> mov %rbx,%rdi callq 1060 <strlen@plt> mov %rbx,%rdi xor %ecx,%ecx lea (%rbx,%rax,1),%rdx xor %eax,%eax jmp 124d <func0+0x3d> xchg %ax,...
func0: endbr64 push rbx cmp byte ptr [rdi], 20h ; ' ' mov rbx, rdi jnz short loc_1229 nop dword ptr [rax] loc_1220: add rbx, 1 cmp byte ptr [rbx], 20h ; ' ' jz short loc_1220 loc_1229: mov rdi, rbx call _strlen mov rdi, rbx xor ecx, ecx lea rdx, [rbx+rax] xor eax, ...
long long func0(_BYTE *a1) { _BYTE *i; // rbx _BYTE *v2; // rdi _BYTE *v3; // rdx long long result; // rax for ( i = a1; *i == 32; ++i ) ; v2 = i; v3 = &i[strlen(i)]; result = 0LL; while ( v2 != v3 ) { result = (unsigned int)(result + 1); if ( *v2 == 32 ) result = 0LL; ++v2; ...
func0: ENDBR64 PUSH RBX CMP byte ptr [RDI],0x20 MOV RBX,RDI JNZ 0x00101229 NOP dword ptr [RAX] LAB_00101220: ADD RBX,0x1 CMP byte ptr [RBX],0x20 JZ 0x00101220 LAB_00101229: MOV RDI,RBX CALL 0x00101060 MOV RDI,RBX XOR ECX,ECX LEA RDX,[RBX + RAX*0x1] XOR EAX,EAX JMP 0x0010124d LAB_00101240: ADD EAX,0x1 CMP byte ptr [RDI]...
int func0(char *param_1) { char *pcVar1; char cVar2; int iVar3; size_t sVar4; cVar2 = *param_1; while (cVar2 == ' ') { param_1 = param_1 + 1; cVar2 = *param_1; } sVar4 = strlen(param_1); pcVar1 = param_1 + sVar4; iVar3 = 0; for (; param_1 != pcVar1; param_1 = param_1 + 1) { iVar3 =...
7,367
func0
#include <assert.h> #include <string.h>
int func0(char *a) { int l = 0; char *x = a; while (*x == ' ') x++; // Trim leading spaces for (int i = 0; i < strlen(x); i++) { if (x[i] == ' ') { l = 0; } else { l++; } } return l; }
int main() { assert(func0("python language") == 8); assert(func0("PHP") == 3); assert(func0("") == 0); return 0; }
O3
c
func0: endbr64 push %rbx cmpb $0x20,(%rdi) mov %rdi,%rbx jne 1229 <func0+0x19> nopl (%rax) add $0x1,%rbx cmpb $0x20,(%rbx) je 1220 <func0+0x10> mov %rbx,%rdi callq 1060 <strlen@plt> test %rax,%rax je 1260 <func0+0x50> lea (%rbx,%rax,1),%rdx mov %rbx,%rdi xor %eax,%eax xor %ecx...
func0: endbr64 push rbx cmp byte ptr [rdi], 20h ; ' ' mov rbx, rdi jnz short loc_1229 nop dword ptr [rax] loc_1220: add rbx, 1 cmp byte ptr [rbx], 20h ; ' ' jz short loc_1220 loc_1229: mov rdi, rbx; s call _strlen test rax, rax jz short loc_1258 lea rdx, [rbx+rax] mov ...
size_t func0(char *s) { char *i; // rbx size_t result; // rax char *v3; // rdx char *v4; // rdi for ( i = s; *i == 32; ++i ) ; result = strlen(i); if ( !result ) return 0LL; v3 = &i[result]; v4 = i; LODWORD(result) = 0; do { result = (unsigned int)(result + 1); if ( *v4 == 32 )...
func0: ENDBR64 PUSH RBX CMP byte ptr [RDI],0x20 MOV RBX,RDI JNZ 0x00101229 NOP dword ptr [RAX] LAB_00101220: ADD RBX,0x1 CMP byte ptr [RBX],0x20 JZ 0x00101220 LAB_00101229: MOV RDI,RBX CALL 0x00101060 TEST RAX,RAX JZ 0x00101258 LEA RDX,[RBX + RAX*0x1] MOV RDI,RBX XOR EAX,EAX NOP LAB_00101240: ADD EAX,0x1 CMP byte ptr [...
int func0(char *param_1) { char *pcVar1; char cVar2; int iVar3; size_t sVar4; cVar2 = *param_1; while (cVar2 == ' ') { param_1 = param_1 + 1; cVar2 = *param_1; } sVar4 = strlen(param_1); if (sVar4 == 0) { return 0; } pcVar1 = param_1 + sVar4; iVar3 = 0; do { iVar3 = iVar3 +...
7,368
func0
#include <assert.h> #include <stdio.h> typedef struct { int elements[10]; int size; } IntList; typedef struct { IntList lists[10]; int size; } ListOfLists; int compare_lists(ListOfLists a, ListOfLists b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { ...
ListOfLists func0(ListOfLists list1, int leftrange, int rigthrange) { ListOfLists result; result.size = 0; for(int i = 0; i < list1.size; i++) { int min = list1.lists[i].elements[0]; int max = list1.lists[i].elements[0]; for(int j = 1; j < list1.lists[i].size; j++) { ...
int main() { ListOfLists list1; list1.size = 6; list1.lists[0].size = 1; list1.lists[0].elements[0] = 2; list1.lists[1].size = 1; list1.lists[1].elements[0] = 0; list1.lists[2].size = 3; list1.lists[2].elements[0] = 1; list1.lists[2].elements[1] = 2; list1.lists[2].elements[2] = 3; list1.l...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x1f8,%rsp mov %rdi,-0x1f8(%rbp) mov %esi,-0x1fc(%rbp) mov %edx,-0x200(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x28(%rbp) movl $0x0,-0x1f0(%rbp) jmpq 14f1 <func0+0x251> mov -0x1f0(%rbp),%eax movslq %...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 1F8h mov [rbp+var_1F8], rdi mov [rbp+var_1FC], esi mov [rbp+var_200], edx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_28], 0 mov [rbp+var_1F0], 0 jmp loc_14F7 loc_12E8: mov eax, [rbp+var_1F0]...
_QWORD * func0( _QWORD *a1, int a2, int a3, long long a4, long long a5, long long a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int a17, ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x1f8 MOV qword ptr [RBP + -0x1f8],RDI MOV dword ptr [RBP + -0x1fc],ESI MOV dword ptr [RBP + -0x200],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x1f0],0x0 JMP 0x001014f7 LAB_001012...
int8 * func0(int8 *param_1,int param_2,int param_3) { int8 uVar1; int iVar2; long lVar3; ulong uVar4; long lVar5; int8 *puVar6; int8 *puVar7; long in_FS_OFFSET; int param_11; int local_1f8; int local_1f4; int local_1f0; int local_1ec; int8 local_1e8 [3]; int8 auStack_1cc [51]; int4 loca...
7,369
func0
#include <assert.h> #include <stdio.h> typedef struct { int elements[10]; int size; } IntList; typedef struct { IntList lists[10]; int size; } ListOfLists; int compare_lists(ListOfLists a, ListOfLists b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { ...
ListOfLists func0(ListOfLists list1, int leftrange, int rigthrange) { ListOfLists result; result.size = 0; for(int i = 0; i < list1.size; i++) { int min = list1.lists[i].elements[0]; int max = list1.lists[i].elements[0]; for(int j = 1; j < list1.lists[i].size; j++) { ...
int main() { ListOfLists list1; list1.size = 6; list1.lists[0].size = 1; list1.lists[0].elements[0] = 2; list1.lists[1].size = 1; list1.lists[1].elements[0] = 0; list1.lists[2].size = 3; list1.lists[2].elements[0] = 1; list1.lists[2].elements[1] = 2; list1.lists[2].elements[2] = 3; list1.l...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x1d0,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x1c8(%rsp) xor %eax,%eax mov 0x3b8(%rsp),%eax test %eax,%eax jle 12f8 <func0+0xfa> mov %esi,%ebp mov %edx,%r13d lea 0x204(%rsp),%r10 lea -0x1(%rax),%eax...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 1D0h mov rbx, rdi mov rax, fs:28h mov [rsp+1F8h+var_30], rax xor eax, eax mov eax, [rsp+1F8h+arg_1B8] test eax, eax jle loc_12F4 mov ebp, esi mov r13d, edx lea r8, [rsp+1F8h+arg_4] mov eax,...
_QWORD * func0( _QWORD *a1, int a2, int a3, long long a4, long long a5, long long a6, long long a7, char a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1d0 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1c8],RAX XOR EAX,EAX MOV EAX,dword ptr [RSP + 0x3b8] TEST EAX,EAX JLE 0x001012f4 MOV EBP,ESI MOV R13D,EDX LEA R8,[RSP + 0x204] MOV EAX,EAX LEA RDX,[RAX + RAX*0x4] LEA R12,[RAX + RDX*0...
int8 * func0(int8 *param_1,int param_2,int param_3) { int iVar1; int8 uVar2; long lVar3; long lVar4; int iVar5; ulong uVar6; int *piVar7; int iVar8; int8 *puVar9; int8 *puVar10; int *piVar11; long lVar12; int iVar13; long in_FS_OFFSET; uint in_stack_000001c0; int8 local_1f8 [5]; int l...
7,370
func0
#include <assert.h> #include <stdio.h> typedef struct { int elements[10]; int size; } IntList; typedef struct { IntList lists[10]; int size; } ListOfLists; int compare_lists(ListOfLists a, ListOfLists b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { ...
ListOfLists func0(ListOfLists list1, int leftrange, int rigthrange) { ListOfLists result; result.size = 0; for(int i = 0; i < list1.size; i++) { int min = list1.lists[i].elements[0]; int max = list1.lists[i].elements[0]; for(int j = 1; j < list1.lists[i].size; j++) { ...
int main() { ListOfLists list1; list1.size = 6; list1.lists[0].size = 1; list1.lists[0].elements[0] = 2; list1.lists[1].size = 1; list1.lists[1].elements[0] = 0; list1.lists[2].size = 3; list1.lists[2].elements[0] = 1; list1.lists[2].elements[1] = 2; list1.lists[2].elements[2] = 3; list1.l...
O2
c
func0: endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x1d8,%rsp mov %fs:0x28,%rax mov %rax,0x1c8(%rsp) xor %eax,%eax mov 0x3b8(%rsp),%eax test %eax,%eax jle 1768 <func0+0x168> sub $0x1,%eax mov %edx,%ebp lea 0x204(%rsp),%r10 xor %r11d,%r11d add $0x1,%ra...
func0: endbr64 push r13 mov r11, rdi push r12 push rbp push rbx sub rsp, 1D8h mov rax, fs:28h mov [rsp+1F8h+var_30], rax xor eax, eax movsxd rax, [rsp+1F8h+arg_1B8] test eax, eax jle loc_173F mov r12d, edx lea rdx, [rax+rax*4] mov ebx, esi xor r9d, r9d lea r8,...
_QWORD * func0( _QWORD *a1, int a2, int a3, long long a4, long long a5, long long a6, long long a7, char a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int ...
func0: ENDBR64 PUSH R13 MOV R11,RDI PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1d8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1c8],RAX XOR EAX,EAX MOVSXD RAX,dword ptr [RSP + 0x3b8] TEST EAX,EAX JLE 0x0010173f MOV R12D,EDX LEA RDX,[RAX + RAX*0x4] MOV EBX,ESI XOR R9D,R9D LEA R8,[RSP + 0x204] LEA RBP,[RAX + RDX*0x2] XO...
int8 * func0(int8 *param_1,int param_2,int param_3) { int iVar1; int8 uVar2; int8 uVar3; int8 uVar4; long lVar5; long lVar6; int iVar7; ulong uVar8; int *piVar9; int iVar10; int8 *puVar11; int8 *puVar12; int *piVar13; long lVar14; int iVar15; long in_FS_OFFSET; int in_stack_000001c0; ...
7,371
func0
#include <assert.h> #include <stdio.h> typedef struct { int elements[10]; int size; } IntList; typedef struct { IntList lists[10]; int size; } ListOfLists; int compare_lists(ListOfLists a, ListOfLists b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { ...
ListOfLists func0(ListOfLists list1, int leftrange, int rigthrange) { ListOfLists result; result.size = 0; for(int i = 0; i < list1.size; i++) { int min = list1.lists[i].elements[0]; int max = list1.lists[i].elements[0]; for(int j = 1; j < list1.lists[i].size; j++) { ...
int main() { ListOfLists list1; list1.size = 6; list1.lists[0].size = 1; list1.lists[0].elements[0] = 2; list1.lists[1].size = 1; list1.lists[1].elements[0] = 0; list1.lists[2].size = 3; list1.lists[2].elements[0] = 1; list1.lists[2].elements[1] = 2; list1.lists[2].elements[2] = 3; list1.l...
O3
c
func0: endbr64 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x1d0,%rsp mov %fs:0x28,%rax mov %rax,0x1c8(%rsp) xor %eax,%eax mov 0x3b8(%rsp),%ebp test %ebp,%ebp jle 1900 <func0+0x230> mov %esi,%ebx mov %edx,%r13d lea 0x200(%rsp),%rcx xor %esi,%esi xor ...
func0: endbr64 push r14 mov r11, rdi push r13 push r12 push rbp push rbx sub rsp, 1D0h mov rax, fs:28h mov [rsp+1F8h+var_30], rax xor eax, eax mov r12d, [rsp+1F8h+arg_1B8] test r12d, r12d jle loc_1896 mov ebp, esi mov r13d, edx lea rcx, [rsp+1F8h+arg_0] xor ...
_QWORD * func0( _QWORD *a1, signed int a2, int a3, long long a4, long long a5, long long a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int ...
func0: ENDBR64 PUSH R14 MOV R11,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1d0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1c8],RAX XOR EAX,EAX MOV R12D,dword ptr [RSP + 0x3b8] TEST R12D,R12D JLE 0x00101896 MOV EBP,ESI MOV R13D,EDX LEA RCX,[RSP + 0x200] XOR EBX,EBX XOR R9D,R9D JMP 0x00101884 LAB_001016c8:...
int8 * func0(int8 *param_1,int param_2,int param_3) { uint uVar1; uint uVar2; int8 uVar3; int8 uVar4; int8 uVar5; int8 uVar6; long lVar7; uint *puVar8; ulong uVar9; uint uVar10; int iVar11; int iVar12; int8 *puVar13; int8 *puVar14; int iVar15; long in_FS_OFFSET; uint uVar16; uint uV...
7,372
func0
#include <assert.h>
int func0(int nums[], int size) { int sum = 0; for (int i = 0; i < size; i++) { if (nums[i] > 0) { sum += nums[i]; } } return sum; }
int main() { int array1[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; int array2[] = {10, 15, -14, 13, -18, 12, -20}; int array3[] = {19, -65, 57, 39, 152, -639, 121, 44, 90, -190}; assert(func0(array1, sizeof(array1)/sizeof(array1[0])) == 48); assert(func0(array2, sizeof(array2)/sizeof(array2...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11bf <func0+0x56> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax test %eax,%eax jle 11bb <func0+0x52> mo...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11BF loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] test eax, eax jle sho...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; ++i ) { if ( *(int *)(4LL * i + a1) > 0 ) v3 += *(_DWORD *)(4LL * i + a1); } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011bf LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] TEST EA...
int func0(long param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (0 < *(int *)(param_1 + (long)local_c * 4)) { local_10 = local_10 + *(int *)(param_1 + (long)local_c * 4); } } return local_10; }
7,373
func0
#include <assert.h>
int func0(int nums[], int size) { int sum = 0; for (int i = 0; i < size; i++) { if (nums[i] > 0) { sum += nums[i]; } } return sum; }
int main() { int array1[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; int array2[] = {10, 15, -14, 13, -18, 12, -20}; int array3[] = {19, -65, 57, 39, 152, -639, 121, 44, 90, -190}; assert(func0(array1, sizeof(array1)/sizeof(array1[0])) == 48); assert(func0(array2, sizeof(array2)/sizeof(array2...
O1
c
func0: endbr64 test %esi,%esi jle 1197 <func0+0x2e> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rdi mov $0x0,%edx mov (%rax),%ecx lea (%rdx,%rcx,1),%esi test %ecx,%ecx cmovg %esi,%edx add $0x4,%rax cmp %rdi,%rax jne 1181 <func0+0x18> mov %edx,%eax retq mov $0x0,%edx ...
func0: endbr64 test esi, esi jle short loc_1197 mov rax, rdi lea edx, [rsi-1] lea rdi, [rdi+rdx*4+4] mov edx, 0 loc_1181: mov ecx, [rax] lea esi, [rdx+rcx] test ecx, ecx cmovg edx, esi add rax, 4 cmp rax, rdi jnz short loc_1181 loc_1194: mov eax, edx retn loc_1197: mo...
long long func0(int *a1, int a2) { int *v2; // rax long long v3; // rdi unsigned int v4; // edx if ( a2 <= 0 ) { return 0; } else { v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; v4 = 0; do { if ( *v2 > 0 ) v4 += *v2; ++v2; } while ( v2 != (int *)v3 ); ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101197 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RDI,[RDI + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_00101181: MOV ECX,dword ptr [RAX] LEA ESI,[RDX + RCX*0x1] TEST ECX,ECX CMOVG EDX,ESI ADD RAX,0x4 CMP RAX,RDI JNZ 0x00101181 LAB_00101194: MOV EAX,EDX RET LAB_00101197: MOV EDX,0x0 JMP 0x00101194
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { if (0 < *param_1) { iVar2 = iVar2 + *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1)...
7,374
func0
#include <assert.h>
int func0(int nums[], int size) { int sum = 0; for (int i = 0; i < size; i++) { if (nums[i] > 0) { sum += nums[i]; } } return sum; }
int main() { int array1[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; int array2[] = {10, 15, -14, 13, -18, 12, -20}; int array3[] = {19, -65, 57, 39, 152, -639, 121, 44, 90, -190}; assert(func0(array1, sizeof(array1)/sizeof(array1[0])) == 48); assert(func0(array2, sizeof(array2)/sizeof(array2...
O2
c
func0: endbr64 test %esi,%esi jle 13a0 <func0+0x30> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rsi xor %eax,%eax nopw 0x0(%rax,%rax,1) mov (%rdi),%edx test %edx,%edx lea (%rax,%rdx,1),%ecx cmovg %ecx,%eax add $0x4,%rdi cmp %rsi,%rdi jne 1388 <func0+0x18> retq nopl 0x0(%rax) xor %ea...
func0: endbr64 test esi, esi jle short loc_1390 lea eax, [rsi-1] lea rsi, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00h] loc_1378: mov edx, [rdi] test edx, edx lea ecx, [rax+rdx] cmovg eax, ecx add rdi, 4 cmp rdi, rsi jnz short loc_1378 retn loc_1390: xor eax, ...
long long func0(int *a1, int a2) { long long v2; // rsi long long result; // rax if ( a2 <= 0 ) return 0LL; v2 = (long long)&a1[a2 - 1 + 1]; result = 0LL; do { if ( *a1 > 0 ) result = (unsigned int)(result + *a1); ++a1; } while ( a1 != (int *)v2 ); return result; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101390 LEA EAX,[RSI + -0x1] LEA RSI,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_00101378: MOV EDX,dword ptr [RDI] TEST EDX,EDX LEA ECX,[RAX + RDX*0x1] CMOVG EAX,ECX ADD RDI,0x4 CMP RDI,RSI JNZ 0x00101378 RET LAB_00101390: XOR EAX,EAX RET
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { if (0 < *param_1) { iVar2 = iVar2 + *param_1; } param_1 = param_1 + 1; } while (param_1 != piVar1); return iVar2; } re...
7,375
func0
#include <assert.h>
int func0(int nums[], int size) { int sum = 0; for (int i = 0; i < size; i++) { if (nums[i] > 0) { sum += nums[i]; } } return sum; }
int main() { int array1[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; int array2[] = {10, 15, -14, 13, -18, 12, -20}; int array3[] = {19, -65, 57, 39, 152, -639, 121, 44, 90, -190}; assert(func0(array1, sizeof(array1)/sizeof(array1[0])) == 48); assert(func0(array2, sizeof(array2)/sizeof(array2...
O3
c
func0: endbr64 test %esi,%esi jle 11f8 <func0+0xb8> lea -0x1(%rsi),%eax cmp $0x2,%eax jbe 1201 <func0+0xc1> mov %esi,%edx pxor %xmm1,%xmm1 mov %rdi,%rax shr $0x2,%edx movdqa %xmm1,%xmm2 shl $0x4,%rdx add %rdi,%rdx movdqu (%rax),%xmm0 movdqu (%rax),%xmm3 add $0x10,%rax pcmpgtd %xmm2,%xm...
func0: endbr64 mov ecx, esi test esi, esi jle loc_1200 lea eax, [rsi-1] cmp eax, 2 jbe loc_1209 mov edx, esi pxor xmm0, xmm0 mov rax, rdi shr edx, 2 movdqa xmm2, xmm0 shl rdx, 4 add rdx, rdi nop dword ptr [rax+00000000h] loc_1178: movdqu xmm1, xmmword ptr [rax] movdqu...
long long func0(const __m128i *a1, int a2) { __m128i v3; // xmm0 const __m128i *v4; // rax __m128i v5; // xmm1 signed int v6; // edx __m128i v7; // xmm0 long long result; // rax long long v9; // r8 int v10; // esi int v11; // esi int v12; // edx if ( a2 <= 0 ) return 0LL; if ( (unsigned in...
func0: ENDBR64 MOV ECX,ESI TEST ESI,ESI JLE 0x00101200 LEA EAX,[RSI + -0x1] CMP EAX,0x2 JBE 0x00101209 MOV EDX,ESI PXOR XMM0,XMM0 MOV RAX,RDI SHR EDX,0x2 MOVDQA XMM2,XMM0 SHL RDX,0x4 ADD RDX,RDI NOP dword ptr [RAX] LAB_00101178: MOVDQU XMM1,xmmword ptr [RAX] MOVDQU XMM3,xmmword ptr [RAX] ADD RAX,0x10 PCMPGTD XMM1,XMM2 ...
int func0(uint *param_1,uint param_2) { uint *puVar1; uint *puVar2; uint *puVar3; uint uVar4; uint *puVar5; uint *puVar6; uint *puVar7; uint *puVar8; uint uVar9; int iVar10; int iVar11; int iVar12; int iVar13; if ((int)param_2 < 1) { iVar10 = 0; } else { if (param_2 - 1 < 3) ...
7,376
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char *string1, char *string2) { int size1 = strlen(string1); int size2 = strlen(string2); if (size1 != size2) return 0; char temp[2 * size1 + 1]; strcpy(temp, string1); strcat(temp, string1); if (strstr(temp, string2) != NULL) return 1; else r...
int main() { assert(func0("abc", "cba") == 0); assert(func0("abcd", "cdba") == 0); assert(func0("abacd", "cdaba") == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 push %r14 push %r13 push %r12 push %rbx sub $0x38,%rsp mov %rdi,-0x58(%rbp) mov %rsi,-0x60(%rbp) mov %fs:0x28,%rax mov %rax,-0x38(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rbx mov -0x58(%rbp),%rax mov %rax,%rdi callq 10b0 <...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+s], rdi mov [rbp+needle], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, rsp mov rbx, rax mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_30], eax mov rax, [rbp+ne...
_BOOL8 func0(char *a1, char *a2) { int v3; // eax unsigned long long v4; // rax void *v5; // rsp char *needle; // [rsp+8h] [rbp-40h] BYREF char *s; // [rsp+10h] [rbp-38h] int v8; // [rsp+18h] [rbp-30h] int v9; // [rsp+1Ch] [rbp-2Ch] long long v10; // [rsp+20h] [rbp-28h] char *dest; // [rsp+28h] [rbp-...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,RSP MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x001010b0 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qw...
int8 func0(char *param_1,char *param_2) { long lVar1; char *pcVar2; int iVar3; size_t sVar4; int8 uVar5; ulong uVar6; char *pcVar7; char **ppcVar8; long in_FS_OFFSET; char *local_48; char *local_40; int local_38; int local_34; long local_30; char *local_28; long local_20; ppcVar8 =...
7,377
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char *string1, char *string2) { int size1 = strlen(string1); int size2 = strlen(string2); if (size1 != size2) return 0; char temp[2 * size1 + 1]; strcpy(temp, string1); strcat(temp, string1); if (strstr(temp, string2) != NULL) return 1; else r...
int main() { assert(func0("abc", "cba") == 0); assert(func0("abcd", "cdba") == 0); assert(func0("abacd", "cdaba") == 1); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x10,%rsp mov %rdi,%rbx mov %rsi,%r12 mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov $0xffffffffffffffff,%rsi mov %rsi,%rcx repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%rdx mov %rsi,%rcx mov %r12...
func0: endbr64 push rbp mov rbp, rsp push r13 push r12 push rbx sub rsp, 18h mov r12, rdi mov r13, rsi mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax call _strlen mov rbx, rax mov rdi, r13 call _strlen mov rdx, rax mov eax, 0 cmp ebx, edx jz sho...
_BOOL8 func0(long long a1, long long a2) { int v2; // ebx int v3; // edx _BOOL8 result; // rax signed long long v5; // rax void *v6; // rsp _QWORD v8[6]; // [rsp+8h] [rbp-30h] BYREF v8[1] = __readfsqword(0x28u); v2 = ((long long (*)(void))strlen)(); v3 = strlen(a2); result = 0LL; if ( v2 == v3 )...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV R13,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x001010b0 MOV RBX,RAX MOV RDI,R13 CALL 0x001010b0 MOV RDX,RAX MOV EAX,0x0 CMP EBX,EDX JZ 0x00101249 LAB_0010122b: MOV RDX,qword ptr [RBP + -0x...
bool func0(char *param_1,char *param_2) { long lVar1; size_t sVar2; size_t sVar3; ulong uVar4; char *pcVar5; int1 *puVar6; int1 *puVar7; long in_FS_OFFSET; bool bVar8; int1 auStack_38 [8]; long local_30; puVar6 = auStack_38; puVar7 = auStack_38; local_30 = *(long *)(in_FS_OFFSET + 0x28);...
7,378
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char *string1, char *string2) { int size1 = strlen(string1); int size2 = strlen(string2); if (size1 != size2) return 0; char temp[2 * size1 + 1]; strcpy(temp, string1); strcat(temp, string1); if (strstr(temp, string2) != NULL) return 1; else r...
int main() { assert(func0("abc", "cba") == 0); assert(func0("abcd", "cdba") == 0); assert(func0("abacd", "cdaba") == 1); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r13 mov %rdi,%r13 push %r12 mov %rsi,%r12 push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax callq 1090 <strlen@plt> mov %r12,%rdi mov %rax,%rbx callq 1090 <strlen@plt> mov %rax,%r8 xor %eax,%eax cmp %r...
func0: endbr64 push rbp mov rbp, rsp push r13 mov r13, rdi push r12 mov r12, rsi push rbx sub rsp, 18h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax call _strlen mov rdi, r12 mov rbx, rax call _strlen mov r8, rax xor eax, eax cmp ebx, r8d jz sh...
_BOOL8 func0(long long a1, long long a2) { long long v2; // rbx int v3; // r8d _BOOL8 result; // rax _BYTE *v5; // rcx signed long long v6; // rdx void *v7; // rsp _BYTE v9[4088]; // [rsp+8h] [rbp-1030h] BYREF _QWORD v10[6]; // [rsp+1008h] [rbp-30h] BYREF v10[1] = __readfsqword(0x28u); v2 = ((long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R13 MOV R13,RDI PUSH R12 MOV R12,RSI PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x00101090 MOV RDI,R12 MOV RBX,RAX CALL 0x00101090 MOV R8,RAX XOR EAX,EAX CMP EBX,R8D JZ 0x001012f0 LAB_001012d0: MOV RDX,qword ptr [RBP + -0x2...
bool func0(char *param_1,char *param_2) { long lVar1; int1 *puVar2; size_t __n; size_t sVar3; ulong uVar4; char *pcVar5; int1 *puVar6; int1 *puVar7; long in_FS_OFFSET; bool bVar9; int1 auStack_38 [8]; long local_30; int1 *puVar8; puVar6 = auStack_38; puVar8 = auStack_38; puVar7 = auS...
7,379
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char *string1, char *string2) { int size1 = strlen(string1); int size2 = strlen(string2); if (size1 != size2) return 0; char temp[2 * size1 + 1]; strcpy(temp, string1); strcat(temp, string1); if (strstr(temp, string2) != NULL) return 1; else r...
int main() { assert(func0("abc", "cba") == 0); assert(func0("abcd", "cdba") == 0); assert(func0("abacd", "cdaba") == 1); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r13 mov %rdi,%r13 push %r12 mov %rsi,%r12 push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax callq 1090 <strlen@plt> mov %r12,%rdi mov %rax,%rbx callq 1090 <strlen@plt> mov %rax,%r8 xor %eax,%eax cmp %r...
func0: endbr64 push rbp mov rbp, rsp push r14 push r13 mov r13, rsi push r12 mov r12, rdi push rbx sub rsp, 10h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax call _strlen mov rdi, r13; s mov rbx, rax call _strlen mov rdx, rax xor eax, eax cmp ebx...
_BOOL8 func0(const char *a1, const char *a2) { size_t v2; // rbx int v3; // edx _BOOL8 result; // rax long long v5; // r14 char *v6; // rcx signed long long v7; // rdx void *v8; // rsp char v10[4088]; // [rsp+8h] [rbp-1030h] BYREF _QWORD v11[6]; // [rsp+1008h] [rbp-30h] BYREF v11[1] = __readfsqwor...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 MOV R13,RSI PUSH R12 MOV R12,RDI PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CALL 0x00101090 MOV RDI,R13 MOV RBX,RAX CALL 0x00101090 MOV RDX,RAX XOR EAX,EAX CMP EBX,EDX JZ 0x001012f8 LAB_001012d1: MOV RDX,qword ptr [...
bool func0(char *param_1,char *param_2) { long lVar1; int *puVar2; size_t sVar3; size_t sVar4; char *pcVar5; ulong uVar6; int *puVar7; int *puVar8; long lVar10; long in_FS_OFFSET; bool bVar11; int auStack_38 [8]; long local_30; int *puVar9; puVar7 = auStack_38; puVar9 = auStack_38; ...
7,380
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h>
bool func0(int list1[][2], int size1, int list2[][2], int size2) { for (int i = 0; i < size2; i++) { bool found = false; for (int j = 0; j < size1; j++) { if (list1[j][0] == list2[i][0] && list1[j][1] == list2[i][1]) { found = true; break; ...
int main() { int list1[][2] = {{1, 3}, {5, 7}, {9, 11}, {13, 15}}; int list2[][2] = {{1, 3}, {13, 15}}; assert(func0(list1, 4, list2, 2) == true); int list3[][2] = {{1, 2}, {2, 3}, {3, 4}, {5, 6}}; int list4[][2] = {{3, 4}, {5, 6}}; assert(func0(list3, 4, list4, 2) == true); int l...
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) jmpq 1222 <func0+0xb9> movb $0x0,-0x9(%rbp) movl $0x0,-0x4(%rbp) jmp 1204 <func0+0x9b> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%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_8], 0 jmp loc_1222 loc_118B: mov [rbp+var_9], 0 mov [rbp+var_4], 0 jmp short loc_1204 loc_1198: mov eax, [rbp+var_4] cdqe lea rdx, ...
long long func0(long long a1, int a2, long long a3, int a4) { char v5; // [rsp+1Fh] [rbp-9h] int i; // [rsp+20h] [rbp-8h] int j; // [rsp+24h] [rbp-4h] for ( i = 0; i < a4; ++i ) { v5 = 0; for ( j = 0; j < a2; ++j ) { if ( *(_DWORD *)(8LL * j + a1) == *(_DWORD *)(8LL * i + 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 + -0x8],0x0 JMP 0x00101222 LAB_0010118b: MOV byte ptr [RBP + -0x9],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101204 LAB_00101198: MOV EA...
int8 func0(long param_1,int param_2,long param_3,int param_4) { bool bVar1; int local_10; int local_c; local_10 = 0; do { if (param_4 <= local_10) { return 1; } bVar1 = false; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if ((*(int *)(param_1 + (long)local_c * ...
7,381
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h>
bool func0(int list1[][2], int size1, int list2[][2], int size2) { for (int i = 0; i < size2; i++) { bool found = false; for (int j = 0; j < size1; j++) { if (list1[j][0] == list2[i][0] && list1[j][1] == list2[i][1]) { found = true; break; ...
int main() { int list1[][2] = {{1, 3}, {5, 7}, {9, 11}, {13, 15}}; int list2[][2] = {{1, 3}, {13, 15}}; assert(func0(list1, 4, list2, 2) == true); int list3[][2] = {{1, 2}, {2, 3}, {3, 4}, {5, 6}}; int list4[][2] = {{3, 4}, {5, 6}}; assert(func0(list3, 4, list4, 2) == true); int l...
O1
c
func0: endbr64 test %ecx,%ecx jle 1189 <func0+0x20> mov %rdx,%r8 lea -0x1(%rcx),%eax lea 0x8(%rdx,%rax,8),%r10 mov %rdi,%r9 lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%rcx jmp 11af <func0+0x46> mov $0x1,%eax retq add $0x8,%rax cmp %rcx,%rax je 11be <func0+0x55> cmp %edx,(%rax) jn...
func0: endbr64 mov r9, rdi mov r8d, esi test ecx, ecx jle short loc_118C mov rdi, rdx lea eax, [rcx-1] lea r10, [rdx+rax*8+8] lea eax, [rsi-1] lea rcx, [r9+rax*8+8] jmp short loc_11B2 loc_118C: mov eax, 1 retn loc_1192: add rax, 8 cmp rax, rcx jz short loc_11C1 lo...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v5; // rdi _DWORD *v7; // rax if ( a4 <= 0 ) return 1LL; v5 = a3; while ( 2 ) { if ( a2 <= 0 ) return 0LL; v7 = a1; while ( *v7 != *v5 || v7[1] != v5[1] ) { v7 += 2; if ( v7 == &a1[2 * (a2 - 1) + 2] ) ...
func0: ENDBR64 MOV R9,RDI MOV R8D,ESI TEST ECX,ECX JLE 0x0010118c MOV RDI,RDX LEA EAX,[RCX + -0x1] LEA R10,[RDX + RAX*0x8 + 0x8] LEA EAX,[RSI + -0x1] LEA RCX,[R9 + RAX*0x8 + 0x8] JMP 0x001011b2 LAB_0010118c: MOV EAX,0x1 RET LAB_00101192: ADD RAX,0x8 CMP RAX,RCX JZ 0x001011c1 LAB_0010119b: CMP dword ptr [RAX],EDX JNZ 0x...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (param_4 < 1) { return 1; } piVar1 = param_3 + (ulong)(param_4 - 1) * 2 + 2; do { if (param_2 < 1) { return 0; } piVar2 = param_1; while ((*piVar2 != *param_3 || (piVar2[1] != param_3[1...