#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 */

/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
scalar_t__ ft_strcmp(char *, char *);
void interprate_color(char *c) {
  if (c) {
    if (ft_strcmp("RED", c) == 0)
      ft_putstr("\033[1;31m");
    else if (ft_strcmp("BLUE", c) == 0)
      ft_putstr("\033[1;34m");
    else if (ft_strcmp("GRAY", c) == 0)
      ft_putstr("\033[1;30m");
    else if (ft_strcmp("YEL", c) == 0)
      ft_putstr("\033[1;33m");
    else if (ft_strcmp("GRE", c) == 0)
      ft_putstr("\033[1;32m");
    else if (ft_strcmp("MAG", c) == 0)
      ft_putstr("\033[1;35m");
    else if (ft_strcmp("SBLUE", c) == 0)
      ft_putstr("\033[1;36m");
    else if (ft_strcmp("DEF", c) == 0)
      ft_putstr("\033[0m");
  }
}


x86 assembly (clang, -O0):
<interprate_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     12b2 <interprate_color+0x192>
mov    -0x8(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    1162 <interprate_color+0x42>
lea    0xeac(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    12ad <interprate_color+0x18d>
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    118d <interprate_color+0x6d>
lea    0xe89(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    12a8 <interprate_color+0x188>
mov    -0x8(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    11b8 <interprate_color+0x98>
lea    0xe6b(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    12a3 <interprate_color+0x183>
mov    -0x8(%rbp),%rsi
lea    0xe5e(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    11e3 <interprate_color+0xc3>
lea    0xe4c(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    129e <interprate_color+0x17e>
mov    -0x8(%rbp),%rsi
lea    0xe3f(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    120e <interprate_color+0xee>
lea    0xe2d(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    1299 <interprate_color+0x179>
mov    -0x8(%rbp),%rsi
lea    0xe20(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    1239 <interprate_color+0x119>
lea    0xe0e(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    1294 <interprate_color+0x174>
mov    -0x8(%rbp),%rsi
lea    0xe01(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    1264 <interprate_color+0x144>
lea    0xdf1(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    128f <interprate_color+0x16f>
mov    -0x8(%rbp),%rsi
lea    0xde4(%rip),%rdi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
jne    128a <interprate_color+0x16a>
lea    0xdd2(%rip),%rdi
call   1040 <ft_putstr@plt>
jmp    128f <interprate_color+0x16f>
jmp    1294 <interprate_color+0x174>
jmp    1299 <interprate_color+0x179>
jmp    129e <interprate_color+0x17e>
jmp    12a3 <interprate_color+0x183>
jmp    12a8 <interprate_color+0x188>
jmp    12ad <interprate_color+0x18d>
jmp    12b2 <interprate_color+0x192>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interprate_color>:
push   %rbx
test   %rdi,%rdi
je     11d9 <interprate_color+0xb9>
mov    %rdi,%rbx
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     11db <interprate_color+0xbb>
lea    0xefa(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     11e8 <interprate_color+0xc8>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     11f5 <interprate_color+0xd5>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     1202 <interprate_color+0xe2>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     120f <interprate_color+0xef>
lea    0xe95(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     121c <interprate_color+0xfc>
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     1229 <interprate_color+0x109>
lea    0xe87(%rip),%rdi
mov    %rbx,%rsi
call   1030 <ft_strcmp@plt>
test   %rax,%rax
je     1236 <interprate_color+0x116>
pop    %rbx
ret
lea    0xe22(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1d(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1d(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1c(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1b(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1a(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1b(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>
lea    0xe1a(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"RED\00"
@.str.1 = [8 x i8] c"\1B[1;31m\00"
@.str.2 = [5 x i8] c"BLUE\00"
@.str.3 = [8 x i8] c"\1B[1;34m\00"
@.str.4 = [5 x i8] c"GRAY\00"
@.str.5 = [8 x i8] c"\1B[1;30m\00"
@.str.6 = [4 x i8] c"YEL\00"
@.str.7 = [8 x i8] c"\1B[1;33m\00"
@.str.8 = [4 x i8] c"GRE\00"
@.str.9 = [8 x i8] c"\1B[1;32m\00"
@.str.10 = [4 x i8] c"MAG\00"
@.str.11 = [8 x i8] c"\1B[1;35m\00"
@.str.12 = [6 x i8] c"SBLUE\00"
@.str.13 = [8 x i8] c"\1B[1;36m\00"
@.str.14 = [4 x i8] c"DEF\00"
@.str.15 = [5 x i8] c"\1B[0m\00"
define void @interprate_color(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %61
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %60
11: ; preds = %5
%12 = load i8*, i8** %2
%13 = call i64 @ft_strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %59
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = call i64 @ft_strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %58
23: ; preds = %17
%24 = load i8*, i8** %2
%25 = call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %57
29: ; preds = %23
%30 = load i8*, i8** %2
%31 = call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %30)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %56
35: ; preds = %29
%36 = load i8*, i8** %2
%37 = call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %55
41: ; preds = %35
%42 = load i8*, i8** %2
%43 = call i64 @ft_strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
br label %54
47: ; preds = %41
%48 = load i8*, i8** %2
%49 = call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* %48)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
br label %53
53: ; preds = %51, %47
br label %54
54: ; preds = %53, %45
br label %55
55: ; preds = %54, %39
br label %56
56: ; preds = %55, %33
br label %57
57: ; preds = %56, %27
br label %58
58: ; preds = %57, %21
br label %59
59: ; preds = %58, %15
br label %60
60: ; preds = %59, %9
br label %61
61: ; preds = %60, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"RED\00"
@.str.1 = [8 x i8] c"\1B[1;31m\00"
@.str.2 = [5 x i8] c"BLUE\00"
@.str.3 = [8 x i8] c"\1B[1;34m\00"
@.str.4 = [5 x i8] c"GRAY\00"
@.str.5 = [8 x i8] c"\1B[1;30m\00"
@.str.6 = [4 x i8] c"YEL\00"
@.str.7 = [8 x i8] c"\1B[1;33m\00"
@.str.8 = [4 x i8] c"GRE\00"
@.str.9 = [8 x i8] c"\1B[1;32m\00"
@.str.10 = [4 x i8] c"MAG\00"
@.str.11 = [8 x i8] c"\1B[1;35m\00"
@.str.12 = [6 x i8] c"SBLUE\00"
@.str.13 = [8 x i8] c"\1B[1;36m\00"
@.str.14 = [4 x i8] c"DEF\00"
@.str.15 = [5 x i8] c"\1B[0m\00"
define void @interprate_color(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %30, label %3
3: ; preds = %1
%4 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %27, label %6
6: ; preds = %3
%7 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %27, label %9
9: ; preds = %6
%10 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%11 = icmp eq i64 %10, 0
br i1 %11, label %27, label %12
12: ; preds = %9
%13 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %0)
%14 = icmp eq i64 %13, 0
br i1 %14, label %27, label %15
15: ; preds = %12
%16 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %0)
%17 = icmp eq i64 %16, 0
br i1 %17, label %27, label %18
18: ; preds = %15
%19 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %0)
%20 = icmp eq i64 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %18
%22 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8* %0)
%23 = icmp eq i64 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = tail call i64 @ft_strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* %0)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24, %21, %18, %15, %12, %9, %6, %3
%28 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %9 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %15 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), %18 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), %21 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), %24 ]
%29 = tail call i32 @ft_putstr(i8* %28)
br label %30
30: ; preds = %27, %24, %1
ret void
}