index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
5,982
func0
#include <assert.h> #include <stdio.h>
int func0(int arr[], int n) { int lis[n+1]; int lds[n+1]; int i, j, maximum; for (i = 0; i <= n; i++) { lis[i] = 1; } for (i = 1; i < n; i++) { for (j = 0; j < i; j++) { if (arr[i] > arr[j] && lis[i] < lis[j] + 1) { lis[i] = lis[j] + ...
int main() { int arr1[] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}; int arr2[] = {1, 11, 2, 10, 4, 5, 2, 1}; int arr3[] = {80, 60, 30, 40, 20, 10}; assert(func0(arr1, sizeof(arr1)/sizeof(arr1[0])) == 7); assert(func0(arr2, sizeof(arr2)/sizeof(arr2[0])) == 6); assert(func0(a...
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r14 push %r13 push %r12 push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax lea 0x1(%rsi),%eax mov %rsp,%rbx cltq lea 0xf(,%rax,4),%rax mov %rax,%rcx mov %rax,%rdx and $0xfffffffffffff000,%rcx and $0xfff...
func0: endbr64 push rbp mov rdx, rdi mov r9d, esi mov rbp, rsp push r13 push r12 push rbx sub rsp, 18h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea eax, [rsi+1] mov rsi, rsp cdqe lea rax, ds:0Fh[rax*4] mov rdi, rax mov rcx, rax and rdi, 0FFFFFFFF...
long long func0(long long a1, int a2) { long long v3; // rax _DWORD *v4; // rsi signed long long v5; // rcx void *v6; // rsp _DWORD *v7; // rsi signed long long v8; // rcx void *v9; // rsp _DWORD *v10; // rax long long v11; // rcx int v12; // ebx long long v13; // rax int v14; // esi long lon...
func0: ENDBR64 PUSH RBP MOV RDX,RDI MOV R9D,ESI MOV RBP,RSP PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA EAX,[RSI + 0x1] MOV RSI,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDI,RAX MOV RCX,RAX AND RDI,-0x1000 AND RCX,-0x10 SUB RSI,RDI CMP RSP,RSI JZ 0x0010...
int func0(long param_1,int param_2) { long lVar1; long lVar2; int1 *puVar3; int iVar4; int iVar5; int4 *puVar6; long lVar7; ulong uVar8; ulong uVar9; long lVar10; int1 *puVar11; int1 *puVar13; long in_FS_OFFSET; int1 auStack_38 [8]; long local_30; int1 *puVar12; int1 *puVar14; pu...
5,983
func0
#include <assert.h> #include <stdio.h>
int func0(int arr[], int n) { int lis[n+1]; int lds[n+1]; int i, j, maximum; for (i = 0; i <= n; i++) { lis[i] = 1; } for (i = 1; i < n; i++) { for (j = 0; j < i; j++) { if (arr[i] > arr[j] && lis[i] < lis[j] + 1) { lis[i] = lis[j] + ...
int main() { int arr1[] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}; int arr2[] = {1, 11, 2, 10, 4, 5, 2, 1}; int arr3[] = {80, 60, 30, 40, 20, 10}; assert(func0(arr1, sizeof(arr1)/sizeof(arr1[0])) == 7); assert(func0(arr2, sizeof(arr2)/sizeof(arr2[0])) == 6); assert(func0(a...
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r13 push %r12 lea 0x1(%rsi),%r12d push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax movslq %r12d,%rax mov %rsp,%rbx lea 0xf(,%rax,4),%rax mov %rax,%rcx mov %rax,%rdx and $0xfffffffffffff000,%rcx and $0xf...
func0: endbr64 push rbp mov r10d, esi mov rbp, rsp push r14 push r13 push r12 push rbx lea ebx, [rsi+1] sub rsp, 10h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax movsxd rax, ebx mov rcx, rsp lea rax, ds:0Fh[rax*4] mov rsi, rax mov rdx, rax and rsi, 0...
long long func0(long long a1, int a2) { unsigned int v3; // ebx long long v4; // rax __m128i *v5; // rcx signed long long v6; // rdx void *v7; // rsp __m128i *v8; // rcx signed long long v9; // rdx void *v10; // rsp __m128i si128; // xmm0 __m128i *v12; // rax long long v13; // rdx __m128i *v14;...
func0: ENDBR64 PUSH RBP MOV R10D,ESI MOV RBP,RSP PUSH R14 PUSH R13 PUSH R12 PUSH RBX LEA EBX,[RSI + 0x1] SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOVSXD RAX,EBX MOV RCX,RSP LEA RAX,[0xf + RAX*0x4] MOV RSI,RAX MOV RDX,RAX AND RSI,-0x1000 AND RDX,-0x10 SUB RCX,RSI CMP RSP,RCX J...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint func0(long param_1,uint param_2) { int iVar1; long lVar2; long lVar3; int *puVar4; int8 uVar5; int8 uVar6; uint uVar7; uint uVar8; int8 *puVar9; long lVar10; int8 *puVar11; int iVar12; ulong uVar13; i...
5,984
func0
#include <stdio.h> #include <ctype.h> #include <assert.h> #include <string.h>
char *func0(const char *str1) { static char result[200]; int has_upper = 0, has_lower = 0, has_digit = 0, is_valid = 1; int length = strlen(str1); for (int i = 0; i < length; i++) { if (isupper(str1[i])) { has_upper = 1; } if (islower(str1[i])) { ...
int main() { assert(strcmp(func0("python"), "String must have 1 upper case character,String must have 1 number,String length should be atleast 8") == 0); assert(strcmp(func0("123python"), "String must have 1 upper case character") == 0); assert(strcmp(func0("123Python"), "Valid string.") == 0); re...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x1c(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) movl $0x1,-0xc(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 1080 <strlen@plt> mov %eax,-0x8(%rbp) movl $0x0,-0x10(%rbp) jmpq 129c <func0+0xf3> c...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+s], rdi mov [rbp+var_1C], 0 mov [rbp+var_18], 0 mov [rbp+var_14], 0 mov [rbp+var_C], 1 mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_8], eax mov [rbp+var_10], 0 jmp loc_129C loc_11F0: call __...
char * func0(const char *a1) { int v2; // [rsp+14h] [rbp-1Ch] int v3; // [rsp+18h] [rbp-18h] int v4; // [rsp+1Ch] [rbp-14h] int i; // [rsp+20h] [rbp-10h] int v6; // [rsp+28h] [rbp-8h] int v7; // [rsp+2Ch] [rbp-4h] v2 = 0; v3 = 0; v4 = 0; v6 = strlen(a1); for ( i = 0; i < v6; ++i ) { if ( ((...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0xc],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101080 MOV dword ptr [RBP + -0x8],EAX MOV dword ptr [RBP + ...
int1 * func0(char *param_1) { bool bVar1; bool bVar2; bool bVar3; int iVar4; size_t sVar5; ushort **ppuVar6; int local_18; bVar1 = false; bVar2 = false; bVar3 = false; sVar5 = strlen(param_1); iVar4 = (int)sVar5; for (local_18 = 0; local_18 < iVar4; local_18 = local_18 + 1) { ppuVar6 =...
5,985
func0
#include <stdio.h> #include <ctype.h> #include <assert.h> #include <string.h>
char *func0(const char *str1) { static char result[200]; int has_upper = 0, has_lower = 0, has_digit = 0, is_valid = 1; int length = strlen(str1); for (int i = 0; i < length; i++) { if (isupper(str1[i])) { has_upper = 1; } if (islower(str1[i])) { ...
int main() { assert(strcmp(func0("python"), "String must have 1 upper case character,String must have 1 number,String length should be atleast 8") == 0); assert(strcmp(func0("123python"), "String must have 1 upper case character") == 0); assert(strcmp(func0("123Python"), "Valid string.") == 0); re...
O1
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%r13 test %r13d,%r13d jle 12e1 <func0+0x158> callq 1090 <__ctype_b_loc@plt> mov (%rax),%rdi mov %rbx,%rax ...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi call _strlen mov r13, rax test eax, eax jle loc_1307 call ___ctype_b_loc mov rdi, [rax] mov rax, rbx lea edx, [r13-1] lea rsi, [rbx+rdx+1] mov r12d, 0 mov ebp, 0 mov ebx, 0 mov ...
long long * func0(const char *a1) { long long v2; // rcx int v3; // r13d long long v4; // rdi const char *v5; // rax const char *v6; // rsi int v7; // r12d int v8; // ebp int v9; // ebx long long v10; // rdx long long v11; // rdx v3 = ((long long (*)(void))strlen)(); if ( v3 <= 0 ) { LOBY...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI CALL 0x001010a0 MOV R13,RAX TEST EAX,EAX JLE 0x00101307 CALL 0x001010d0 MOV RDI,qword ptr [RAX] MOV RAX,RBX LEA EDX,[R13 + -0x1] LEA RSI,[RBX + RDX*0x1 + 0x1] MOV R12D,0x0 MOV EBP,0x0 MOV EBX,0x0 MOV ECX,0x1 LAB_00101213: MOVSX RDX,byte ptr [RAX...
int1 * func0(char *param_1) { char *pcVar1; ushort uVar2; bool bVar3; bool bVar4; bool bVar5; int iVar6; size_t sVar7; ushort **ppuVar8; sVar7 = strlen(param_1); iVar6 = (int)sVar7; if (iVar6 < 1) { result_1._0_8_ = result_1._0_8_ & 0xffffffffffffff00; bVar5 = false; bVar4 = false;...
5,986
func0
#include <stdio.h> #include <ctype.h> #include <assert.h> #include <string.h>
char *func0(const char *str1) { static char result[200]; int has_upper = 0, has_lower = 0, has_digit = 0, is_valid = 1; int length = strlen(str1); for (int i = 0; i < length; i++) { if (isupper(str1[i])) { has_upper = 1; } if (islower(str1[i])) { ...
int main() { assert(strcmp(func0("python"), "String must have 1 upper case character,String must have 1 number,String length should be atleast 8") == 0); assert(strcmp(func0("123python"), "String must have 1 upper case character") == 0); assert(strcmp(func0("123Python"), "Valid string.") == 0); re...
O2
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1090 <strlen@plt> mov %rax,%r13 test %eax,%eax jle 13b8 <func0+0x128> callq 10b0 <__ctype_b_loc@plt> xor %r12d,%r12d mov %rbx,%rdi xor %ebp,%ebp mov (%rax),%rsi lea -0x1(%r13),%eax mov $0x1...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi call _strlen mov r13, rax test eax, eax jle loc_13C0 call ___ctype_b_loc xor r12d, r12d mov rdi, rbx xor ebp, ebp mov rsi, [rax] lea eax, [r13-1] mov edx, 1 lea rcx, [rbx+rax+1] xor ...
__int128 * func0(char *a1) { int v1; // r13d int v2; // r12d int v3; // ebp const char *v4; // rsi long long v5; // rdx long long v6; // rcx int v7; // ebx __int16 v8; // ax long long v9; // rax v1 = ((long long (*)(void))strlen)(); if ( v1 <= 0 ) { v7 = 0; v3 = 0; strcpy((char *)&q...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI CALL 0x001010a0 MOV R13,RAX TEST EAX,EAX JLE 0x001013c0 CALL 0x001010d0 XOR R12D,R12D MOV RDI,RBX XOR EBP,EBP MOV RSI,qword ptr [RAX] LEA EAX,[R13 + -0x1] MOV EDX,0x1 LEA RCX,[RBX + RAX*0x1 + 0x1] XOR EBX,EBX NOP LAB_001012e0: MOVSX RAX,byte ptr [R...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 * func0(char *param_1) { char *pcVar1; ushort uVar2; bool bVar3; bool bVar4; bool bVar5; int iVar6; size_t sVar7; ushort **ppuVar8; sVar7 = strlen(param_1); iVar6 = (int)sVar7; if (iVar6 < 1) { bVar4...
5,987
func0
#include <stdio.h> #include <ctype.h> #include <assert.h> #include <string.h>
char *func0(const char *str1) { static char result[200]; int has_upper = 0, has_lower = 0, has_digit = 0, is_valid = 1; int length = strlen(str1); for (int i = 0; i < length; i++) { if (isupper(str1[i])) { has_upper = 1; } if (islower(str1[i])) { ...
int main() { assert(strcmp(func0("python"), "String must have 1 upper case character,String must have 1 number,String length should be atleast 8") == 0); assert(strcmp(func0("123python"), "String must have 1 upper case character") == 0); assert(strcmp(func0("123Python"), "Valid string.") == 0); re...
O3
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1090 <strlen@plt> mov %rax,%r13 test %eax,%eax jle 13b8 <func0+0x128> callq 10b0 <__ctype_b_loc@plt> xor %r12d,%r12d mov %rbx,%rdi xor %ebp,%ebp mov (%rax),%rsi lea -0x1(%r13),%eax mov $0x1...
func0: endbr64 push r13 push r12 push rbp push rbx mov rbx, rdi sub rsp, 8 call _strlen test eax, eax jle loc_13D0 mov r12, rax xor ebp, ebp call ___ctype_b_loc mov rdi, rbx xor ecx, ecx mov edx, 1 mov r8, [rax] lea eax, [r12-1] lea rsi, [rbx+rax+1] xor ...
char * func0(const char *a1) { int v1; // eax int v2; // r12d int v3; // ebp const unsigned __int16 **v4; // rax int v5; // ecx const unsigned __int16 *v6; // r8 long long v7; // rsi int v8; // ebx unsigned __int16 v9; // ax long long v11; // rax v1 = strlen(a1); if ( v1 <= 0 ) { qword_40...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x001010a0 TEST EAX,EAX JLE 0x001013d0 MOV R12,RAX XOR EBP,EBP CALL 0x001010d0 MOV RDI,RBX XOR ECX,ECX MOV EDX,0x1 MOV R8,qword ptr [RAX] LEA EAX,[R12 + -0x1] LEA RSI,[RBX + RAX*0x1 + 0x1] XOR EBX,EBX NOP dword ptr [RAX] LAB_001012e8: MOVSX...
5,988
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int max = 0; int msis[n]; for (int i = 0; i < n; i++) { msis[i] = arr[i]; } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) { msis[i] = msis[j] + arr[i]; ...
int main() { int arr1[] = {1, 101, 2, 3, 100, 4, 5}; int arr2[] = {3, 4, 5, 10}; int arr3[] = {10, 5, 4, 3}; assert(func0(arr1, 7) == 106); assert(func0(arr2, 4) == 22); assert(func0(arr3, 4) == 10); printf("All tests 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,%rdi movl $0x0,-0x30(%rbp) mov -0x4c(%rbp),%eax movslq %eax,%rdx sub $0x1,%rdx mov %rdx,-0x28(%r...
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 rdi, rax mov [rbp+var_2C], 0 mov eax, [rbp+var_3C] movsxd rdx, eax sub rdx, 1 mov [rbp+var_18], rdx cdq...
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+1Ch] [rbp-2Ch] int i; // [rsp+20h] [rbp-28h] int j; // [rsp+24h] [rbp-24h] int k;...
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 RDI,RAX MOV dword ptr [RBP + -0x2c],0x0 MOV EAX,dword ptr [RBP + -0x3c] MOVSXD RDX,EAX SUB RDX,0x1 MOV qword ptr [RBP + ...
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_34; int local_30; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; local_40 = param_1; loc...
5,989
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int max = 0; int msis[n]; for (int i = 0; i < n; i++) { msis[i] = arr[i]; } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) { msis[i] = msis[j] + arr[i]; ...
int main() { int arr1[] = {1, 101, 2, 3, 100, 4, 5}; int arr2[] = {3, 4, 5, 10}; int arr3[] = {10, 5, 4, 3}; assert(func0(arr1, 7) == 106); assert(func0(arr2, 4) == 22); assert(func0(arr3, 4) == 10); printf("All tests 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,%rax lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffffff0,%rdx and $0xfffffffffffff000,%rax mov %rsp,%rcx sub %rax,%rcx mov %rcx,%rax cmp %rax,%rsp je ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov r9d, esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax movsxd rax, esi lea rax, ds:0Fh[rax*4] mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFFFFFFFF000h mov rdx, rsp sub rdx, rax loc_11C5: cmp rsp...
long long func0(long long a1, int a2) { signed long long v2; // rax void *v3; // rsp long long i; // rax long long j; // rdx long long v6; // rax int v7; // r8d int v8; // ecx unsigned int v9; // edx long long v10; // rax _DWORD v13[2]; // [rsp+8h] [rbp-10h] BYREF unsigned long long v14; // [rsp+...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV R9D,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOVSXD RAX,ESI LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RCX,-0x10 AND RAX,-0x1000 MOV RDX,RSP SUB RDX,RAX LAB_001011c5: CMP RSP,RDX JZ 0x001011dc SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0...
int func0(long param_1,uint param_2) { long lVar1; ulong uVar2; ulong uVar3; long lVar4; int iVar5; int1 *puVar6; int iVar7; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (long)(int)param_2 * 4 + 0xf; for (puVar6 = auStack_18; puV...
5,990
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int max = 0; int msis[n]; for (int i = 0; i < n; i++) { msis[i] = arr[i]; } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) { msis[i] = msis[j] + arr[i]; ...
int main() { int arr1[] = {1, 101, 2, 3, 100, 4, 5}; int arr2[] = {3, 4, 5, 10}; int arr3[] = {10, 5, 4, 3}; assert(func0(arr1, 7) == 106); assert(func0(arr2, 4) == 22); assert(func0(arr3, 4) == 10); printf("All tests passed!\n"); 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 movslq %esi,%rax mov %rsp,%rcx lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rcx and $0xfffffffffffffff0,%rdx mov %rcx,%rax cmp %rax,%rsp je ...
func0: endbr64 push rbp mov rbp, rsp push r14 push r13 movsxd r13, esi push r12 mov r12, r13 push rbx mov rbx, rdi sub rsp, 10h mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea rax, ds:0Fh[r13*4] mov rcx, rsp mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub ...
long long func0(long long a1, int a2) { long long v2; // r13 long long v5; // rdx _DWORD *v6; // rcx __int16 v7; // dx signed long long v8; // rdx void *v9; // rsp long long v10; // rdi long long v11; // rdx int v12; // ecx long long v13; // rax int v14; // esi long long v15; // rax unsigned ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 MOVSXD R13,ESI PUSH R12 MOV R12,R13 PUSH RBX MOV RBX,RDI SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA RAX,[0xf + R13*0x4] MOV RCX,RSP MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x00101350 LAB_0010...
int func0(void *param_1,int param_2) { long lVar1; int1 *puVar2; long lVar3; void *pvVar4; long lVar5; ulong uVar6; long lVar7; int1 *puVar8; int iVar10; int iVar11; long lVar12; long in_FS_OFFSET; int1 auStack_38 [8]; long local_30; int1 *puVar9; lVar12 = (long)param_2; puVar8 = a...
5,991
func0
#include <stdio.h> #include <assert.h>
int func0(int arr[], int n) { int max = 0; int msis[n]; for (int i = 0; i < n; i++) { msis[i] = arr[i]; } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (arr[i] > arr[j] && msis[i] < msis[j] + arr[i]) { msis[i] = msis[j] + arr[i]; ...
int main() { int arr1[] = {1, 101, 2, 3, 100, 4, 5}; int arr2[] = {3, 4, 5, 10}; int arr3[] = {10, 5, 4, 3}; assert(func0(arr1, 7) == 106); assert(func0(arr2, 4) == 22); assert(func0(arr3, 4) == 10); printf("All tests passed!\n"); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r13 mov %esi,%r13d push %r12 mov %rdi,%r12 push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax movslq %esi,%rax mov %rsp,%rbx lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rbx ...
func0: endbr64 push rbp mov rbp, rsp push r15 push r14 mov r14d, esi push r13 mov r13, rdi push r12 push rbx sub rsp, 28h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax movsxd rax, esi mov rcx, rsp lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFF...
long long func0(char *src, int a2) { long long v3; // rdx long long *v4; // rcx __int16 v5; // dx signed long long v6; // rdx void *v7; // rsp int *v8; // r15 unsigned int v9; // ebx size_t v10; // r12 long long v11; // rdx int v12; // ecx long long v13; // rax int v14; // esi const __m128i *...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 MOV R14D,ESI PUSH R13 MOV R13,RDI PUSH R12 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOVSXD RAX,ESI MOV RCX,RSP LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x0010133...
uint func0(void *param_1,uint param_2) { int iVar1; long lVar2; uint *puVar3; uint *puVar4; uint *puVar5; int *puVar6; size_t sVar7; size_t sVar8; uint *puVar9; uint uVar10; ulong uVar11; size_t sVar12; int *puVar13; int iVar15; long in_FS_OFFSET; uint uVar16; uint uVar17; uint uVar...
5,992
func0
#include <assert.h> #include <stdbool.h>
bool func0(int line1[], int line2[]) { return line1[0] * line2[1] == line1[1] * line2[0]; }
int main() { int line1[] = {2, 3, 4}; int line2[] = {2, 3, 8}; assert(func0(line1, line2) == true); int line3[] = {2, 3, 4}; int line4[] = {4, -3, 8}; assert(func0(line3, line4) == false); int line5[] = {3, 3}; int line6[] = {5, 5}; assert(func0(line5, line6) == true); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x8(%rbp) mov %rsi,-0x10(%rbp) mov -0x8(%rbp),%rax mov (%rax),%edx mov -0x10(%rbp),%rax add $0x4,%rax mov (%rax),%eax imul %eax,%edx mov -0x8(%rbp),%rax add $0x4,%rax mov (%rax),%ecx mov -0x10(%rbp),%rax mov (%rax),%eax imul %...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov edx, [rax] mov rax, [rbp+var_10] add rax, 4 mov eax, [rax] mov ecx, edx imul ecx, eax mov rax, [rbp+var_8] add rax, 4 mov edx, [rax] mov rax, [rbp+var_10] mo...
bool func0(_DWORD *a1, _DWORD *a2) { return a2[1] * *a1 == a1[1] * *a2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x4 MOV EAX,dword ptr [RAX] MOV ECX,EDX IMUL ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 MOV EDX,dword ptr [RAX] MOV RA...
int4 func0(int *param_1,int *param_2) { return CONCAT31((int3)((uint)(*param_2 * param_1[1]) >> 8), *param_1 * param_2[1] == *param_2 * param_1[1]); }
5,993
func0
#include <assert.h> #include <stdbool.h>
bool func0(int line1[], int line2[]) { return line1[0] * line2[1] == line1[1] * line2[0]; }
int main() { int line1[] = {2, 3, 4}; int line2[] = {2, 3, 8}; assert(func0(line1, line2) == true); int line3[] = {2, 3, 4}; int line4[] = {4, -3, 8}; assert(func0(line3, line4) == false); int line5[] = {3, 3}; int line6[] = {5, 5}; assert(func0(line5, line6) == true); ...
O1
c
func0: endbr64 mov (%rdi),%edx imul 0x4(%rsi),%edx mov 0x4(%rdi),%eax imul (%rsi),%eax cmp %eax,%edx sete %al retq
func0: endbr64 mov edx, [rdi] imul edx, [rsi+4] mov eax, [rdi+4] imul eax, [rsi] cmp edx, eax setz al retn
bool func0(_DWORD *a1, _DWORD *a2) { return a2[1] * *a1 == *a2 * a1[1]; }
func0: ENDBR64 MOV EDX,dword ptr [RDI] IMUL EDX,dword ptr [RSI + 0x4] MOV EAX,dword ptr [RDI + 0x4] IMUL EAX,dword ptr [RSI] CMP EDX,EAX SETZ AL RET
int4 func0(int *param_1,int *param_2) { return CONCAT31((int3)((uint)(param_1[1] * *param_2) >> 8), *param_1 * param_2[1] == param_1[1] * *param_2); }
5,994
func0
#include <assert.h> #include <stdbool.h>
bool func0(int line1[], int line2[]) { return line1[0] * line2[1] == line1[1] * line2[0]; }
int main() { int line1[] = {2, 3, 4}; int line2[] = {2, 3, 8}; assert(func0(line1, line2) == true); int line3[] = {2, 3, 4}; int line4[] = {4, -3, 8}; assert(func0(line3, line4) == false); int line5[] = {3, 3}; int line6[] = {5, 5}; assert(func0(line5, line6) == true); ...
O2
c
func0: endbr64 mov (%rdi),%edx mov 0x4(%rdi),%eax imul 0x4(%rsi),%edx imul (%rsi),%eax cmp %eax,%edx sete %al retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 mov edx, [rdi] mov eax, [rdi+4] imul edx, [rsi+4] imul eax, [rsi] cmp edx, eax setz al retn
bool func0(_DWORD *a1, _DWORD *a2) { return a2[1] * *a1 == *a2 * a1[1]; }
func0: ENDBR64 MOV EDX,dword ptr [RDI] MOV EAX,dword ptr [RDI + 0x4] IMUL EDX,dword ptr [RSI + 0x4] IMUL EAX,dword ptr [RSI] CMP EDX,EAX SETZ AL RET
int4 func0(int *param_1,int *param_2) { return CONCAT31((int3)((uint)(param_1[1] * *param_2) >> 8), *param_1 * param_2[1] == param_1[1] * *param_2); }
5,995
func0
#include <assert.h> #include <stdbool.h>
bool func0(int line1[], int line2[]) { return line1[0] * line2[1] == line1[1] * line2[0]; }
int main() { int line1[] = {2, 3, 4}; int line2[] = {2, 3, 8}; assert(func0(line1, line2) == true); int line3[] = {2, 3, 4}; int line4[] = {4, -3, 8}; assert(func0(line3, line4) == false); int line5[] = {3, 3}; int line6[] = {5, 5}; assert(func0(line5, line6) == true); ...
O3
c
func0: endbr64 mov (%rdi),%edx mov 0x4(%rdi),%eax imul 0x4(%rsi),%edx imul (%rsi),%eax cmp %eax,%edx sete %al retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 mov edx, [rdi] mov eax, [rdi+4] imul edx, [rsi+4] imul eax, [rsi] cmp edx, eax setz al retn
bool func0(_DWORD *a1, _DWORD *a2) { return a2[1] * *a1 == *a2 * a1[1]; }
func0: ENDBR64 MOV EDX,dword ptr [RDI] MOV EAX,dword ptr [RDI + 0x4] IMUL EDX,dword ptr [RSI + 0x4] IMUL EAX,dword ptr [RSI] CMP EDX,EAX SETZ AL RET
int4 func0(int *param_1,int *param_2) { return CONCAT31((int3)((uint)(param_1[1] * *param_2) >> 8), *param_1 * param_2[1] == param_1[1] * *param_2); }
5,996
func0
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <assert.h>
char* func0(const char* str1) { size_t len = strlen(str1); char* result = malloc(len + 1); if (!result) return NULL; if (len > 0) { result[0] = toupper(str1[0]); for (size_t i = 1; i < len; i++) { result[i] = tolower(str1[i]); } result[len - 1] = toup...
int main() { assert(strcmp(func0("python"), "PythoN") == 0); assert(strcmp(func0("bigdata"), "BigdatA") == 0); assert(strcmp(func0("Hadoop"), "HadooP") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 10b0 <strlen@plt> mov %rax,-0x10(%rbp) mov -0x10(%rbp),%rax add $0x1,%rax mov %rax,%rdi callq 10f0 <malloc@plt> mov %rax,-0x8(%rbp) cmpq $0x0,-0x8(%rbp) jne 122e <fu...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+s], rdi mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_10], rax mov rax, [rbp+var_10] add rax, 1 mov rdi, rax; size call _malloc mov [rbp+var_8], rax cmp [rbp+var_8], 0 jnz short loc_122E mov ...
_BYTE * func0(const char *a1) { unsigned long long i; // [rsp+18h] [rbp-18h] size_t v3; // [rsp+20h] [rbp-10h] _BYTE *v4; // [rsp+28h] [rbp-8h] v3 = strlen(a1); v4 = malloc(v3 + 1); if ( !v4 ) return 0LL; if ( v3 ) { *v4 = toupper(*a1); for ( i = 1LL; i < v3; ++i ) v4[i] = tolower(a1[...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV RDI,RAX CALL 0x001010f0 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JNZ 0x0010122...
int * func0(char *param_1) { int iVar1; size_t sVar2; int *puVar3; ulong local_20; sVar2 = strlen(param_1); puVar3 = (int *)malloc(sVar2 + 1); if (puVar3 == (int *)0x0) { puVar3 = (int *)0x0; } else if (sVar2 != 0) { iVar1 = toupper((int)*param_1); *puVar3 = (char)iVar1; for (local...
5,997
func0
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <assert.h>
char* func0(const char* str1) { size_t len = strlen(str1); char* result = malloc(len + 1); if (!result) return NULL; if (len > 0) { result[0] = toupper(str1[0]); for (size_t i = 1; i < len; i++) { result[i] = tolower(str1[i]); } result[len - 1] = toup...
int main() { assert(strcmp(func0("python"), "PythoN") == 0); assert(strcmp(func0("bigdata"), "BigdatA") == 0); assert(strcmp(func0("Hadoop"), "HadooP") == 0); return 0; }
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx mov %rcx,%r12 lea -0x1(%rcx),%r13 mov %rcx,%rdi callq 10a0 <malloc@plt> mov %rax,%rbx test %rax,%rax je 1235 <func0+0x8c> ...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi call _strlen mov rbp, rax lea rdi, [rax+1] call _malloc mov rbx, rax test rax, rax jz short loc_1267 test rbp, rbp jz short loc_1267 call ___ctype_toupper_loc mov r13, [rax] movsx ra...
_BYTE * func0(char *a1) { unsigned long long v1; // rbp _BYTE *v2; // rbx long long *v3; // rax long long v4; // r13 long long v5; // rcx long long i; // rax v1 = strlen(); v2 = (_BYTE *)malloc(v1 + 1); if ( v2 && v1 ) { v3 = (long long *)__ctype_toupper_loc(); v4 = *v3; *v2 = *(_DWORD ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI CALL 0x001010b0 MOV RBP,RAX LEA RDI,[RAX + 0x1] CALL 0x001010e0 MOV RBX,RAX TEST RAX,RAX JZ 0x00101267 TEST RBP,RBP JZ 0x00101267 CALL 0x001010a0 MOV R13,qword ptr [RAX] MOVSX RAX,byte ptr [R12] MOV EAX,dword ptr [R13 + RAX*0x4] MOV byte ptr [RB...
int1 * func0(char *param_1) { __int32_t *p_Var1; __int32_t *p_Var2; size_t sVar3; int1 *puVar4; __int32_t **pp_Var5; size_t sVar6; sVar3 = strlen(param_1); puVar4 = (int1 *)malloc(sVar3 + 1); if ((puVar4 != (int1 *)0x0) && (sVar3 != 0)) { pp_Var5 = __ctype_toupper_loc(); p_Var1 = *pp_Var5;...
5,998
func0
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <assert.h>
char* func0(const char* str1) { size_t len = strlen(str1); char* result = malloc(len + 1); if (!result) return NULL; if (len > 0) { result[0] = toupper(str1[0]); for (size_t i = 1; i < len; i++) { result[i] = tolower(str1[i]); } result[len - 1] = toup...
int main() { assert(strcmp(func0("python"), "PythoN") == 0); assert(strcmp(func0("bigdata"), "BigdatA") == 0); assert(strcmp(func0("Hadoop"), "HadooP") == 0); return 0; }
O2
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx sub $0x8,%rsp callq 10a0 <strlen@plt> lea 0x1(%rax),%rdi mov %rax,%rbx callq 10c0 <malloc@plt> mov %rax,%r12 test %rax,%rax je 133b <func0+0x8b> test %rbx,%rbx je 133b <func0+0x8b> callq 1090 <__ctype_toupper_loc@...
func0: endbr64 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 8 call _strlen lea rdi, [rax+1] mov rbx, rax call _malloc mov r12, rax test rax, rax jz short loc_134B test rbx, rbx jz short loc_134B call ___ctype_toupper_loc mov r13, [rax] movsx ra...
_BYTE * func0(char *a1) { long long v1; // rbx _BYTE *v2; // r12 long long *v3; // rax long long v4; // r13 long long v5; // rcx long long i; // rax v1 = strlen(); v2 = (_BYTE *)malloc(v1 + 1); if ( v2 && v1 ) { v3 = (long long *)__ctype_toupper_loc(); v4 = *v3; *v2 = *(_DWORD *)(*v3 + ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 CALL 0x001010b0 LEA RDI,[RAX + 0x1] MOV RBX,RAX CALL 0x001010e0 MOV R12,RAX TEST RAX,RAX JZ 0x0010134b TEST RBX,RBX JZ 0x0010134b CALL 0x001010a0 MOV R13,qword ptr [RAX] MOVSX RAX,byte ptr [RBP] MOV EAX,dword ptr [R13 + RAX*0x4] MOV byte ptr [R1...
int1 * func0(char *param_1) { __int32_t *p_Var1; __int32_t *p_Var2; size_t sVar3; int1 *puVar4; __int32_t **pp_Var5; size_t sVar6; sVar3 = strlen(param_1); puVar4 = (int1 *)malloc(sVar3 + 1); if ((puVar4 != (int1 *)0x0) && (sVar3 != 0)) { pp_Var5 = __ctype_toupper_loc(); p_Var1 = *pp_Var5;...
5,999
func0
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <assert.h>
char* func0(const char* str1) { size_t len = strlen(str1); char* result = malloc(len + 1); if (!result) return NULL; if (len > 0) { result[0] = toupper(str1[0]); for (size_t i = 1; i < len; i++) { result[i] = tolower(str1[i]); } result[len - 1] = toup...
int main() { assert(strcmp(func0("python"), "PythoN") == 0); assert(strcmp(func0("bigdata"), "BigdatA") == 0); assert(strcmp(func0("Hadoop"), "HadooP") == 0); return 0; }
O3
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx sub $0x8,%rsp callq 10a0 <strlen@plt> lea 0x1(%rax),%rdi mov %rax,%rbx callq 10c0 <malloc@plt> mov %rax,%r12 test %rax,%rax je 133b <func0+0x8b> test %rbx,%rbx je 133b <func0+0x8b> callq 1090 <__ctype_toupper_loc@...
func0: endbr64 push r13 push r12 mov r12, rdi push rbp push rbx sub rsp, 8 call _strlen lea rdi, [rax+1]; size mov rbx, rax call _malloc mov rbp, rax test rbx, rbx jz short loc_134A test rax, rax jz short loc_134A call ___ctype_toupper_loc mov r13, [rax] movs...
_BYTE * func0(const char *a1) { size_t v1; // rbx _BYTE *v2; // rax _BYTE *v3; // rbp const __int32_t **v4; // rax const __int32_t *v5; // r13 const __int32_t *v6; // rcx long long i; // rax v1 = strlen(a1); v2 = malloc(v1 + 1); v3 = v2; if ( v1 && v2 ) { v4 = __ctype_toupper_loc(); v5 ...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x8 CALL 0x001010b0 LEA RDI,[RAX + 0x1] MOV RBX,RAX CALL 0x001010e0 MOV RBP,RAX TEST RBX,RBX JZ 0x0010134a TEST RAX,RAX JZ 0x0010134a CALL 0x001010a0 MOV R13,qword ptr [RAX] MOVSX RAX,byte ptr [R12] MOV EAX,dword ptr [R13 + RAX*0x4] MOV byte ptr [RB...
int * func0(char *param_1) { __int32_t *p_Var1; __int32_t *p_Var2; size_t sVar3; int *puVar4; __int32_t **pp_Var5; size_t sVar6; sVar3 = strlen(param_1); puVar4 = (int *)malloc(sVar3 + 1); if ((sVar3 != 0) && (puVar4 != (int *)0x0)) { pp_Var5 = __ctype_toupper_loc(); p_Var1 = *pp_Var5; ...
6,000
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count++; } } } return count; }
int main() { int arr1[] = {1, 5, 7, -1, 5}; int arr2[] = {1, 5, 7, -1}; int arr3[] = {1, 1, 1, 1}; assert(func0(arr1, 5, 6) == 3); assert(func0(arr2, 4, 6) == 2); assert(func0(arr3, 4, 2) == 6); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11dd <func0+0x74> mov -0x8(%rbp),%eax add $0x1,%eax mov %eax,-0x4(%rbp) jmp 11d1 <func0+0x68> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,...
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_C], 0 mov [rbp+var_8], 0 jmp short loc_11DD loc_118B: mov eax, [rbp+var_8] add eax, 1 mov [rbp+var_4], eax jmp short loc_11D1 loc_1196: mov eax, [rbp+var...
long long func0(long long a1, int a2, int a3) { unsigned int v4; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] int j; // [rsp+1Ch] [rbp-4h] v4 = 0; for ( i = 0; i < a2; ++i ) { for ( j = i + 1; j < a2; ++j ) { if ( a3 == *(_DWORD *)(4LL * i + a1) + *(_DWORD *)(4LL * j + a1) ) ++...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011dd LAB_0010118b: MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x001011d1 LAB_0010...
int func0(long param_1,int param_2,int param_3) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) { while (local_c = local_c + 1, local_c < param_2) { if (param_3 == *(int *)(param_1 + (long)local_c * 4...
6,001
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count++; } } } return count; }
int main() { int arr1[] = {1, 5, 7, -1, 5}; int arr2[] = {1, 5, 7, -1}; int arr3[] = {1, 1, 1, 1}; assert(func0(arr1, 5, 6) == 3); assert(func0(arr2, 4, 6) == 2); assert(func0(arr3, 4, 2) == 6); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 11b4 <func0+0x4b> lea -0x1(%rsi),%r11d add $0x1,%r11 mov $0x1,%r10d mov $0x0,%ecx cmp %r11,%r10 je 11b9 <func0+0x50> mov -0x4(%rdi,%r10,4),%r9d mov %r10,%rax mov %r9d,%r8d add (%rdi,%rax,4),%r8d cmp %edx,%r8d sete %r8b movzbl %r8b,%r8d add %r...
func0: endbr64 test esi, esi jle short loc_11AF mov r11d, esi mov r10d, 1 mov ecx, 0 loc_117F: cmp r10, r11 jz short loc_11B4 mov r9d, [rdi+r10*4-4] mov rax, r10 loc_118C: mov r8d, r9d add r8d, [rdi+rax*4] cmp r8d, edx setz r8b movzx r8d, r8b add ecx, r8d add ...
long long func0(long long a1, int a2, int a3) { long long v3; // r10 unsigned int v4; // ecx long long v5; // rax if ( a2 <= 0 ) { return 0; } else { v3 = 1LL; v4 = 0; while ( v3 != a2 ) { v5 = v3; do v4 += *(_DWORD *)(a1 + 4 * v5++) + *(_DWORD *)(a1 + 4 * v3 - ...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011af MOV R11D,ESI MOV R10D,0x1 MOV ECX,0x0 LAB_0010117f: CMP R10,R11 JZ 0x001011b4 MOV R9D,dword ptr [RDI + R10*0x4 + -0x4] MOV RAX,R10 LAB_0010118c: MOV R8D,R9D ADD R8D,dword ptr [RDI + RAX*0x4] CMP R8D,EDX SETZ R8B MOVZX R8D,R8B ADD ECX,R8D ADD RAX,0x1 CMP ESI,EAX JG 0x0010118c A...
int func0(long param_1,uint param_2,int param_3) { ulong uVar1; int iVar2; ulong uVar3; if ((int)param_2 < 1) { iVar2 = 0; } else { iVar2 = 0; for (uVar3 = 1; uVar3 != param_2; uVar3 = uVar3 + 1) { uVar1 = uVar3; do { iVar2 = iVar2 + (uint)(*(int *)(param_1 + -4 + uVar3 *...
6,002
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count++; } } } return count; }
int main() { int arr1[] = {1, 5, 7, -1, 5}; int arr2[] = {1, 5, 7, -1}; int arr3[] = {1, 1, 1, 1}; assert(func0(arr1, 5, 6) == 3); assert(func0(arr2, 4, 6) == 2); assert(func0(arr3, 4, 2) == 6); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1386 <func0+0x56> lea -0x1(%rsi),%r11d mov $0x1,%r10d xor %r8d,%r8d add $0x1,%r11 cmp %r11,%r10 je 1382 <func0+0x52> xchg %ax,%ax mov -0x4(%rdi,%r10,4),%r9d mov %r10,%rax nopl 0x0(%rax,%rax,1) mov (%rdi,%rax,4),%ecx add %r9d,%ecx cmp %edx,%ecx...
func0: endbr64 test esi, esi jle short loc_12E6 movsxd r11, esi mov r10d, 1 xor r8d, r8d cmp r10, r11 jz short loc_12E2 nop dword ptr [rax+00000000h] loc_12B0: mov r9d, [rdi+r10*4-4] mov rax, r10 nop dword ptr [rax+rax+00000000h] loc_12C0: mov ecx, [rdi+rax*4] add ecx, r...
long long func0(long long a1, int a2, int a3) { long long v3; // r10 unsigned int i; // r8d long long v5; // rax bool v6; // cl if ( a2 <= 0 ) return 0LL; v3 = 1LL; for ( i = 0; v3 != a2; ++v3 ) { v5 = v3; do { v6 = *(_DWORD *)(a1 + 4 * v3 - 4) + *(_DWORD *)(a1 + 4 * v5++) == a3;...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012e6 MOVSXD R11,ESI MOV R10D,0x1 XOR R8D,R8D CMP R10,R11 JZ 0x001012e2 NOP dword ptr [RAX] LAB_001012b0: MOV R9D,dword ptr [RDI + R10*0x4 + -0x4] MOV RAX,R10 NOP dword ptr [RAX + RAX*0x1] LAB_001012c0: MOV ECX,dword ptr [RDI + RAX*0x4] ADD ECX,R9D CMP ECX,EDX SETZ CL ADD RAX,0x1 MO...
int func0(long param_1,int param_2,int param_3) { long lVar1; long lVar2; int iVar3; long lVar4; if (0 < param_2) { lVar4 = 1; iVar3 = 0; if ((long)param_2 != 1) { do { lVar2 = lVar4; do { lVar1 = lVar2 * 4; lVar2 = lVar2 + 1; iVar3 = iVar3 +...
6,003
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count++; } } } return count; }
int main() { int arr1[] = {1, 5, 7, -1, 5}; int arr2[] = {1, 5, 7, -1}; int arr3[] = {1, 1, 1, 1}; assert(func0(arr1, 5, 6) == 3); assert(func0(arr2, 4, 6) == 2); assert(func0(arr3, 4, 2) == 6); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 1481 <func0+0x171> cmp $0x1,%esi je 1481 <func0+0x171> push %r14 xor %r9d,%r9d mov $0x1,%r8d push %r12 lea -0x1(%rsi),%r12d push %rbp mov $0x1,%ebp push %rbx mov %rdi,%rbx mov %edx,%edi movd %edi,%xmm5 lea 0x4(%rbx),%rdx pshufd $0x0,%xmm5,%xmm...
func0: endbr64 test esi, esi jle loc_1280 push r14 push r12 push rbp push rbx mov rbx, rdi mov edi, esi xor esi, esi cmp edi, 1 jz loc_1273 movd xmm5, edx mov r11d, edx lea r10, [rbx+4] xor esi, esi mov ecx, 1 lea r12d, [rdi-1] mov ebp, 1 pshufd xmm3, ...
long long func0(long long a1, int a2, unsigned int a3) { unsigned int v5; // esi const __m128i *v6; // r10 int v7; // ecx __m128i v8; // xmm3 unsigned int v9; // r9d unsigned int v10; // r8d __m128i v11; // xmm1 const __m128i *v12; // rax __m128i v13; // xmm2 __m128i v14; // xmm0 __m128i v15; // ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101280 PUSH R14 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV EDI,ESI XOR ESI,ESI CMP EDI,0x1 JZ 0x00101273 MOVD XMM5,EDX MOV R11D,EDX LEA R10,[RBX + 0x4] XOR ESI,ESI MOV ECX,0x1 LEA R12D,[RDI + -0x1] MOV EBP,0x1 PSHUFD XMM3,XMM5,0x0 NOP word ptr [RAX + RAX*0x1] LAB_00101188: MOV R8D,ED...
int func0(long param_1,int param_2,int param_3) { long lVar1; int iVar2; uint uVar3; int iVar4; int *piVar5; int *piVar6; int *piVar7; int *piVar8; int iVar9; int iVar10; int *piVar11; int iVar12; int iVar13; int iVar14; int iVar15; if (param_2 < 1) { return 0; } iVar10 = 0; ...
6,004
func0
#include <assert.h> #include <string.h> typedef struct { int length; int *list; } MinResult;
MinResult func0(int **list1, int size) { int min_length = 1000000; // large initial value int *min_list = NULL; for (int i = 0; i < size; i++) { int list_length = 0; while(list1[i][list_length] != -1) { // using -1 as termination signal for each sublist list_length++;...
int main() { int list1[5][4] = {{0, -1}, {1, 3, -1}, {5, 7, -1}, {9, 11, -1}, {13, 15, 17, -1}}; int *plist1[5] = {list1[0], list1[1], list1[2], list1[3], list1[4]}; MinResult res1 = func0(plist1, 5); assert(res1.length == 1 && res1.list[0] == 0); int list2[3][5] = {{1, -1}, {5, 7, -1}, {10, ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx mov %rdi,-0x40(%rbp) mov %esi,-0x44(%rbp) movl $0xf4240,-0x2c(%rbp) movq $0x0,-0x20(%rbp) movl $0x0,-0x28(%rbp) jmp 11f6 <func0+0x8d> movl $0x0,-0x24(%rbp) jmp 119e <func0+0x35> addl $0x1,-0x24(%rbp) mov -0x28(%rbp),%eax cltq lea 0x0(,%...
func0: endbr64 push rbp mov rbp, rsp push rbx mov [rbp+var_48], rdi mov [rbp+var_4C], esi mov [rbp+var_34], 0F4240h mov [rbp+var_28], 0 mov [rbp+var_30], 0 jmp short loc_11F6 loc_1191: mov [rbp+var_2C], 0 jmp short loc_119E loc_119A: add [rbp+var_2C], 1 loc_119E: mov ea...
long long func0(long long a1, int a2) { int v3; // [rsp+18h] [rbp-34h] int i; // [rsp+1Ch] [rbp-30h] int j; // [rsp+20h] [rbp-2Ch] v3 = 1000000; for ( i = 0; i < a2; ++i ) { for ( j = 0; *(_DWORD *)(4LL * j + *(_QWORD *)(8LL * i + a1)) != -1; ++j ) ; if ( j < v3 ) v3 = j; } return ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI MOV dword ptr [RBP + -0x34],0xf4240 MOV qword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x30],0x0 JMP 0x001011f6 LAB_00101191: MOV dword ptr [RBP + -0x2c],0x0 JMP 0x0010119e LAB_0010119a: ADD dword ptr [RBP + ...
int [16] func0(long param_1,int param_2) { int auVar1 [16]; int4 local_3c; int4 local_38; int4 local_34; int8 local_30; local_3c = 1000000; local_30 = 0; for (local_38 = 0; local_38 < param_2; local_38 = local_38 + 1) { local_34 = 0; while (*(int *)(*(long *)(param_1 + (long)local_38 * 8) +...
6,005
func0
#include <assert.h> #include <string.h> typedef struct { int length; int *list; } MinResult;
MinResult func0(int **list1, int size) { int min_length = 1000000; // large initial value int *min_list = NULL; for (int i = 0; i < size; i++) { int list_length = 0; while(list1[i][list_length] != -1) { // using -1 as termination signal for each sublist list_length++;...
int main() { int list1[5][4] = {{0, -1}, {1, 3, -1}, {5, 7, -1}, {9, 11, -1}, {13, 15, 17, -1}}; int *plist1[5] = {list1[0], list1[1], list1[2], list1[3], list1[4]}; MinResult res1 = func0(plist1, 5); assert(res1.length == 1 && res1.list[0] == 0); int list2[3][5] = {{1, -1}, {5, 7, -1}, {10, ...
O1
c
func0: endbr64 test %esi,%esi jle 11c0 <func0+0x57> mov %rdi,%r8 lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%rdi mov $0x0,%r9d mov $0xf4240,%esi mov $0x0,%r10d jmp 1198 <func0+0x2f> add $0x8,%r8 cmp %rdi,%r8 je 11cb <func0+0x62> mov (%r8),%rdx mov $0x1,%eax mov %r10d,%ecx cmpl...
func0: endbr64 test esi, esi jle short loc_11C0 mov r8, rdi lea eax, [rsi-1] lea rdi, [rdi+rax*8+8] mov r9d, 0 mov eax, 0F4240h mov r10d, 0 jmp short loc_1198 loc_118F: add r8, 8 cmp r8, rdi jz short loc_11CB loc_1198: mov rcx, [r8] mov edx, 1 mov esi, r10d cm...
long long func0(_QWORD *a1, int a2) { _QWORD *v2; // r8 long long v3; // rdi long long result; // rax long long v5; // rdx int v6; // esi if ( a2 <= 0 ) return 1000000LL; v2 = a1; v3 = (long long)&a1[(unsigned int)(a2 - 1) + 1]; result = 1000000LL; do { v5 = 1LL; v6 = 0; if ( *(_...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011c0 MOV R8,RDI LEA EAX,[RSI + -0x1] LEA RDI,[RDI + RAX*0x8 + 0x8] MOV R9D,0x0 MOV EAX,0xf4240 MOV R10D,0x0 JMP 0x00101198 LAB_0010118f: ADD R8,0x8 CMP R8,RDI JZ 0x001011cb LAB_00101198: MOV RCX,qword ptr [R8] MOV EDX,0x1 MOV ESI,R10D CMP dword ptr [RCX],-0x1 JZ 0x001011b5 LAB_0010...
int1 [16] func0(int8 *param_1,int param_2) { int8 *puVar1; int iVar2; int *piVar3; long lVar4; ulong uVar5; uint uVar6; int *piVar7; int1 auVar8 [16]; if (param_2 < 1) { piVar7 = (int *)0x0; uVar5 = 1000000; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; piVar7 = (int *...
6,006
func0
#include <assert.h> #include <string.h> typedef struct { int length; int *list; } MinResult;
MinResult func0(int **list1, int size) { int min_length = 1000000; // large initial value int *min_list = NULL; for (int i = 0; i < size; i++) { int list_length = 0; while(list1[i][list_length] != -1) { // using -1 as termination signal for each sublist list_length++;...
int main() { int list1[5][4] = {{0, -1}, {1, 3, -1}, {5, 7, -1}, {9, 11, -1}, {13, 15, 17, -1}}; int *plist1[5] = {list1[0], list1[1], list1[2], list1[3], list1[4]}; MinResult res1 = func0(plist1, 5); assert(res1.length == 1 && res1.list[0] == 0); int list2[3][5] = {{1, -1}, {5, 7, -1}, {10, ...
O2
c
func0: endbr64 test %esi,%esi jle 1475 <func0+0x55> lea -0x1(%rsi),%eax xor %r9d,%r9d mov $0xf4240,%esi lea 0x8(%rdi,%rax,8),%r8 nopl 0x0(%rax,%rax,1) mov (%rdi),%rdx xor %ecx,%ecx mov $0x1,%eax cmpl $0xffffffff,(%rdx) je 145d <func0+0x3d> mov %eax,%ecx add $0x1,%rax cmpl $0xff...
func0: endbr64 test esi, esi jle short loc_1483 lea eax, [rsi-1] xor r9d, r9d lea r8, [rdi+rax*8+8] mov eax, 0F4240h nop dword ptr [rax+rax+00000000h] loc_1450: mov rcx, [rdi] xor esi, esi mov edx, 1 cmp dword ptr [rcx], 0FFFFFFFFh jz short loc_146D nop loc_1460: mov ...
long long func0(_QWORD *a1, int a2) { long long v2; // r8 long long result; // rax int v4; // esi long long v5; // rdx if ( a2 <= 0 ) return 1000000LL; v2 = (long long)&a1[(unsigned int)(a2 - 1) + 1]; result = 1000000LL; do { v4 = 0; v5 = 1LL; if ( *(_DWORD *)*a1 != -1 ) { ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101483 LEA EAX,[RSI + -0x1] XOR R9D,R9D LEA R8,[RDI + RAX*0x8 + 0x8] MOV EAX,0xf4240 NOP dword ptr [RAX + RAX*0x1] LAB_00101450: MOV RCX,qword ptr [RDI] XOR ESI,ESI MOV EDX,0x1 CMP dword ptr [RCX],-0x1 JZ 0x0010146d NOP LAB_00101460: MOV ESI,EDX ADD RDX,0x1 CMP dword ptr [RCX + RDX*0...
int1 [16] func0(int8 *param_1,int param_2) { int8 *puVar1; int iVar2; int *piVar3; long lVar4; ulong uVar5; uint uVar6; int *piVar7; int1 auVar8 [16]; if (param_2 < 1) { return ZEXT816(1000000); } piVar7 = (int *)0x0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; uVar5 = 1000000; do ...
6,007
func0
#include <assert.h> #include <string.h> typedef struct { int length; int *list; } MinResult;
MinResult func0(int **list1, int size) { int min_length = 1000000; // large initial value int *min_list = NULL; for (int i = 0; i < size; i++) { int list_length = 0; while(list1[i][list_length] != -1) { // using -1 as termination signal for each sublist list_length++;...
int main() { int list1[5][4] = {{0, -1}, {1, 3, -1}, {5, 7, -1}, {9, 11, -1}, {13, 15, 17, -1}}; int *plist1[5] = {list1[0], list1[1], list1[2], list1[3], list1[4]}; MinResult res1 = func0(plist1, 5); assert(res1.length == 1 && res1.list[0] == 0); int list2[3][5] = {{1, -1}, {5, 7, -1}, {10, ...
O3
c
func0: endbr64 test %esi,%esi jle 1475 <func0+0x55> lea -0x1(%rsi),%eax xor %r9d,%r9d mov $0xf4240,%esi lea 0x8(%rdi,%rax,8),%r8 nopl 0x0(%rax,%rax,1) mov (%rdi),%rdx xor %ecx,%ecx mov $0x1,%eax cmpl $0xffffffff,(%rdx) je 145d <func0+0x3d> mov %eax,%ecx add $0x1,%rax cmpl $0xff...
func0: endbr64 test esi, esi jle short loc_1474 movsxd rsi, esi xor r9d, r9d mov eax, 0F4240h lea r8, [rdi+rsi*8] nop word ptr [rax+rax+00000000h] loc_1440: mov rsi, [rdi] xor ecx, ecx mov edx, 1 cmp dword ptr [rsi], 0FFFFFFFFh jz short loc_145E nop loc_1450: mov rcx, rd...
long long func0(_QWORD *a1, int a2) { long long result; // rax _QWORD *v3; // r8 int v4; // ecx long long v5; // rdx if ( a2 <= 0 ) return 1000000LL; result = 1000000LL; v3 = &a1[a2]; do { v4 = 0; v5 = 1LL; if ( *(_DWORD *)*a1 != -1 ) { do v4 = v5++; while ( *...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101474 MOVSXD RSI,ESI XOR R9D,R9D MOV EAX,0xf4240 LEA R8,[RDI + RSI*0x8] NOP word ptr [RAX + RAX*0x1] LAB_00101440: MOV RSI,qword ptr [RDI] XOR ECX,ECX MOV EDX,0x1 CMP dword ptr [RSI],-0x1 JZ 0x0010145e NOP LAB_00101450: MOV RCX,RDX ADD RDX,0x1 CMP dword ptr [RSI + RDX*0x4 + -0x4],-0...
int [16] func0(int8 *param_1,int param_2) { int8 *puVar1; int iVar2; int *piVar3; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; int *piVar8; int auVar9 [16]; if (param_2 < 1) { return ZEXT816(1000000); } piVar8 = (int *)0x0; uVar7 = 1000000; puVar1 = param_1 + param_2; do { ...
6,008
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 2; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 31); assert(func0(2) == 5); assert(func0(4) == 17); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %edi,-0x34(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x34(%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, 30h mov [rbp+var_24], edi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax mov eax, [rbp+var_24] 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 _DWORD v4[3]; // [rsp+8h] [rbp-30h] BYREF int v5; // [rsp+14h] [rbp-24h] int i; // [rsp+1Ch] [rbp-1Ch] long long v7; // [rsp+20h] [rbp-18h] _DWORD *v8; // [rsp+28h] [rbp-10h] unsigned long long v9; // [rsp+30h] [rbp-8h] v5 = a1...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x24],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 + -0x24] 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_38 [12]; int local_2c; int local_24; long local_20; int *local_18; long local_10; local_2c = param_1; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = (long)(param_1 + 1) + -1; uVar2 = (((...
6,009
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 2; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 31); assert(func0(2) == 5); assert(func0(4) == 17); 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 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_11A4: cmp rsp, rdx jz...
long long func0(int a1) { signed long long v1; // rax void *v2; // rsp unsigned long long v3; // rax _BYTE *v4; // rax _BYTE v7[3]; // [rsp+8h] [rbp-10h] BYREF char v8; // [rsp+Bh] [rbp-Dh] BYREF unsigned long long v9; // [rsp+10h] [rbp-8h] v9 = __readfsqword(0x28u); while ( v7 != &v7[-((4LL * (a1 +...
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 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_001011a4: CMP RSP,RDX JZ 0x001011bb SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0x0...
int4 func0(int param_1) { long lVar1; ulong uVar2; int *piVar3; int1 *puVar4; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (long)(param_1 + 1) * 4 + 0xf; for (puVar4 = auStack_18; puVar4 != auStack_18 + -(uVar2 & 0xfffffffffffff000); ...
6,010
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 2; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 31); assert(func0(2) == 5); assert(func0(4) == 17); 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 sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rdi+1] mov rcx, rsp cdqe lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rcx, rax and rdx, 0FFFFFFFFFFFFFFF0h cmp rsp, rcx jz shor...
long long func0(int a1) { long long v1; // rdx long long *v2; // rcx __int16 v3; // dx signed long long v4; // rdx void *v5; // rsp long long *v6; // rax int v7; // ecx int v8; // edx long long v10; // [rsp+0h] [rbp-1018h] long long v11; // [rsp+8h] [rbp-1010h] BYREF long long v12; // [rsp+10h] [...
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 LEA EAX,[RDI + 0x1] MOV RCX,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x00101265 LAB_00101250: SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0x0...
int4 func0(int param_1) { long lVar1; int1 *puVar2; int *piVar3; int iVar4; int iVar5; ulong uVar6; int1 *puVar7; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; int1 *puVar8; puVar7 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar6 = (long)(param_1 + 1) * 4 + 0xf; ...
6,011
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 2; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 31); assert(func0(2) == 5); assert(func0(4) == 17); return 0; }
O3
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 movsxd rcx, edi mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rcx+1] mov rsi, rsp cdqe lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rsi, rax and rdx, 0FFFFFFFFFFFFFFF0h cmp rsp,...
long long func0(int a1) { long long v1; // rcx long long v2; // rdx _QWORD *v3; // rsi __int16 v4; // dx signed long long v5; // rdx void *v6; // rsp long long v7; // rsi int v8; // r8d int v9; // edi long long v10; // rax _QWORD v13[511]; // [rsp+8h] [rbp-1010h] BYREF _QWORD v14[2]; // [rsp+10...
func0: ENDBR64 PUSH RBP MOVSXD RCX,EDI MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA EAX,[RCX + 0x1] MOV RSI,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RSI,RAX AND RDX,-0x10 CMP RSP,RSI JZ 0x001011b8 LAB_001011a3: SUB RSP,0x1000 OR qword ptr [R...
int4 func0(int param_1) { long lVar1; int *puVar2; int iVar3; ulong uVar4; int *puVar5; long lVar7; int iVar8; int iVar9; long in_FS_OFFSET; int auStack_18 [8]; long local_10; int *puVar6; puVar5 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = (long)(param_1 + 1) * 4 +...
6,012
func0
#include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] < 0) n1++; } double result = ((double)n1)/n; // Round to two decimal places return round(result * 100) / 100; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.31); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.31); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.44); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 11ce <func0+0x45> mov -0xc(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax test %eax,%eax jns 1...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short loc_11CE loc_11AC: mov eax, [rbp+var_C] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] test ea...
__int128 __usercall func0@<xmm0>(long long a1@<rdi>, int a2@<esi>) { double v2; // rax __int128 v3; // xmm1 int v5; // [rsp+10h] [rbp-10h] int i; // [rsp+14h] [rbp-Ch] v5 = 0; for ( i = 0; i < a2; ++i ) { if ( *(int *)(4LL * i + a1) < 0 ) ++v5; } v2 = round((double)v5 / (double)a2 * 100.0);...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP 0x001011ce LAB_001011ac: MOV EAX,dword ptr [RBP + -0xc] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr...
double func0(long param_1,int param_2) { double dVar1; int4 local_18; int4 local_14; local_18 = 0; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { if (*(int *)(param_1 + (long)local_14 * 4) < 0) { local_18 = local_18 + 1; } } dVar1 = round(((double)local_18 / (double)pa...
6,013
func0
#include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] < 0) n1++; } double result = ((double)n1)/n; // Round to two decimal places return round(result * 100) / 100; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.31); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.31); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.44); ...
O1
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 11e5 <func0+0x5c> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rcx mov $0x0,%edx cmpl $0x80000000,(%rax) sbb $0xffffffff,%edx add $0x4,%rax cmp %rcx,%rax jne 11a5 <func0+0x1c> pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 pxor %xmm1...
func0: endbr64 sub rsp, 8 test esi, esi jle short loc_11E5 mov rax, rdi lea edx, [rsi-1] lea rcx, [rdi+rdx*4+4] mov edx, 0 loc_11A5: cmp dword ptr [rax], 80000000h sbb edx, 0FFFFFFFFh add rax, 4 cmp rax, rcx jnz short loc_11A5 loc_11B7: pxor xmm0, xmm0 cvtsi2sd xmm0, ed...
double func0(_DWORD *a1, int a2) { _DWORD *v2; // rax int v3; // edx if ( a2 <= 0 ) { v3 = 0; } else { v2 = a1; v3 = 0; do v3 -= (*v2++ < 0x80000000) - 1; while ( v2 != &a1[a2 - 1 + 1] ); } return round((double)v3 / (double)a2 * 100.0) / 100.0; }
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x001011e5 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RCX,[RDI + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_001011a5: CMP dword ptr [RAX],0x80000000 SBB EDX,-0x1 ADD RAX,0x4 CMP RAX,RCX JNZ 0x001011a5 LAB_001011b7: PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,ESI DIVSD XMM0,XM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; double dVar3; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = (iVar2 ...
6,014
func0
#include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] < 0) n1++; } double result = ((double)n1)/n; // Round to two decimal places return round(result * 100) / 100; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.31); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.31); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.44); ...
O2
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 13f0 <func0+0x60> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rdx xor %eax,%eax nopw %cs:0x0(%rax,%rax,1) cmpl $0x80000000,(%rdi) sbb $0xffffffff,%eax add $0x4,%rdi cmp %rdi,%rdx jne 13b0 <func0+0x20> pxor %xmm0,%xmm0 cvtsi2sd %eax,%xmm0 p...
func0: endbr64 sub rsp, 8 test esi, esi jle short loc_13F0 lea eax, [rsi-1] lea rdx, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00000000h] loc_13B0: cmp dword ptr [rdi], 80000000h sbb eax, 0FFFFFFFFh add rdi, 4 cmp rdx, rdi jnz short loc_13B0 pxor xmm0, xmm0 cvtsi...
double func0(_DWORD *a1, int a2) { long long v2; // rdx int v3; // eax double v4; // xmm0_8 if ( a2 <= 0 ) { v4 = 0.0; } else { v2 = (long long)&a1[a2 - 1 + 1]; v3 = 0; do v3 -= (*a1++ < 0x80000000) - 1; while ( (_DWORD *)v2 != a1 ); v4 = (double)v3; } return round(v4...
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x001013f0 LEA EAX,[RSI + -0x1] LEA RDX,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr CS:[RAX + RAX*0x1] LAB_001013b0: CMP dword ptr [RDI],0x80000000 SBB EAX,-0x1 ADD RDI,0x4 CMP RDX,RDI JNZ 0x001013b0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX LAB_001013ca: PXOR XMM1,XMM1 CVTSI2SD XM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(uint *param_1,int param_2) { uint *puVar1; int iVar2; double dVar3; if (param_2 < 1) { dVar3 = 0.0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = (iVar...
6,015
func0
#include <assert.h> #include <math.h>
double func0(int nums[], int n) { int n1 = 0; for(int i = 0; i < n; i++) { if(nums[i] < 0) n1++; } double result = ((double)n1)/n; // Round to two decimal places return round(result * 100) / 100; }
int main() { int arr1[] = {0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8}; assert(func0(arr1, 13) == 0.31); int arr2[] = {2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8}; assert(func0(arr2, 13) == 0.31); int arr3[] = {2, 4, -6, -9, 11, -12, 14, -5, 17}; assert(func0(arr3, 9) == 0.44); ...
O3
c
func0: endbr64 sub $0x8,%rsp test %esi,%esi jle 1410 <func0+0xf0> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 1416 <func0+0xf6> mov %esi,%edx mov %rdi,%rax pxor %xmm0,%xmm0 shr $0x2,%edx shl $0x4,%rdx add %rdi,%rdx movdqu (%rax),%xmm1 add $0x10,%rax psrad $0x1f,%xmm1 psubd %xmm1,%xmm0 c...
func0: endbr64 sub rsp, 8 test esi, esi jle loc_1410 lea eax, [rsi-1] mov rcx, rdi cmp eax, 2 jbe loc_1416 mov edx, esi pxor xmm0, xmm0 mov rax, rdi shr edx, 2 movdqa xmm2, xmm0 shl rdx, 4 add rdx, rdi nop word ptr [rax+rax+00000000h] loc_1360: movdqu xmm3, xmmwor...
double func0(const __m128i *a1, int a2) { __m128i v2; // xmm0 const __m128i *v3; // rax __m128i v4; // xmm3 int v5; // edx __m128i v6; // xmm0 int v7; // eax long long v8; // r8 double v9; // xmm0_8 if ( a2 <= 0 ) { v9 = 0.0; return round(v9 / (double)a2 * 100.0) / 100.0; } if ( (unsig...
func0: ENDBR64 SUB RSP,0x8 TEST ESI,ESI JLE 0x00101410 LEA EAX,[RSI + -0x1] MOV RCX,RDI CMP EAX,0x2 JBE 0x00101416 MOV EDX,ESI PXOR XMM0,XMM0 MOV RAX,RDI SHR EDX,0x2 MOVDQA XMM2,XMM0 SHL RDX,0x4 ADD RDX,RDI NOP word ptr CS:[RAX + RAX*0x1] LAB_00101360: MOVDQU XMM3,xmmword ptr [RAX] MOVDQA XMM1,XMM2 ADD RAX,0x10 PCMPGTD...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(int *param_1,uint param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; uint uVar6; int iVar7; int iVar9; double dVar8; int iVar10; int iVar11; if ((int)param_2 < 1) { d...
6,016
func0
#include <assert.h> #include <limits.h>
int func0(int coins[], int m, int V) { if (V == 0) { return 0; } int res = INT_MAX; for (int i = 0; i < m; i++) { if (coins[i] <= V) { int sub_res = func0(coins, m, V - coins[i]); if (sub_res != INT_MAX && sub_res + 1 < res) { res = sub_re...
int main() { assert(func0((int[]){9, 6, 5, 1}, 4, 11) == 2); assert(func0((int[]){4, 5, 6, 7, 8, 9}, 6, 9) == 1); assert(func0((int[]){1, 2, 3}, 3, 4) == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) cmpl $0x0,-0x20(%rbp) jne 118f <func0+0x26> mov $0x0,%eax jmpq 1215 <func0+0xac> movl $0x7fffffff,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 120a <func0+0xa1> mov -0x8(%rbp)...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx cmp [rbp+var_20], 0 jnz short loc_118F mov eax, 0 jmp locret_1215 loc_118F: mov [rbp+var_C], 7FFFFFFFh mov [rbp+var_8], 0 jmp short loc_120A loc_119F: mo...
long long func0(long long a1, unsigned int a2, int a3) { int v5; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] int v7; // [rsp+1Ch] [rbp-4h] if ( !a3 ) return 0LL; v5 = 0x7FFFFFFF; for ( i = 0; i < (int)a2; ++i ) { if ( a3 >= *(_DWORD *)(4LL * i + a1) ) { v7 = func0(a1, a2, (unsig...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX CMP dword ptr [RBP + -0x20],0x0 JNZ 0x0010118f MOV EAX,0x0 JMP 0x00101215 LAB_0010118f: MOV dword ptr [RBP + -0xc],0x7fffffff MOV dword ptr [RBP + -0x8],0x0 JMP 0x0010120a LAB...
int func0(long param_1,int param_2,int param_3) { int iVar1; int local_14; int local_10; if (param_3 == 0) { local_14 = 0; } else { local_14 = 0x7fffffff; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { if (((*(int *)(param_1 + (long)local_10 * 4) <= param_3) && ...
6,017
func0
#include <assert.h> #include <limits.h>
int func0(int coins[], int m, int V) { if (V == 0) { return 0; } int res = INT_MAX; for (int i = 0; i < m; i++) { if (coins[i] <= V) { int sub_res = func0(coins, m, V - coins[i]); if (sub_res != INT_MAX && sub_res + 1 < res) { res = sub_re...
int main() { assert(func0((int[]){9, 6, 5, 1}, 4, 11) == 2); assert(func0((int[]){4, 5, 6, 7, 8, 9}, 6, 9) == 1); assert(func0((int[]){1, 2, 3}, 3, 4) == 2); return 0; }
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %edx,%r14d test %edx,%edx je 11d2 <func0+0x69> mov %rdi,%r13 mov %esi,%r12d mov %edx,%ebp mov $0x7fffffff,%r14d test %esi,%esi jle 11d2 <func0+0x69> mov %rdi,%rbx lea -0x1(%rsi),%e...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12d, edx test edx, edx jz short loc_11D4 mov r14, rdi mov r13d, esi mov ebp, edx mov r12d, 7FFFFFFFh test esi, esi jle short loc_11D4 mov rbx, rdi lea eax, [rsi-1] lea ...
long long func0(int *a1, int a2, int a3) { int v3; // r12d int *v5; // rbx int v6; // eax int v7; // edx v3 = a3; if ( a3 ) { v3 = 0x7FFFFFFF; if ( a2 > 0 ) { v5 = a1; do { if ( *v5 <= a3 ) { v6 = func0(a1, (unsigned int)a2, (unsigned int)(a3 - *v5...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12D,EDX TEST EDX,EDX JZ 0x001011d4 MOV R14,RDI MOV R13D,ESI MOV EBP,EDX MOV R12D,0x7fffffff TEST ESI,ESI JLE 0x001011d4 MOV RBX,RDI LEA EAX,[RSI + -0x1] LEA R15,[RDI + RAX*0x4 + 0x4] JMP 0x001011aa LAB_001011a1: ADD RBX,0x4 CMP RBX,R1...
int func0(int *param_1,int param_2,int param_3) { int iVar1; int iVar2; int *piVar3; int iVar4; iVar4 = param_3; if ((param_3 != 0) && (iVar4 = 0x7fffffff, 0 < param_2)) { piVar3 = param_1; do { if (*piVar3 <= param_3) { iVar1 = func0(param_1,param_2,param_3 - *piVar3); iVa...
6,018
func0
#include <assert.h> #include <limits.h>
int func0(int coins[], int m, int V) { if (V == 0) { return 0; } int res = INT_MAX; for (int i = 0; i < m; i++) { if (coins[i] <= V) { int sub_res = func0(coins, m, V - coins[i]); if (sub_res != INT_MAX && sub_res + 1 < res) { res = sub_re...
int main() { assert(func0((int[]){9, 6, 5, 1}, 4, 11) == 2); assert(func0((int[]){4, 5, 6, 7, 8, 9}, 6, 9) == 1); assert(func0((int[]){1, 2, 3}, 3, 4) == 2); return 0; }
O2
c
func0: endbr64 test %edx,%edx je 12d0 <func0+0x10> jmp 12e0 <func0.part.0> nopw 0x0(%rax,%rax,1) xor %eax,%eax retq data16 nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
func0_part_0: push r15 push r14 mov r14d, 7FFFFFFFh push r13 push r12 push rbp push rbx sub rsp, 8 test esi, esi jle short loc_12EA lea eax, [rsi-1] mov r15, rdi mov r12d, esi mov ebp, edx mov rbx, rdi lea r13, [rdi+rax*4+4] loc_12DB: mov eax, [rbx] cmp e...
long long func0_part_0(int *a1, int a2, int a3) { int v3; // r14d int *i; // rbx int v6; // eax int v8; // eax int v9; // eax v3 = 0x7FFFFFFF; if ( a2 > 0 ) { for ( i = a1; i != &a1[a2 - 1 + 1]; ++i ) { v6 = *i; if ( *i <= a3 ) { if ( a3 == v6 ) { v9...
func0.part.0: PUSH R15 PUSH R14 MOV R14D,0x7fffffff PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 TEST ESI,ESI JLE 0x001012ea LEA EAX,[RSI + -0x1] MOV R15,RDI MOV R12D,ESI MOV EBP,EDX MOV RBX,RDI LEA R13,[RDI + RAX*0x4 + 0x4] LAB_001012db: MOV EAX,dword ptr [RBX] CMP EAX,EBP JLE 0x00101300 LAB_001012e1: ADD RBX,0x4 C...
int func0_part_0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; int iVar3; iVar3 = 0x7fffffff; if (0 < param_2) { piVar2 = param_1; do { if (*piVar2 <= param_3) { if (param_3 == *piVar2) { iVar1 = 1; } else { iVar1 = func0_part_0(p...
6,019
func0
#include <assert.h> #include <limits.h>
int func0(int coins[], int m, int V) { if (V == 0) { return 0; } int res = INT_MAX; for (int i = 0; i < m; i++) { if (coins[i] <= V) { int sub_res = func0(coins, m, V - coins[i]); if (sub_res != INT_MAX && sub_res + 1 < res) { res = sub_re...
int main() { assert(func0((int[]){9, 6, 5, 1}, 4, 11) == 2); assert(func0((int[]){4, 5, 6, 7, 8, 9}, 6, 9) == 1); assert(func0((int[]){1, 2, 3}, 3, 4) == 2); return 0; }
O3
c
func0: endbr64 push %r15 xor %r15d,%r15d push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp test %edx,%edx je 1351 <func0+0x41> mov $0x7fffffff,%r15d test %esi,%esi jle 1351 <func0+0x41> lea -0x1(%rsi),%eax mov %edx,%r14d mov %rdi,%rcx lea 0x4(%rdi,%rax,4),%r9 m...
func0_part_0: push r15 push r14 push r13 mov r13d, 7FFFFFFFh push r12 push rbp push rbx sub rsp, 58h test esi, esi jle short loc_12CE movsxd rax, esi mov r12d, edx mov r14d, r13d mov rbx, rdi lea rdx, [rdi+rax*4] mov r13, rdx loc_12BB: mov eax, [rbx] cmp eax...
long long func0_part_0(_DWORD *a1, long long a2, int a3) { unsigned int v3; // r13d int v5; // r14d _DWORD *v6; // rbx _DWORD *v7; // r13 int v8; // eax int v10; // r15d _DWORD *v11; // rbp int v12; // r8d int v13; // r12d int v14; // eax int v15; // ecx int v16; // ecx _DWORD *v17; // rcx ...
func0.part.0: PUSH R15 PUSH R14 PUSH R13 MOV R13D,0x7fffffff PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 TEST ESI,ESI JLE 0x001012ce MOVSXD RAX,ESI MOV R12D,EDX MOV R14D,R13D MOV RBX,RDI LEA RDX,[RDI + RAX*0x4] MOV R13,RDX LAB_001012bb: MOV EAX,dword ptr [RBX] CMP EAX,R12D JLE 0x001012e0 LAB_001012c2: ADD RBX,0x4 CMP RBX,R...
int func0_part_0(int *param_1,int param_2,int param_3) { int *piVar1; int iVar2; bool bVar3; int iVar4; int iVar5; int iVar6; int *piVar7; int *piVar8; int *piVar9; int iVar10; int iVar11; int iVar12; long lVar13; int iVar14; int iVar15; int iVar16; int iVar17; int iVar18; int *pi...
6,020
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int compare_chars(const void* a, const void* b) { char arg1 = *(const char*)a; char arg2 = *(const char*)b; if (arg1 < arg2) return -1; if (arg1 > arg2) return 1; return 0; }
int func0(char *str1, char *str2) { int n1 = strlen(str1); int n2 = strlen(str2); if (n1 != n2) { return 0; } qsort(str1, n1, sizeof(char), compare_chars); qsort(str2, n2, sizeof(char), compare_chars); for (int i = 0; i < n1; i++) { if (str1[i] != str2[i]...
int main() { char str1[] = "abc"; char str2[] = "cba"; char str3[] = "test"; char str4[] = "ttew"; char str5[] = "xxyz"; char str6[] = "yxzx"; assert(func0(str1, str2) == 1); assert(func0(str3, str4) == 0); assert(func0(str5, str6) == 1); printf("All tests passe...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 10b0 <strlen@plt> mov %eax,-0x8(%rbp) mov -0x20(%rbp),%rax mov %rax,%rdi callq 10b0 <strlen@plt> mov %eax,-0x4(%rbp) mov -0x8(%rbp),%eax cmp -0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+s], rdi mov [rbp+var_20], rsi mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_8], eax mov rax, [rbp+var_20] mov rdi, rax; s call _strlen mov [rbp+var_4], eax mov eax, [rbp+var_8] cmp eax, [rbp+...
long long func0(char *a1, char *a2) { int i; // [rsp+14h] [rbp-Ch] int v4; // [rsp+18h] [rbp-8h] int v5; // [rsp+1Ch] [rbp-4h] v4 = strlen(a1); v5 = strlen(a2); if ( v4 != v5 ) return 0LL; qsort(a1, v4, 1uLL, compare_chars); qsort(a2, v5, 1uLL, compare_chars); for ( i = 0; i < v4; ++i ) { ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x001010b0 MOV dword ptr [RBP + -0x8],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,RAX CALL 0x001010b0 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + ...
int8 func0(char *param_1,char *param_2) { int iVar1; size_t sVar2; int8 uVar3; int local_14; sVar2 = strlen(param_1); iVar1 = (int)sVar2; sVar2 = strlen(param_2); if (iVar1 == (int)sVar2) { qsort(param_1,(long)iVar1,1,compare_chars); qsort(param_2,(long)(int)sVar2,1,compare_chars); for (...
6,021
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int compare_chars(const void* a, const void* b) { char arg1 = *(const char*)a; char arg2 = *(const char*)b; if (arg1 < arg2) return -1; if (arg1 > arg2) return 1; return 0; }
int func0(char *str1, char *str2) { int n1 = strlen(str1); int n2 = strlen(str2); if (n1 != n2) { return 0; } qsort(str1, n1, sizeof(char), compare_chars); qsort(str2, n2, sizeof(char), compare_chars); for (int i = 0; i < n1; i++) { if (str1[i] != str2[i]...
int main() { char str1[] = "abc"; char str2[] = "cba"; char str3[] = "test"; char str4[] = "ttew"; char str5[] = "xxyz"; char str6[] = "yxzx"; assert(func0(str1, str2) == 1); assert(func0(str3, str4) == 0); assert(func0(str5, str6) == 1); printf("All tests passe...
O1
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov $0xffffffffffffffff,%rbx mov $0x0,%eax mov %rbx,%rcx repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%r13 mov %rbx,%rcx mov %rsi,%rdi repnz scas %es:(%rdi),%al mov %rcx,%rax not %rax lea ...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi mov rbp, rsi call _strlen mov r13, rax mov rdi, rbp call _strlen mov r12, rax mov eax, 0 cmp r13d, r12d jz short loc_121B loc_1212: pop rbx pop rbp pop r12 pop r13 pop r14 r...
long long func0(long long a1, long long a2) { int v2; // r13d int v3; // r12d long long result; // rax long long i; // rax v2 = ((long long (*)(void))strlen)(); v3 = strlen(a2); result = 0LL; if ( v2 == v3 ) { qsort(a1, v2, 1LL, compare_chars); qsort(a2, v3, 1LL, compare_chars); if ( v2 ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV RBP,RSI CALL 0x001010b0 MOV R13,RAX MOV RDI,RBP CALL 0x001010b0 MOV R12,RAX MOV EAX,0x0 CMP R13D,R12D JZ 0x0010121b LAB_00101212: POP RBX POP RBP POP R12 POP R13 POP R14 RET LAB_0010121b: MOVSXD RSI,R13D LEA R14,[0x1011c9] MOV RCX,R14 MOV EDX,0...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; int8 uVar3; ulong uVar4; int iVar5; bool bVar6; sVar1 = strlen(param_1); sVar2 = strlen(param_2); uVar3 = 0; iVar5 = (int)sVar1; if (iVar5 == (int)sVar2) { qsort(param_1,(long)iVar5,1,compare_chars); qsort(param_2,(l...
6,022
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int compare_chars(const void* a, const void* b) { char arg1 = *(const char*)a; char arg2 = *(const char*)b; if (arg1 < arg2) return -1; if (arg1 > arg2) return 1; return 0; }
int func0(char *str1, char *str2) { int n1 = strlen(str1); int n2 = strlen(str2); if (n1 != n2) { return 0; } qsort(str1, n1, sizeof(char), compare_chars); qsort(str2, n2, sizeof(char), compare_chars); for (int i = 0; i < n1; i++) { if (str1[i] != str2[i]...
int main() { char str1[] = "abc"; char str2[] = "cba"; char str3[] = "test"; char str4[] = "ttew"; char str5[] = "xxyz"; char str6[] = "yxzx"; assert(func0(str1, str2) == 1); assert(func0(str3, str4) == 0); assert(func0(str5, str6) == 1); printf("All tests passe...
O2
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 10b0 <strlen@plt> mov %rbp,%rdi mov %rax,%r12 callq 10b0 <strlen@plt> cmp %eax,%r12d je 1350 <func0+0x40> add $0x8,%rsp xor %eax,%eax pop %rbx pop %rbp pop %r12 pop %r...
func0: endbr64 push r14 push r13 push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi call _strlen mov rdi, rbp mov r12, rax call _strlen cmp r12d, eax jz short loc_1348 loc_1337: pop rbx xor eax, eax pop rbp pop r12 pop r13 pop r14 retn loc_1348: mo...
long long func0(long long a1, long long a2) { int v2; // r12d long long i; // rax v2 = ((long long (*)(void))strlen)(); if ( v2 != (unsigned int)strlen(a2) ) return 0LL; qsort(a1, v2, 1LL, compare_chars); qsort(a2, v2, 1LL, compare_chars); if ( v2 > 0 ) { for ( i = 0LL; *(_BYTE *)(a1 + i) == *...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI CALL 0x001010b0 MOV RDI,RBP MOV R12,RAX CALL 0x001010b0 CMP R12D,EAX JZ 0x00101348 LAB_00101337: POP RBX XOR EAX,EAX POP RBP POP R12 POP R13 POP R14 RET LAB_00101348: MOVSXD R13,R12D LEA R14,[0x1012f0] MOV EDX,0x1 MOV RDI,RBX MOV RCX,R1...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; ulong uVar3; int iVar4; bool bVar5; sVar1 = strlen(param_1); sVar2 = strlen(param_2); iVar4 = (int)sVar1; if (iVar4 != (int)sVar2) { return 0; } qsort(param_1,(long)iVar4,1,compare_chars); qsort(param_2,(long)iVar4,1,c...
6,023
func0
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> int compare_chars(const void* a, const void* b) { char arg1 = *(const char*)a; char arg2 = *(const char*)b; if (arg1 < arg2) return -1; if (arg1 > arg2) return 1; return 0; }
int func0(char *str1, char *str2) { int n1 = strlen(str1); int n2 = strlen(str2); if (n1 != n2) { return 0; } qsort(str1, n1, sizeof(char), compare_chars); qsort(str2, n2, sizeof(char), compare_chars); for (int i = 0; i < n1; i++) { if (str1[i] != str2[i]...
int main() { char str1[] = "abc"; char str2[] = "cba"; char str3[] = "test"; char str4[] = "ttew"; char str5[] = "xxyz"; char str6[] = "yxzx"; assert(func0(str1, str2) == 1); assert(func0(str3, str4) == 0); assert(func0(str5, str6) == 1); printf("All tests passe...
O3
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 10b0 <strlen@plt> mov %rbp,%rdi mov %rax,%r12 callq 10b0 <strlen@plt> cmp %eax,%r12d je 1350 <func0+0x40> add $0x8,%rsp xor %eax,%eax pop %rbx pop %rbp pop %r12 pop %r...
func0: endbr64 push r14 push r13 push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi call _strlen mov rdi, rbp; s mov r12, rax call _strlen cmp r12d, eax jz short loc_1348 loc_1337: pop rbx xor eax, eax pop rbp pop r12 pop r13 pop r14 retn loc_1348:...
long long func0(char *base, char *a2) { int v2; // r12d long long i; // rax v2 = strlen(base); if ( v2 != (unsigned int)strlen(a2) ) return 0LL; qsort(base, v2, 1uLL, compare_chars); qsort(a2, v2, 1uLL, compare_chars); if ( v2 > 0 ) { for ( i = 0LL; base[i] == a2[i]; ++i ) { if ( i =...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI CALL 0x001010b0 MOV RDI,RBP MOV R12,RAX CALL 0x001010b0 CMP R12D,EAX JZ 0x00101348 LAB_00101337: POP RBX XOR EAX,EAX POP RBP POP R12 POP R13 POP R14 RET LAB_00101348: MOVSXD R13,R12D LEA R14,[0x1012f0] MOV EDX,0x1 MOV RDI,RBX MOV RCX,R1...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; ulong uVar3; int iVar4; bool bVar5; sVar1 = strlen(param_1); sVar2 = strlen(param_2); iVar4 = (int)sVar1; if (iVar4 != (int)sVar2) { return 0; } qsort(param_1,(long)iVar4,1,compare_chars); qsort(param_2,(long)iVar4,1,c...
6,024
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef enum { INT_TYPE, FLOAT_TYPE, STRING_TYPE } DataType; typedef struct { DataType type; union { int i; float f; char* s; } data; } Element; typedef struct { E...
int func0(ElementArray a, ElementArray b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { if(a.elements[i].type != b.elements[i].type) return 0; switch(a.elements[i].type){ case INT_TYPE: if(a.elements[i].data.i != b.elements[i].data.i) return...
int main() { // Test case 1 Element test1[] = { {INT_TYPE, .data.i = 4}, {INT_TYPE, .data.i = 5}, {INT_TYPE, .data.i = 4}, {FLOAT_TYPE, .data.f = 7.7}, {FLOAT_TYPE, .data.f = 1.2} }; Element expected1[] = { {FLOAT_TYPE, .data.f = 7.7}, {...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rsi,%rax mov %rdi,%r8 mov %r8,%rsi mov %r9,%rdi mov %rax,%rdi mov %rsi,-0x20(%rbp) mov %rdi,-0x18(%rbp) mov %rdx,-0x30(%rbp) mov %rcx,-0x28(%rbp) mov -0x18(%rbp),%edx mov -0x28(%rbp),%eax cmp %eax,%edx je 12bd <fu...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov rax, rdi mov r8, rsi mov rsi, rax mov rdi, rdx mov rdi, r8 mov [rbp+var_20], rsi mov [rbp+var_18], rdi mov [rbp+var_30], rdx mov [rbp+var_28], rcx mov edx, dword ptr [rbp+var_18] mov eax, dword ptr [rbp+var_28] ...
long long func0(long long a1, int a2, long long a3, int a4) { unsigned int v5; // eax int i; // [rsp+2Ch] [rbp-4h] if ( a2 != a4 ) return 0LL; for ( i = 0; i < a2; ++i ) { if ( *(_DWORD *)(16LL * i + a1) != *(_DWORD *)(16LL * i + a3) ) return 0LL; v5 = *(_DWORD *)(16LL * i + a1); if ( ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,RDI MOV R8,RSI MOV RSI,RAX MOV RDI,RDX MOV RDI,R8 MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x28],RCX MOV EDX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x28] CMP EDX,EAX JZ 0x0010...
int8 func0(long param_1,int param_2,long param_3,int param_4) { uint uVar1; int iVar2; int8 uVar3; int local_c; if (param_2 == param_4) { for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (*(int *)(param_1 + (long)local_c * 0x10) != *(int *)(param_3 + (long)local_c * 0x10)) { ...
6,025
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef enum { INT_TYPE, FLOAT_TYPE, STRING_TYPE } DataType; typedef struct { DataType type; union { int i; float f; char* s; } data; } Element; typedef struct { E...
int func0(ElementArray a, ElementArray b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { if(a.elements[i].type != b.elements[i].type) return 0; switch(a.elements[i].type){ case INT_TYPE: if(a.elements[i].data.i != b.elements[i].data.i) return...
int main() { // Test case 1 Element test1[] = { {INT_TYPE, .data.i = 4}, {INT_TYPE, .data.i = 5}, {INT_TYPE, .data.i = 4}, {FLOAT_TYPE, .data.f = 7.7}, {FLOAT_TYPE, .data.f = 1.2} }; Element expected1[] = { {FLOAT_TYPE, .data.f = 7.7}, {...
O1
c
func0: endbr64 mov $0x0,%eax cmp %ecx,%esi jne 12cc <func0+0xa1> test %esi,%esi jle 12b5 <func0+0x8a> push %r12 push %rbp push %rbx lea 0x8(%rdi),%rbx lea 0x8(%rdx),%rbp lea -0x1(%rsi),%eax shl $0x4,%rax lea 0x18(%rdi,%rax,1),%r12 jmp 1273 <func0+0x48> movss (%rbx),%xmm0 ucomiss 0...
func0: endbr64 mov eax, 0 cmp esi, ecx jnz locret_12CC test esi, esi jle short loc_12B5 push r12 push rbp push rbx lea rbx, [rdi+8] lea rbp, [rdx+8] lea eax, [rsi-1] shl rax, 4 lea r12, [rdi+rax+18h] jmp short loc_1273 loc_125A: movss xmm0, dword ptr [rbx] ucomiss x...
long long func0(long long a1, int a2, long long a3, int a4) { long long result; // rax _QWORD *v5; // rbx _QWORD *i; // rbp int v7; // eax result = 0LL; if ( a2 == a4 ) { if ( a2 <= 0 ) return 1LL; v5 = (_QWORD *)(a1 + 8); for ( i = (_QWORD *)(a3 + 8); ; i += 2 ) { v7 = *((_D...
func0: ENDBR64 MOV EAX,0x0 CMP ESI,ECX JNZ 0x001012cc TEST ESI,ESI JLE 0x001012b5 PUSH R12 PUSH RBP PUSH RBX LEA RBX,[RDI + 0x8] LEA RBP,[RDX + 0x8] LEA EAX,[RSI + -0x1] SHL RAX,0x4 LEA R12,[RDI + RAX*0x1 + 0x18] JMP 0x00101273 LAB_0010125a: MOVSS XMM0,dword ptr [RBX] UCOMISS XMM0,dword ptr [RBP] JP 0x001012c5 JNZ 0x00...
int8 func0(long param_1,int param_2,long param_3,int param_4) { float fVar1; int iVar2; float *pfVar3; float *pfVar4; if (param_2 != param_4) { return 0; } if (0 < param_2) { pfVar3 = (float *)(param_1 + 8); pfVar4 = (float *)(param_3 + 8); do { fVar1 = pfVar3[-2]; if (fVar...
6,026
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef enum { INT_TYPE, FLOAT_TYPE, STRING_TYPE } DataType; typedef struct { DataType type; union { int i; float f; char* s; } data; } Element; typedef struct { E...
int func0(ElementArray a, ElementArray b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { if(a.elements[i].type != b.elements[i].type) return 0; switch(a.elements[i].type){ case INT_TYPE: if(a.elements[i].data.i != b.elements[i].data.i) return...
int main() { // Test case 1 Element test1[] = { {INT_TYPE, .data.i = 4}, {INT_TYPE, .data.i = 5}, {INT_TYPE, .data.i = 4}, {FLOAT_TYPE, .data.f = 7.7}, {FLOAT_TYPE, .data.f = 1.2} }; Element expected1[] = { {FLOAT_TYPE, .data.f = 7.7}, {...
O2
c
func0: endbr64 xor %eax,%eax cmp %ecx,%esi je 1560 <func0+0x10> retq nopl 0x0(%rax,%rax,1) test %esi,%esi jle 15f9 <func0+0xa9> lea -0x1(%rsi),%eax push %r12 shl $0x4,%rax push %rbp lea 0x8(%rdx),%rbp push %rbx lea 0x18(%rdi,%rax,1),%r12 lea 0x8(%rdi),%rbx jmp 1599 <func0+0x49> ...
func0: endbr64 xor eax, eax cmp esi, ecx jz short loc_1550 retn loc_1550: test esi, esi jle loc_15E9 lea eax, [rsi-1] push r12 shl rax, 4 push rbp lea rbp, [rdx+8] push rbx lea r12, [rdi+rax+18h] lea rbx, [rdi+8] jmp short loc_1589 loc_1578: test eax, eax jz ...
long long func0(long long a1, int a2, long long a3, int a4) { long long result; // rax _QWORD *v5; // rbp long long v6; // r12 _QWORD *v7; // rbx int v8; // eax result = 0LL; if ( a2 == a4 ) { if ( a2 <= 0 ) { return 1LL; } else { v5 = (_QWORD *)(a3 + 8); v6 = a1 ...
func0: ENDBR64 XOR EAX,EAX CMP ESI,ECX JZ 0x00101550 RET LAB_00101550: TEST ESI,ESI JLE 0x001015e9 LEA EAX,[RSI + -0x1] PUSH R12 SHL RAX,0x4 PUSH RBP LEA RBP,[RDX + 0x8] PUSH RBX LEA R12,[RDI + RAX*0x1 + 0x18] LEA RBX,[RDI + 0x8] JMP 0x00101589 LAB_00101578: TEST EAX,EAX JZ 0x001015e0 LAB_0010157c: ADD RBX,0x10 ADD RBP...
int8 func0(long param_1,int param_2,long param_3,int param_4) { float fVar1; int iVar2; float *pfVar3; float *pfVar4; if (param_2 != param_4) { return 0; } if (0 < param_2) { pfVar4 = (float *)(param_3 + 8); pfVar3 = (float *)(param_1 + 8); do { fVar1 = pfVar3[-2]; if (fVar...
6,027
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef enum { INT_TYPE, FLOAT_TYPE, STRING_TYPE } DataType; typedef struct { DataType type; union { int i; float f; char* s; } data; } Element; typedef struct { E...
int func0(ElementArray a, ElementArray b) { if(a.size != b.size) return 0; for(int i = 0; i < a.size; i++) { if(a.elements[i].type != b.elements[i].type) return 0; switch(a.elements[i].type){ case INT_TYPE: if(a.elements[i].data.i != b.elements[i].data.i) return...
int main() { // Test case 1 Element test1[] = { {INT_TYPE, .data.i = 4}, {INT_TYPE, .data.i = 5}, {INT_TYPE, .data.i = 4}, {FLOAT_TYPE, .data.f = 7.7}, {FLOAT_TYPE, .data.f = 1.2} }; Element expected1[] = { {FLOAT_TYPE, .data.f = 7.7}, {...
O3
c
func0: endbr64 xor %eax,%eax cmp %ecx,%esi je 1560 <func0+0x10> retq nopl 0x0(%rax,%rax,1) test %esi,%esi jle 15f9 <func0+0xa9> lea -0x1(%rsi),%eax push %r12 shl $0x4,%rax push %rbp lea 0x8(%rdx),%rbp push %rbx lea 0x18(%rdi,%rax,1),%r12 lea 0x8(%rdi),%rbx jmp 1599 <func0+0x49> ...
func0: endbr64 xor eax, eax cmp esi, ecx jz short loc_1560 retn loc_1560: test esi, esi jle loc_15EC movsxd rsi, esi push r12 shl rsi, 4 push rbp lea rbp, [rdx+8] push rbx lea r12, [rsi+rdi] mov rbx, rdi jmp short loc_1599 loc_1580: test eax, eax jnz short loc_15...
long long func0(const char **a1, int a2, long long a3, int a4) { long long result; // rax const char **v5; // rbp int *v6; // r12 const char **v7; // rbx int v8; // eax result = 0LL; if ( a2 == a4 ) { if ( a2 <= 0 ) { return 1LL; } else { v5 = (const char **)(a3 + 8); ...
func0: ENDBR64 XOR EAX,EAX CMP ESI,ECX JZ 0x00101560 RET LAB_00101560: TEST ESI,ESI JLE 0x001015ec MOVSXD RSI,ESI PUSH R12 SHL RSI,0x4 PUSH RBP LEA RBP,[RDX + 0x8] PUSH RBX LEA R12,[RSI + RDI*0x1] MOV RBX,RDI JMP 0x00101599 LAB_00101580: TEST EAX,EAX JNZ 0x0010158c MOV EAX,dword ptr [RBP] CMP dword ptr [RBX + 0x8],EAX ...
int8 func0(float *param_1,int param_2,long param_3,int param_4) { float *pfVar1; float fVar2; int iVar3; float *pfVar4; if (param_2 != param_4) { return 0; } if (0 < param_2) { pfVar4 = (float *)(param_3 + 8); pfVar1 = param_1 + (long)param_2 * 4; do { fVar2 = *param_1; if ...
6,028
func0
#include <regex.h> #include <stdio.h> #include <assert.h>
int func0(const char *pattern, const char *text, int *start, int *end) { regex_t regex; regmatch_t match; int status; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return -1; // Compilation error } status = regexec(&regex, text, 1, &match, 0); regfree(&regex); ...
int main() { int start, end; assert(func0("python", "python programming language", &start, &end) == 0 && start == 0 && end == 6); assert(func0("programming", "python programming language", &start, &end) == 0 && start == 7 && end == 18); assert(func0("language", "python programming language", &star...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp add $0xffffffffffffff80,%rsp mov %rdi,-0x68(%rbp) mov %rsi,-0x70(%rbp) mov %rdx,-0x78(%rbp) mov %rcx,-0x80(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x68(%rbp),%rcx lea -0x50(%rbp),%rax mov $0x1,%edx mov %rcx,%rsi mov ...
func0: endbr64 push rbp mov rbp, rsp add rsp, 0FFFFFFFFFFFFFF80h mov [rbp+pattern], rdi mov [rbp+string], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rcx, [rbp+pattern] lea rax, [rbp+preg] mov edx, 1; cflags mov...
long long func0(const char *a1, const char *a2, regoff_t *a3, regoff_t *a4) { int v7; // [rsp+24h] [rbp-5Ch] regmatch_t pmatch; // [rsp+28h] [rbp-58h] BYREF regex_t preg; // [rsp+30h] [rbp-50h] BYREF unsigned long long v10; // [rsp+78h] [rbp-8h] v10 = __readfsqword(0x28u); if ( regcomp(&preg, a1, 1) ) ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP ADD RSP,-0x80 MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x68] LEA RAX,[RBP + -0x50] MOV EDX,0x1 MOV R...
int8 func0(char *param_1,char *param_2,regoff_t *param_3,regoff_t *param_4) { int iVar1; int8 uVar2; long in_FS_OFFSET; regmatch_t local_60; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,param_1,1); if (iVar1 == 0) { iVar1 = regexec(&loca...
6,029
func0
#include <regex.h> #include <stdio.h> #include <assert.h>
int func0(const char *pattern, const char *text, int *start, int *end) { regex_t regex; regmatch_t match; int status; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return -1; // Compilation error } status = regexec(&regex, text, 1, &match, 0); regfree(&regex); ...
int main() { int start, end; assert(func0("python", "python programming language", &start, &end) == 0 && start == 0 && end == 6); assert(func0("programming", "python programming language", &start, &end) == 0 && start == 7 && end == 18); assert(func0("language", "python programming language", &star...
O1
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov %rsi,%rbx mov %rdx,%r12 mov %rcx,%rbp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%rax mov $0x1,%edx mov %rdi,%rsi mov %rax,%rdi callq 10c0 <regcomp@plt> test %eax,%eax jne 126...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 68h mov rbx, rsi mov r12, rdx mov rbp, rcx mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea rax, [rsp+88h+var_78] mov edx, 1 mov rsi, rdi mov rdi, rax call _regcomp test eax, eax jnz s...
long long func0(long long a1, long long a2, _DWORD *a3, _DWORD *a4) { unsigned int v6; // ebx _DWORD v8[2]; // [rsp+8h] [rbp-80h] BYREF _BYTE v9[72]; // [rsp+10h] [rbp-78h] BYREF unsigned long long v10; // [rsp+58h] [rbp-30h] v10 = __readfsqword(0x28u); if ( (unsigned int)regcomp(v9, a1, 1LL) ) { re...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBX,RSI MOV R12,RDX MOV RBP,RCX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RAX,[RSP + 0x10] MOV EDX,0x1 MOV RSI,RDI MOV RDI,RAX CALL 0x001010c0 TEST EAX,EAX JNZ 0x00101263 LEA RCX,[RSP + 0x8] LEA R13,[RSP + 0x10] MOV R8D...
int4 func0(char *param_1,char *param_2,regoff_t *param_3,regoff_t *param_4) { int iVar1; int4 uVar2; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_78,param_1,1); if (iVar1 == 0) { iVar1 = regexec(&loca...
6,030
func0
#include <regex.h> #include <stdio.h> #include <assert.h>
int func0(const char *pattern, const char *text, int *start, int *end) { regex_t regex; regmatch_t match; int status; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return -1; // Compilation error } status = regexec(&regex, text, 1, &match, 0); regfree(&regex); ...
int main() { int start, end; assert(func0("python", "python programming language", &start, &end) == 0 && start == 0 && end == 6); assert(func0("programming", "python programming language", &start, &end) == 0 && start == 7 && end == 18); assert(func0("language", "python programming language", &star...
O2
c
func0: endbr64 push %r13 push %r12 mov %rsi,%r12 mov %rdi,%rsi push %rbp mov %rdx,%rbp mov $0x1,%edx push %rbx mov %rcx,%rbx sub $0x68,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r13 mov %r13,%rdi callq 10c0 <regcomp@plt> test %eax,%eax jne 139...
func0: endbr64 push r13 push r12 mov r12, rsi mov rsi, rdi push rbp mov rbp, rdx mov edx, 1 push rbx mov rbx, rcx sub rsp, 68h mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea r13, [rsp+88h+var_78] mov rdi, r13 call _regcomp test eax, eax jnz s...
long long func0(long long a1, long long a2, _DWORD *a3, _DWORD *a4) { unsigned int v6; // r12d _DWORD v8[2]; // [rsp+8h] [rbp-80h] BYREF _BYTE v9[72]; // [rsp+10h] [rbp-78h] BYREF unsigned long long v10; // [rsp+58h] [rbp-30h] v10 = __readfsqword(0x28u); if ( (unsigned int)regcomp(v9, a1, 1LL) ) retur...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RSI MOV RSI,RDI PUSH RBP MOV RBP,RDX MOV EDX,0x1 PUSH RBX MOV RBX,RCX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R13,[RSP + 0x10] MOV RDI,R13 CALL 0x001010c0 TEST EAX,EAX JNZ 0x00101398 XOR R8D,R8D MOV RSI,R12 MOV RDI,R13 MOV EDX,0x1 ...
int4 func0(char *param_1,char *param_2,regoff_t *param_3,regoff_t *param_4) { int iVar1; int4 uVar2; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_78,param_1,1); if (iVar1 == 0) { iVar1 = regexec(&loca...
6,031
func0
#include <regex.h> #include <stdio.h> #include <assert.h>
int func0(const char *pattern, const char *text, int *start, int *end) { regex_t regex; regmatch_t match; int status; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return -1; // Compilation error } status = regexec(&regex, text, 1, &match, 0); regfree(&regex); ...
int main() { int start, end; assert(func0("python", "python programming language", &start, &end) == 0 && start == 0 && end == 6); assert(func0("programming", "python programming language", &start, &end) == 0 && start == 7 && end == 18); assert(func0("language", "python programming language", &star...
O3
c
func0: endbr64 push %r13 push %r12 mov %rsi,%r12 mov %rdi,%rsi push %rbp mov %rdx,%rbp mov $0x1,%edx push %rbx mov %rcx,%rbx sub $0x68,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r13 mov %r13,%rdi callq 10c0 <regcomp@plt> test %eax,%eax jne 139...
func0: endbr64 push r13 push r12 mov r12, rdx mov edx, 1; cflags push rbp mov rbp, rcx push rbx mov rbx, rsi mov rsi, rdi; pattern sub rsp, 68h mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea r13, [rsp+88h+preg] mov rdi, r13; preg call _regcomp test ...
long long func0(char *pattern, char *string, regoff_t *a3, regoff_t *a4) { unsigned int v6; // ebx regmatch_t pmatch; // [rsp+8h] [rbp-80h] BYREF regex_t preg; // [rsp+10h] [rbp-78h] BYREF unsigned long long v10; // [rsp+58h] [rbp-30h] v10 = __readfsqword(0x28u); if ( regcomp(&preg, pattern, 1) ) retu...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RDX MOV EDX,0x1 PUSH RBP MOV RBP,RCX PUSH RBX MOV RBX,RSI MOV RSI,RDI SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R13,[RSP + 0x10] MOV RDI,R13 CALL 0x001010c0 TEST EAX,EAX JNZ 0x00101388 XOR R8D,R8D MOV RSI,RBX MOV RDI,R13 MOV EDX,0x1 ...
int4 func0(char *param_1,char *param_2,regoff_t *param_3,regoff_t *param_4) { int iVar1; int4 uVar2; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_78,param_1,1); if (iVar1 == 0) { iVar1 = regexec(&loca...
6,032
func0
#include <assert.h>
double func0(double r) { return 3.1415 * r * r; }
int main() { assert(func0(10) == 314.15000000000003); assert(func0(5) == 78.53750000000001); assert(func0(4) == 50.264); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x8(%rbp) movsd -0x8(%rbp),%xmm1 movsd 0xf3d(%rip),%xmm0 mulsd %xmm1,%xmm0 mulsd -0x8(%rbp),%xmm0 pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp movsd [rbp+var_8], xmm0 movsd xmm1, [rbp+var_8] movsd xmm0, cs:qword_2080 mulsd xmm0, xmm1 mulsd xmm0, [rbp+var_8] pop rbp retn
double func0(double a1) { return 3.1415 * a1 * a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x8],XMM0 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [0x00102080] MULSD XMM0,XMM1 MULSD XMM0,qword ptr [RBP + -0x8] POP RBP RET
double func0(double param_1) { return DAT_00102080 * param_1 * param_1; }
6,033
func0
#include <assert.h>
double func0(double r) { return 3.1415 * r * r; }
int main() { assert(func0(10) == 314.15000000000003); assert(func0(5) == 78.53750000000001); assert(func0(4) == 50.264); return 0; }
O1
c
func0: endbr64 movapd %xmm0,%xmm1 mulsd 0xecf(%rip),%xmm0 mulsd %xmm1,%xmm0 retq
func0: endbr64 movapd xmm1, xmm0 mulsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 retn
double func0(double a1) { return a1 * 3.1415 * a1; }
func0: ENDBR64 MOVAPD XMM1,XMM0 MULSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1) { return param_1 * _DAT_00102008 * param_1; }
6,034
func0
#include <assert.h>
double func0(double r) { return 3.1415 * r * r; }
int main() { assert(func0(10) == 314.15000000000003); assert(func0(5) == 78.53750000000001); assert(func0(4) == 50.264); return 0; }
O2
c
func0: endbr64 movapd %xmm0,%xmm1 movsd 0xeb8(%rip),%xmm0 mulsd %xmm1,%xmm0 mulsd %xmm1,%xmm0 retq nopl 0x0(%rax)
func0: endbr64 movapd xmm1, xmm0 movsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 mulsd xmm0, xmm1 retn
double func0(double a1) { return 3.1415 * a1 * a1; }
func0: ENDBR64 MOVAPD XMM1,XMM0 MOVSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 MULSD XMM0,XMM1 RET
double func0(double param_1) { return DAT_00102008 * param_1 * param_1; }
6,035
func0
#include <assert.h>
double func0(double r) { return 3.1415 * r * r; }
int main() { assert(func0(10) == 314.15000000000003); assert(func0(5) == 78.53750000000001); assert(func0(4) == 50.264); return 0; }
O3
c
func0: endbr64 movapd %xmm0,%xmm1 movsd 0xeb8(%rip),%xmm0 mulsd %xmm1,%xmm0 mulsd %xmm1,%xmm0 retq nopl 0x0(%rax)
func0: endbr64 movapd xmm1, xmm0 movsd xmm0, cs:qword_2008 mulsd xmm0, xmm1 mulsd xmm0, xmm1 retn
double func0(double a1) { return 3.1415 * a1 * a1; }
func0: ENDBR64 MOVAPD XMM1,XMM0 MOVSD XMM0,qword ptr [0x00102008] MULSD XMM0,XMM1 MULSD XMM0,XMM1 RET
double func0(double param_1) { return DAT_00102008 * param_1 * param_1; }
6,036
func0
#include <assert.h> #include <stdio.h>
void func0(int* input_list, int list_size, int n, int* output_list, int* output_size) { int j = 0; for (int i = 0; i < list_size; i += n) { output_list[j++] = input_list[i]; } *output_size = j; }
int main() { int output_list[5]; int output_size; int list1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int expected1[] = {1, 3, 5, 7, 9}; func0(list1, 9, 2, output_list, &output_size); assert(output_size == 5); for (int i = 0; i < output_size; i++) { assert(output_list[i] == expected...
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) mov %r8,-0x30(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11ec <func0+0x63> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax lea (%...
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_30], r8 mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11EC loc_11B3: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, ...
_DWORD * func0(long long a1, int a2, int a3, long long a4, _DWORD *a5) { int v5; // eax _DWORD *result; // rax int v7; // [rsp+28h] [rbp-8h] int i; // [rsp+2Ch] [rbp-4h] v7 = 0; for ( i = 0; i < a2; i += a3 ) { v5 = v7++; *(_DWORD *)(a4 + 4LL * v5) = *(_DWORD *)(4LL * i + a1); } result = a5; ...
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 qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ec LAB_001011b3: MOV EAX,dword ptr [RBP + -0x4] CDQ...
void func0(long param_1,int param_2,int param_3,long param_4,int *param_5) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + param_3) { *(int4 *)((long)local_10 * 4 + param_4) = *(int4 *)((long)local_c * 4 + param_1); local_10 = local_10 + 1; } ...
6,037
func0
#include <assert.h> #include <stdio.h>
void func0(int* input_list, int list_size, int n, int* output_list, int* output_size) { int j = 0; for (int i = 0; i < list_size; i += n) { output_list[j++] = input_list[i]; } *output_size = j; }
int main() { int output_list[5]; int output_size; int list1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int expected1[] = {1, 3, 5, 7, 9}; func0(list1, 9, 2, output_list, &output_size); assert(output_size == 5); for (int i = 0; i < output_size; i++) { assert(output_list[i] == expected...
O1
c
func0: endbr64 push %rbx test %esi,%esi jle 11c2 <func0+0x39> movslq %edx,%r11 shl $0x2,%r11 mov $0x1,%eax mov $0x0,%r9d mov %eax,%ebx mov (%rdi),%r10d mov %r10d,-0x4(%rcx,%rax,4) add %edx,%r9d add $0x1,%rax add %r11,%rdi cmp %r9d,%esi jg 11a4 <func0+0x1b> mov %ebx,(%r8) pop ...
func0: endbr64 push rbx test esi, esi jle short loc_11C5 mov r9d, esi mov r10d, edx movsxd r11, edx shl r11, 2 mov eax, 1 mov edx, 0 loc_11A9: mov ebx, eax mov esi, [rdi] mov [rcx+rax*4-4], esi add edx, r10d add rax, 1 add rdi, r11 cmp r9d, edx jg short lo...
void func0(_DWORD *a1, int a2, int a3, long long a4, _DWORD *a5) { long long v6; // r11 long long v7; // rax int v8; // edx int v9; // ebx if ( a2 <= 0 ) { v9 = 0; } else { v6 = 4LL * a3; v7 = 1LL; v8 = 0; do { v9 = v7; *(_DWORD *)(a4 + 4 * v7 - 4) = *a1; v8...
func0: ENDBR64 PUSH RBX TEST ESI,ESI JLE 0x001011c5 MOV R9D,ESI MOV R10D,EDX MOVSXD R11,EDX SHL R11,0x2 MOV EAX,0x1 MOV EDX,0x0 LAB_001011a9: MOV EBX,EAX MOV ESI,dword ptr [RDI] MOV dword ptr [RCX + RAX*0x4 + -0x4],ESI ADD EDX,R10D ADD RAX,0x1 ADD RDI,R11 CMP R9D,EDX JG 0x001011a9 LAB_001011c0: MOV dword ptr [R8],EBX P...
void func0(int4 *param_1,int param_2,int param_3,long param_4,int4 *param_5) { long lVar1; int iVar2; int4 uVar3; if (param_2 < 1) { uVar3 = 0; } else { lVar1 = 1; iVar2 = 0; do { uVar3 = (int4)lVar1; *(int4 *)(param_4 + -4 + lVar1 * 4) = *param_1; iVar2 = iVar2 + param...
6,038
func0
#include <assert.h> #include <stdio.h>
void func0(int* input_list, int list_size, int n, int* output_list, int* output_size) { int j = 0; for (int i = 0; i < list_size; i += n) { output_list[j++] = input_list[i]; } *output_size = j; }
int main() { int output_list[5]; int output_size; int list1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int expected1[] = {1, 3, 5, 7, 9}; func0(list1, 9, 2, output_list, &output_size); assert(output_size == 5); for (int i = 0; i < output_size; i++) { assert(output_list[i] == expected...
O2
c
func0: endbr64 push %rbx test %esi,%esi jle 1280 <func0+0x40> movslq %edx,%r11 mov $0x1,%eax xor %r9d,%r9d shl $0x2,%r11 nopl 0x0(%rax,%rax,1) mov (%rdi),%r10d add %edx,%r9d mov %eax,%ebx add %r11,%rdi mov %r10d,-0x4(%rcx,%rax,4) add $0x1,%rax cmp %r9d,%esi jg 1260 <func0+0x20...
func0: endbr64 push rbx test esi, esi jle short loc_12E0 movsxd r11, edx mov r10d, edx mov r9d, esi mov eax, 1 shl r11, 2 xor edx, edx nop dword ptr [rax] loc_12C0: mov esi, [rdi] add edx, r10d mov ebx, eax add rdi, r11 mov [rcx+rax*4-4], esi add rax, 1 cmp ...
void func0(int *a1, int a2, int a3, long long a4, _DWORD *a5) { long long v7; // rax long long v8; // r11 int v9; // edx int v10; // esi int v11; // ebx if ( a2 <= 0 ) { *a5 = 0; } else { v7 = 1LL; v8 = 4LL * a3; v9 = 0; do { v10 = *a1; v9 += a3; v11 = v7;...
func0: ENDBR64 PUSH RBX TEST ESI,ESI JLE 0x001012e0 MOVSXD R11,EDX MOV R10D,EDX MOV R9D,ESI MOV EAX,0x1 SHL R11,0x2 XOR EDX,EDX NOP dword ptr [RAX] LAB_001012c0: MOV ESI,dword ptr [RDI] ADD EDX,R10D MOV EBX,EAX ADD RDI,R11 MOV dword ptr [RCX + RAX*0x4 + -0x4],ESI ADD RAX,0x1 CMP R9D,EDX JG 0x001012c0 MOV dword ptr [R8]...
void func0(int4 *param_1,int param_2,int param_3,long param_4,int4 *param_5) { int4 uVar1; long lVar2; long lVar3; int iVar4; if (0 < param_2) { iVar4 = 0; lVar2 = 1; do { lVar3 = lVar2; uVar1 = *param_1; iVar4 = iVar4 + param_3; param_1 = param_1 + param_3; *(int...
6,039
func0
#include <assert.h> #include <stdio.h>
void func0(int* input_list, int list_size, int n, int* output_list, int* output_size) { int j = 0; for (int i = 0; i < list_size; i += n) { output_list[j++] = input_list[i]; } *output_size = j; }
int main() { int output_list[5]; int output_size; int list1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int expected1[] = {1, 3, 5, 7, 9}; func0(list1, 9, 2, output_list, &output_size); assert(output_size == 5); for (int i = 0; i < output_size; i++) { assert(output_list[i] == expected...
O3
c
func0: endbr64 test %esi,%esi jle 1350 <func0+0x130> cmp $0x1,%edx jne 12e0 <func0+0xc0> lea 0xf(%rdi),%rdx lea -0x1(%rsi),%eax sub %rcx,%rdx cmp $0x1e,%rdx jbe 1320 <func0+0x100> cmp $0x3,%eax jbe 1320 <func0+0x100> mov %esi,%edx movdqa 0xe34(%rip),%xmm1 xor %eax,%eax movdqa 0xe3a...
func0: endbr64 mov r9d, esi mov r10, rcx mov esi, edx test r9d, r9d jle loc_1290 cmp edx, 1 jnz loc_1258 lea eax, [r9-1] cmp eax, 3 jbe short loc_11A7 lea rdx, [rdi+4] mov rax, rcx sub rax, rdx cmp rax, 8 ja short loc_11D0 loc_11A7: movsxd rcx, r9d mov ea...
long long func0(int *a1, int a2, int a3, long long a4, _DWORD *a5) { long long v8; // rax long long v9; // rdx long long result; // rax __m128i si128; // xmm1 __m128i v12; // xmm2 long long v13; // rax __m128i v14; // xmm0 unsigned int v15; // edx long long v16; // rcx long long v17; // r11 int v...
func0: ENDBR64 MOV R9D,ESI MOV R10,RCX MOV ESI,EDX TEST R9D,R9D JLE 0x00101290 CMP EDX,0x1 JNZ 0x00101258 LEA EAX,[R9 + -0x1] CMP EAX,0x3 JBE 0x001011a7 LEA RDX,[RDI + 0x4] MOV RAX,RCX SUB RAX,RDX CMP RAX,0x8 JA 0x001011d0 LAB_001011a7: MOVSXD RCX,R9D MOV EAX,0x1 NOP LAB_001011b0: MOV EDX,dword ptr [RDI + RAX*0x4 + -0x...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void func0(int4 *param_1,uint param_2,int param_3,long param_4,uint *param_5) { int4 uVar1; int8 uVar2; int iVar3; uint uVar4; long lVar5; int iVar6; uint uVar7; long lVar8; ulong uVar9; bool bVar10; int iVar11;...
6,040
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char *func0(char *str1) { char *words[100]; int word_count = 0; char *word = strtok(str1, " "); while (word != NULL) { for (int i = 0; i < word_count; i++) { if (strcmp(words[i], word) == 0) { return word; } } words[word_cou...
int main() { char str1[] = "ab ca bc ab"; char str2[] = "ab ca bc"; char str3[] = "ab ca bc ca ab bc"; assert(strcmp(func0(str1), "ab") == 0); assert(strcmp(func0(str2), "None") == 0); assert(strcmp(func0(str3), "ca") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x350,%rsp mov %rdi,-0x348(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x340(%rbp) mov -0x348(%rbp),%rax lea 0xe22(%rip),%rsi mov %rax,%rdi callq 10b0 <strtok@plt> mov %rax,-0x338(%rbp) jmpq 1282 <func0+0xd9> movl ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 350h mov [rbp+s], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_340], 0 mov rax, [rbp+s] lea rdx, delim; " " mov rsi, rdx; delim mov rdi, rax; s call _strtok mov [rbp+s2], rax jmp loc_1288 loc_11...
const char * func0(char *a1) { int v2; // eax int v3; // [rsp+10h] [rbp-340h] int i; // [rsp+14h] [rbp-33Ch] const char *s2; // [rsp+18h] [rbp-338h] char *s1[102]; // [rsp+20h] [rbp-330h] s1[101] = (char *)__readfsqword(0x28u); v3 = 0; for ( s2 = strtok(a1, " "); s2; s2 = strtok(0LL, " ") ) { for...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x350 MOV qword ptr [RBP + -0x348],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x340],0x0 MOV RAX,qword ptr [RBP + -0x348] LEA RDX,[0x102008] MOV RSI,RDX MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x338],RAX JMP 0x00...
char * func0(char *param_1) { int iVar1; long in_FS_OFFSET; int local_348; int local_344; char *local_340; int8 auStack_338 [101]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_348 = 0; local_340 = strtok(param_1," "); while (local_340 != (char *)0x0) { for (local_344 = 0...
6,041
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char *func0(char *str1) { char *words[100]; int word_count = 0; char *word = strtok(str1, " "); while (word != NULL) { for (int i = 0; i < word_count; i++) { if (strcmp(words[i], word) == 0) { return word; } } words[word_cou...
int main() { char str1[] = "ab ca bc ab"; char str2[] = "ab ca bc"; char str3[] = "ab ca bc ca ab bc"; assert(strcmp(func0(str1), "ab") == 0); assert(strcmp(func0(str2), "None") == 0); assert(strcmp(func0(str3), "ca") == 0); return 0; }
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x338,%rsp mov %fs:0x28,%rax mov %rax,0x328(%rsp) xor %eax,%eax lea 0xe31(%rip),%rsi callq 10b0 <strtok@plt> lea 0xe20(%rip),%rbp test %rax,%rax je 124c <func0+0xa3> mov %rax,%rbp mov %rsp,%r14 lea...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 338h mov rax, fs:28h mov [rsp+368h+var_40], rax xor eax, eax lea rsi, asc_2009; " " call _strtok lea rbp, aNone; "None" test rax, rax jz short loc_124C mov rbp, rax mov r14, rsp lea...
const char * func0(long long a1) { long long v1; // rax const char *v2; // rbp char *v3; // r12 int i; // r13d long long *v5; // rbx long long v7; // [rsp+0h] [rbp-368h] BYREF char v8; // [rsp+8h] [rbp-360h] BYREF unsigned long long v9; // [rsp+328h] [rbp-40h] v9 = __readfsqword(0x28u); v1 = strtok...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x338 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x328],RAX XOR EAX,EAX LEA RSI,[0x102009] CALL 0x001010b0 LEA RBP,[0x102004] TEST RAX,RAX JZ 0x0010124c MOV RBP,RAX MOV R14,RSP LEA R12,[RSP + 0x8] MOV R13D,0x1 LEA R15,[0x102009] LAB_0010...
char * func0(char *param_1) { int8 *puVar1; int iVar2; char *pcVar3; int8 *puVar4; char *__s2; int iVar5; long in_FS_OFFSET; int8 local_368 [101]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); pcVar3 = strtok(param_1," "); __s2 = "None"; if (pcVar3 != (char *)0x0) { iVar5 =...
6,042
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char *func0(char *str1) { char *words[100]; int word_count = 0; char *word = strtok(str1, " "); while (word != NULL) { for (int i = 0; i < word_count; i++) { if (strcmp(words[i], word) == 0) { return word; } } words[word_cou...
int main() { char str1[] = "ab ca bc ab"; char str2[] = "ab ca bc"; char str3[] = "ab ca bc ca ab bc"; assert(strcmp(func0(str1), "ab") == 0); assert(strcmp(func0(str2), "None") == 0); assert(strcmp(func0(str3), "ca") == 0); return 0; }
O2
c
func0: endbr64 push %r14 lea 0xd1c(%rip),%rsi push %r13 push %r12 push %rbp push %rbx sub $0x330,%rsp mov %fs:0x28,%rax mov %rax,0x328(%rsp) xor %eax,%eax callq 10b0 <strtok@plt> test %rax,%rax je 1396 <func0+0xb6> mov %rax,%r12 mov %rsp,%r14 lea 0x8(%rsp),%rbp lea 0xce0(%rip...
func0: endbr64 push r14 push r13 lea r13, asc_2009; " " push r12 mov rsi, r13 push rbp push rbx sub rsp, 330h mov rax, fs:28h mov [rsp+358h+var_30], rax xor eax, eax call _strtok test rax, rax jz short loc_1376 mov r12, rax mov r14, rsp lea rbp, [rsp+358h+va...
const char * func0(long long a1) { long long v1; // rax long long v2; // r12 char *v3; // rbp long long *v4; // rbx long long v6; // [rsp+0h] [rbp-358h] BYREF char v7; // [rsp+8h] [rbp-350h] BYREF unsigned long long v8; // [rsp+328h] [rbp-30h] v8 = __readfsqword(0x28u); v1 = strtok(a1, " "); if ( !...
func0: ENDBR64 PUSH R14 PUSH R13 LEA R13,[0x102009] PUSH R12 MOV RSI,R13 PUSH RBP PUSH RBX SUB RSP,0x330 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x328],RAX XOR EAX,EAX CALL 0x001010b0 TEST RAX,RAX JZ 0x00101376 MOV R12,RAX MOV R14,RSP LEA RBP,[RSP + 0x8] LAB_00101315: MOV RSI,R13 XOR EDI,EDI MOV qword ptr [RBP...
char * func0(char *param_1) { int8 *puVar1; int iVar2; char *__s2; int8 *puVar3; int8 *puVar4; long in_FS_OFFSET; int8 local_358 [101]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); __s2 = strtok(param_1," "); puVar1 = local_358; if (__s2 != (char *)0x0) { while( true ) { ...
6,043
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char *func0(char *str1) { char *words[100]; int word_count = 0; char *word = strtok(str1, " "); while (word != NULL) { for (int i = 0; i < word_count; i++) { if (strcmp(words[i], word) == 0) { return word; } } words[word_cou...
int main() { char str1[] = "ab ca bc ab"; char str2[] = "ab ca bc"; char str3[] = "ab ca bc ca ab bc"; assert(strcmp(func0(str1), "ab") == 0); assert(strcmp(func0(str2), "None") == 0); assert(strcmp(func0(str3), "ca") == 0); return 0; }
O3
c
func0: endbr64 push %r14 lea 0xd1c(%rip),%rsi push %r13 push %r12 push %rbp push %rbx sub $0x330,%rsp mov %fs:0x28,%rax mov %rax,0x328(%rsp) xor %eax,%eax callq 10b0 <strtok@plt> test %rax,%rax je 1396 <func0+0xb6> mov %rax,%r12 mov %rsp,%r14 lea 0x8(%rsp),%rbp lea 0xce0(%rip...
func0: endbr64 push r15 push r14 lea r14, delim; " " push r13 mov rsi, r14; delim push r12 push rbp push rbx sub rsp, 338h mov rax, fs:28h mov [rsp+368h+var_40], rax xor eax, eax call _strtok test rax, rax jz short loc_1383 mov r15, rsp mov rbp, rax mov r...
const char * func0(char *a1) { char *v1; // rax char *v2; // rbp char **v3; // r13 const char **v4; // r12 const char **i; // rbx _QWORD v7[109]; // [rsp+0h] [rbp-368h] BYREF v7[101] = __readfsqword(0x28u); v1 = strtok(a1, " "); if ( !v1 ) return "None"; v2 = v1; v3 = (char **)v7; LABEL_3: ...
func0: ENDBR64 PUSH R15 PUSH R14 LEA R14,[0x102009] PUSH R13 MOV RSI,R14 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x338 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x328],RAX XOR EAX,EAX CALL 0x001010b0 TEST RAX,RAX JZ 0x00101383 MOV R15,RSP MOV RBP,RAX MOV R13,R15 LAB_00101315: MOV qword ptr [R13],RBP MOV RSI,R14 XOR E...
char * func0(char *param_1) { int8 *puVar1; int iVar2; char *__s2; int8 *puVar3; int8 *puVar4; long in_FS_OFFSET; bool bVar5; int8 local_368 [101]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); __s2 = strtok(param_1," "); puVar1 = local_368; if (__s2 != (char *)0x0) { while...
6,044
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include<ctype.h> typedef struct { char values[100]; int length; } tuple;
tuple func0(const char *str1) { tuple result; int j = 0; for (int i = 0; str1[i] != '\0'; i++) { if (!isspace(str1[i])) { result.values[j++] = str1[i]; } } result.length = j; return result; }
int main() { tuple result; result = func0("python 3.0"); char expected1[] = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'}; int length1 = sizeof(expected1); assert(result.length == length1); for (int i = 0; i < length1; i++) { assert(result.values[i] == expected1[i]); } ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x98,%rsp mov %rdi,-0x98(%rbp) mov %rsi,-0xa0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax movl $0x0,-0x88(%rbp) movl $0x0,-0x84(%rbp) jmp 1236 <func0+0xad> callq 1090 <__ctype_b_loc@plt> mov (%rax),%rax mov -0x84...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 98h mov [rbp+var_98], rdi mov [rbp+var_A0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov [rbp+var_88], 0 mov [rbp+var_84], 0 jmp short loc_1236 loc_11CC: call ___ctype_b_loc mov rax, [rax] mov e...
_QWORD * func0(_QWORD *a1, long long a2) { int v2; // eax long long v3; // rbx long long v4; // rbx long long v5; // rbx long long v6; // rbx long long v7; // rbx long long v8; // rbx int v10; // [rsp+18h] [rbp-88h] int i; // [rsp+1Ch] [rbp-84h] _QWORD v12[12]; // [rsp+20h] [rbp-80h] long long v13...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV qword ptr [RBP + -0x98],RDI MOV qword ptr [RBP + -0xa0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x88],0x0 MOV dword ptr [RBP + -0x84],0x0 JMP 0x00101236 LAB_001011cc: CALL 0x00101090 MOV RAX,qword ptr...
int8 * func0(int8 *param_1,long param_2) { ushort **ppuVar1; long in_FS_OFFSET; int local_90; int local_8c; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30;...
6,045
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include<ctype.h> typedef struct { char values[100]; int length; } tuple;
tuple func0(const char *str1) { tuple result; int j = 0; for (int i = 0; str1[i] != '\0'; i++) { if (!isspace(str1[i])) { result.values[j++] = str1[i]; } } result.length = j; return result; }
int main() { tuple result; result = func0("python 3.0"); char expected1[] = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'}; int length1 = sizeof(expected1); assert(result.length == length1); for (int i = 0; i < length1; i++) { assert(result.values[i] == expected1[i]); } ...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx sub $0x70,%rsp mov %rdi,%r12 mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax movzbl (%rsi),%ebx test %bl,%bl je 11e7 <func0+0x5e> mov %rsi,%rbp callq 1090 <__ctype_b_loc@plt> mov (%rax),%rcx lea 0x1(%rbp),%rsi mov $0x0,%edx jmp ...
func0: endbr64 push r12 push rbp push rbx sub rsp, 70h mov r12, rdi mov rax, fs:28h mov [rsp+88h+var_20], rax xor eax, eax movzx ebx, byte ptr [rsi] test bl, bl jz short loc_11E7 mov rbp, rsi call ___ctype_b_loc mov rcx, [rax] lea rsi, [rbp+1] mov edx, 0 jmp ...
__m128i * func0(__m128i *a1, __int8 *a2) { __int8 v2; // bl long long v3; // rcx __int8 *v4; // rsi int v5; // edx __m128i v7; // [rsp+0h] [rbp-88h] BYREF __m128i v8; // [rsp+10h] [rbp-78h] BYREF __m128i v9; // [rsp+20h] [rbp-68h] BYREF __m128i v10; // [rsp+30h] [rbp-58h] BYREF __m128i v11; // [rsp+40...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x70 MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX MOVZX EBX,byte ptr [RSI] TEST BL,BL JZ 0x001011e7 MOV RBP,RSI CALL 0x00101090 MOV RCX,qword ptr [RAX] LEA RSI,[RBP + 0x1] MOV EDX,0x0 JMP 0x001011d1 LAB_001011c5: ADD RSI,0x1 MOVZX E...
int8 * func0(int8 *param_1,char *param_2) { ushort *puVar1; ushort **ppuVar2; char cVar3; char *pcVar4; long in_FS_OFFSET; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 loca...
6,046
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include<ctype.h> typedef struct { char values[100]; int length; } tuple;
tuple func0(const char *str1) { tuple result; int j = 0; for (int i = 0; str1[i] != '\0'; i++) { if (!isspace(str1[i])) { result.values[j++] = str1[i]; } } result.length = j; return result; }
int main() { tuple result; result = func0("python 3.0"); char expected1[] = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'}; int length1 = sizeof(expected1); assert(result.length == length1); for (int i = 0; i < length1; i++) { assert(result.values[i] == expected1[i]); } ...
O2
c
func0: endbr64 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x70,%rsp movzbl (%rsi),%ebx mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax test %bl,%bl je 1460 <func0+0xd0> mov %rsi,%rbp callq 1090 <__ctype_b_loc@plt> lea 0x1(%rbp),%rsi xor %edx,%edx mov (%rax),%rcx nopl ...
func0: endbr64 push r12 mov r12, rdi push rbp push rbx sub rsp, 70h movzx ebx, byte ptr [rsi] mov rax, fs:28h mov [rsp+88h+var_20], rax xor eax, eax test bl, bl jz loc_1460 mov rbp, rsi call ___ctype_b_loc lea rsi, [rbp+1] xor edx, edx mov rcx, [rax] nop dwo...
__m128i * func0(__m128i *a1, __int8 *a2) { __int8 v2; // bl long long *v3; // rax __int8 *v4; // rsi int v5; // edx long long v6; // rcx long long v7; // rax __m128i v8; // xmm0 __m128i v9; // xmm1 long long v10; // rax __m128i v11; // xmm2 __m128i v12; // xmm3 __m128i v13; // xmm4 __m128i v14...
func0: ENDBR64 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x70 MOVZX EBX,byte ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX TEST BL,BL JZ 0x00101460 MOV RBP,RSI CALL 0x00101090 LEA RSI,[RBP + 0x1] XOR EDX,EDX MOV RCX,qword ptr [RAX] NOP dword ptr [RAX + RAX*0x1] LAB_001013d0: MOVS...
int8 * func0(int8 *param_1,char *param_2) { ushort *puVar1; ushort **ppuVar2; long lVar3; char cVar4; long in_FS_OFFSET; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_...
6,047
func0
#include <stdio.h> #include <assert.h> #include <string.h> #include<ctype.h> typedef struct { char values[100]; int length; } tuple;
tuple func0(const char *str1) { tuple result; int j = 0; for (int i = 0; str1[i] != '\0'; i++) { if (!isspace(str1[i])) { result.values[j++] = str1[i]; } } result.length = j; return result; }
int main() { tuple result; result = func0("python 3.0"); char expected1[] = {'p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'}; int length1 = sizeof(expected1); assert(result.length == length1); for (int i = 0; i < length1; i++) { assert(result.values[i] == expected1[i]); } ...
O3
c
func0: endbr64 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x70,%rsp movzbl (%rsi),%ebx mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax test %bl,%bl je 1550 <func0+0xf0> mov %rsi,%rbp callq 1090 <__ctype_b_loc@plt> lea 0x1(%rbp),%rsi mov (%rax),%rcx xor %eax,%eax nopl ...
func0: endbr64 push r12 mov r12, rdi push rbp push rbx sub rsp, 70h movzx ebx, byte ptr [rsi] mov rax, fs:28h mov [rsp+88h+var_20], rax xor eax, eax test bl, bl jz loc_14B8 mov rbp, rsi call ___ctype_b_loc lea rsi, [rbp+1] mov rcx, [rax] xor eax, eax nop dwo...
__m128i * func0(__m128i *a1, __int8 *a2) { __int8 v2; // bl __int8 *v3; // rsi const unsigned __int16 *v4; // rcx long long v5; // rax __m128i v6; // xmm0 __m128i v7; // xmm1 long long v8; // rax __m128i v9; // xmm2 __m128i v10; // xmm3 __m128i v11; // xmm4 __m128i v12; // xmm5 __m128i v14; // [...
func0: ENDBR64 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX SUB RSP,0x70 MOVZX EBX,byte ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX TEST BL,BL JZ 0x001014b8 MOV RBP,RSI CALL 0x00101090 LEA RSI,[RBP + 0x1] MOV RCX,qword ptr [RAX] XOR EAX,EAX NOP dword ptr [RAX + RAX*0x1] LAB_00101400: MOVS...
int8 * func0(int8 *param_1,char *param_2) { byte bVar1; ushort *puVar2; ushort **ppuVar3; ulong uVar4; uint uVar5; char cVar6; long in_FS_OFFSET; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; ...
6,048
func0
#include <assert.h> #include <math.h>
double* func0(int bases_num[], int index[], int length, double result[]) { for(int i = 0; i < length; i++) { result[i] = pow(bases_num[i], index[i]); } return result; }
int main() { int bases_num1[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; int index1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; double expected1[] = {10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}; double result1[10]; fu...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov %rcx,-0x40(%rbp) movl $0x0,-0x14(%rbp) jmp 1208 <func0+0x7f> mov -0x14(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x30(%rbp),%rax add %rdx,%rax mov ...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_34], edx mov [rbp+var_40], rcx mov [rbp+var_14], 0 jmp short loc_121F loc_11AE: mov eax, [rbp+var_14] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_30] add ...
long long func0(long long a1, long long a2, int a3, long long a4) { int i; // [rsp+2Ch] [rbp-14h] for ( i = 0; i < a3; ++i ) *(double *)(8LL * i + a4) = pow((double)*(int *)(4LL * i + a1), (double)*(int *)(4LL * i + a2)); return a4; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV qword ptr [RBP + -0x40],RCX MOV dword ptr [RBP + -0x14],0x0 JMP 0x0010121f LAB_001011ae: MOV EAX,dword ptr [RBP + -0x14] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr ...
long func0(long param_1,long param_2,int param_3,long param_4) { double dVar1; int4 local_1c; for (local_1c = 0; local_1c < param_3; local_1c = local_1c + 1) { dVar1 = pow((double)*(int *)(param_1 + (long)local_1c * 4), (double)*(int *)(param_2 + (long)local_1c * 4)); *(double *)((long...
6,049
func0
#include <assert.h> #include <math.h>
double* func0(int bases_num[], int index[], int length, double result[]) { for(int i = 0; i < length; i++) { result[i] = pow(bases_num[i], index[i]); } return result; }
int main() { int bases_num1[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; int index1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; double expected1[] = {10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}; double result1[10]; fu...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rcx,%rbp test %edx,%edx jle 11d7 <func0+0x4e> mov %rdi,%r12 mov %rsi,%r13 lea -0x1(%rdx),%r14d mov $0x0,%ebx pxor %xmm0,%xmm0 cvtsi2sdl (%r12,%rbx,4),%xmm0 pxor %xmm1,%xmm1 cvtsi2sdl 0x0(%r13,%rbx,4),%xmm1 callq 107...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov r12, rcx test edx, edx jle short loc_11D2 mov r13, rdi mov r14, rsi mov ebp, edx mov ebx, 0 loc_11A9: pxor xmm0, xmm0 cvtsi2sd xmm0, dword ptr [r13+rbx*4+0] pxor xmm1, xmm1 cvtsi2sd xmm1, dword ptr [r14+rbx*4...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // rbp long long i; // rbx if ( a3 > 0 ) { v5 = (unsigned int)a3; for ( i = 0LL; i != v5; ++i ) *(double *)(a4 + 8 * i) = pow((double)*(int *)(a1 + 4 * i), (double)*(int *)(a2 + 4 * i)); } return a4; }
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RCX TEST EDX,EDX JLE 0x001011d2 MOV R13,RDI MOV R14,RSI MOV EBP,EDX MOV EBX,0x0 LAB_001011a9: PXOR XMM0,XMM0 CVTSI2SD XMM0,dword ptr [R13 + RBX*0x4] PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [R14 + RBX*0x4] CALL 0x00101070 MOVSD qword ptr [R12 + RBX*0x8],...
long func0(long param_1,long param_2,uint param_3,long param_4) { ulong uVar1; double dVar2; if (0 < (int)param_3) { uVar1 = 0; do { dVar2 = pow((double)*(int *)(param_1 + uVar1 * 4),(double)*(int *)(param_2 + uVar1 * 4)); *(double *)(param_4 + uVar1 * 8) = dVar2; uVar1 = uVar1 + 1; ...
6,050
func0
#include <assert.h> #include <math.h>
double* func0(int bases_num[], int index[], int length, double result[]) { for(int i = 0; i < length; i++) { result[i] = pow(bases_num[i], index[i]); } return result; }
int main() { int bases_num1[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; int index1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; double expected1[] = {10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}; double result1[10]; fu...
O2
c
func0: endbr64 push %r14 push %r13 push %r12 mov %rcx,%r12 push %rbp push %rbx test %edx,%edx jle 163c <func0+0x4c> mov %rdi,%rbp mov %rsi,%r13 lea -0x1(%rdx),%r14d xor %ebx,%ebx pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 cvtsi2sdl 0x0(%rbp,%rbx,4),%xmm0 cvtsi2sdl 0x0(%r13,%rbx,4),%xmm1 callq ...
func0: endbr64 push r14 push r13 push r12 mov r12, rcx push rbp push rbx test edx, edx jle short loc_1639 mov r13, rdi mov r14, rsi movsxd rbp, edx xor ebx, ebx xchg ax, ax loc_1610: pxor xmm0, xmm0 pxor xmm1, xmm1 cvtsi2sd xmm0, dword ptr [r13+rbx*4+0] cvtsi2sd xmm1, dwo...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // rbp long long i; // rbx if ( a3 > 0 ) { v5 = a3; for ( i = 0LL; i != v5; ++i ) *(double *)(a4 + 8 * i) = pow((double)*(int *)(a1 + 4 * i), (double)*(int *)(a2 + 4 * i)); } return a4; }
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 MOV R12,RCX PUSH RBP PUSH RBX TEST EDX,EDX JLE 0x00101639 MOV R13,RDI MOV R14,RSI MOVSXD RBP,EDX XOR EBX,EBX NOP LAB_00101610: PXOR XMM0,XMM0 PXOR XMM1,XMM1 CVTSI2SD XMM0,dword ptr [R13 + RBX*0x4] CVTSI2SD XMM1,dword ptr [R14 + RBX*0x4] CALL 0x00101070 MOVSD qword ptr [R12 + RB...
long func0(long param_1,long param_2,int param_3,long param_4) { long lVar1; double dVar2; if (0 < param_3) { lVar1 = 0; do { dVar2 = pow((double)*(int *)(param_1 + lVar1 * 4),(double)*(int *)(param_2 + lVar1 * 4)); *(double *)(param_4 + lVar1 * 8) = dVar2; lVar1 = lVar1 + 1; } w...
6,051
func0
#include <assert.h> #include <math.h>
double* func0(int bases_num[], int index[], int length, double result[]) { for(int i = 0; i < length; i++) { result[i] = pow(bases_num[i], index[i]); } return result; }
int main() { int bases_num1[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; int index1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; double expected1[] = {10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000.0}; double result1[10]; fu...
O3
c
func0: endbr64 push %r14 push %r13 push %r12 mov %rcx,%r12 push %rbp push %rbx test %edx,%edx jle 174c <func0+0x4c> mov %rdi,%rbp mov %rsi,%r13 lea -0x1(%rdx),%r14d xor %ebx,%ebx pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 cvtsi2sdl 0x0(%rbp,%rbx,4),%xmm0 cvtsi2sdl 0x0(%r13,%rbx,4),%xmm1 callq ...
func0: endbr64 push r14 push r13 push r12 mov r12, rcx push rbp push rbx test edx, edx jle short loc_1659 movsxd rdx, edx mov r13, rdi mov r14, rsi xor ebx, ebx lea rbp, ds:0[rdx*4] nop word ptr [rax+rax+00000000h] loc_1630: pxor xmm0, xmm0 pxor xmm1, xmm1 cvtsi2sd x...
long long func0(long long a1, long long a2, int a3, long long a4) { long long v5; // rbx long long v6; // rbp if ( a3 > 0 ) { v5 = 0LL; v6 = 4LL * a3; do { *(double *)(a4 + 2 * v5) = pow((double)*(int *)(a1 + v5), (double)*(int *)(a2 + v5)); v5 += 4LL; } while ( v6 != v5 );...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 MOV R12,RCX PUSH RBP PUSH RBX TEST EDX,EDX JLE 0x00101659 MOVSXD RDX,EDX MOV R13,RDI MOV R14,RSI XOR EBX,EBX LEA RBP,[RDX*0x4] NOP word ptr CS:[RAX + RAX*0x1] LAB_00101630: PXOR XMM0,XMM0 PXOR XMM1,XMM1 CVTSI2SD XMM0,dword ptr [R13 + RBX*0x1] CVTSI2SD XMM1,dword ptr [R14 + RBX*...
long func0(long param_1,long param_2,int param_3,long param_4) { long lVar1; double dVar2; if (0 < param_3) { lVar1 = 0; do { dVar2 = pow((double)*(int *)(param_1 + lVar1),(double)*(int *)(param_2 + lVar1)); *(double *)(param_4 + lVar1 * 2) = dVar2; lVar1 = lVar1 + 4; } while ((l...
6,052
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> void sortArray(int *arr, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr...
int func0(int *arr, int n) { sortArray(arr, n); int count = 0, max_count = 0, min_count = n; for (int i = 0; i < n - 1; i++) { if (arr[i] == arr[i + 1]) { count++; continue; } else { max_count = (max_count > count) ? max_count : count; ...
int main() { int arr1[10] = {1, 1, 2, 2, 7, 8, 4, 5, 1, 4}; int arr2[9] = {1, 7, 9, 2, 3, 3, 1, 3, 3}; int arr3[4] = {1, 2, 1, 2}; assert(func0(arr1, 10) == 2); assert(func0(arr2, 9) == 3); assert(func0(arr3, 4) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov -0x1c(%rbp),%edx mov -0x18(%rbp),%rax mov %edx,%esi mov %rax,%rdi callq 1169 <sortArray> movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) mov -0x1c(%rbp),%eax mov %eax,-0x8(%rbp) movl $0x...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov edx, [rbp+var_1C] mov rax, [rbp+var_18] mov esi, edx mov rdi, rax call sortArray mov [rbp+var_10], 0 mov [rbp+var_C], 0 mov eax, [rbp+var_1C] mov [rbp+var_8], eax mov ...
long long func0(long long a1, unsigned int a2) { int v2; // eax int v3; // eax int v5; // [rsp+10h] [rbp-10h] int v6; // [rsp+14h] [rbp-Ch] signed int v7; // [rsp+18h] [rbp-8h] int i; // [rsp+1Ch] [rbp-4h] sortArray(a1, a2); v5 = 0; v6 = 0; v7 = a2; for ( i = 0; i < (int)(a2 - 1); ++i ) { ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EDX MOV RDI,RAX CALL 0x00101169 MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 MOV EAX,dword ptr [RBP + -0x1c] MOV dwor...
int func0(long param_1,int param_2) { int iVar1; int iVar2; int4 local_18; int4 local_14; int4 local_10; int4 local_c; sortArray(param_1,param_2); local_18 = 0; local_14 = 0; local_10 = param_2; for (local_c = 0; local_c < param_2 + -1; local_c = local_c + 1) { if (*(int *)(param_1 + (long...
6,053
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> void sortArray(int *arr, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr...
int func0(int *arr, int n) { sortArray(arr, n); int count = 0, max_count = 0, min_count = n; for (int i = 0; i < n - 1; i++) { if (arr[i] == arr[i + 1]) { count++; continue; } else { max_count = (max_count > count) ? max_count : count; ...
int main() { int arr1[10] = {1, 1, 2, 2, 7, 8, 4, 5, 1, 4}; int arr2[9] = {1, 7, 9, 2, 3, 3, 1, 3, 3}; int arr3[4] = {1, 2, 1, 2}; assert(func0(arr1, 10) == 2); assert(func0(arr2, 9) == 3); assert(func0(arr3, 4) == 0); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbp mov %esi,%ebx callq 1169 <sortArray> cmp $0x1,%ebx jle 11fe <func0+0x50> mov %rbp,%rdx lea -0x2(%rbx),%eax lea 0x4(%rbp,%rax,4),%rsi mov $0x0,%eax mov $0x0,%ecx jmp 11e6 <func0+0x38> add $0x1,%ecx add $0x4,%rdx cmp %rsi,%rdx je...
func0: endbr64 push rbp push rbx mov rbp, rdi mov ebx, esi call sortArray cmp ebx, 1 jle short loc_11FE mov rdx, rbp lea eax, [rbx-2] lea rsi, [rbp+rax*4+4] mov eax, 0 mov ecx, 0 jmp short loc_11E6 loc_11DA: add ecx, 1 loc_11DD: add rdx, 4 cmp rdx, rsi jz ...
long long func0(_DWORD *a1, int a2) { int v2; // ebx _DWORD *v3; // rdx long long v4; // rsi int v5; // eax int v6; // ecx v2 = a2; sortArray(); if ( a2 <= 1 ) { v5 = 0; } else { v3 = a1; v4 = (long long)&a1[a2 - 2 + 1]; v5 = 0; v6 = 0; do { if ( *v3 == v3[1] ...
func0: ENDBR64 PUSH RBP PUSH RBX MOV RBP,RDI MOV EBX,ESI CALL 0x00101169 CMP EBX,0x1 JLE 0x001011fe MOV RDX,RBP LEA EAX,[RBX + -0x2] LEA RSI,[RBP + RAX*0x4 + 0x4] MOV EAX,0x0 MOV ECX,0x0 JMP 0x001011e6 LAB_001011da: ADD ECX,0x1 LAB_001011dd: ADD RDX,0x4 CMP RDX,RSI JZ 0x00101203 LAB_001011e6: MOV EDI,dword ptr [RDX + 0...
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; int iVar3; sortArray(); if (param_2 < 2) { iVar2 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 2) + 1; iVar2 = 0; iVar3 = 0; do { if (*param_1 == param_1[1]) { iVar3 = iVar3 + 1; } else { ...
6,054
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> void sortArray(int *arr, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr...
int func0(int *arr, int n) { sortArray(arr, n); int count = 0, max_count = 0, min_count = n; for (int i = 0; i < n - 1; i++) { if (arr[i] == arr[i + 1]) { count++; continue; } else { max_count = (max_count > count) ? max_count : count; ...
int main() { int arr1[10] = {1, 1, 2, 2, 7, 8, 4, 5, 1, 4}; int arr2[9] = {1, 7, 9, 2, 3, 3, 1, 3, 3}; int arr3[4] = {1, 2, 1, 2}; assert(func0(arr1, 10) == 2); assert(func0(arr2, 9) == 3); assert(func0(arr3, 4) == 0); return 0; }
O2
c
func0: endbr64 mov %esi,%r10d callq 12e0 <sortArray> cmp $0x1,%r10d jle 1380 <func0+0x60> lea -0x2(%r10),%eax xor %edx,%edx lea 0x4(%rdi,%rax,4),%rcx xor %eax,%eax jmp 135f <func0+0x3f> nopl 0x0(%rax) cmp %edx,%eax cmovl %edx,%eax cmp %edx,%r10d cmovg %edx,%r10d add $0x4,%rdi xor ...
func0: endbr64 mov r10d, esi call sortArray cmp r10d, 1 jle short loc_1380 lea eax, [r10-2] xor edx, edx lea rcx, [rdi+rax*4+4] xor eax, eax jmp short loc_135F loc_1348: cmp eax, edx cmovl eax, edx cmp r10d, edx cmovg r10d, edx add rdi, 4 xor edx, edx cmp rdi, ...
long long func0(_DWORD *a1) { int v1; // r10d int v2; // edx long long v3; // rcx int v4; // eax sortArray(); if ( v1 <= 1 ) return (unsigned int)-v1; v2 = 0; v3 = (long long)&a1[v1 - 2 + 1]; v4 = 0; do { while ( *a1 == a1[1] ) { ++a1; ++v2; if ( a1 == (_DWORD *)v3 ...
func0: ENDBR64 MOV R10D,ESI CALL 0x001012e0 CMP R10D,0x1 JLE 0x00101380 LEA EAX,[R10 + -0x2] XOR EDX,EDX LEA RCX,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX JMP 0x0010135f LAB_00101348: CMP EAX,EDX CMOVL EAX,EDX CMP R10D,EDX CMOVG R10D,EDX ADD RDI,0x4 XOR EDX,EDX CMP RDI,RCX JZ 0x00101372 LAB_0010135f: MOV ESI,dword ptr [RDI + 0...
int func0(int *param_1,ulong param_2) { int *piVar1; uint uVar2; uint uVar3; int iVar4; param_2 = param_2 & 0xffffffff; sortArray(); iVar4 = (int)param_2; if (iVar4 < 2) { return -iVar4; } uVar3 = 0; piVar1 = param_1 + (ulong)(iVar4 - 2) + 1; uVar2 = 0; do { while (iVar4 = (int)par...
6,055
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> void sortArray(int *arr, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr...
int func0(int *arr, int n) { sortArray(arr, n); int count = 0, max_count = 0, min_count = n; for (int i = 0; i < n - 1; i++) { if (arr[i] == arr[i + 1]) { count++; continue; } else { max_count = (max_count > count) ? max_count : count; ...
int main() { int arr1[10] = {1, 1, 2, 2, 7, 8, 4, 5, 1, 4}; int arr2[9] = {1, 7, 9, 2, 3, 3, 1, 3, 3}; int arr3[4] = {1, 2, 1, 2}; assert(func0(arr1, 10) == 2); assert(func0(arr2, 9) == 3); assert(func0(arr3, 4) == 0); return 0; }
O3
c
func0: endbr64 lea -0x1(%rsi),%edx test %edx,%edx jle 1380 <func0+0xa0> lea 0x4(%rdi),%rcx nopl 0x0(%rax,%rax,1) lea -0x1(%rdx),%r8d mov %rdi,%rax mov %r8,%rdx lea (%rcx,%r8,4),%r10 nopw %cs:0x0(%rax,%rax,1) mov (%rax),%r8d mov 0x4(%rax),%r9d cmp %r9d,%r8d jle 1323 <func0+0x43> mo...
func0: endbr64 lea eax, [rsi-1] mov r8, rdi mov edi, esi test eax, eax jle loc_13AE cdqe lea r10d, [rdi-2] shl rax, 2 shl r10, 2 lea r9, [r8+rax-4] lea rsi, [rax+r8] sub r9, r10 xchg ax, ax loc_1330: mov rax, r8 nop dword ptr [rax+rax+00h] loc_1338: movq xmm0, qw...
long long func0(__m128i *a1, int a2) { int v3; // edi long long v4; // r10 __m128i *v5; // rsi __m128i *v6; // r9 __m128i *v7; // rax __m128i v8; // xmm0 __int32 v9; // esi __int32 *v10; // rcx long long v11; // r9 int v12; // eax int v13; // edx __int32 v14; // r8d v3 = a2; if ( a2 - 1 <=...
func0: ENDBR64 LEA EAX,[RSI + -0x1] MOV R8,RDI MOV EDI,ESI TEST EAX,EAX JLE 0x001013ae CDQE LEA R10D,[RDI + -0x2] SHL RAX,0x2 SHL R10,0x2 LEA R9,[R8 + RAX*0x1 + -0x4] LEA RSI,[RAX + R8*0x1] SUB R9,R10 NOP LAB_00101330: MOV RAX,R8 NOP dword ptr [RAX + RAX*0x1] LAB_00101338: MOVQ XMM0,qword ptr [RAX] PSHUFD XMM1,XMM0,0xe...
int func0(int *param_1,int param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; int iVar5; int *piVar6; uint uVar7; int iVar8; iVar2 = param_2 + -1; if (iVar2 < 1) { return -param_2; } uVar7 = param_2 - 2; piVar4 = param_1; piVar6 = param_1 + iVar2; do { piVar3 = piVar4; ...
6,056
func0
#include <math.h> #include <assert.h> double get_sum(int n) { double sum = 0; int i = 1; while (i <= (int)(sqrt(n))) { if (n % i == 0) { if (n / i == i) { sum = sum + i; } else { sum = sum + i; sum = sum + (n / i)...
int func0(int n) { if (get_sum(n) > n) { return 1; } else { return 0; } }
int main() { assert(func0(12) == 1); assert(func0(15) == 0); assert(func0(18) == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax mov %eax,%edi callq 1169 <get_sum> cvtsi2sdl -0x4(%rbp),%xmm1 comisd %xmm1,%xmm0 jbe 1240 <func0+0x2b> mov $0x1,%eax jmp 1245 <func0+0x30> mov $0x0,%eax leaveq retq
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov eax, [rbp+var_4] mov edi, eax call get_sum movq rax, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, [rbp+var_4] movq xmm1, rax comisd xmm1, xmm0 jbe short loc_1270 mov eax, 1 jmp short locret_1275 loc_1270: m...
_BOOL8 func0(int a1) { return get_sum((unsigned int)a1) > (double)a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] MOV EDI,EAX CALL 0x00101169 MOVQ RAX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,dword ptr [RBP + -0x4] MOVQ XMM1,RAX COMISD XMM1,XMM0 JBE 0x00101270 MOV EAX,0x1 JMP 0x00101275 LAB_00101270: MOV EAX,0x0 LAB_00101275: LE...
bool func0(int param_1) { double dVar1; dVar1 = (double)get_sum(param_1); return (double)param_1 < dVar1; }
6,057
func0
#include <math.h> #include <assert.h> double get_sum(int n) { double sum = 0; int i = 1; while (i <= (int)(sqrt(n))) { if (n % i == 0) { if (n / i == i) { sum = sum + i; } else { sum = sum + i; sum = sum + (n / i)...
int func0(int n) { if (get_sum(n) > n) { return 1; } else { return 0; } }
int main() { assert(func0(12) == 1); assert(func0(15) == 0); assert(func0(18) == 1); return 0; }
O1
c
func0: endbr64 push %rbx mov %edi,%ebx callq 1169 <get_sum> movapd %xmm0,%xmm1 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 comisd %xmm0,%xmm1 seta %al movzbl %al,%eax pop %rbx retq
func0: endbr64 push rbx mov ebx, edi call get_sum movapd xmm1, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, ebx comisd xmm1, xmm0 setnbe al movzx eax, al pop rbx retn
_BOOL8 func0(int a1) { return get_sum() > (double)a1; }
func0: ENDBR64 PUSH RBX MOV EBX,EDI CALL 0x00101169 MOVAPD XMM1,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EBX COMISD XMM1,XMM0 SETA AL MOVZX EAX,AL POP RBX RET
bool func0(int param_1) { double dVar1; dVar1 = (double)get_sum(); return (double)param_1 < dVar1; }
6,058
func0
#include <math.h> #include <assert.h> double get_sum(int n) { double sum = 0; int i = 1; while (i <= (int)(sqrt(n))) { if (n % i == 0) { if (n / i == i) { sum = sum + i; } else { sum = sum + i; sum = sum + (n / i)...
int func0(int n) { if (get_sum(n) > n) { return 1; } else { return 0; } }
int main() { assert(func0(12) == 1); assert(func0(15) == 0); assert(func0(18) == 1); return 0; }
O2
c
func0: endbr64 push %rbx mov %edi,%ebx callq 1220 <get_sum> xor %eax,%eax movapd %xmm0,%xmm1 pxor %xmm0,%xmm0 cvtsi2sd %ebx,%xmm0 pop %rbx comisd %xmm0,%xmm1 seta %al retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 push rbx mov ebx, edi call get_sum xor eax, eax movapd xmm1, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, ebx pop rbx comisd xmm1, xmm0 setnbe al retn
_BOOL8 func0(int a1) { return get_sum() > (double)a1; }
func0: ENDBR64 PUSH RBX MOV EBX,EDI CALL 0x00101220 XOR EAX,EAX MOVAPD XMM1,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EBX POP RBX COMISD XMM1,XMM0 SETA AL RET
bool func0(int param_1) { double dVar1; dVar1 = (double)get_sum(); return (double)param_1 < dVar1; }
6,059
func0
#include <math.h> #include <assert.h> double get_sum(int n) { double sum = 0; int i = 1; while (i <= (int)(sqrt(n))) { if (n % i == 0) { if (n / i == i) { sum = sum + i; } else { sum = sum + i; sum = sum + (n / i)...
int func0(int n) { if (get_sum(n) > n) { return 1; } else { return 0; } }
int main() { assert(func0(12) == 1); assert(func0(15) == 0); assert(func0(18) == 1); return 0; }
O3
c
func0: endbr64 pxor %xmm2,%xmm2 push %rbp pxor %xmm1,%xmm1 cvtsi2sd %edi,%xmm2 push %rbx sub $0x28,%rsp movapd %xmm2,%xmm0 ucomisd %xmm2,%xmm1 sqrtsd %xmm0,%xmm0 cvttsd2si %xmm0,%ebx ja 1378 <func0+0x78> lea 0x1(%rbx),%esi mov $0x1,%ecx test %ebx,%ebx jle 1364 <func0+0x64> nopl 0x0(%rax) mov...
func0: endbr64 pxor xmm2, xmm2 pxor xmm0, xmm0 cvtsi2sd xmm2, edi ucomisd xmm0, xmm2 ja short loc_136A movapd xmm0, xmm2 pxor xmm1, xmm1 mov ecx, 1 sqrtsd xmm0, xmm0 cvttsd2si esi, xmm0 test esi, esi jle short loc_135C nop loc_1330: mov eax, edi cdq idiv ecx test edx, edx jnz sh...
_BOOL8 func0(int a1) { double v1; // xmm2_8 double v2; // xmm1_8 int v3; // ecx int v4; // esi int v5; // eax double v7; // xmm1_8 int i; // ebx int v9; // eax v1 = (double)a1; if ( (double)a1 < 0.0 ) { v7 = 0.0; for ( i = 1; i <= (int)sqrt(v1); ++i ) { v9 = a1 / i; if ( ...
func0: ENDBR64 PXOR XMM2,XMM2 PXOR XMM0,XMM0 CVTSI2SD XMM2,EDI UCOMISD XMM0,XMM2 JA 0x0010136a MOVAPD XMM0,XMM2 PXOR XMM1,XMM1 MOV ECX,0x1 SQRTSD XMM0,XMM0 CVTTSD2SI ESI,XMM0 TEST ESI,ESI JLE 0x0010135c NOP LAB_00101330: MOV EAX,EDI CDQ IDIV ECX TEST EDX,EDX JNZ 0x00101355 PXOR XMM0,XMM0 CVTSI2SD XMM0,ECX ADDSD XMM1,XM...
bool func0(int param_1) { int iVar1; double dVar2; double dVar3; double __x; __x = (double)param_1; if (0.0 <= __x) { dVar2 = 0.0; iVar1 = 1; dVar3 = 0.0; if (0 < (int)SQRT(__x)) { do { dVar2 = dVar3; if (param_1 % iVar1 == 0) { dVar2 = dVar3 + (double)iVa...
6,060
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* text) { static char result[100]; strcpy(result, text); for (int i = 0; result[i] != '\0'; i++) { if (result[i] == ' ' || result[i] == ',' || result[i] == '.') result[i] = ':'; } return result; }
int main() { assert(strcmp(func0("Boult Curve Wireless Neckband"), "Boult:Curve:Wireless:Neckband") == 0); assert(strcmp(func0("Stereo Sound Sweatproof"), "Stereo:Sound:Sweatproof") == 0); assert(strcmp(func0("Probass Curve Audio"), "Probass:Curve:Audio") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax mov %rax,%rsi lea 0x2e99(%rip),%rdi callq 1070 <strcpy@plt> movl $0x0,-0x4(%rbp) jmp 1205 <func0+0x7c> mov -0x4(%rbp),%eax cltq lea 0x2e7f(%rip),%rdx movzbl (%rax,%rdx,1),%eax cmp $0x20,%al...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+src], rdi mov rax, [rbp+src] mov rsi, rax; src lea rax, result_1 mov rdi, rax; dest call _strcpy mov [rbp+var_4], 0 jmp short loc_1208 loc_11B8: mov eax, [rbp+var_4] cdqe lea rdx, result_1 movzx eax, byte ptr ...
char * func0(const char *a1) { int i; // [rsp+1Ch] [rbp-4h] strcpy(result_1, a1); for ( i = 0; result_1[i]; ++i ) { if ( result_1[i] == 32 || result_1[i] == 44 || result_1[i] == 46 ) result_1[i] = 58; } return result_1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] MOV RSI,RAX LEA RAX,[0x104040] MOV RDI,RAX CALL 0x00101070 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101208 LAB_001011b8: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[0x104040] MOVZX EAX,byte ptr [RAX + RDX*0x1...
int1 * func0(char *param_1) { int local_c; strcpy(result_1,param_1); for (local_c = 0; result_1[local_c] != '\0'; local_c = local_c + 1) { if (((result_1[local_c] == ' ') || (result_1[local_c] == ',')) || (result_1[local_c] == '.')) { result_1[local_c] = 0x3a; } } return result_1; }
6,061
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* text) { static char result[100]; strcpy(result, text); for (int i = 0; result[i] != '\0'; i++) { if (result[i] == ' ' || result[i] == ',' || result[i] == '.') result[i] = ':'; } return result; }
int main() { assert(strcmp(func0("Boult Curve Wireless Neckband"), "Boult:Curve:Wireless:Neckband") == 0); assert(strcmp(func0("Stereo Sound Sweatproof"), "Stereo:Sound:Sweatproof") == 0); assert(strcmp(func0("Probass Curve Audio"), "Probass:Curve:Audio") == 0); return 0; }
O1
c
func0: endbr64 sub $0x8,%rsp mov %rdi,%rsi mov $0x64,%edx lea 0x2ec0(%rip),%rdi callq 1070 <__strcpy_chk@plt> movzbl 0x2eb4(%rip),%eax test %al,%al je 11b7 <func0+0x4e> lea 0x2ea9(%rip),%rdx jmp 11a7 <func0+0x3e> movb $0x3a,(%rdx) add $0x1,%rdx movzbl (%rdx),%eax test %al,%al je 11b7...
func0: endbr64 sub rsp, 8 mov rsi, rdi mov edx, 64h ; 'd' lea rdi, result_1 call ___strcpy_chk movzx eax, cs:result_1 test al, al jz short loc_11DD lea rdx, result_1 mov rcx, 500100000000h jmp short loc_11D1 loc_11C3: mov byte ptr [rdx], 3Ah ; ':' loc_11C6: add rdx, 1 mo...
char * func0(long long a1) { unsigned long long v1; // rax char *v2; // rdx long long v3; // rcx __strcpy_chk(&result_1, a1, 100LL); v1 = (unsigned __int8)result_1; if ( result_1 ) { v2 = &result_1; v3 = 0x500100000000LL; do { if ( (unsigned __int8)v1 <= 0x2Eu && _bittest64(&v3, v1)...
func0: ENDBR64 SUB RSP,0x8 MOV RSI,RDI MOV EDX,0x64 LEA RDI,[0x104040] CALL 0x00101090 MOVZX EAX,byte ptr [0x00104040] TEST AL,AL JZ 0x001011dd LEA RDX,[0x104040] MOV RCX,0x500100000000 JMP 0x001011d1 LAB_001011c3: MOV byte ptr [RDX],0x3a LAB_001011c6: ADD RDX,0x1 MOVZX EAX,byte ptr [RDX] TEST AL,AL JZ 0x001011dd LAB_0...
int1 * func0(int8 param_1) { byte bVar1; byte *pbVar2; __strcpy_chk(&result_1,param_1,100); if (result_1 != 0) { pbVar2 = &result_1; bVar1 = result_1; do { if ((bVar1 < 0x2f) && ((0x500100000000U >> ((ulong)bVar1 & 0x3f) & 1) != 0)) { *pbVar2 = 0x3a; } pbVar2 = pbVar2 +...
6,062
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* text) { static char result[100]; strcpy(result, text); for (int i = 0; result[i] != '\0'; i++) { if (result[i] == ' ' || result[i] == ',' || result[i] == '.') result[i] = ':'; } return result; }
int main() { assert(strcmp(func0("Boult Curve Wireless Neckband"), "Boult:Curve:Wireless:Neckband") == 0); assert(strcmp(func0("Stereo Sound Sweatproof"), "Stereo:Sound:Sweatproof") == 0); assert(strcmp(func0("Probass Curve Audio"), "Probass:Curve:Audio") == 0); return 0; }
O2
c
func0: endbr64 mov %rdi,%rsi sub $0x8,%rsp mov $0x64,%edx lea 0x2dd9(%rip),%rdi callq 1070 <__strcpy_chk@plt> movzbl 0x2dcd(%rip),%eax test %al,%al je 129d <func0+0x4d> lea 0x2dc2(%rip),%rdx xchg %ax,%ax mov %eax,%ecx and $0xfffffffd,%ecx cmp $0x2c,%cl je 128e <func0+0x3e> cmp $0...
func0: endbr64 lea r8, result_1 mov rsi, rdi sub rsp, 8 mov edx, 64h ; 'd' mov rdi, r8 call ___strcpy_chk mov r8, rax movzx eax, cs:result_1 test al, al jz short loc_12B9 mov rcx, 500100000000h mov rdx, r8 nop word ptr [rax+rax+00h] loc_12A0: cmp al, 2Eh ; '.' ja ...
long long func0(long long a1) { long long v1; // r8 unsigned long long v2; // rax long long v3; // rcx _BYTE *v4; // rdx v1 = __strcpy_chk(&result_1, a1, 100LL); v2 = (unsigned __int8)result_1; if ( result_1 ) { v3 = 0x500100000000LL; v4 = (_BYTE *)v1; do { if ( (unsigned __int8)...
func0: ENDBR64 LEA R8,[0x104040] MOV RSI,RDI SUB RSP,0x8 MOV EDX,0x64 MOV RDI,R8 CALL 0x00101090 MOV R8,RAX MOVZX EAX,byte ptr [0x00104040] TEST AL,AL JZ 0x001012b9 MOV RCX,0x500100000000 MOV RDX,R8 NOP word ptr [RAX + RAX*0x1] LAB_001012a0: CMP AL,0x2e JA 0x001012ad BT RCX,RAX JNC 0x001012ad MOV byte ptr [RDX],0x3a LA...
int1 * func0(int8 param_1) { byte *pbVar1; byte bVar2; int1 *puVar3; int1 *puVar4; puVar3 = (int1 *)__strcpy_chk(&result_1,param_1,100); puVar4 = puVar3; bVar2 = result_1; while (bVar2 != 0) { if ((bVar2 < 0x2f) && ((0x500100000000U >> ((ulong)bVar2 & 0x3f) & 1) != 0)) { *puVar4 = 0x3a; ...
6,063
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(const char* text) { static char result[100]; strcpy(result, text); for (int i = 0; result[i] != '\0'; i++) { if (result[i] == ' ' || result[i] == ',' || result[i] == '.') result[i] = ':'; } return result; }
int main() { assert(strcmp(func0("Boult Curve Wireless Neckband"), "Boult:Curve:Wireless:Neckband") == 0); assert(strcmp(func0("Stereo Sound Sweatproof"), "Stereo:Sound:Sweatproof") == 0); assert(strcmp(func0("Probass Curve Audio"), "Probass:Curve:Audio") == 0); return 0; }
O3
c
func0: endbr64 mov %rdi,%rsi sub $0x8,%rsp mov $0x64,%edx lea 0x2dd9(%rip),%rdi callq 1070 <__strcpy_chk@plt> movzbl 0x2dcd(%rip),%eax test %al,%al je 129a <func0+0x4a> lea 0x2dc2(%rip),%rdx xchg %ax,%ax mov %eax,%ecx and $0xfffffffd,%ecx cmp $0x2c,%cl je 12b0 <func0+0x60> cmp $0...
func0: endbr64 mov rsi, rdi sub rsp, 8 mov edx, 64h ; 'd' lea rdi, result_1 call ___strcpy_chk mov rdi, rax movzx eax, cs:result_1 test al, al jz short loc_12B9 mov rcx, 500100000000h mov rdx, rdi nop word ptr [rax+rax+00000000h] loc_12A0: cmp al, 2Eh ; '.' ja short...
long long func0(long long a1) { long long v1; // rdi unsigned long long v2; // rax long long v3; // rcx _BYTE *v4; // rdx v1 = __strcpy_chk(&result_1, a1, 100LL); v2 = (unsigned __int8)result_1; if ( result_1 ) { v3 = 0x500100000000LL; v4 = (_BYTE *)v1; do { if ( (unsigned __int8...
func0: ENDBR64 MOV RSI,RDI SUB RSP,0x8 MOV EDX,0x64 LEA RDI,[0x104040] CALL 0x00101090 MOV RDI,RAX MOVZX EAX,byte ptr [0x00104040] TEST AL,AL JZ 0x001012b9 MOV RCX,0x500100000000 MOV RDX,RDI NOP word ptr [RAX + RAX*0x1] LAB_001012a0: CMP AL,0x2e JA 0x001012ad BT RCX,RAX JNC 0x001012ad MOV byte ptr [RDX],0x3a LAB_001012...
int * func0(int8 param_1) { byte *pbVar1; byte bVar2; int *puVar3; int *puVar4; puVar3 = (int *)__strcpy_chk(&result_1,param_1,100); puVar4 = puVar3; bVar2 = result_1; while (bVar2 != 0) { if ((bVar2 < 0x2f) && ((0x500100000000U >> ((ulong)bVar2 & 0x3f) & 1) != 0)) { *puVar4 = 0x3a; } ...
6,064
func0
#include <assert.h>
int func0(long long num1, long long num2) { long long number = num1 + num2; int count = 0; while (number > 0) { number = number / 10; count = count + 1; } return count; }
int main() { assert(func0(9875, 10) == 4); assert(func0(98759853034, 100) == 11); assert(func0(1234567, 500) == 7); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov -0x18(%rbp),%rdx mov -0x20(%rbp),%rax add %rdx,%rax mov %rax,-0x8(%rbp) movl $0x0,-0xc(%rbp) jmp 119e <func0+0x55> mov -0x8(%rbp),%rcx movabs $0x6666666666666667,%rdx mov %rcx,%rax imul %rdx sar $...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rdx, [rbp+var_18] mov rax, [rbp+var_20] add rax, rdx mov [rbp+var_8], rax mov [rbp+var_C], 0 jmp short loc_119E loc_1171: mov rcx, [rbp+var_8] mov rdx, 6666666666666667h mov rax, rcx i...
long long func0(long long a1, long long a2) { unsigned int v3; // [rsp+14h] [rbp-Ch] long long v4; // [rsp+18h] [rbp-8h] v4 = a1 + a2; v3 = 0; while ( v4 > 0 ) { v4 /= 10LL; ++v3; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RDX MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010119e LAB_00101171: MOV RCX,qword ptr [RBP + -0x8] MOV RDX,0x666666666666...
int func0(long param_1,long param_2) { int4 local_14; int8 local_10; local_14 = 0; for (local_10 = param_2 + param_1; 0 < local_10; local_10 = local_10 / 10) { local_14 = local_14 + 1; } return local_14; }
6,065
func0
#include <assert.h>
int func0(long long num1, long long num2) { long long number = num1 + num2; int count = 0; while (number > 0) { number = number / 10; count = count + 1; } return count; }
int main() { assert(func0(9875, 10) == 4); assert(func0(98759853034, 100) == 11); assert(func0(1234567, 500) == 7); return 0; }
O1
c
func0: endbr64 add %rdi,%rsi test %rsi,%rsi jle 1167 <func0+0x3e> mov $0x0,%ecx movabs $0x6666666666666667,%r8 mov %rsi,%rdi mov %rsi,%rax imul %r8 sar $0x2,%rdx sar $0x3f,%rsi sub %rsi,%rdx mov %rdx,%rsi add $0x1,%ecx cmp $0x9,%rdi jg 1144 <func0+0x1b> mov %ecx,%eax retq mov...
func0: endbr64 add rdi, rsi test rdi, rdi jle short loc_116A mov ecx, 0 mov r8, 6666666666666667h loc_1144: mov rsi, rdi mov rax, rdi imul r8 sar rdx, 2 mov rax, rdi sar rax, 3Fh sub rdx, rax mov rdi, rdx add ecx, 1 cmp rsi, 9 jg short loc_1144 loc_1167: mo...
long long func0(long long a1, long long a2) { long long v2; // rdi unsigned int v3; // ecx long long v4; // rsi v2 = a2 + a1; if ( v2 <= 0 ) { return 0; } else { v3 = 0; do { v4 = v2; v2 /= 10LL; ++v3; } while ( v4 > 9 ); } return v3; }
func0: ENDBR64 ADD RDI,RSI TEST RDI,RDI JLE 0x0010116a MOV ECX,0x0 MOV R8,0x6666666666666667 LAB_00101144: MOV RSI,RDI MOV RAX,RDI IMUL R8 SAR RDX,0x2 MOV RAX,RDI SAR RAX,0x3f SUB RDX,RAX MOV RDI,RDX ADD ECX,0x1 CMP RSI,0x9 JG 0x00101144 LAB_00101167: MOV EAX,ECX RET LAB_0010116a: MOV ECX,0x0 JMP 0x00101167
int func0(long param_1,long param_2) { bool bVar1; int iVar2; long lVar3; if (param_1 + param_2 < 1) { iVar2 = 0; } else { iVar2 = 0; lVar3 = param_1 + param_2; do { iVar2 = iVar2 + 1; bVar1 = 9 < lVar3; lVar3 = lVar3 / 10; } while (bVar1); } return iVar2; }
6,066
func0
#include <assert.h>
int func0(long long num1, long long num2) { long long number = num1 + num2; int count = 0; while (number > 0) { number = number / 10; count = count + 1; } return count; }
int main() { assert(func0(9875, 10) == 4); assert(func0(98759853034, 100) == 11); assert(func0(1234567, 500) == 7); return 0; }
O2
c
func0: endbr64 lea (%rdi,%rsi,1),%rdx xor %r8d,%r8d test %rdx,%rdx jle 1177 <func0+0x37> movabs $0xcccccccccccccccd,%rsi nopw 0x0(%rax,%rax,1) mov %rdx,%rax mov %rdx,%rcx add $0x1,%r8d mul %rsi shr $0x3,%rdx cmp $0x9,%rcx jg 1160 <func0+0x20> mov %r8d,%eax retq nopl 0x0(%rax,%rax...
func0: endbr64 lea rdx, [rdi+rsi] xor r8d, r8d test rdx, rdx jle short loc_1177 mov rsi, 0CCCCCCCCCCCCCCCDh nop word ptr [rax+rax+00h] loc_1160: mov rax, rdx mov rcx, rdx add r8d, 1 mul rsi shr rdx, 3 cmp rcx, 9 jg short loc_1160 loc_1177: mov eax, r8d retn
long long func0(long long a1, long long a2) { unsigned long long v2; // rdx unsigned int v3; // r8d long long v4; // rcx v2 = a1 + a2; v3 = 0; if ( a1 + a2 > 0 ) { do { v4 = v2; ++v3; v2 /= 0xAuLL; } while ( v4 > 9 ); } return v3; }
func0: ENDBR64 LEA RDX,[RDI + RSI*0x1] XOR R8D,R8D TEST RDX,RDX JLE 0x00101177 MOV RSI,-0x3333333333333333 NOP word ptr [RAX + RAX*0x1] LAB_00101160: MOV RAX,RDX MOV RCX,RDX ADD R8D,0x1 MUL RSI SHR RDX,0x3 CMP RCX,0x9 JG 0x00101160 LAB_00101177: MOV EAX,R8D RET
int func0(long param_1,long param_2) { bool bVar1; ulong uVar2; int iVar3; uVar2 = param_1 + param_2; iVar3 = 0; if (0 < (long)uVar2) { do { iVar3 = iVar3 + 1; bVar1 = 9 < (long)uVar2; uVar2 = uVar2 / 10; } while (bVar1); } return iVar3; }
6,067
func0
#include <assert.h>
int func0(long long num1, long long num2) { long long number = num1 + num2; int count = 0; while (number > 0) { number = number / 10; count = count + 1; } return count; }
int main() { assert(func0(9875, 10) == 4); assert(func0(98759853034, 100) == 11); assert(func0(1234567, 500) == 7); return 0; }
O3
c
func0: endbr64 lea (%rdi,%rsi,1),%rdx xor %r8d,%r8d test %rdx,%rdx jle 1177 <func0+0x37> movabs $0xcccccccccccccccd,%rsi nopw 0x0(%rax,%rax,1) mov %rdx,%rax mov %rdx,%rcx add $0x1,%r8d mul %rsi shr $0x3,%rdx cmp $0x9,%rcx jg 1160 <func0+0x20> mov %r8d,%eax retq nopl 0x0(%rax,%rax...
func0: endbr64 lea rdx, [rdi+rsi] xor esi, esi test rdx, rdx jle short loc_1176 mov rdi, 0CCCCCCCCCCCCCCCDh nop dword ptr [rax+00000000h] loc_1160: mov rax, rdx mov rcx, rdx add esi, 1 mul rdi shr rdx, 3 cmp rcx, 9 jg short loc_1160 loc_1176: mov eax, esi retn
long long func0(long long a1, long long a2) { long long v2; // rdx unsigned int v3; // esi long long v4; // rcx v2 = a1 + a2; v3 = 0; if ( v2 > 0 ) { do { v4 = v2; ++v3; v2 /= 0xAuLL; } while ( v4 > 9 ); } return v3; }
func0: ENDBR64 LEA RDX,[RDI + RSI*0x1] XOR ESI,ESI TEST RDX,RDX JLE 0x00101176 MOV RDI,-0x3333333333333333 NOP dword ptr [RAX] LAB_00101160: MOV RAX,RDX MOV RCX,RDX ADD ESI,0x1 MUL RDI SHR RDX,0x3 CMP RCX,0x9 JG 0x00101160 LAB_00101176: MOV EAX,ESI RET
int func0(long param_1,long param_2) { bool bVar1; ulong uVar2; int iVar3; uVar2 = param_1 + param_2; iVar3 = 0; if (0 < (long)uVar2) { do { iVar3 = iVar3 + 1; bVar1 = 9 < (long)uVar2; uVar2 = uVar2 / 10; } while (bVar1); } return iVar3; }
6,068
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { static char res[1000]; strcpy(res, ""); // initialize result string for(int i = 0; i < size; i++) { strcat(res, test_list[i]); // append string to result strcat(res, " "); // append space after each tuple element } res[strlen(res) - 1...
int main() { char* list1[] = {"1", "4", "6", "5", "8", "2", "9", "1", "10"}; assert(strcmp(func0(list1, 9), "1 4 6 5 8 2 9 1 10") == 0); char* list2[] = {"2", "3", "4", "6", "9", "3", "2", "2", "11"}; assert(strcmp(func0(list2, 9), "2 3 4 6 9 3 2 2 11") == 0); char* list3[] = {"14", "21", "...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movb $0x0,0x2e5d(%rip) movl $0x0,-0x4(%rbp) jmp 124a <func0+0x81> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%rax mov %rax,%rsi lea ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov cs:res_1, 0 mov [rbp+var_4], 0 jmp short loc_123A loc_11EC: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var_18] add rax, rdx mov rax, [rax] mov rsi, r...
char * func0(long long a1, int a2) { int i; // [rsp+1Ch] [rbp-4h] res_1[0] = 0; for ( i = 0; i < a2; ++i ) { strcat(res_1, *(const char **)(8LL * i + a1)); *(_WORD *)&res_1[strlen(res_1)] = 32; } res_1[strlen(res_1) - 1] = 0; return res_1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV byte ptr [0x00104040],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010123a LAB_001011ec: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x8] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV RAX,qword ptr [...
int1 * func0(long param_1,int param_2) { size_t sVar1; int local_c; res_1[0] = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { strcat(res_1,*(char **)(param_1 + (long)local_c * 8)); sVar1 = strlen(res_1); *(int2 *)(res_1 + sVar1) = 0x20; } sVar1 = strlen(res_1); (&DAT_0010...
6,069
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { static char res[1000]; strcpy(res, ""); // initialize result string for(int i = 0; i < size; i++) { strcat(res, test_list[i]); // append string to result strcat(res, " "); // append space after each tuple element } res[strlen(res) - 1...
int main() { char* list1[] = {"1", "4", "6", "5", "8", "2", "9", "1", "10"}; assert(strcmp(func0(list1, 9), "1 4 6 5 8 2 9 1 10") == 0); char* list2[] = {"2", "3", "4", "6", "9", "3", "2", "2", "11"}; assert(strcmp(func0(list2, 9), "2 3 4 6 9 3 2 2 11") == 0); char* list3[] = {"14", "21", "...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx movb $0x0,0x2ea8(%rip) test %esi,%esi jle 11db <func0+0x52> mov %rdi,%rbx lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%r12 lea 0x2e92(%rip),%rbp mov $0x3e8,%edx mov (%rbx),%rsi mov %rbp,%rdi callq 1070 <__strcat_chk@plt> mov $0x3e8,%edx lea...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov cs:res_1, 0 test esi, esi jle short loc_1224 mov rbx, rdi lea eax, [rsi-1] lea r13, [rdi+rax*8+8] lea rbp, res_1 lea r12, a658; " 658" loc_11FB: mov edx, 3E8h mov rsi, [rbx] mov rdi, rbp call ...
char * func0(_QWORD *a1, int a2) { _QWORD *v2; // rbx res_1[0] = 0; if ( a2 > 0 ) { v2 = a1; do { __strcat_chk(res_1, *v2, 1000LL); __strcat_chk(res_1, a658, 1000LL); ++v2; } while ( v2 != &a1[(unsigned int)(a2 - 1) + 1] ); } res_1[strlen(res_1) - 1] = 0; return res_...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV byte ptr [0x00104040],0x0 TEST ESI,ESI JLE 0x00101224 MOV RBX,RDI LEA EAX,[RSI + -0x1] LEA R13,[RDI + RAX*0x8 + 0x8] LEA RBP,[0x104040] LEA R12,[0x102004] LAB_001011fb: MOV EDX,0x3e8 MOV RSI,qword ptr [RBX] MOV RDI,RBP CALL 0x00101090 MOV EDX,0x3e8 MOV ...
int1 * func0(int8 *param_1,int param_2) { int8 *puVar1; size_t sVar2; res_1[0] = 0; if (0 < param_2) { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { __strcat_chk(res_1,*param_1,1000); __strcat_chk(res_1,&DAT_00102004,1000); param_1 = param_1 + 1; } while (param_1 != puVar1)...
6,070
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { static char res[1000]; strcpy(res, ""); // initialize result string for(int i = 0; i < size; i++) { strcat(res, test_list[i]); // append string to result strcat(res, " "); // append space after each tuple element } res[strlen(res) - 1...
int main() { char* list1[] = {"1", "4", "6", "5", "8", "2", "9", "1", "10"}; assert(strcmp(func0(list1, 9), "1 4 6 5 8 2 9 1 10") == 0); char* list2[] = {"2", "3", "4", "6", "9", "3", "2", "2", "11"}; assert(strcmp(func0(list2, 9), "2 3 4 6 9 3 2 2 11") == 0); char* list3[] = {"14", "21", "...
O2
c
func0: endbr64 push %r12 movb $0x0,0x2c23(%rip) push %rbp push %rbx test %esi,%esi jle 14ad <func0+0x9d> lea -0x1(%rsi),%eax mov %rdi,%r12 lea 0x2ff4(%rip),%rbx lea 0x8(%rdi,%rax,8),%rbp nopl 0x0(%rax) lea 0x2bf9(%rip),%rdi mov (%rdi),%edx add $0x4,%rdi lea -0x1010101(%rdx),%eax n...
func0: endbr64 push r14 mov cs:res_1, 0 push r13 push r12 lea r12, res_1 push rbp push rbx test esi, esi jle short loc_14A9 lea eax, [rsi-1] mov rbx, rdi lea r13, [r12+3E8h] lea r14, [rdi+rax*8+8] lea rbp, a658; " 658" nop dword ptr [rax+rax+00000000h] loc_1470: mov...
char * func0(long long a1, int a2) { long long v2; // rbx long long v3; // rax long long v4; // rax res_1[0] = 0; if ( a2 > 0 ) { v2 = a1; do { v2 += 8LL; v3 = strlen(res_1); v4 = __stpcpy_chk(&res_1[v3], *(_QWORD *)(v2 - 8), 1000LL); __memcpy_chk(v4, a658, 2LL, &res_1[-...
func0: ENDBR64 PUSH R14 MOV byte ptr [0x00104040],0x0 PUSH R13 PUSH R12 LEA R12,[0x104040] PUSH RBP PUSH RBX TEST ESI,ESI JLE 0x001014a9 LEA EAX,[RSI + -0x1] MOV RBX,RDI LEA R13,[R12 + 0x3e8] LEA R14,[RDI + RAX*0x8 + 0x8] LEA RBP,[0x102004] NOP dword ptr [RAX + RAX*0x1] LAB_00101470: MOV RDI,R12 ADD RBX,0x8 CALL 0x0010...
int1 * func0(int8 *param_1,int param_2) { size_t sVar1; long lVar2; int8 *puVar3; int8 *puVar4; res_1[0] = 0; if (0 < param_2) { puVar3 = param_1; do { puVar4 = puVar3 + 1; sVar1 = strlen(res_1); lVar2 = __stpcpy_chk(res_1 + sVar1,*puVar3,1000); __memcpy_chk(lVar2,&DAT_00...
6,071
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { static char res[1000]; strcpy(res, ""); // initialize result string for(int i = 0; i < size; i++) { strcat(res, test_list[i]); // append string to result strcat(res, " "); // append space after each tuple element } res[strlen(res) - 1...
int main() { char* list1[] = {"1", "4", "6", "5", "8", "2", "9", "1", "10"}; assert(strcmp(func0(list1, 9), "1 4 6 5 8 2 9 1 10") == 0); char* list2[] = {"2", "3", "4", "6", "9", "3", "2", "2", "11"}; assert(strcmp(func0(list2, 9), "2 3 4 6 9 3 2 2 11") == 0); char* list3[] = {"14", "21", "...
O3
c
func0: endbr64 push %r12 movb $0x0,0x2be3(%rip) push %rbp push %rbx test %esi,%esi jle 14ed <func0+0x9d> lea -0x1(%rsi),%eax mov %rdi,%r12 lea 0x2fb4(%rip),%rbx lea 0x8(%rdi,%rax,8),%rbp nopl 0x0(%rax) lea 0x2bb9(%rip),%rdi mov (%rdi),%edx add $0x4,%rdi lea -0x1010101(%rdx),%eax n...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx lea rbx, res_1 mov cs:res_1, 0 test esi, esi jle short loc_1539 movsxd rsi, esi mov r14, rdi lea r12, [rbx+3E8h] lea r13, [rdi+rsi*8] lea rbp, unk_2004 nop word ptr [rax+rax+00000000h] loc_1500: mov rdi, r...
char * func0(long long a1, int a2) { long long v2; // r14 size_t v3; // rax long long v4; // rax res_1[0] = 0; if ( a2 > 0 ) { v2 = a1; do { v2 += 8LL; v3 = strlen(res_1); v4 = __stpcpy_chk(&res_1[v3], *(_QWORD *)(v2 - 8), 1000LL); __memcpy_chk(v4, &unk_2004, 2LL, &res_1...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX LEA RBX,[0x104040] MOV byte ptr [0x00104040],0x0 TEST ESI,ESI JLE 0x00101539 MOVSXD RSI,ESI MOV R14,RDI LEA R12,[RBX + 0x3e8] LEA R13,[RDI + RSI*0x8] LEA RBP,[0x102004] NOP word ptr CS:[RAX + RAX*0x1] LAB_00101500: MOV RDI,RBX ADD R14,0x8 CALL 0x001010a0 MOV R...
int1 * func0(int8 *param_1,int param_2) { size_t sVar1; long lVar2; int8 *puVar3; int8 *puVar4; res_1[0] = 0; if (0 < param_2) { puVar3 = param_1; do { puVar4 = puVar3 + 1; sVar1 = strlen(res_1); lVar2 = __stpcpy_chk(res_1 + sVar1,*puVar3,1000); __memcpy_chk(lVar2,&DAT_00...
6,072
func0
#include <assert.h> int take_L_and_F_set_bits(int n) { n = n | n >> 1; n = n | n >> 2; n = n | n >> 4; n = n | n >> 8; n = n | n >> 16; return ((n + 1) >> 1) + 1; }
int func0(int n) { if (n == 1) { return 0; } return n ^ take_L_and_F_set_bits(n); }
int main() { assert(func0(10) == 3); assert(func0(15) == 6); assert(func0(20) == 5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x8,%rsp mov %edi,-0x4(%rbp) cmpl $0x1,-0x4(%rbp) jne 11a9 <func0+0x1c> mov $0x0,%eax jmp 11b6 <func0+0x29> mov -0x4(%rbp),%eax mov %eax,%edi callq 1149 <take_L_and_F_set_bits> xor -0x4(%rbp),%eax leaveq retq
func0: endbr64 push rbp mov rbp, rsp sub rsp, 8 mov [rbp+var_4], edi cmp [rbp+var_4], 1 jnz short loc_11A9 mov eax, 0 jmp short locret_11B6 loc_11A9: mov eax, [rbp+var_4] mov edi, eax call take_L_and_F_set_bits xor eax, [rbp+var_4] locret_11B6: leave retn
long long func0(unsigned int a1) { if ( a1 == 1 ) return 0LL; else return a1 ^ (unsigned int)take_L_and_F_set_bits(a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x8 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x1 JNZ 0x001011a9 MOV EAX,0x0 JMP 0x001011b6 LAB_001011a9: MOV EAX,dword ptr [RBP + -0x4] MOV EDI,EAX CALL 0x00101149 XOR EAX,dword ptr [RBP + -0x4] LAB_001011b6: LEAVE RET
uint func0(uint param_1) { uint uVar1; if (param_1 == 1) { uVar1 = 0; } else { uVar1 = take_L_and_F_set_bits(param_1); uVar1 = uVar1 ^ param_1; } return uVar1; }
6,073
func0
#include <assert.h> int take_L_and_F_set_bits(int n) { n = n | n >> 1; n = n | n >> 2; n = n | n >> 4; n = n | n >> 8; n = n | n >> 16; return ((n + 1) >> 1) + 1; }
int func0(int n) { if (n == 1) { return 0; } return n ^ take_L_and_F_set_bits(n); }
int main() { assert(func0(10) == 3); assert(func0(15) == 6); assert(func0(20) == 5); return 0; }
O1
c
func0: endbr64 mov $0x0,%eax cmp $0x1,%edi je 1192 <func0+0x1a> push %rbx mov %edi,%ebx callq 1149 <take_L_and_F_set_bits> xor %ebx,%eax pop %rbx retq retq
func0: endbr64 mov eax, 0 cmp edi, 1 jz short locret_1192 push rbx mov ebx, edi call take_L_and_F_set_bits xor eax, ebx pop rbx retn locret_1192: retn
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 != 1 ) return a1 ^ (unsigned int)take_L_and_F_set_bits(); return result; }
func0: ENDBR64 MOV EAX,0x0 CMP EDI,0x1 JZ 0x00101192 PUSH RBX MOV EBX,EDI CALL 0x00101149 XOR EAX,EBX POP RBX RET LAB_00101192: RET
uint func0(uint param_1) { uint uVar1; if (param_1 != 1) { uVar1 = take_L_and_F_set_bits(); return uVar1 ^ param_1; } return 0; }
6,074
func0
#include <assert.h> int take_L_and_F_set_bits(int n) { n = n | n >> 1; n = n | n >> 2; n = n | n >> 4; n = n | n >> 8; n = n | n >> 16; return ((n + 1) >> 1) + 1; }
int func0(int n) { if (n == 1) { return 0; } return n ^ take_L_and_F_set_bits(n); }
int main() { assert(func0(10) == 3); assert(func0(15) == 6); assert(func0(20) == 5); return 0; }
O2
c
func0: endbr64 xor %eax,%eax cmp $0x1,%edi je 11a7 <func0+0x37> mov %edi,%eax sar %eax or %edi,%eax mov %eax,%edx sar $0x2,%edx or %edx,%eax mov %eax,%edx sar $0x4,%edx or %edx,%eax mov %eax,%edx sar $0x8,%edx or %edx,%eax mov %eax,%edx sar $0x10,%edx or %edx,...
func0: endbr64 xor eax, eax cmp edi, 1 jz short locret_11A7 mov eax, edi sar eax, 1 or eax, edi mov edx, eax sar edx, 2 or eax, edx mov edx, eax sar edx, 4 or eax, edx mov edx, eax sar edx, 8 or eax, edx mov edx, eax sar edx, 10h or eax, edx ...
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 != 1 ) return a1 ^ (unsigned int)((((((((((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 8) | ((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)...
func0: ENDBR64 XOR EAX,EAX CMP EDI,0x1 JZ 0x001011a7 MOV EAX,EDI SAR EAX,0x1 OR EAX,EDI MOV EDX,EAX SAR EDX,0x2 OR EAX,EDX MOV EDX,EAX SAR EDX,0x4 OR EAX,EDX MOV EDX,EAX SAR EDX,0x8 OR EAX,EDX MOV EDX,EAX SAR EDX,0x10 OR EAX,EDX ADD EAX,0x1 SAR EAX,0x1 ADD EAX,0x1 XOR EAX,EDI LAB_001011a7: RET
uint func0(uint param_1) { uint uVar1; uVar1 = 0; if (param_1 != 1) { uVar1 = (int)param_1 >> 1 | param_1; uVar1 = uVar1 | (int)uVar1 >> 2; uVar1 = uVar1 | (int)uVar1 >> 4; uVar1 = uVar1 | (int)uVar1 >> 8; uVar1 = ((int)((uVar1 | (int)uVar1 >> 0x10) + 1) >> 1) + 1U ^ param_1; } return ...
6,075
func0
#include <assert.h> int take_L_and_F_set_bits(int n) { n = n | n >> 1; n = n | n >> 2; n = n | n >> 4; n = n | n >> 8; n = n | n >> 16; return ((n + 1) >> 1) + 1; }
int func0(int n) { if (n == 1) { return 0; } return n ^ take_L_and_F_set_bits(n); }
int main() { assert(func0(10) == 3); assert(func0(15) == 6); assert(func0(20) == 5); return 0; }
O3
c
func0: endbr64 xor %eax,%eax cmp $0x1,%edi je 11a7 <func0+0x37> mov %edi,%eax sar %eax or %edi,%eax mov %eax,%edx sar $0x2,%edx or %edx,%eax mov %eax,%edx sar $0x4,%edx or %edx,%eax mov %eax,%edx sar $0x8,%edx or %edx,%eax mov %eax,%edx sar $0x10,%edx or %edx,...
func0: endbr64 xor eax, eax cmp edi, 1 jz short locret_11A7 mov eax, edi sar eax, 1 or eax, edi mov edx, eax sar edx, 2 or eax, edx mov edx, eax sar edx, 4 or eax, edx mov edx, eax sar edx, 8 or eax, edx mov edx, eax sar edx, 10h or eax, edx ...
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 != 1 ) return a1 ^ (unsigned int)((((((((((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 8) | ((((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)) >> 4) | ((a1 | (a1 >> 1)) >> 2) | a1 | (a1 >> 1)...
func0: ENDBR64 XOR EAX,EAX CMP EDI,0x1 JZ 0x001011a7 MOV EAX,EDI SAR EAX,0x1 OR EAX,EDI MOV EDX,EAX SAR EDX,0x2 OR EAX,EDX MOV EDX,EAX SAR EDX,0x4 OR EAX,EDX MOV EDX,EAX SAR EDX,0x8 OR EAX,EDX MOV EDX,EAX SAR EDX,0x10 OR EAX,EDX ADD EAX,0x1 SAR EAX,0x1 ADD EAX,0x1 XOR EAX,EDI LAB_001011a7: RET
uint func0(uint param_1) { uint uVar1; uVar1 = 0; if (param_1 != 1) { uVar1 = (int)param_1 >> 1 | param_1; uVar1 = uVar1 | (int)uVar1 >> 2; uVar1 = uVar1 | (int)uVar1 >> 4; uVar1 = uVar1 | (int)uVar1 >> 8; uVar1 = ((int)((uVar1 | (int)uVar1 >> 0x10) + 1) >> 1) + 1U ^ param_1; } return ...
6,076
func0
#include <assert.h> #include <string.h>
int func0(const char *string, char c) { int flag = -1; int length = strlen(string); for (int i = 0; i < length; i++) { if (string[i] == c) { flag = i; } } if (flag == -1) { return -1; // Return -1 to indicate no occurrence } else { return fl...
int main() { assert(func0("hello world", 'l') == 10); assert(func0("language", 'g') == 7); assert(func0("little", 'y') == -1); // -1 indicates None in Python return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,%eax mov %al,-0x1c(%rbp) movl $0xffffffff,-0xc(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 1060 <strlen@plt> mov %eax,-0x4(%rbp) movl $0x0,-0x8(%rbp) jmp 11bc <func0+0x53> mov -0x8(%rbp),%eax movs...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+s], rdi mov eax, esi mov [rbp+var_1C], al mov [rbp+var_C], 0FFFFFFFFh mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_4], eax mov [rbp+var_8], 0 jmp short loc_11BC loc_119D: mov eax, [rbp+var_8] m...
long long func0(const char *a1, char a2) { int v3; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] int v5; // [rsp+1Ch] [rbp-4h] v3 = -1; v5 = strlen(a1); for ( i = 0; i < v5; ++i ) { if ( a2 == a1[i] ) v3 = i; } if ( v3 == -1 ) return 0xFFFFFFFFLL; else return (unsigned int)(...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV EAX,ESI MOV byte ptr [RBP + -0x1c],AL MOV dword ptr [RBP + -0xc],0xffffffff MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101060 MOV dword ptr [RBP + -0x4],EAX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011bc LAB_0010119d: MOV EAX,...
int func0(char *param_1,char param_2) { size_t sVar1; int local_14; int local_10; local_14 = -1; sVar1 = strlen(param_1); for (local_10 = 0; local_10 < (int)sVar1; local_10 = local_10 + 1) { if (param_2 == param_1[local_10]) { local_14 = local_10; } } if (local_14 == -1) { local_14...
6,077
func0
#include <assert.h> #include <string.h>
int func0(const char *string, char c) { int flag = -1; int length = strlen(string); for (int i = 0; i < length; i++) { if (string[i] == c) { flag = i; } } if (flag == -1) { return -1; // Return -1 to indicate no occurrence } else { return fl...
int main() { assert(func0("hello world", 'l') == 10); assert(func0("language", 'g') == 7); assert(func0("little", 'y') == -1); // -1 indicates None in Python return 0; }
O1
c
func0: endbr64 mov %rdi,%r8 mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx sub $0x1,%rcx test %ecx,%ecx jle 1196 <func0+0x4d> lea -0x1(%rcx),%edi mov $0x0,%eax mov $0xffffffff,%edx jmp 117b <func0+0x32> mov %rcx,%rax cmp %sil,(%r8,%rax,1) cmove %eax,...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbx, rdi mov ebp, esi call _strlen test eax, eax jle short loc_11B4 lea esi, [rax-1] mov eax, 0 mov edx, 0FFFFFFFFh jmp short loc_1193 loc_1190: mov rax, rcx loc_1193: cmp [rbx+rax], bpl cmovz edx, eax lea rcx, [ra...
long long func0(long long a1, char a2) { int v3; // eax long long v4; // rsi long long v5; // rax unsigned int v6; // edx v3 = strlen(); if ( v3 <= 0 ) { return (unsigned int)-1; } else { v4 = (unsigned int)(v3 - 1); v5 = 0LL; v6 = -1; while ( 1 ) { if ( *(_BYTE *)(a1...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV EBP,ESI CALL 0x00101060 TEST EAX,EAX JLE 0x001011b4 LEA ESI,[RAX + -0x1] MOV EAX,0x0 MOV EDX,0xffffffff JMP 0x00101193 LAB_00101190: MOV RAX,RCX LAB_00101193: CMP byte ptr [RBX + RAX*0x1],BPL CMOVZ EDX,EAX LEA RCX,[RAX + 0x1] CMP RAX,RSI JNZ 0x00101190 CMP ED...
ulong func0(char *param_1,char param_2) { size_t sVar1; ulong uVar2; ulong uVar3; bool bVar4; sVar1 = strlen(param_1); if ((int)sVar1 < 1) { uVar3 = 0xffffffff; } else { uVar3 = 0xffffffff; uVar2 = 0; do { if (param_1[uVar2] == param_2) { uVar3 = uVar2 & 0xffffffff; ...
6,078
func0
#include <assert.h> #include <string.h>
int func0(const char *string, char c) { int flag = -1; int length = strlen(string); for (int i = 0; i < length; i++) { if (string[i] == c) { flag = i; } } if (flag == -1) { return -1; // Return -1 to indicate no occurrence } else { return fl...
int main() { assert(func0("hello world", 'l') == 10); assert(func0("language", 'g') == 7); assert(func0("little", 'y') == -1); // -1 indicates None in Python return 0; }
O2
c
func0: endbr64 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1060 <strlen@plt> test %eax,%eax jle 1270 <func0+0x50> lea -0x1(%rax),%ecx mov $0xffffffff,%r8d xor %eax,%eax jmp 124b <func0+0x2b> nopl (%rax) mov %rdx,%rax cmp %bpl,(%rbx,%rax,1) lea 0x1(%rax),...
func0: endbr64 push rbp mov ebp, esi push rbx mov rbx, rdi sub rsp, 8 call _strlen test eax, eax jle short loc_1270 lea ecx, [rax-1] mov r8d, 0FFFFFFFFh xor eax, eax jmp short loc_124B loc_1248: mov rax, rdx loc_124B: cmp [rbx+rax], bpl lea rdx, [rax+1] cmovz r8...
long long func0(long long a1, char a2) { int v2; // eax long long v3; // rcx unsigned int v4; // r8d long long i; // rax v2 = strlen(); if ( v2 <= 0 ) return 0xFFFFFFFFLL; v3 = (unsigned int)(v2 - 1); v4 = -1; for ( i = 0LL; ; ++i ) { if ( *(_BYTE *)(a1 + i) == a2 ) v4 = i; if ( ...
func0: ENDBR64 PUSH RBP MOV EBP,ESI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x00101060 TEST EAX,EAX JLE 0x00101270 LEA ECX,[RAX + -0x1] MOV R8D,0xffffffff XOR EAX,EAX JMP 0x0010124b LAB_00101248: MOV RAX,RDX LAB_0010124b: CMP byte ptr [RBX + RAX*0x1],BPL LEA RDX,[RAX + 0x1] CMOVZ R8D,EAX CMP RAX,RCX JNZ 0x00101248 CMP R8...
ulong func0(char *param_1,char param_2) { size_t sVar1; ulong uVar2; ulong uVar3; bool bVar4; sVar1 = strlen(param_1); if ((int)sVar1 < 1) { return 0xffffffff; } uVar3 = 0xffffffff; uVar2 = 0; do { if (param_1[uVar2] == param_2) { uVar3 = uVar2 & 0xffffffff; } bVar4 = uVar2...
6,079
func0
#include <assert.h> #include <string.h>
int func0(const char *string, char c) { int flag = -1; int length = strlen(string); for (int i = 0; i < length; i++) { if (string[i] == c) { flag = i; } } if (flag == -1) { return -1; // Return -1 to indicate no occurrence } else { return fl...
int main() { assert(func0("hello world", 'l') == 10); assert(func0("language", 'g') == 7); assert(func0("little", 'y') == -1); // -1 indicates None in Python return 0; }
O3
c
func0: endbr64 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1060 <strlen@plt> test %eax,%eax jle 1270 <func0+0x50> lea -0x1(%rax),%ecx mov $0xffffffff,%r8d xor %eax,%eax jmp 124b <func0+0x2b> nopl (%rax) mov %rdx,%rax cmp (%rbx,%rax,1),%bpl lea 0x1(%rax),...
func0: endbr64 push rbp mov ebp, esi push rbx mov rbx, rdi sub rsp, 8 call _strlen test eax, eax jle short loc_1270 lea esi, [rax-1] mov edx, 0FFFFFFFFh xor eax, eax jmp short loc_124B loc_1248: mov rax, rcx loc_124B: cmp bpl, [rbx+rax] lea rcx, [rax+1] cmovz ed...
long long func0(const char *a1, char a2) { int v3; // eax long long v4; // rsi unsigned int v5; // edx long long i; // rax v3 = strlen(a1); if ( v3 <= 0 ) return 0xFFFFFFFFLL; v4 = (unsigned int)(v3 - 1); v5 = -1; for ( i = 0LL; ; ++i ) { if ( a2 == a1[i] ) v5 = i; if ( v4 == i )...
func0: ENDBR64 PUSH RBP MOV EBP,ESI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x00101060 TEST EAX,EAX JLE 0x00101270 LEA ESI,[RAX + -0x1] MOV EDX,0xffffffff XOR EAX,EAX JMP 0x0010124b LAB_00101248: MOV RAX,RCX LAB_0010124b: CMP BPL,byte ptr [RBX + RAX*0x1] LEA RCX,[RAX + 0x1] CMOVZ EDX,EAX CMP RSI,RAX JNZ 0x00101248 CMP ED...
ulong func0(char *param_1,char param_2) { size_t sVar1; ulong uVar2; ulong uVar3; bool bVar4; sVar1 = strlen(param_1); if ((int)sVar1 < 1) { return 0xffffffff; } uVar3 = 0xffffffff; uVar2 = 0; do { if (param_2 == param_1[uVar2]) { uVar3 = uVar2 & 0xffffffff; } bVar4 = (int)...
6,080
func0
#include <assert.h>
int func0(int n) { int i = 1; int sum = 0; while (n / i > 0) { sum = sum + n / i; i = i * 2; } return sum; }
int main() { assert(func0(4) == 7); assert(func0(2) == 3); assert(func0(5) == 8); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x1,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 1171 <func0+0x28> mov -0x14(%rbp),%eax cltd idivl -0x8(%rbp) add %eax,-0x4(%rbp) shll -0x8(%rbp) mov -0x14(%rbp),%eax cltd idivl -0x8(%rbp) test %eax,%eax jg 1164 <func0+0x1b> mov ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 1 mov [rbp+var_4], 0 jmp short loc_1171 loc_1164: mov eax, [rbp+var_14] cdq idiv [rbp+var_8] add [rbp+var_4], eax shl [rbp+var_8], 1 loc_1171: mov eax, [rbp+var_14] cdq idiv [rbp+var_8] test eax, ...
long long func0(int a1) { int v2; // [rsp+Ch] [rbp-8h] unsigned int v3; // [rsp+10h] [rbp-4h] v2 = 1; v3 = 0; while ( a1 / v2 > 0 ) { v3 += a1 / v2; v2 *= 2; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101171 LAB_00101164: MOV EAX,dword ptr [RBP + -0x14] CDQ IDIV dword ptr [RBP + -0x8] ADD dword ptr [RBP + -0x4],EAX SHL dword ptr [RBP + -0x8],0x1 LAB_00101171: MOV EAX,dword ptr [RB...
int func0(int param_1) { int4 local_10; int4 local_c; local_c = 0; for (local_10 = 1; 0 < param_1 / local_10; local_10 = local_10 << 1) { local_c = local_c + param_1 / local_10; } return local_c; }
6,081
func0
#include <assert.h>
int func0(int n) { int i = 1; int sum = 0; while (n / i > 0) { sum = sum + n / i; i = i * 2; } return sum; }
int main() { assert(func0(4) == 7); assert(func0(2) == 3); assert(func0(5) == 8); return 0; }
O1
c
func0: endbr64 test %edi,%edi jle 116f <func0+0x26> mov %edi,%edx mov $0x0,%esi mov $0x1,%ecx add %edx,%esi add %ecx,%ecx mov %edi,%eax cltd idiv %ecx mov %eax,%edx test %eax,%eax jg 115d <func0+0x14> mov %esi,%eax retq mov $0x0,%esi jmp 116c <func0+0x23>
func0: endbr64 test edi, edi jle short loc_116F mov edx, edi mov esi, 0 mov ecx, 1 loc_115D: add esi, edx add ecx, ecx mov eax, edi cdq idiv ecx mov edx, eax test eax, eax jg short loc_115D loc_116C: mov eax, esi retn loc_116F: mov esi, 0 jmp short loc_116C
long long func0(int a1) { int v1; // edx unsigned int v2; // esi int v3; // ecx if ( a1 <= 0 ) { return 0; } else { v1 = a1; v2 = 0; v3 = 1; do { v2 += v1; v3 *= 2; v1 = a1 / v3; } while ( a1 / v3 > 0 ); } return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x0010116f MOV EDX,EDI MOV ESI,0x0 MOV ECX,0x1 LAB_0010115d: ADD ESI,EDX ADD ECX,ECX MOV EAX,EDI CDQ IDIV ECX MOV EDX,EAX TEST EAX,EAX JG 0x0010115d LAB_0010116c: MOV EAX,ESI RET LAB_0010116f: MOV ESI,0x0 JMP 0x0010116c
int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (param_1 < 1) { iVar3 = 0; } else { iVar3 = 0; iVar2 = 1; iVar1 = param_1; do { iVar3 = iVar3 + iVar1; iVar2 = iVar2 * 2; iVar1 = param_1 / iVar2; } while (0 < iVar1); } return iVar3; }