#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 */
scalar_t__ strcmp(char const *, char *);
char *cl(const char *color) {
  if (!color)
    return NULL;
  else if (strcmp(color, "normal") == 0)
    return "\033[0m";
  else if (strcmp(color, "red") == 0)
    return "\033[31m";
  else if (strcmp(color, "green") == 0)
    return "\033[32m";
  else if (strcmp(color, "yellow") == 0)
    return "\033[33m";
  else if (strcmp(color, "blue") == 0)
    return "\033[34m";
  else if (strcmp(color, "magenta") == 0)
    return "\033[35m";
  else if (strcmp(color, "cyan") == 0)
    return "\033[36m";
  else if (strcmp(color, "white") == 0)
    return "\033[37m";
  return NULL;
}


x86 assembly (clang, -O0):
<cl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <cl+0x24>
movq   $0x0,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115e <cl+0x4e>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1188 <cl+0x78>
lea    0xe91(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11b2 <cl+0xa2>
lea    0xe73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11dc <cl+0xcc>
lea    0xe56(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1206 <cl+0xf6>
lea    0xe37(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xe29(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1230 <cl+0x120>
lea    0xe1b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    125a <cl+0x14a>
lea    0xdfc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
mov    -0x10(%rbp),%rdi
lea    0xdee(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1284 <cl+0x174>
lea    0xdde(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12b4 <cl+0x1a4>
jmp    1289 <cl+0x179>
jmp    128e <cl+0x17e>
jmp    1293 <cl+0x183>
jmp    1298 <cl+0x188>
jmp    129d <cl+0x18d>
jmp    12a2 <cl+0x192>
jmp    12a7 <cl+0x197>
jmp    12ac <cl+0x19c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl>:
push   %rbx
test   %rdi,%rdi
je     11d6 <cl+0xc6>
mov    %rdi,%rbx
lea    0xedc(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11da <cl+0xca>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11e3 <cl+0xd3>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11ec <cl+0xdc>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11f5 <cl+0xe5>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11fe <cl+0xee>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1207 <cl+0xf7>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1210 <cl+0x100>
lea    0xe9a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
lea    0xe89(%rip),%rcx
cmove  %rcx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
lea    0xe26(%rip),%rax
pop    %rbx
ret
lea    0xe26(%rip),%rax
pop    %rbx
ret
lea    0xe29(%rip),%rax
pop    %rbx
ret
lea    0xe2d(%rip),%rax
pop    %rbx
ret
lea    0xe2f(%rip),%rax
pop    %rbx
ret
lea    0xe34(%rip),%rax
pop    %rbx
ret
lea    0xe36(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"normal\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [4 x i8] c"red\00"
@.str.3 = [6 x i8] c"\1B[31m\00"
@.str.4 = [6 x i8] c"green\00"
@.str.5 = [6 x i8] c"\1B[32m\00"
@.str.6 = [7 x i8] c"yellow\00"
@.str.7 = [6 x i8] c"\1B[33m\00"
@.str.8 = [5 x i8] c"blue\00"
@.str.9 = [6 x i8] c"\1B[34m\00"
@.str.10 = [8 x i8] c"magenta\00"
@.str.11 = [6 x i8] c"\1B[35m\00"
@.str.12 = [5 x i8] c"cyan\00"
@.str.13 = [6 x i8] c"\1B[36m\00"
@.str.14 = [6 x i8] c"white\00"
@.str.15 = [6 x i8] c"\1B[37m\00"
define i8* @cl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %56
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %56
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %56
17: ; preds = %12
%18 = load i8*, i8** %3
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %56
22: ; preds = %17
%23 = load i8*, i8** %3
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %56
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %56
32: ; preds = %27
%33 = load i8*, i8** %3
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %56
37: ; preds = %32
%38 = load i8*, i8** %3
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %56
42: ; preds = %37
%43 = load i8*, i8** %3
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %56
47: ; preds = %42
br label %48
48: ; preds = %47
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
br label %51
51: ; preds = %50
br label %52
52: ; preds = %51
br label %53
53: ; preds = %52
br label %54
54: ; preds = %53
br label %55
55: ; preds = %54
store i8* null, i8** %2
br label %56
56: ; preds = %55, %46, %41, %36, %31, %26, %21, %16, %11, %6
%57 = load i8*, i8** %2
ret i8* %57
}

LLVM IR (-O2):
@.str = [7 x i8] c"normal\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [4 x i8] c"red\00"
@.str.3 = [6 x i8] c"\1B[31m\00"
@.str.4 = [6 x i8] c"green\00"
@.str.5 = [6 x i8] c"\1B[32m\00"
@.str.6 = [7 x i8] c"yellow\00"
@.str.7 = [6 x i8] c"\1B[33m\00"
@.str.8 = [5 x i8] c"blue\00"
@.str.9 = [6 x i8] c"\1B[34m\00"
@.str.10 = [8 x i8] c"magenta\00"
@.str.11 = [6 x i8] c"\1B[35m\00"
@.str.12 = [5 x i8] c"cyan\00"
@.str.13 = [6 x i8] c"\1B[36m\00"
@.str.14 = [6 x i8] c"white\00"
@.str.15 = [6 x i8] c"\1B[37m\00"
define i8* @cl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %28, label %3
3: ; preds = %1
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %28, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %28, label %9
9: ; preds = %6
%10 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %28, label %12
12: ; preds = %9
%13 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %28, label %15
15: ; preds = %12
%16 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %28, label %18
18: ; preds = %15
%19 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %18
%22 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %21
%25 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
%27 = select i1 %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* null
br label %28
28: ; preds = %24, %21, %18, %15, %12, %9, %6, %3, %1
%29 = phi i8* [ null, %1 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %9 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %12 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), %15 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), %18 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), %21 ], [ %27, %24 ]
ret i8* %29
}