#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 */
struct char_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ act(char *, int, struct char_data *, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ char_from_room(struct char_data *);
int /*<<< orphan*/ char_to_room(struct char_data *, int /*<<< orphan*/);
int /*<<< orphan*/ do_action(struct char_data *, char *, int);
int /*<<< orphan*/ do_look(struct char_data *, char *, int);
int /*<<< orphan*/ real_room(int);
int /*<<< orphan*/ send_to_char(char *, struct char_data *);
int kings_hall(struct char_data *ch, int cmd, char *arg) {
  if (cmd != 176)
    return (0);
  do_action(ch, arg, 176);
  send_to_char("You feel as if some mighty force has been offended.\r\n", ch);
  send_to_char("You are torn out of reality!\r\nYou roll and tumble through "
               "endless voids for what seems like eternity...\r\n\r\nAfter a "
               "time, a new reality comes into focus... you are elsewhere.\r\n",
               ch);
  act("$n is struck by an intense beam of light and vanishes.", 1, ch, 0, 0, 0);
  char_from_room(ch);
  char_to_room(ch, real_room(1420));
  do_look(ch, "", 15);
  return (1);
}


x86 assembly (clang, -O0):
<kings_hall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0xb0,-0x14(%rbp)
je     119c <kings_hall+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    122e <kings_hall+0xbe>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0xb0,%edx
call   1040 <do_action@plt>
mov    -0x10(%rbp),%rsi
lea    0xe47(%rip),%rdi
call   1060 <send_to_char@plt>
mov    -0x10(%rbp),%rsi
lea    0xe6d(%rip),%rdi
call   1060 <send_to_char@plt>
mov    -0x10(%rbp),%rdx
lea    0xf0d(%rip),%rdi
mov    $0x1,%esi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1050 <act@plt>
mov    -0x10(%rbp),%rdi
call   1080 <char_from_room@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x58c,%edi
call   1070 <real_room@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1030 <char_to_room@plt>
mov    -0x10(%rbp),%rdi
lea    0xe18(%rip),%rsi
mov    $0xf,%edx
call   1090 <do_look@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kings_hall>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
cmp    $0xb0,%esi
jne    11fc <kings_hall+0x8c>
mov    %rdi,%rbx
mov    %rdx,%rsi
mov    $0xb0,%edx
call   1040 <do_action@plt>
lea    0xe6c(%rip),%rdi
mov    %rbx,%rsi
call   1060 <send_to_char@plt>
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
call   1060 <send_to_char@plt>
lea    0xf34(%rip),%rdi
mov    $0x1,%ebp
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1050 <act@plt>
mov    %rbx,%rdi
call   1080 <char_from_room@plt>
mov    $0x58c,%edi
call   1070 <real_room@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <char_to_room@plt>
lea    0xe46(%rip),%rsi
mov    %rbx,%rdi
mov    $0xf,%edx
call   1090 <do_look@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.char_data = type { i32 }
@.str = [54 x i8] c"You feel as if some mighty force has been offended.\0D\0A\00"
@.str.1 = [176 x i8] c"You are torn out of reality!\0D\0AYou roll and tumble through endless voids for what seems like eternity...\0D\0A\0D\0AAfter a time, a new reality comes into focus... you are elsewhere.\0D\0A\00"
@.str.2 = [55 x i8] c"$n is struck by an intense beam of light and vanishes.\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @kings_hall(%struct.char_data* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.char_data*
%6 = alloca i32
%7 = alloca i8*
store %struct.char_data* %0, %struct.char_data** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 176
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 0, i32* %4
br label %28
11: ; preds = %3
%12 = load %struct.char_data*, %struct.char_data** %5
%13 = load i8*, i8** %7
%14 = call i32 @do_action(%struct.char_data* %12, i8* %13, i32 176)
%15 = load %struct.char_data*, %struct.char_data** %5
%16 = call i32 @send_to_char(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), %struct.char_data* %15)
%17 = load %struct.char_data*, %struct.char_data** %5
%18 = call i32 @send_to_char(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0), %struct.char_data* %17)
%19 = load %struct.char_data*, %struct.char_data** %5
%20 = call i32 @act(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 1, %struct.char_data* %19, i32 0, i32 0, i32 0)
%21 = load %struct.char_data*, %struct.char_data** %5
%22 = call i32 @char_from_room(%struct.char_data* %21)
%23 = load %struct.char_data*, %struct.char_data** %5
%24 = call i32 @real_room(i32 1420)
%25 = call i32 @char_to_room(%struct.char_data* %23, i32 %24)
%26 = load %struct.char_data*, %struct.char_data** %5
%27 = call i32 @do_look(%struct.char_data* %26, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 15)
store i32 1, i32* %4
br label %28
28: ; preds = %11, %10
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
%struct.char_data = type { i32 }
@.str = [54 x i8] c"You feel as if some mighty force has been offended.\0D\0A\00"
@.str.1 = [176 x i8] c"You are torn out of reality!\0D\0AYou roll and tumble through endless voids for what seems like eternity...\0D\0A\0D\0AAfter a time, a new reality comes into focus... you are elsewhere.\0D\0A\00"
@.str.2 = [55 x i8] c"$n is struck by an intense beam of light and vanishes.\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @kings_hall(%struct.char_data* %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 176
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = tail call i32 @do_action(%struct.char_data* %0, i8* %2, i32 176)
%7 = tail call i32 @send_to_char(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), %struct.char_data* %0)
%8 = tail call i32 @send_to_char(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0), %struct.char_data* %0)
%9 = tail call i32 @act(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 1, %struct.char_data* %0, i32 0, i32 0, i32 0)
%10 = tail call i32 @char_from_room(%struct.char_data* %0)
%11 = tail call i32 @real_room(i32 1420)
%12 = tail call i32 @char_to_room(%struct.char_data* %0, i32 %11)
%13 = tail call i32 @do_look(%struct.char_data* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 15)
br label %14
14: ; preds = %3, %5
%15 = phi i32 [ 1, %5 ], [ 0, %3 ]
ret i32 %15
}