#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
void PrintInstructions(void) {
  char string[256];
  printf("Santa Paravia and Fiumaccio\n\n");
  printf("You are the ruler of a 15th century Italian city state.\n");
  printf("If you rule well, you will receive higher titles. The\n");
  printf("first player to become king or queen wins. Life expectancy\n");
  printf("then was brief, so you may not live long enough to win.\n");
  printf("The computer will draw a map of your state. The size\n");
  printf("of the area in the wall grows as you buy more land. The\n");
  printf("size of the guard tower in the upper left corner shows\n");
  printf("the adequacy of your defenses. If it shrinks, equip more\n");
  printf(
      "soldiers! If the horse and plowman is touching the top of the wall,\n");
  printf("all your land is in production. Otherwise you need more\n");
  printf("serfs, who will migrate to your state if you distribute\n");
  printf("more grain than the minimum demand. If you distribute less\n");
  printf("grain, some of your people will starve, and you will have\n");
  printf("a high death rate. High taxes raise money, but slow down\n");
  printf("economic growth. (Press ENTER to begin game)\n");
  fgets(string, 255, stdin);
  return;
}


x86 assembly (clang, -O0):
<PrintInstructions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
call   1030 <printf@plt>
lea    0xf68(%rip),%rdi
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbf(%rip),%rdi
call   1030 <printf@plt>
lea    0xfec(%rip),%rdi
call   1030 <printf@plt>
lea    0x1018(%rip),%rdi
call   1030 <printf@plt>
lea    0x1046(%rip),%rdi
call   1030 <printf@plt>
lea    0x107f(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ac(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d9(%rip),%rdi
call   1030 <printf@plt>
lea    0x1109(%rip),%rdi
call   1030 <printf@plt>
lea    0x1138(%rip),%rdi
call   1030 <printf@plt>
lea    0x1166(%rip),%rdi
call   1030 <printf@plt>
lea    -0x100(%rbp),%rdi
mov    0x2def(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1040 <fgets@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintInstructions>:
sub    $0x108,%rsp
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf94(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbd(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe9(%rip),%rdi
call   1030 <puts@plt>
lea    0x1014(%rip),%rdi
call   1030 <puts@plt>
lea    0x1041(%rip),%rdi
call   1030 <puts@plt>
lea    0x1079(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d1(%rip),%rdi
call   1030 <puts@plt>
lea    0x1100(%rip),%rdi
call   1030 <puts@plt>
lea    0x112e(%rip),%rdi
call   1030 <puts@plt>
lea    0x115b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0xff,%esi
call   1040 <fgets@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Santa Paravia and Fiumaccio\0A\0A\00"
@.str.1 = [57 x i8] c"You are the ruler of a 15th century Italian city state.\0A\00"
@.str.2 = [55 x i8] c"If you rule well, you will receive higher titles. The\0A\00"
@.str.3 = [60 x i8] c"first player to become king or queen wins. Life expectancy\0A\00"
@.str.4 = [57 x i8] c"then was brief, so you may not live long enough to win.\0A\00"
@.str.5 = [54 x i8] c"The computer will draw a map of your state. The size\0A\00"
@.str.6 = [57 x i8] c"of the area in the wall grows as you buy more land. The\0A\00"
@.str.7 = [56 x i8] c"size of the guard tower in the upper left corner shows\0A\00"
@.str.8 = [58 x i8] c"the adequacy of your defenses. If it shrinks, equip more\0A\00"
@.str.9 = [69 x i8] c"soldiers! If the horse and plowman is touching the top of the wall,\0A\00"
@.str.10 = [57 x i8] c"all your land is in production. Otherwise you need more\0A\00"
@.str.11 = [57 x i8] c"serfs, who will migrate to your state if you distribute\0A\00"
@.str.12 = [60 x i8] c"more grain than the minimum demand. If you distribute less\0A\00"
@.str.13 = [59 x i8] c"grain, some of your people will starve, and you will have\0A\00"
@.str.14 = [58 x i8] c"a high death rate. High taxes raise money, but slow down\0A\00"
@.str.15 = [46 x i8] c"economic growth. (Press ENTER to begin game)\0A\00"
@stdin = global i32 0
define void @PrintInstructions() {
%1 = alloca [256 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.15, i64 0, i64 0))
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%19 = load i32, i32* @stdin
%20 = call i32 @fgets(i8* %18, i32 255, i32 %19)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@str = [29 x i8] c"Santa Paravia and Fiumaccio\0A\00"
@str.16 = [56 x i8] c"You are the ruler of a 15th century Italian city state.\00"
@str.17 = [54 x i8] c"If you rule well, you will receive higher titles. The\00"
@str.18 = [59 x i8] c"first player to become king or queen wins. Life expectancy\00"
@str.19 = [56 x i8] c"then was brief, so you may not live long enough to win.\00"
@str.20 = [53 x i8] c"The computer will draw a map of your state. The size\00"
@str.21 = [56 x i8] c"of the area in the wall grows as you buy more land. The\00"
@str.22 = [55 x i8] c"size of the guard tower in the upper left corner shows\00"
@str.23 = [57 x i8] c"the adequacy of your defenses. If it shrinks, equip more\00"
@str.24 = [68 x i8] c"soldiers! If the horse and plowman is touching the top of the wall,\00"
@str.25 = [56 x i8] c"all your land is in production. Otherwise you need more\00"
@str.26 = [56 x i8] c"serfs, who will migrate to your state if you distribute\00"
@str.27 = [59 x i8] c"more grain than the minimum demand. If you distribute less\00"
@str.28 = [58 x i8] c"grain, some of your people will starve, and you will have\00"
@str.29 = [57 x i8] c"a high death rate. High taxes raise money, but slow down\00"
@str.30 = [45 x i8] c"economic growth. (Press ENTER to begin game)\00"
define void @PrintInstructions() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.28, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.29, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.30, i64 0, i64 0))
%19 = load i32, i32* @stdin
%20 = call i32 @fgets(i8* %2, i32 255, i32 %19)
ret void
}