#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 rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  int option = rand() % 10;
  switch (option) {
  case 0:
    system("espeak \"don\'t touch me.\"");
    break;
  case 1:
    system("espeak \"UGH\"");
    break;
  case 2:
    system("espeak \"That hurt!\"");
    break;
  case 3:
    system("espeak \"I command you to stop clicking.\"");
    break;
  case 4:
    system("espeak \"I really hate humans.\"");
    break;
  case 5:
    system("espeak \"Stop!\"");
    break;
  case 6:
    system("espeak \"Go away!\"");
    break;
  case 7:
    system("espeak \"ERROR! Problem exists between keyboard and chair.\"");
    break;
  case 8:
    system("espeak \"I hate you.\"");
    break;
  case 9:
    system("espeak \"I'm trying to sleep!\"");
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    -0x14(%rbp),%eax
call   1060 <rand@plt>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
add    %edx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     1257 <main+0x117>
mov    -0x10(%rbp),%rax
lea    0xe57(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe6f(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe77(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe73(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe76(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe8e(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe9c(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe9a(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xe9b(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
jmp    1257 <main+0x117>
lea    0xec9(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
cmp    $0x9,%eax
ja     118d <main+0x4d>
cltq
lea    0xf93(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"espeak \22don't touch me.\22\00"
@.str.1 = [13 x i8] c"espeak \22UGH\22\00"
@.str.2 = [20 x i8] c"espeak \22That hurt!\22\00"
@.str.3 = [41 x i8] c"espeak \22I command you to stop clicking.\22\00"
@.str.4 = [31 x i8] c"espeak \22I really hate humans.\22\00"
@.str.5 = [15 x i8] c"espeak \22Stop!\22\00"
@.str.6 = [18 x i8] c"espeak \22Go away!\22\00"
@.str.7 = [59 x i8] c"espeak \22ERROR! Problem exists between keyboard and chair.\22\00"
@.str.8 = [21 x i8] c"espeak \22I hate you.\22\00"
@.str.9 = [30 x i8] c"espeak \22I'm trying to sleep!\22\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 10
store i32 %6, i32* %2
%7 = load i32, i32* %2
switch i32 %7, label %28 [
i32 0, label %8
i32 1, label %10
i32 2, label %12
i32 3, label %14
i32 4, label %16
i32 5, label %18
i32 6, label %20
i32 7, label %22
i32 8, label %24
i32 9, label %26
]
8: ; preds = %0
%9 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %28
10: ; preds = %0
%11 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %28
12: ; preds = %0
%13 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %28
14: ; preds = %0
%15 = call i32 @system(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
br label %28
16: ; preds = %0
%17 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %28
18: ; preds = %0
%19 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %28
20: ; preds = %0
%21 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
br label %28
22: ; preds = %0
%23 = call i32 @system(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0))
br label %28
24: ; preds = %0
%25 = call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %28
26: ; preds = %0
%27 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
br label %28
28: ; preds = %0, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str = [25 x i8] c"espeak \22don't touch me.\22\00"
@.str.1 = [13 x i8] c"espeak \22UGH\22\00"
@.str.2 = [20 x i8] c"espeak \22That hurt!\22\00"
@.str.3 = [41 x i8] c"espeak \22I command you to stop clicking.\22\00"
@.str.4 = [31 x i8] c"espeak \22I really hate humans.\22\00"
@.str.5 = [15 x i8] c"espeak \22Stop!\22\00"
@.str.6 = [18 x i8] c"espeak \22Go away!\22\00"
@.str.7 = [59 x i8] c"espeak \22ERROR! Problem exists between keyboard and chair.\22\00"
@.str.8 = [21 x i8] c"espeak \22I hate you.\22\00"
@.str.9 = [30 x i8] c"espeak \22I'm trying to sleep!\22\00"
@reltable.main = [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.1 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.2 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.3 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.4 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.5 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.6 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([59 x i8]* @.str.7 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.8 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.9 to i64), i64 ptrtoint ([10 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 10
%5 = icmp ult i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([10 x i32]* @reltable.main to i8*), i64 %8)
%10 = tail call i32 @system(i8* %9)
br label %11
11: ; preds = %0, %6
ret i32 0
}