#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*/ add_option(char, char *, char *);
int /*<<< orphan*/ print_header(char *);
int /*<<< orphan*/ set_callback(char *);
void prompt_character_class() {
  print_header("Pick a character class...");
  set_callback("ULarnSetup");
  add_option('a', "Ogre", "Exceptional strength, but thick as a brick");
  add_option('b', "Wizard", "Smart, good at magic, but very weak");
  add_option('c', "Klingon", "Strong and average IQ, but unwise & very ugly");
  add_option('d', "Elf", "OK at magic, but a mediocre fighter");
  add_option('e', "Rogue", "Nimble and smart, but only average strength");
  add_option('f', "Adventurer", "Jack of all trades, master of none");
  add_option('g', "Dwarf", "Strong and healthy, but not good at magic");
  add_option('h', "Rambo", "Bad at everything, but has a lance of death");
}


x86 assembly (clang, -O0):
<prompt_character_class>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <print_header@plt>
lea    0xed3(%rip),%rdi
call   1030 <set_callback@plt>
mov    $0x61,%edi
lea    0xecd(%rip),%rsi
lea    0xecb(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x62,%edi
lea    0xee5(%rip),%rsi
lea    0xee5(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x63,%edi
lea    0xef8(%rip),%rsi
lea    0xef9(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x64,%edi
lea    0xf16(%rip),%rsi
lea    0xf13(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x65,%edi
lea    0xf26(%rip),%rsi
lea    0xf25(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x66,%edi
lea    0xf40(%rip),%rsi
lea    0xf44(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x67,%edi
lea    0xf56(%rip),%rsi
lea    0xf55(%rip),%rdx
call   1040 <add_option@plt>
mov    $0x68,%edi
lea    0xf6e(%rip),%rsi
lea    0xf6d(%rip),%rdx
call   1040 <add_option@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_character_class>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <print_header@plt>
lea    0xed6(%rip),%rdi
call   1030 <set_callback@plt>
lea    0xed5(%rip),%rsi
lea    0xed3(%rip),%rdx
mov    $0x61,%edi
call   1040 <add_option@plt>
lea    0xeed(%rip),%rsi
lea    0xeed(%rip),%rdx
mov    $0x62,%edi
call   1040 <add_option@plt>
lea    0xf00(%rip),%rsi
lea    0xf01(%rip),%rdx
mov    $0x63,%edi
call   1040 <add_option@plt>
lea    0xf1e(%rip),%rsi
lea    0xf1b(%rip),%rdx
mov    $0x64,%edi
call   1040 <add_option@plt>
lea    0xf2e(%rip),%rsi
lea    0xf2d(%rip),%rdx
mov    $0x65,%edi
call   1040 <add_option@plt>
lea    0xf48(%rip),%rsi
lea    0xf4c(%rip),%rdx
mov    $0x66,%edi
call   1040 <add_option@plt>
lea    0xf5e(%rip),%rsi
lea    0xf5d(%rip),%rdx
mov    $0x67,%edi
call   1040 <add_option@plt>
lea    0xf76(%rip),%rsi
lea    0xf75(%rip),%rdx
mov    $0x68,%edi
pop    %rax
jmp    1040 <add_option@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Pick a character class...\00"
@.str.1 = [11 x i8] c"ULarnSetup\00"
@.str.2 = [5 x i8] c"Ogre\00"
@.str.3 = [43 x i8] c"Exceptional strength, but thick as a brick\00"
@.str.4 = [7 x i8] c"Wizard\00"
@.str.5 = [36 x i8] c"Smart, good at magic, but very weak\00"
@.str.6 = [8 x i8] c"Klingon\00"
@.str.7 = [46 x i8] c"Strong and average IQ, but unwise & very ugly\00"
@.str.8 = [4 x i8] c"Elf\00"
@.str.9 = [36 x i8] c"OK at magic, but a mediocre fighter\00"
@.str.10 = [6 x i8] c"Rogue\00"
@.str.11 = [44 x i8] c"Nimble and smart, but only average strength\00"
@.str.12 = [11 x i8] c"Adventurer\00"
@.str.13 = [35 x i8] c"Jack of all trades, master of none\00"
@.str.14 = [6 x i8] c"Dwarf\00"
@.str.15 = [42 x i8] c"Strong and healthy, but not good at magic\00"
@.str.16 = [6 x i8] c"Rambo\00"
@.str.17 = [44 x i8] c"Bad at everything, but has a lance of death\00"
define void @prompt_character_class() {
%1 = call i32 @print_header(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @set_callback(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @add_option(i8 signext 97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @add_option(i8 signext 98, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 @add_option(i8 signext 99, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%6 = call i32 @add_option(i8 signext 100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%7 = call i32 @add_option(i8 signext 101, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0))
%8 = call i32 @add_option(i8 signext 102, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0))
%9 = call i32 @add_option(i8 signext 103, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
%10 = call i32 @add_option(i8 signext 104, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Pick a character class...\00"
@.str.1 = [11 x i8] c"ULarnSetup\00"
@.str.2 = [5 x i8] c"Ogre\00"
@.str.3 = [43 x i8] c"Exceptional strength, but thick as a brick\00"
@.str.4 = [7 x i8] c"Wizard\00"
@.str.5 = [36 x i8] c"Smart, good at magic, but very weak\00"
@.str.6 = [8 x i8] c"Klingon\00"
@.str.7 = [46 x i8] c"Strong and average IQ, but unwise & very ugly\00"
@.str.8 = [4 x i8] c"Elf\00"
@.str.9 = [36 x i8] c"OK at magic, but a mediocre fighter\00"
@.str.10 = [6 x i8] c"Rogue\00"
@.str.11 = [44 x i8] c"Nimble and smart, but only average strength\00"
@.str.12 = [11 x i8] c"Adventurer\00"
@.str.13 = [35 x i8] c"Jack of all trades, master of none\00"
@.str.14 = [6 x i8] c"Dwarf\00"
@.str.15 = [42 x i8] c"Strong and healthy, but not good at magic\00"
@.str.16 = [6 x i8] c"Rambo\00"
@.str.17 = [44 x i8] c"Bad at everything, but has a lance of death\00"
define void @prompt_character_class() {
%1 = tail call i32 @print_header(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @set_callback(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @add_option(i8 signext 97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @add_option(i8 signext 98, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 @add_option(i8 signext 99, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%6 = tail call i32 @add_option(i8 signext 100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%7 = tail call i32 @add_option(i8 signext 101, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0))
%8 = tail call i32 @add_option(i8 signext 102, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0))
%9 = tail call i32 @add_option(i8 signext 103, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
%10 = tail call i32 @add_option(i8 signext 104, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
ret void
}