#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_add_test_case(char **, char *, char *);
int /*<<< orphan*/ ft_get_values(char **, char **, char **);
int ft_str_is_alpha(char *);
int printf(char *, ...);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  time_t start_t, end_t;
  double diff_t;
  char *data[5][2];
  char *original;
  int your_result;
  char *answer;
  int i;
  ft_add_test_case(&data[0][0], "Je Code avec le CUL", "0");
  ft_add_test_case(&data[1][0], "UMADBRO", "1");
  ft_add_test_case(&data[2][0], "", "1");
  ft_add_test_case(
      &data[3][0],
      "salut, comment tu vas ? 42mots quarante-deux; cinquante+et+un", "0");
  ft_add_test_case(&data[4][0], "h44526", "0");
  i = 0;
  while (i < 5) {
    ft_get_values(&data[i][0], &original, &answer);
    time(&start_t);
    your_result = ft_str_is_alpha(original);
    time(&end_t);
    diff_t = difftime(end_t, start_t);
    printf("str: %s, your_result: %i, actual_result: %i, execution time = %f\n",
           original, your_result, answer[0] - '0', diff_t);
    if (your_result != answer[0] - '0')
      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    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xe8b(%rip),%rsi
lea    0xe98(%rip),%rdx
call   1060 <ft_add_test_case@plt>
lea    -0x70(%rbp),%rdi
add    $0x10,%rdi
lea    0xe86(%rip),%rsi
lea    0xe87(%rip),%rdx
call   1060 <ft_add_test_case@plt>
lea    -0x70(%rbp),%rdi
add    $0x20,%rdi
lea    0xefb(%rip),%rsi
lea    0xe6c(%rip),%rdx
call   1060 <ft_add_test_case@plt>
lea    -0x70(%rbp),%rdi
add    $0x30,%rdi
lea    0xe5a(%rip),%rsi
lea    0xe47(%rip),%rdx
call   1060 <ft_add_test_case@plt>
lea    -0x70(%rbp),%rdi
add    $0x40,%rdi
lea    0xe7d(%rip),%rsi
lea    0xe2c(%rip),%rdx
call   1060 <ft_add_test_case@plt>
movl   $0x0,-0x8c(%rbp)
cmpl   $0x5,-0x8c(%rbp)
jge    12f2 <main+0x192>
movslq -0x8c(%rbp),%rax
lea    -0x70(%rbp),%rdi
shl    $0x4,%rax
add    %rax,%rdi
lea    -0x78(%rbp),%rsi
lea    -0x88(%rbp),%rdx
call   1080 <ft_get_values@plt>
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
mov    -0x78(%rbp),%rdi
call   1070 <ft_str_is_alpha@plt>
mov    %eax,-0x7c(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <time@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <difftime@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x78(%rbp),%rsi
mov    -0x7c(%rbp),%edx
mov    -0x88(%rbp),%rax
movsbl (%rax),%ecx
sub    $0x30,%ecx
movsd  -0x18(%rbp),%xmm0
lea    0xdf1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x7c(%rbp),%eax
mov    -0x88(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
cmp    %ecx,%eax
je     12b1 <main+0x151>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x4(%rbp)
jmp    1303 <main+0x1a3>
movsd  -0x18(%rbp),%xmm0
movsd  0xd42(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12de <main+0x17e>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x4(%rbp)
jmp    1303 <main+0x1a3>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    11ff <main+0x9f>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xe93(%rip),%rsi
lea    0xea0(%rip),%rbx
lea    0x20(%rsp),%rdi
mov    %rbx,%rdx
call   1060 <ft_add_test_case@plt>
lea    0x30(%rsp),%rdi
lea    0xe89(%rip),%rsi
lea    0xe8a(%rip),%rbp
mov    %rbp,%rdx
call   1060 <ft_add_test_case@plt>
lea    0x40(%rsp),%rdi
lea    0xefe(%rip),%rsi
mov    %rbp,%rdx
call   1060 <ft_add_test_case@plt>
lea    0x50(%rsp),%rdi
lea    0xe64(%rip),%rsi
mov    %rbx,%rdx
call   1060 <ft_add_test_case@plt>
lea    0x60(%rsp),%rdi
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdx
call   1060 <ft_add_test_case@plt>
xor    %r15d,%r15d
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%r13
mov    %rsp,%rbx
lea    0xe76(%rip),%rbp
nopw   0x0(%rax,%rax,1)
lea    (%rsp,%r15,1),%rdi
add    $0x20,%rdi
lea    0x10(%rsp),%rsi
mov    %r12,%rdx
call   1080 <ft_get_values@plt>
mov    %r13,%rdi
call   1050 <time@plt>
mov    0x10(%rsp),%rdi
call   1070 <ft_str_is_alpha@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1050 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1040 <difftime@plt>
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rax
movsbl (%rax),%ecx
add    $0xffffffd0,%ecx
mov    %rbp,%rdi
mov    %r14d,%edx
movsd  %xmm0,0x18(%rsp)
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x8(%rsp),%rax
movsbl (%rax),%eax
add    $0xffffffd0,%eax
cmp    %eax,%r14d
jne    1298 <main+0x138>
movsd  0x18(%rsp),%xmm0
ucomisd 0xd81(%rip),%xmm0
jae    12a1 <main+0x141>
add    $0x10,%r15
cmp    $0x50,%r15
jne    1200 <main+0xa0>
lea    0xe58(%rip),%rdi
jmp    12a8 <main+0x148>
lea    0xe10(%rip),%rdi
jmp    12a8 <main+0x148>
lea    0xe24(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Je Code avec le CUL\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [8 x i8] c"UMADBRO\00"
@.str.3 = [2 x i8] c"1\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [62 x i8] c"salut, comment tu vas ? 42mots quarante-deux; cinquante+et+un\00"
@.str.6 = [7 x i8] c"h44526\00"
@.str.7 = [66 x i8] c"str: %s, your_result: %i, actual_result: %i, execution time = %f\0A\00"
@.str.8 = [29 x i8] c"\1B[0;31mFAKE AND GAY \E2\9C\97\1B[0m\0A\00"
@.str.9 = [34 x i8] c"\1B[0;33mYOU ARE TOO SLOW! \E2\9C\97\1B[0m\0A\00"
@.str.10 = [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 [2 x i8*]]
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i32 0, i32* %1
%10 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 0
%11 = getelementptr inbounds [2 x i8*], [2 x i8*]* %10, i64 0, i64 0
%12 = call i32 @ft_add_test_case(i8** %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 1
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%15 = call i32 @ft_add_test_case(i8** %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%16 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 2
%17 = getelementptr inbounds [2 x i8*], [2 x i8*]* %16, i64 0, i64 0
%18 = call i32 @ft_add_test_case(i8** %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%19 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 3
%20 = getelementptr inbounds [2 x i8*], [2 x i8*]* %19, i64 0, i64 0
%21 = call i32 @ft_add_test_case(i8** %20, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 4
%23 = getelementptr inbounds [2 x i8*], [2 x i8*]* %22, i64 0, i64 0
%24 = call i32 @ft_add_test_case(i8** %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %9
br label %25
25: ; preds = %64, %0
%26 = load i32, i32* %9
%27 = icmp slt i32 %26, 5
br i1 %27, label %28, label %67
28: ; preds = %25
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %5, i64 0, i64 %30
%32 = getelementptr inbounds [2 x i8*], [2 x i8*]* %31, i64 0, i64 0
%33 = call i32 @ft_get_values(i8** %32, i8** %6, i8** %8)
%34 = call i32 @time(i32* %2)
%35 = load i8*, i8** %6
%36 = call i32 @ft_str_is_alpha(i8* %35)
store i32 %36, i32* %7
%37 = call i32 @time(i32* %3)
%38 = load i32, i32* %3
%39 = load i32, i32* %2
%40 = call double @difftime(i32 %38, i32 %39)
store double %40, double* %4
%41 = load i8*, i8** %6
%42 = load i32, i32* %7
%43 = load i8*, i8** %8
%44 = getelementptr inbounds i8, i8* %43, i64 0
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = sub nsw i32 %46, 48
%48 = load double, double* %4
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.7, i64 0, i64 0), i8* %41, i32 %42, i32 %47, double %48)
%50 = load i32, i32* %7
%51 = load i8*, i8** %8
%52 = getelementptr inbounds i8, i8* %51, i64 0
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = sub nsw i32 %54, 48
%56 = icmp ne i32 %50, %55
br i1 %56, label %57, label %59
57: ; preds = %28
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
store i32 %58, i32* %1
br label %69
59: ; preds = %28
%60 = load double, double* %4
%61 = fcmp oge double %60, 2.000000e+00
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
store i32 %63, i32* %1
br label %69
64: ; preds = %59
%65 = load i32, i32* %9
%66 = add nsw i32 %65, 1
store i32 %66, i32* %9
br label %25
67: ; preds = %25
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
store i32 %68, i32* %1
br label %69
69: ; preds = %67, %62, %57
%70 = load i32, i32* %1
ret i32 %70
}

LLVM IR (-O2):
@.str = [20 x i8] c"Je Code avec le CUL\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [8 x i8] c"UMADBRO\00"
@.str.3 = [2 x i8] c"1\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [62 x i8] c"salut, comment tu vas ? 42mots quarante-deux; cinquante+et+un\00"
@.str.6 = [7 x i8] c"h44526\00"
@.str.7 = [66 x i8] c"str: %s, your_result: %i, actual_result: %i, execution time = %f\0A\00"
@.str.8 = [29 x i8] c"\1B[0;31mFAKE AND GAY \E2\9C\97\1B[0m\0A\00"
@.str.9 = [34 x i8] c"\1B[0;33mYOU ARE TOO SLOW! \E2\9C\97\1B[0m\0A\00"
@.str.10 = [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 [5 x [2 x i8*]]
%4 = alloca i8*
%5 = alloca i8*
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast [5 x [2 x i8*]]* %3 to i8*
%9 = bitcast i8** %4 to i8*
%10 = bitcast i8** %5 to i8*
%11 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 0, i64 0
%12 = call i32 @ft_add_test_case(i8** %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 1, i64 0
%14 = call i32 @ft_add_test_case(i8** %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%15 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 2, i64 0
%16 = call i32 @ft_add_test_case(i8** %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%17 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 3, i64 0
%18 = call i32 @ft_add_test_case(i8** %17, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 4, i64 0
%20 = call i32 @ft_add_test_case(i8** %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
21: ; preds = %46
%22 = add nuw nsw i64 %25, 1
%23 = icmp eq i64 %22, 5
br i1 %23, label %48, label %24
24: ; preds = %0, %21
%25 = phi i64 [ 0, %0 ], [ %22, %21 ]
%26 = getelementptr inbounds [5 x [2 x i8*]], [5 x [2 x i8*]]* %3, i64 0, i64 %25, i64 0
%27 = call i32 @ft_get_values(i8** %26, i8** %4, i8** %5)
%28 = call i32 @time(i32* %1)
%29 = load i8*, i8** %4
%30 = call i32 @ft_str_is_alpha(i8* %29)
%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 = load i8*, i8** %4
%36 = load i8*, i8** %5
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = add nsw i32 %38, -48
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.7, i64 0, i64 0), i8* %35, i32 %30, i32 %39, double %34)
%41 = load i8*, i8** %5
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = add nsw i32 %43, -48
%45 = icmp eq i32 %30, %44
br i1 %45, label %46, label %48
46: ; preds = %24
%47 = fcmp ult double %34, 2.000000e+00
br i1 %47, label %21, label %48
48: ; preds = %21, %46, %24
%49 = phi i8* [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), %24 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), %46 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), %21 ]
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %49)
ret i32 %50
}