#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*/ msg_print(char *);
int randint(int);
void prt_comment5() {
  switch (randint(10)) {
  case 1:
    msg_print("You will have to do better than that!");
    break;
  case 2:
    msg_print("That's an insult!");
    break;
  case 3:
    msg_print("Do you wish to do business or not?");
    break;
  case 4:
    msg_print("Hah!  Try again...");
    break;
  case 5:
    msg_print("Ridiculous!");
    break;
  case 6:
    msg_print("You've got to be kidding!");
    break;
  case 7:
    msg_print("You better be kidding!!");
    break;
  case 8:
    msg_print("You try my patience.");
    break;
  case 9:
    msg_print("I don't hear you.");
    break;
  case 10:
    msg_print("Hmmm, nice weather we're having...");
    break;
  }
}


x86 assembly (clang, -O0):
<prt_comment5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <randint@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
sub    $0x9,%eax
ja     11fd <prt_comment5+0xdd>
mov    -0x8(%rbp),%rax
lea    0xeb1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec9(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xede(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xedf(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xef1(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xef3(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xeee(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xef7(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xefe(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xf02(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11fd <prt_comment5+0xdd>
lea    0xf03(%rip),%rdi
call   1030 <msg_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prt_comment5>:
push   %rax
mov    $0xa,%edi
call   1040 <randint@plt>
add    $0xffffffff,%eax
cmp    $0x9,%eax
ja     1149 <prt_comment5+0x29>
cltq
lea    0xfbc(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
pop    %rax
jmp    1030 <msg_print@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [38 x i8] c"You will have to do better than that!\00"
@.str.1 = [18 x i8] c"That's an insult!\00"
@.str.2 = [35 x i8] c"Do you wish to do business or not?\00"
@.str.3 = [19 x i8] c"Hah! Try again...\00"
@.str.4 = [12 x i8] c"Ridiculous!\00"
@.str.5 = [26 x i8] c"You've got to be kidding!\00"
@.str.6 = [24 x i8] c"You better be kidding!!\00"
@.str.7 = [21 x i8] c"You try my patience.\00"
@.str.8 = [18 x i8] c"I don't hear you.\00"
@.str.9 = [35 x i8] c"Hmmm, nice weather we're having...\00"
define void @prt_comment5() {
%1 = call i32 @randint(i32 10)
switch i32 %1, label %22 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
i32 6, label %12
i32 7, label %14
i32 8, label %16
i32 9, label %18
i32 10, label %20
]
2: ; preds = %0
%3 = call i32 @msg_print(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %22
4: ; preds = %0
%5 = call i32 @msg_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %22
6: ; preds = %0
%7 = call i32 @msg_print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
br label %22
8: ; preds = %0
%9 = call i32 @msg_print(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %22
10: ; preds = %0
%11 = call i32 @msg_print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
br label %22
12: ; preds = %0
%13 = call i32 @msg_print(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %22
14: ; preds = %0
%15 = call i32 @msg_print(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %22
16: ; preds = %0
%17 = call i32 @msg_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %22
18: ; preds = %0
%19 = call i32 @msg_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %22
20: ; preds = %0
%21 = call i32 @msg_print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
br label %22
22: ; preds = %0, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"You will have to do better than that!\00"
@.str.1 = [18 x i8] c"That's an insult!\00"
@.str.2 = [35 x i8] c"Do you wish to do business or not?\00"
@.str.3 = [19 x i8] c"Hah! Try again...\00"
@.str.4 = [12 x i8] c"Ridiculous!\00"
@.str.5 = [26 x i8] c"You've got to be kidding!\00"
@.str.6 = [24 x i8] c"You better be kidding!!\00"
@.str.7 = [21 x i8] c"You try my patience.\00"
@.str.8 = [18 x i8] c"I don't hear you.\00"
@.str.9 = [35 x i8] c"Hmmm, nice weather we're having...\00"
@reltable.prt_comment5 = [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.1 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([35 x i8]* @.str.2 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.3 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.4 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.5 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.6 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.7 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.8 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([35 x i8]* @.str.9 to i64), i64 ptrtoint ([10 x i32]* @reltable.prt_comment5 to i64)) to i32)]
define void @prt_comment5() {
%1 = tail call i32 @randint(i32 10)
%2 = add i32 %1, -1
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([10 x i32]* @reltable.prt_comment5 to i8*), i64 %6)
%8 = tail call i32 @msg_print(i8* %7)
br label %9
9: ; preds = %0, %4
ret void
}