#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 getint();
int /*<<< orphan*/ printf(char *);
int expand_fleet_menu() {
  int choice;
  printf("Expand your fleet..\n");
  printf("1. Deploy X-wing starfighter_\n");
  printf("2. Deploy z95 fighter_\n");
  printf("3. Deploy B-wing fighter_\n");
  printf("4. Request special support vehicle_\n");
  choice = getint();
  return choice;
}


x86 assembly (clang, -O0):
<expand_fleet_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getint@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_fleet_menu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getint@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Expand your fleet..\0A\00"
@.str.1 = [31 x i8] c"1. Deploy X-wing starfighter_\0A\00"
@.str.2 = [24 x i8] c"2. Deploy z95 fighter_\0A\00"
@.str.3 = [27 x i8] c"3. Deploy B-wing fighter_\0A\00"
@.str.4 = [37 x i8] c"4. Request special support vehicle_\0A\00"
define i32 @expand_fleet_menu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 (...) @getint()
store i32 %7, i32* %1
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [20 x i8] c"Expand your fleet..\00"
@str.5 = [30 x i8] c"1. Deploy X-wing starfighter_\00"
@str.6 = [23 x i8] c"2. Deploy z95 fighter_\00"
@str.7 = [26 x i8] c"3. Deploy B-wing fighter_\00"
@str.8 = [36 x i8] c"4. Request special support vehicle_\00"
define i32 @expand_fleet_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 (...) @getint()
ret i32 %6
}