#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 q__reject_char() {
  msg_print("A guard meets you at the entrance and says:");
  switch (randint(4)) {
  case 1:
    msg_print("'M'lord, the Arch-Mage does not wish to be disturbed.'");
  case 2:
    msg_print("'My master has other business at the present time.'");
  case 3:
    msg_print("'Piss off you inexperienced peon.'");
  case 4:
    msg_print("'You have yet to prove yourself worthy.'");
  }
  msg_print("The guard escorts you back outside and locks the door.");
  msg_print("");
}


x86 assembly (clang, -O0):
<q__reject_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <msg_print@plt>
mov    $0x4,%edi
call   1040 <randint@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
sub    $0x3,%eax
ja     1194 <q__reject_char+0x74>
mov    -0x8(%rbp),%rax
lea    0xea5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed1(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xefc(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf24(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf3b(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf58(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xecb(%rip),%rdi
call   1030 <msg_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q__reject_char>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <msg_print@plt>
mov    $0x4,%edi
call   1040 <randint@plt>
add    $0xffffffff,%eax
cmp    $0x3,%eax
ja     117f <q__reject_char+0x5f>
lea    0xeba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee6(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf11(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf39(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf50(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xf6d(%rip),%rdi
call   1030 <msg_print@plt>
lea    0xee0(%rip),%rdi
pop    %rax
jmp    1030 <msg_print@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"A guard meets you at the entrance and says:\00"
@.str.1 = [55 x i8] c"'M'lord, the Arch-Mage does not wish to be disturbed.'\00"
@.str.2 = [52 x i8] c"'My master has other business at the present time.'\00"
@.str.3 = [35 x i8] c"'Piss off you inexperienced peon.'\00"
@.str.4 = [41 x i8] c"'You have yet to prove yourself worthy.'\00"
@.str.5 = [55 x i8] c"The guard escorts you back outside and locks the door.\00"
@.str.6 = [1 x i8] zeroinitializer
define void @q__reject_char() {
%1 = call i32 @msg_print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @randint(i32 4)
switch i32 %2, label %11 [
i32 1, label %3
i32 2, label %5
i32 3, label %7
i32 4, label %9
]
3: ; preds = %0
%4 = call i32 @msg_print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = call i32 @msg_print(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %0, %5
%8 = call i32 @msg_print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = call i32 @msg_print(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = call i32 @msg_print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @msg_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"A guard meets you at the entrance and says:\00"
@.str.1 = [55 x i8] c"'M'lord, the Arch-Mage does not wish to be disturbed.'\00"
@.str.2 = [52 x i8] c"'My master has other business at the present time.'\00"
@.str.3 = [35 x i8] c"'Piss off you inexperienced peon.'\00"
@.str.4 = [41 x i8] c"'You have yet to prove yourself worthy.'\00"
@.str.5 = [55 x i8] c"The guard escorts you back outside and locks the door.\00"
@.str.6 = [1 x i8] zeroinitializer
define void @q__reject_char() {
%1 = tail call i32 @msg_print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @randint(i32 4)
switch i32 %2, label %11 [
i32 1, label %3
i32 2, label %5
i32 3, label %7
i32 4, label %9
]
3: ; preds = %0
%4 = tail call i32 @msg_print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = tail call i32 @msg_print(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %0, %5
%8 = tail call i32 @msg_print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = tail call i32 @msg_print(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = tail call i32 @msg_print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 @msg_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
ret void
}