#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 */
char charInput();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
void mainWorkplaceSimLoop(char *username) {
  char choice;
  printf("Welcome to your first day, %s! What do you want to do?", username);
  choice = charInput();
  puts("Game is currently being built. Please come back later.");
  switch (choice) {
  case '0':
    break;
  case 'e':
    break;
  case 'h':
    break;
  }
}


x86 assembly (clang, -O0):
<mainWorkplaceSimLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <charInput@plt>
mov    %al,-0x9(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x30,%eax
je     1199 <mainWorkplaceSimLoop+0x69>
jmp    1177 <mainWorkplaceSimLoop+0x47>
mov    -0x10(%rbp),%eax
sub    $0x65,%eax
je     119e <mainWorkplaceSimLoop+0x6e>
jmp    1188 <mainWorkplaceSimLoop+0x58>
mov    -0x10(%rbp),%eax
sub    $0x68,%eax
je     11a3 <mainWorkplaceSimLoop+0x73>
jmp    11a8 <mainWorkplaceSimLoop+0x78>
jmp    11a8 <mainWorkplaceSimLoop+0x78>
jmp    11a8 <mainWorkplaceSimLoop+0x78>
jmp    11a8 <mainWorkplaceSimLoop+0x78>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mainWorkplaceSimLoop>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <charInput@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Welcome to your first day, %s! What do you want to do?\00"
@.str.1 = [55 x i8] c"Game is currently being built. Please come back later.\00"
define void @mainWorkplaceSimLoop(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call signext i8 (...) @charInput()
store i8 %6, i8* %3
%7 = call i32 @puts(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
switch i32 %9, label %13 [
i32 48, label %10
i32 101, label %11
i32 104, label %12
]
10: ; preds = %1
br label %13
11: ; preds = %1
br label %13
12: ; preds = %1
br label %13
13: ; preds = %1, %12, %11, %10
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Welcome to your first day, %s! What do you want to do?\00"
@.str.1 = [55 x i8] c"Game is currently being built. Please come back later.\00"
define void @mainWorkplaceSimLoop(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call signext i8 (...) @charInput()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
ret void
}