#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 random_num();
char random_char() {
  char *c;
  switch (random_num()) {
  case 1:
    c = "q";
    break;
  case 2:
    c = "w";
    break;
  case 3:
    c = "e";
    break;
  case 4:
    c = "r";
    break;
  case 5:
    c = "t";
    break;
  case 6:
    c = "y";
    break;
  case 7:
    c = "u";
    break;
  case 8:
    c = "i";
    break;
  case 9:
    c = "o";
    break;
  case 10:
    c = "p";
    break;
  case 11:
    c = "a";
    break;
  case 12:
    c = "s";
    break;
  case 13:
    c = "d";
    break;
  case 14:
    c = "f";
    break;
  case 15:
    c = "g";
    break;
  case 16:
    c = "h";
    break;
  case 17:
    c = "j";
    break;
  case 18:
    c = "k";
    break;
  case 19:
    c = "l";
    break;
  case 20:
    c = "z";
    break;
  case 21:
    c = "x";
    break;
  case 22:
    c = "c";
    break;
  case 23:
    c = "v";
    break;
  case 24:
    c = "b";
    break;
  case 25:
    c = "n";
    break;
  case 26:
    c = "m";
    break;
  }
  return *c;
}


x86 assembly (clang, -O0):
<random_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <random_num@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x19,%eax
ja     12e0 <random_char+0x1d0>
mov    -0x10(%rbp),%rax
lea    0xec4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xf0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xf00(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xee4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xeba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe9e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe74(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe66(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe4a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe3c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe2e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe20(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe12(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xe04(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xdf6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xde8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xdda(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xdcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e0 <random_char+0x1d0>
lea    0xdbe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_char>:
push   %rax
xor    %eax,%eax
call   1030 <random_num@plt>
add    $0xfffffffe,%eax
cmp    $0x18,%eax
ja     1132 <random_char+0x22>
cltq
lea    0xf0b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    1139 <random_char+0x29>
lea    0xec7(%rip),%rax
mov    (%rax),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"q\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [2 x i8] c"e\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [2 x i8] c"t\00"
@.str.5 = [2 x i8] c"y\00"
@.str.6 = [2 x i8] c"u\00"
@.str.7 = [2 x i8] c"i\00"
@.str.8 = [2 x i8] c"o\00"
@.str.9 = [2 x i8] c"p\00"
@.str.10 = [2 x i8] c"a\00"
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [2 x i8] c"d\00"
@.str.13 = [2 x i8] c"f\00"
@.str.14 = [2 x i8] c"g\00"
@.str.15 = [2 x i8] c"h\00"
@.str.16 = [2 x i8] c"j\00"
@.str.17 = [2 x i8] c"k\00"
@.str.18 = [2 x i8] c"l\00"
@.str.19 = [2 x i8] c"z\00"
@.str.20 = [2 x i8] c"x\00"
@.str.21 = [2 x i8] c"c\00"
@.str.22 = [2 x i8] c"v\00"
@.str.23 = [2 x i8] c"b\00"
@.str.24 = [2 x i8] c"n\00"
@.str.25 = [2 x i8] c"m\00"
define signext i8 @random_char() {
%1 = alloca i8*
%2 = call i32 (...) @random_num()
switch i32 %2, label %29 [
i32 1, label %3
i32 2, label %4
i32 3, label %5
i32 4, label %6
i32 5, label %7
i32 6, label %8
i32 7, label %9
i32 8, label %10
i32 9, label %11
i32 10, label %12
i32 11, label %13
i32 12, label %14
i32 13, label %15
i32 14, label %16
i32 15, label %17
i32 16, label %18
i32 17, label %19
i32 18, label %20
i32 19, label %21
i32 20, label %22
i32 21, label %23
i32 22, label %24
i32 23, label %25
i32 24, label %26
i32 25, label %27
i32 26, label %28
]
3: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %1
br label %29
4: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %29
5: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %29
6: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %29
7: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8** %1
br label %29
8: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %1
br label %29
9: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8** %1
br label %29
10: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8** %1
br label %29
11: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8** %1
br label %29
12: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8** %1
br label %29
13: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8** %1
br label %29
14: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8** %1
br label %29
15: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** %1
br label %29
16: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8** %1
br label %29
17: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8** %1
br label %29
18: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8** %1
br label %29
19: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8** %1
br label %29
20: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8** %1
br label %29
21: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8** %1
br label %29
22: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), i8** %1
br label %29
23: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i8** %1
br label %29
24: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), i8** %1
br label %29
25: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0), i8** %1
br label %29
26: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i8** %1
br label %29
27: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), i8** %1
br label %29
28: ; preds = %0
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8** %1
br label %29
29: ; preds = %0, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%30 = load i8*, i8** %1
%31 = load i8, i8* %30
ret i8 %31
}

LLVM IR (-O2):
@.str = [2 x i8] c"q\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [2 x i8] c"e\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [2 x i8] c"t\00"
@.str.5 = [2 x i8] c"y\00"
@.str.6 = [2 x i8] c"u\00"
@.str.7 = [2 x i8] c"i\00"
@.str.8 = [2 x i8] c"o\00"
@.str.9 = [2 x i8] c"p\00"
@.str.10 = [2 x i8] c"a\00"
@.str.11 = [2 x i8] c"s\00"
@.str.12 = [2 x i8] c"d\00"
@.str.13 = [2 x i8] c"f\00"
@.str.14 = [2 x i8] c"g\00"
@.str.15 = [2 x i8] c"h\00"
@.str.16 = [2 x i8] c"j\00"
@.str.17 = [2 x i8] c"k\00"
@.str.18 = [2 x i8] c"l\00"
@.str.19 = [2 x i8] c"z\00"
@.str.20 = [2 x i8] c"x\00"
@.str.21 = [2 x i8] c"c\00"
@.str.22 = [2 x i8] c"v\00"
@.str.23 = [2 x i8] c"b\00"
@.str.24 = [2 x i8] c"n\00"
@.str.25 = [2 x i8] c"m\00"
@reltable.random_char = [25 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.2 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.3 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.5 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.6 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.7 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.8 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.9 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.10 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.11 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.12 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.13 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.14 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.15 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.16 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.17 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.18 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.19 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.20 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.21 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.22 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.23 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.24 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.25 to i64), i64 ptrtoint ([25 x i32]* @reltable.random_char to i64)) to i32)]
define signext i8 @random_char() {
%1 = tail call i32 (...) @random_num()
%2 = add i32 %1, -2
%3 = icmp ult i32 %2, 25
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([25 x i32]* @reltable.random_char to i8*), i64 %6)
br label %8
8: ; preds = %4, %0
%9 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %0 ], [ %7, %4 ]
%10 = load i8, i8* %9
ret i8 %10
}