#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ft_strcpy(char *, char *);
int printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  time_t start_t, end_t;
  double diff_t;
  char *data[5];
  char *original;
  char string[100];
  int i;
  data[0] = "je code avec le cul";
  data[1] = "u mad brah";
  data[2] = "euh";
  data[3] = "all your base are belong to us";
  data[4] = "raise your dongers ヽ༼ຈل͜ຈ༽ﾉ !!";
  i = 0;
  while (i < 5) {
    original = data[i];
    time(&start_t);
    ft_strcpy(string, original);
    time(&end_t);
    diff_t = difftime(end_t, start_t);
    printf("original: %s, copy: %s, execution time = %f\n", original, string,
           diff_t);
    if (strcmp(original, string))
      return printf("\e[0;31mFAKE AND GAY ✗\e[0m\n");
    if (diff_t >= 2.0)
      return printf("\e[0;33mYOU ARE TOO SLOW! ✗\e[0m\n");
    ++i;
  }
  return printf("\e[0;32mGOES ✓\e[0m\n");
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9f(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xea8(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xea8(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xea1(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeb5(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0xb4(%rbp)
cmpl   $0x5,-0xb4(%rbp)
jge    1281 <main+0x131>
movslq -0xb4(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rax
mov    %rax,-0x48(%rbp)
lea    -0x8(%rbp),%rdi
call   1070 <time@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1030 <ft_strcpy@plt>
lea    -0xc(%rbp),%rdi
call   1070 <time@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <difftime@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x48(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
movsd  -0x18(%rbp),%xmm0
lea    0xe6e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1240 <main+0xf0>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    %eax,-0x4(%rbp)
jmp    1292 <main+0x142>
movsd  -0x18(%rbp),%xmm0
movsd  0xdb3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     126d <main+0x11d>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    %eax,-0x4(%rbp)
jmp    1292 <main+0x142>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11a3 <main+0x53>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
lea    0x4(%rsp),%rdi
call   1070 <time@plt>
lea    0xe9b(%rip),%rbx
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <ft_strcpy@plt>
mov    %rsp,%rdi
call   1070 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <difftime@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
lea    0xee7(%rip),%rbx
test   %rax,%rax
jne    13ba <main+0x26a>
movsd  0x8(%rsp),%xmm0
ucomisd 0xe2c(%rip),%xmm0
jae    13b3 <main+0x263>
lea    0x4(%rsp),%rdi
call   1070 <time@plt>
lea    0xe31(%rip),%r14
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rsp,%rdi
call   1070 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <difftime@plt>
lea    0xe61(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    13ba <main+0x26a>
movsd  0x8(%rsp),%xmm0
ucomisd 0xdb5(%rip),%xmm0
jae    13b3 <main+0x263>
lea    0x4(%rsp),%rdi
call   1070 <time@plt>
lea    0xdc5(%rip),%r14
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rsp,%rdi
call   1070 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <difftime@plt>
lea    0xdea(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    13ba <main+0x26a>
movsd  0x8(%rsp),%xmm0
ucomisd 0xd3e(%rip),%xmm0
jae    13b3 <main+0x263>
lea    0x4(%rsp),%rdi
call   1070 <time@plt>
lea    0xd52(%rip),%r14
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rsp,%rdi
call   1070 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <difftime@plt>
lea    0xd73(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    13ba <main+0x26a>
movsd  0x8(%rsp),%xmm0
ucomisd 0xcc7(%rip),%xmm0
jae    13b3 <main+0x263>
lea    0x4(%rsp),%rdi
call   1070 <time@plt>
lea    0xcfe(%rip),%r14
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rsp,%rdi
call   1070 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1050 <difftime@plt>
lea    0xd00(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    13ba <main+0x26a>
movsd  0x8(%rsp),%xmm0
ucomisd 0xc58(%rip),%xmm0
jae    13b3 <main+0x263>
lea    0xd32(%rip),%rbx
jmp    13ba <main+0x26a>
lea    0xd07(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"je code avec le cul\00"
@.str.1 = [11 x i8] c"u mad brah\00"
@.str.2 = [4 x i8] c"euh\00"
@.str.3 = [31 x i8] c"all your base are belong to us\00"
@.str.4 = [45 x i8] c"raise your dongers \E3\83\BD\E0\BC\BC\E0\BA\88\D9\84\CD\9C\E0\BA\88\E0\BC\BD\EF\BE\89 !!\00"
@.str.5 = [45 x i8] c"original: %s, copy: %s, execution time = %f\0A\00"
@.str.6 = [29 x i8] c"\1B[0;31mFAKE AND GAY \E2\9C\97\1B[0m\0A\00"
@.str.7 = [34 x i8] c"\1B[0;33mYOU ARE TOO SLOW! \E2\9C\97\1B[0m\0A\00"
@.str.8 = [21 x i8] c"\1B[0;32mGOES \E2\9C\93\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca [5 x i8*]
%6 = alloca i8*
%7 = alloca [100 x i8]
%8 = alloca i32
store i32 0, i32* %1
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 3
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 4
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8** %13
store i32 0, i32* %8
br label %14
14: ; preds = %45, %0
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 5
br i1 %16, label %17, label %48
17: ; preds = %14
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i64 0, i64 %19
%21 = load i8*, i8** %20
store i8* %21, i8** %6
%22 = call i32 @time(i32* %2)
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%24 = load i8*, i8** %6
%25 = call i32 @ft_strcpy(i8* %23, i8* %24)
%26 = call i32 @time(i32* %3)
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = call double @difftime(i32 %27, i32 %28)
store double %29, double* %4
%30 = load i8*, i8** %6
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%32 = load double, double* %4
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* %30, i8* %31, double %32)
%34 = load i8*, i8** %6
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%36 = call i64 @strcmp(i8* %34, i8* %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %17
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
store i32 %39, i32* %1
br label %50
40: ; preds = %17
%41 = load double, double* %4
%42 = fcmp oge double %41, 2.000000e+00
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
store i32 %44, i32* %1
br label %50
45: ; preds = %40
%46 = load i32, i32* %8
%47 = add nsw i32 %46, 1
store i32 %47, i32* %8
br label %14
48: ; preds = %14
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
store i32 %49, i32* %1
br label %50
50: ; preds = %48, %43, %38
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
@.str = [20 x i8] c"je code avec le cul\00"
@.str.1 = [11 x i8] c"u mad brah\00"
@.str.2 = [4 x i8] c"euh\00"
@.str.3 = [31 x i8] c"all your base are belong to us\00"
@.str.4 = [45 x i8] c"raise your dongers \E3\83\BD\E0\BC\BC\E0\BA\88\D9\84\CD\9C\E0\BA\88\E0\BC\BD\EF\BE\89 !!\00"
@.str.5 = [45 x i8] c"original: %s, copy: %s, execution time = %f\0A\00"
@.str.6 = [29 x i8] c"\1B[0;31mFAKE AND GAY \E2\9C\97\1B[0m\0A\00"
@.str.7 = [34 x i8] c"\1B[0;33mYOU ARE TOO SLOW! \E2\9C\97\1B[0m\0A\00"
@.str.8 = [21 x i8] c"\1B[0;32mGOES \E2\9C\93\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @time(i32* %1)
%8 = call i32 @ft_strcpy(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @time(i32* %2)
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call double @difftime(i32 %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6, double %12)
%14 = call i64 @strcmp(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
%15 = icmp eq i64 %14, 0
br i1 %15, label %64, label %67
16: ; preds = %64
%17 = call i32 @time(i32* %1)
%18 = call i32 @ft_strcpy(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @time(i32* %2)
%20 = load i32, i32* %2
%21 = load i32, i32* %1
%22 = call double @difftime(i32 %20, i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6, double %22)
%24 = call i64 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %67
26: ; preds = %16
%27 = fcmp ult double %22, 2.000000e+00
br i1 %27, label %28, label %66
28: ; preds = %26
%29 = call i32 @time(i32* %1)
%30 = call i32 @ft_strcpy(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 @time(i32* %2)
%32 = load i32, i32* %2
%33 = load i32, i32* %1
%34 = call double @difftime(i32 %32, i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6, double %34)
%36 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %67
38: ; preds = %28
%39 = fcmp ult double %34, 2.000000e+00
br i1 %39, label %40, label %66
40: ; preds = %38
%41 = call i32 @time(i32* %1)
%42 = call i32 @ft_strcpy(i8* %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @time(i32* %2)
%44 = load i32, i32* %2
%45 = load i32, i32* %1
%46 = call double @difftime(i32 %44, i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %6, double %46)
%48 = call i64 @strcmp(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %67
50: ; preds = %40
%51 = fcmp ult double %46, 2.000000e+00
br i1 %51, label %52, label %66
52: ; preds = %50
%53 = call i32 @time(i32* %1)
%54 = call i32 @ft_strcpy(i8* %6, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%55 = call i32 @time(i32* %2)
%56 = load i32, i32* %2
%57 = load i32, i32* %1
%58 = call double @difftime(i32 %56, i32 %57)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %6, double %58)
%60 = call i64 @strcmp(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %6)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %67
62: ; preds = %52
%63 = fcmp ult double %58, 2.000000e+00
br i1 %63, label %67, label %66
64: ; preds = %0
%65 = fcmp ult double %12, 2.000000e+00
br i1 %65, label %16, label %66
66: ; preds = %62, %50, %38, %26, %64
br label %67
67: ; preds = %0, %16, %28, %40, %52, %62, %66
%68 = phi i8* [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), %66 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), %62 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %52 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %40 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %28 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %16 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %0 ]
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %68)
ret i32 %69
}