#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_comment6() {
  switch (randint(5)) {
  case 1:
    msg_print("I must of heard you wrong...");
    break;
  case 2:
    msg_print("What was that?");
    break;
  case 3:
    msg_print("I'm sorry, say that again...");
    break;
  case 4:
    msg_print("What did you say?");
    break;
  case 5:
    msg_print("Sorry, what was that again?");
    break;
  }
}


x86 assembly (clang, -O0):
<prt_comment6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <randint@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
sub    $0x4,%eax
ja     11a8 <prt_comment6+0x88>
mov    -0x8(%rbp),%rax
lea    0xeb1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb5(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11a8 <prt_comment6+0x88>
lea    0xec1(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11a8 <prt_comment6+0x88>
lea    0xebf(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11a8 <prt_comment6+0x88>
lea    0xecb(%rip),%rdi
call   1030 <msg_print@plt>
jmp    11a8 <prt_comment6+0x88>
lea    0xecc(%rip),%rdi
call   1030 <msg_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"I must of heard you wrong...\00"
@.str.1 = [15 x i8] c"What was that?\00"
@.str.2 = [29 x i8] c"I'm sorry, say that again...\00"
@.str.3 = [18 x i8] c"What did you say?\00"
@.str.4 = [28 x i8] c"Sorry, what was that again?\00"
define void @prt_comment6() {
%1 = call i32 @randint(i32 5)
switch i32 %1, label %12 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
]
2: ; preds = %0
%3 = call i32 @msg_print(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %12
4: ; preds = %0
%5 = call i32 @msg_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %12
6: ; preds = %0
%7 = call i32 @msg_print(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %12
8: ; preds = %0
%9 = call i32 @msg_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @msg_print(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %12
12: ; preds = %0, %10, %8, %6, %4, %2
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"I must of heard you wrong...\00"
@.str.1 = [15 x i8] c"What was that?\00"
@.str.2 = [29 x i8] c"I'm sorry, say that again...\00"
@.str.3 = [18 x i8] c"What did you say?\00"
@.str.4 = [28 x i8] c"Sorry, what was that again?\00"
@reltable.prt_comment6 = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str to i64), i64 ptrtoint ([5 x i32]* @reltable.prt_comment6 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([5 x i32]* @reltable.prt_comment6 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.2 to i64), i64 ptrtoint ([5 x i32]* @reltable.prt_comment6 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.3 to i64), i64 ptrtoint ([5 x i32]* @reltable.prt_comment6 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.4 to i64), i64 ptrtoint ([5 x i32]* @reltable.prt_comment6 to i64)) to i32)]
define void @prt_comment6() {
%1 = tail call i32 @randint(i32 5)
%2 = add i32 %1, -1
%3 = icmp ult i32 %2, 5
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 ([5 x i32]* @reltable.prt_comment6 to i8*), i64 %6)
%8 = tail call i32 @msg_print(i8* %7)
br label %9
9: ; preds = %0, %4
ret void
}