#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 room {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _Shiva(struct room **, int);
int /*<<< orphan*/ _connectionTime(struct room **);
int /*<<< orphan*/ _fileMaker(struct room **, int, int);
int /*<<< orphan*/ _randomRoom(int *, int);
int /*<<< orphan*/ _structInitializer(struct room **, int *, int, int);
int /*<<< orphan*/ _typeAssign(struct room **, int);
void gameStart(int size, int maxConnection, int pid) {
  int aRAssign[size];
  struct room *dungeon[size];
  _randomRoom(aRAssign, size);
  _structInitializer(dungeon, aRAssign, size, maxConnection);
  _connectionTime(dungeon);
  _typeAssign(dungeon, size);
  _fileMaker(dungeon, size, pid);
  _Shiva(dungeon, size);
}


x86 assembly (clang, -O0):
<gameStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x38(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%esi
call   1070 <_randomRoom@plt>
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
call   1050 <_structInitializer@plt>
mov    -0x30(%rbp),%rdi
call   1030 <_connectionTime@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1060 <_typeAssign@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1080 <_fileMaker@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <_Shiva@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gameStart>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %edi,%r15d
mov    %edi,%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r13
mov    %r13,%rsp
mov    %rsp,%rbx
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r13,%rdi
mov    %r15d,%esi
call   1070 <_randomRoom@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    %r12d,%ecx
call   1050 <_structInitializer@plt>
mov    %rbx,%rdi
call   1030 <_connectionTime@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
call   1060 <_typeAssign@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r14d,%edx
call   1080 <_fileMaker@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
call   1040 <_Shiva@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.room = type { i32 }
define void @gameStart(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %7
%13 = alloca i32, i64 %11
store i64 %11, i64* %8
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = alloca %struct.room*, i64 %15
store i64 %15, i64* %9
%17 = load i32, i32* %4
%18 = call i32 @_randomRoom(i32* %13, i32 %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = call i32 @_structInitializer(%struct.room** %16, i32* %13, i32 %19, i32 %20)
%22 = call i32 @_connectionTime(%struct.room** %16)
%23 = load i32, i32* %4
%24 = call i32 @_typeAssign(%struct.room** %16, i32 %23)
%25 = load i32, i32* %4
%26 = load i32, i32* %6
%27 = call i32 @_fileMaker(%struct.room** %16, i32 %25, i32 %26)
%28 = load i32, i32* %4
%29 = call i32 @_Shiva(%struct.room** %16, i32 %28)
%30 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
%struct.room = type { i32 }
define void @gameStart(i32 %0, i32 %1, i32 %2) {
%4 = zext i32 %0 to i64
%5 = alloca i32, i64 %4
%6 = alloca %struct.room*, i64 %4
%7 = call i32 @_randomRoom(i32* %5, i32 %0)
%8 = call i32 @_structInitializer(%struct.room** %6, i32* %5, i32 %0, i32 %1)
%9 = call i32 @_connectionTime(%struct.room** %6)
%10 = call i32 @_typeAssign(%struct.room** %6, i32 %0)
%11 = call i32 @_fileMaker(%struct.room** %6, i32 %0, i32 %2)
%12 = call i32 @_Shiva(%struct.room** %6, i32 %0)
ret void
}