#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*/ printf(char *, int, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char input;
  scanf("%c", &input);
  if (input == 'h') {
    char help;
    scanf("%c", &help);
    char input_string[15];
    scanf("%[^\n]s", input_string);
    int red = 0, green = 0, blue = 0;
    if (input_string[2] > 96 && input_string[2] < 123)
      red = input_string[2] - 87;
    else
      red = input_string[2] - 48;
    if (input_string[1] > 96 && input_string[1] < 123)
      red = red + (input_string[1] - 87) * 16;
    else
      red = red + (input_string[1] - 48) * 16;
    if (input_string[4] > 96 && input_string[4] < 123)
      green = input_string[4] - 87;
    else
      green = input_string[4] - 48;
    if (input_string[3] > 96 && input_string[3] < 123)
      green = green + (input_string[3] - 87) * 16;
    else
      green = green + (input_string[3] - 48) * 16;
    if (input_string[6] > 96 && input_string[6] < 123)
      blue = input_string[6] - 87;
    else
      blue = input_string[6] - 48;
    if (input_string[5] > 96 && input_string[5] < 123)
      blue = blue + (input_string[5] - 87) * 16;
    else
      blue = blue + (input_string[5] - 48) * 16;
    printf("rgb(%d, %d, %d)", red, green, blue);
  }
  if (input == 'd') {
    char comma;
    int numbers[5];
    for (int counter = 0; counter < 3; counter++) {
      scanf("%d", &numbers[counter]);
      scanf("%c", &comma);
    }
    if (numbers[0] == 0)
      printf("#%x%x", numbers[0], numbers[0]);
    else
      printf("#%x", numbers[0]);
    if (numbers[1] == 0)
      printf("%x%x", numbers[1], numbers[1]);
    else
      printf("%x", numbers[1]);
    if (numbers[2] == 0)
      printf("%x%x", numbers[2], numbers[2]);
    else
      printf("%x", numbers[2]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x68,%eax
jne    1300 <main+0x1e0>
lea    0xeab(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x15(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movsbl -0x13(%rbp),%eax
cmp    $0x60,%eax
jle    11b0 <main+0x90>
movsbl -0x13(%rbp),%eax
cmp    $0x7b,%eax
jge    11b0 <main+0x90>
movsbl -0x13(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ba <main+0x9a>
movsbl -0x13(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x1c(%rbp)
movsbl -0x14(%rbp),%eax
cmp    $0x60,%eax
jle    11eb <main+0xcb>
movsbl -0x14(%rbp),%eax
cmp    $0x7b,%eax
jge    11eb <main+0xcb>
mov    -0x1c(%rbp),%eax
movsbl -0x14(%rbp),%ecx
sub    $0x57,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    11fd <main+0xdd>
mov    -0x1c(%rbp),%eax
movsbl -0x14(%rbp),%ecx
sub    $0x30,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x60,%eax
jle    1226 <main+0x106>
movsbl -0x11(%rbp),%eax
cmp    $0x7b,%eax
jge    1226 <main+0x106>
movsbl -0x11(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x20(%rbp)
jmp    1230 <main+0x110>
movsbl -0x11(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x20(%rbp)
movsbl -0x12(%rbp),%eax
cmp    $0x60,%eax
jle    1261 <main+0x141>
movsbl -0x12(%rbp),%eax
cmp    $0x7b,%eax
jge    1261 <main+0x141>
mov    -0x20(%rbp),%eax
movsbl -0x12(%rbp),%ecx
sub    $0x57,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    1273 <main+0x153>
mov    -0x20(%rbp),%eax
movsbl -0x12(%rbp),%ecx
sub    $0x30,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
movsbl -0xf(%rbp),%eax
cmp    $0x60,%eax
jle    129c <main+0x17c>
movsbl -0xf(%rbp),%eax
cmp    $0x7b,%eax
jge    129c <main+0x17c>
movsbl -0xf(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x24(%rbp)
jmp    12a6 <main+0x186>
movsbl -0xf(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x24(%rbp)
movsbl -0x10(%rbp),%eax
cmp    $0x60,%eax
jle    12d7 <main+0x1b7>
movsbl -0x10(%rbp),%eax
cmp    $0x7b,%eax
jge    12d7 <main+0x1b7>
mov    -0x24(%rbp),%eax
movsbl -0x10(%rbp),%ecx
sub    $0x57,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    12e9 <main+0x1c9>
mov    -0x24(%rbp),%eax
movsbl -0x10(%rbp),%ecx
sub    $0x30,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
jne    13fc <main+0x2dc>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    135b <main+0x23b>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xcbe(%rip),%rdi
lea    -0x25(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1314 <main+0x1f4>
cmpl   $0x0,-0x40(%rbp)
jne    137e <main+0x25e>
mov    -0x40(%rbp),%esi
mov    -0x40(%rbp),%edx
lea    0xcab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138f <main+0x26f>
mov    -0x40(%rbp),%esi
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x3c(%rbp)
jne    13b2 <main+0x292>
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xc78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13c3 <main+0x2a3>
mov    -0x3c(%rbp),%esi
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
jne    13e6 <main+0x2c6>
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xc44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13f7 <main+0x2d7>
mov    -0x38(%rbp),%esi
lea    0xc34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13fc <main+0x2dc>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0xed0(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xe(%rsp),%al
cmp    $0x68,%al
jne    121d <main+0xfd>
lea    0xeb1(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xea1(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movsbl 0x12(%rsp),%eax
lea    -0x61(%rax),%ecx
movsbl 0x11(%rsp),%edx
lea    -0x61(%rdx),%esi
shl    $0x4,%edx
lea    -0x30(%rax),%edi
add    $0xffffffa9,%eax
cmp    $0x1a,%cl
cmovae %edi,%eax
cmp    $0x1a,%sil
lea    -0x570(%rax,%rdx,1),%ecx
lea    -0x300(%rax,%rdx,1),%esi
cmovb  %ecx,%esi
movsbl 0x14(%rsp),%eax
lea    -0x61(%rax),%ecx
movsbl 0x13(%rsp),%edx
lea    -0x61(%rdx),%edi
shl    $0x4,%edx
lea    -0x30(%rax),%ebx
add    $0xffffffa9,%eax
cmp    $0x1a,%cl
cmovae %ebx,%eax
cmp    $0x1a,%dil
lea    -0x570(%rax,%rdx,1),%ecx
lea    -0x300(%rax,%rdx,1),%edx
cmovb  %ecx,%edx
movsbl 0x16(%rsp),%eax
lea    -0x61(%rax),%r8d
movsbl 0x15(%rsp),%edi
lea    -0x61(%rdi),%ebx
shl    $0x4,%edi
lea    -0x30(%rax),%ecx
add    $0xffffffa9,%eax
cmp    $0x1a,%r8b
cmovae %ecx,%eax
cmp    $0x1a,%bl
lea    -0x570(%rax,%rdi,1),%ebx
lea    -0x300(%rax,%rdi,1),%ecx
cmovb  %ebx,%ecx
lea    0xdf8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xe(%rsp),%al
cmp    $0x64,%al
jne    130a <main+0x1ea>
lea    0xdee(%rip),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xdbe(%rip),%rbx
lea    0xf(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
test   %esi,%esi
je     12a4 <main+0x184>
lea    0xd88(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    12b6 <main+0x196>
lea    0xd72(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
test   %esi,%esi
je     12ce <main+0x1ae>
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    12e0 <main+0x1c0>
lea    0xd49(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
test   %esi,%esi
je     12f8 <main+0x1d8>
lea    0xd35(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    130a <main+0x1ea>
lea    0xd1f(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@.str.2 = [16 x i8] c"rgb(%d, %d, %d)\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [6 x i8] c"#%x%x\00"
@.str.5 = [4 x i8] c"#%x\00"
@.str.6 = [5 x i8] c"%x%x\00"
@.str.7 = [3 x i8] c"%x\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca [15 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca [5 x i32]
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 104
br i1 %14, label %15, label %161
15: ; preds = %0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%17 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %17)
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%19 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp sgt i32 %21, 96
br i1 %22, label %23, label %33
23: ; preds = %15
%24 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 2
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp slt i32 %26, 123
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 2
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %31, 87
store i32 %32, i32* %5
br label %38
33: ; preds = %23, %15
%34 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 2
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = sub nsw i32 %36, 48
store i32 %37, i32* %5
br label %38
38: ; preds = %33, %28
%39 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 1
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp sgt i32 %41, 96
br i1 %42, label %43, label %56
43: ; preds = %38
%44 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp slt i32 %46, 123
br i1 %47, label %48, label %56
48: ; preds = %43
%49 = load i32, i32* %5
%50 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 1
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = sub nsw i32 %52, 87
%54 = mul nsw i32 %53, 16
%55 = add nsw i32 %49, %54
store i32 %55, i32* %5
br label %64
56: ; preds = %43, %38
%57 = load i32, i32* %5
%58 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 1
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = sub nsw i32 %60, 48
%62 = mul nsw i32 %61, 16
%63 = add nsw i32 %57, %62
store i32 %63, i32* %5
br label %64
64: ; preds = %56, %48
%65 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 4
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp sgt i32 %67, 96
br i1 %68, label %69, label %79
69: ; preds = %64
%70 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 4
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp slt i32 %72, 123
br i1 %73, label %74, label %79
74: ; preds = %69
%75 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 4
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = sub nsw i32 %77, 87
store i32 %78, i32* %6
br label %84
79: ; preds = %69, %64
%80 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 4
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = sub nsw i32 %82, 48
store i32 %83, i32* %6
br label %84
84: ; preds = %79, %74
%85 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 3
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp sgt i32 %87, 96
br i1 %88, label %89, label %102
89: ; preds = %84
%90 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 3
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp slt i32 %92, 123
br i1 %93, label %94, label %102
94: ; preds = %89
%95 = load i32, i32* %6
%96 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 3
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = sub nsw i32 %98, 87
%100 = mul nsw i32 %99, 16
%101 = add nsw i32 %95, %100
store i32 %101, i32* %6
br label %110
102: ; preds = %89, %84
%103 = load i32, i32* %6
%104 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 3
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = sub nsw i32 %106, 48
%108 = mul nsw i32 %107, 16
%109 = add nsw i32 %103, %108
store i32 %109, i32* %6
br label %110
110: ; preds = %102, %94
%111 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp sgt i32 %113, 96
br i1 %114, label %115, label %125
115: ; preds = %110
%116 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp slt i32 %118, 123
br i1 %119, label %120, label %125
120: ; preds = %115
%121 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = sub nsw i32 %123, 87
store i32 %124, i32* %7
br label %130
125: ; preds = %115, %110
%126 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
%127 = load i8, i8* %126
%128 = sext i8 %127 to i32
%129 = sub nsw i32 %128, 48
store i32 %129, i32* %7
br label %130
130: ; preds = %125, %120
%131 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 5
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp sgt i32 %133, 96
br i1 %134, label %135, label %148
135: ; preds = %130
%136 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 5
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp slt i32 %138, 123
br i1 %139, label %140, label %148
140: ; preds = %135
%141 = load i32, i32* %7
%142 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 5
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = sub nsw i32 %144, 87
%146 = mul nsw i32 %145, 16
%147 = add nsw i32 %141, %146
store i32 %147, i32* %7
br label %156
148: ; preds = %135, %130
%149 = load i32, i32* %7
%150 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 5
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = sub nsw i32 %152, 48
%154 = mul nsw i32 %153, 16
%155 = add nsw i32 %149, %154
store i32 %155, i32* %7
br label %156
156: ; preds = %148, %140
%157 = load i32, i32* %5
%158 = load i32, i32* %6
%159 = load i32, i32* %7
%160 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %157, i32 %158, i32 %159)
br label %161
161: ; preds = %156, %0
%162 = load i8, i8* %2
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %163, 100
br i1 %164, label %165, label %221
165: ; preds = %161
store i32 0, i32* %10
br label %166
166: ; preds = %175, %165
%167 = load i32, i32* %10
%168 = icmp slt i32 %167, 3
br i1 %168, label %169, label %178
169: ; preds = %166
%170 = load i32, i32* %10
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 %171
%173 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %172)
%174 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %175
175: ; preds = %169
%176 = load i32, i32* %10
%177 = add nsw i32 %176, 1
store i32 %177, i32* %10
br label %166
178: ; preds = %166
%179 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%180 = load i32, i32* %179
%181 = icmp eq i32 %180, 0
br i1 %181, label %182, label %188
182: ; preds = %178
%183 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%184 = load i32, i32* %183
%185 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%186 = load i32, i32* %185
%187 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %184, i32 %186)
br label %192
188: ; preds = %178
%189 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%190 = load i32, i32* %189
%191 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %190)
br label %192
192: ; preds = %188, %182
%193 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 1
%194 = load i32, i32* %193
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %202
196: ; preds = %192
%197 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 1
%198 = load i32, i32* %197
%199 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 1
%200 = load i32, i32* %199
%201 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %198, i32 %200)
br label %206
202: ; preds = %192
%203 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 1
%204 = load i32, i32* %203
%205 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %204)
br label %206
206: ; preds = %202, %196
%207 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 2
%208 = load i32, i32* %207
%209 = icmp eq i32 %208, 0
br i1 %209, label %210, label %216
210: ; preds = %206
%211 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 2
%212 = load i32, i32* %211
%213 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 2
%214 = load i32, i32* %213
%215 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %212, i32 %214)
br label %220
216: ; preds = %206
%217 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 2
%218 = load i32, i32* %217
%219 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %218)
br label %220
220: ; preds = %216, %210
br label %221
221: ; preds = %220, %161
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@.str.2 = [16 x i8] c"rgb(%d, %d, %d)\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [6 x i8] c"#%x%x\00"
@.str.5 = [4 x i8] c"#%x\00"
@.str.6 = [5 x i8] c"%x%x\00"
@.str.7 = [3 x i8] c"%x\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca [15 x i8]
%4 = alloca i8
%5 = alloca [5 x i32]
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 104
br i1 %8, label %9, label %63
9: ; preds = %0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%11 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add i8 %14, -97
%17 = icmp ult i8 %16, 26
%18 = select i1 %17, i32 -87, i32 -48
%19 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = add i8 %20, -97
%23 = icmp ult i8 %22, 26
%24 = shl nsw i32 %21, 4
%25 = select i1 %23, i32 -1392, i32 -768
%26 = add nsw i32 %18, %15
%27 = add nsw i32 %26, %24
%28 = add nsw i32 %27, %25
%29 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = add i8 %30, -97
%33 = icmp ult i8 %32, 26
%34 = select i1 %33, i32 -87, i32 -48
%35 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 3
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = add i8 %36, -97
%39 = icmp ult i8 %38, 26
%40 = shl nsw i32 %37, 4
%41 = select i1 %39, i32 -1392, i32 -768
%42 = add nsw i32 %34, %31
%43 = add nsw i32 %42, %40
%44 = add nsw i32 %43, %41
%45 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 6
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = add i8 %46, -97
%49 = icmp ult i8 %48, 26
%50 = select i1 %49, i32 -87, i32 -48
%51 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 5
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = add i8 %52, -97
%55 = icmp ult i8 %54, 26
%56 = shl nsw i32 %53, 4
%57 = select i1 %55, i32 -1392, i32 -768
%58 = add nsw i32 %50, %47
%59 = add nsw i32 %58, %56
%60 = add nsw i32 %59, %57
%61 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %44, i32 %60)
%62 = load i8, i8* %1
br label %63
63: ; preds = %9, %0
%64 = phi i8 [ %62, %9 ], [ %7, %0 ]
%65 = icmp eq i8 %64, 100
br i1 %65, label %66, label %98
66: ; preds = %63
%67 = bitcast [5 x i32]* %5 to i8*
%68 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%69 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %68)
%70 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%71 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 1
%72 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %71)
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%74 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 2
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %74)
%76 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%77 = load i32, i32* %68
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %66
%80 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0)
br label %83
81: ; preds = %66
%82 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %77)
br label %83
83: ; preds = %81, %79
%84 = load i32, i32* %71
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 0)
br label %90
88: ; preds = %83
%89 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %84)
br label %90
90: ; preds = %88, %86
%91 = load i32, i32* %74
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 0)
br label %97
95: ; preds = %90
%96 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %91)
br label %97
97: ; preds = %95, %93
br label %98
98: ; preds = %97, %63
ret i32 0
}