#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(int, char *, char *);
int /*<<< orphan*/ print_header(char *);
int /*<<< orphan*/ set_callback(char *);
void welcome(void) {
  print_header("<p>Welcome to the game of Ularn.  At this moment, you face a "
               "great problem.  ");
  print_header("Your daughter has contracted a strange disease and none of "
               "your home remedies ");
  print_header("seems to have any effect.  You sense that she is in mortal "
               "danger and you must ");
  print_header("try to save her.  Time ago you heard of a land of great danger "
               "and opportunity.  ");
  print_header("Perhaps here is the solution you need.</p>");
  print_header("<p>It has been said that there once was a great magician who "
               "called himself ");
  print_header("Polinneaus.  Many years ago, after having many miraculous "
               "successes, Polinneaus ");
  print_header("retired to the caverns of Ularn, where he devoted most of his "
               "time to the ");
  print_header("creation of magic.   Rumors have it that one day Polinneaus "
               "set out to dispel ");
  print_header("an attacking army in a forest some distance to the north.  It "
               "is believed that ");
  print_header("there he met his demise.</p>");
  print_header(
      "<p>The caverns of Ularn, it is thought, must be magnificent in design ");
  print_header("and contain much magic and treasure.  One option you have is "
               "to undertake a ");
  print_header("journey into these caverns.</p>");
  set_callback("*");
  add_option(-1, "Good Luck!  (You're going to need it.)", "");
}


x86 assembly (clang, -O0):
<welcome>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf07(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf4a(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf8e(%rip),%rdi
call   1050 <print_header@plt>
lea    0xfd4(%rip),%rdi
call   1050 <print_header@plt>
lea    0xff3(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1034(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1079(%rip),%rdi
call   1050 <print_header@plt>
lea    0x10b8(%rip),%rdi
call   1050 <print_header@plt>
lea    0x10fb(%rip),%rdi
call   1050 <print_header@plt>
lea    0x113f(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1150(%rip),%rdi
call   1050 <print_header@plt>
lea    0x118b(%rip),%rdi
call   1050 <print_header@plt>
lea    0x11cc(%rip),%rdi
call   1050 <print_header@plt>
lea    0x11e0(%rip),%rdi
call   1030 <set_callback@plt>
mov    $0xffffffff,%edi
lea    0x11d1(%rip),%rsi
lea    0xe52(%rip),%rdx
call   1040 <add_option@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<welcome>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf0a(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf4d(%rip),%rdi
call   1050 <print_header@plt>
lea    0xf91(%rip),%rdi
call   1050 <print_header@plt>
lea    0xfd7(%rip),%rdi
call   1050 <print_header@plt>
lea    0xff6(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1037(%rip),%rdi
call   1050 <print_header@plt>
lea    0x107c(%rip),%rdi
call   1050 <print_header@plt>
lea    0x10bb(%rip),%rdi
call   1050 <print_header@plt>
lea    0x10fe(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1142(%rip),%rdi
call   1050 <print_header@plt>
lea    0x1153(%rip),%rdi
call   1050 <print_header@plt>
lea    0x118e(%rip),%rdi
call   1050 <print_header@plt>
lea    0x11cf(%rip),%rdi
call   1050 <print_header@plt>
lea    0x11e3(%rip),%rdi
call   1030 <set_callback@plt>
lea    0x11d9(%rip),%rsi
lea    0xe5a(%rip),%rdx
mov    $0xffffffff,%edi
pop    %rax
jmp    1040 <add_option@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"<p>Welcome to the game of Ularn. At this moment, you face a great problem. \00"
@.str.1 = [79 x i8] c"Your daughter has contracted a strange disease and none of your home remedies \00"
@.str.2 = [80 x i8] c"seems to have any effect. You sense that she is in mortal danger and you must \00"
@.str.3 = [82 x i8] c"try to save her. Time ago you heard of a land of great danger and opportunity. \00"
@.str.4 = [43 x i8] c"Perhaps here is the solution you need.</p>\00"
@.str.5 = [77 x i8] c"<p>It has been said that there once was a great magician who called himself \00"
@.str.6 = [81 x i8] c"Polinneaus. Many years ago, after having many miraculous successes, Polinneaus \00"
@.str.7 = [75 x i8] c"retired to the caverns of Ularn, where he devoted most of his time to the \00"
@.str.8 = [79 x i8] c"creation of magic. Rumors have it that one day Polinneaus set out to dispel \00"
@.str.9 = [80 x i8] c"an attacking army in a forest some distance to the north. It is believed that \00"
@.str.10 = [29 x i8] c"there he met his demise.</p>\00"
@.str.11 = [71 x i8] c"<p>The caverns of Ularn, it is thought, must be magnificent in design \00"
@.str.12 = [77 x i8] c"and contain much magic and treasure. One option you have is to undertake a \00"
@.str.13 = [32 x i8] c"journey into these caverns.</p>\00"
@.str.14 = [2 x i8] c"*\00"
@.str.15 = [39 x i8] c"Good Luck! (You're going to need it.)\00"
@.str.16 = [1 x i8] zeroinitializer
define void @welcome() {
%1 = call i32 @print_header(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_header(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @print_header(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @print_header(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @print_header(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @print_header(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @print_header(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @print_header(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @print_header(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @print_header(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @print_header(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @print_header(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @print_header(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @print_header(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @set_callback(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @add_option(i32 -1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"<p>Welcome to the game of Ularn. At this moment, you face a great problem. \00"
@.str.1 = [79 x i8] c"Your daughter has contracted a strange disease and none of your home remedies \00"
@.str.2 = [80 x i8] c"seems to have any effect. You sense that she is in mortal danger and you must \00"
@.str.3 = [82 x i8] c"try to save her. Time ago you heard of a land of great danger and opportunity. \00"
@.str.4 = [43 x i8] c"Perhaps here is the solution you need.</p>\00"
@.str.5 = [77 x i8] c"<p>It has been said that there once was a great magician who called himself \00"
@.str.6 = [81 x i8] c"Polinneaus. Many years ago, after having many miraculous successes, Polinneaus \00"
@.str.7 = [75 x i8] c"retired to the caverns of Ularn, where he devoted most of his time to the \00"
@.str.8 = [79 x i8] c"creation of magic. Rumors have it that one day Polinneaus set out to dispel \00"
@.str.9 = [80 x i8] c"an attacking army in a forest some distance to the north. It is believed that \00"
@.str.10 = [29 x i8] c"there he met his demise.</p>\00"
@.str.11 = [71 x i8] c"<p>The caverns of Ularn, it is thought, must be magnificent in design \00"
@.str.12 = [77 x i8] c"and contain much magic and treasure. One option you have is to undertake a \00"
@.str.13 = [32 x i8] c"journey into these caverns.</p>\00"
@.str.14 = [2 x i8] c"*\00"
@.str.15 = [39 x i8] c"Good Luck! (You're going to need it.)\00"
@.str.16 = [1 x i8] zeroinitializer
define void @welcome() {
%1 = tail call i32 @print_header(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_header(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @print_header(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @print_header(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @print_header(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @print_header(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @print_header(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @print_header(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @print_header(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @print_header(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @print_header(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @print_header(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @print_header(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @print_header(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @set_callback(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%16 = tail call i32 @add_option(i32 -1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.16, i64 0, i64 0))
ret void
}