#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*/ puts(char *);
void intro() {
  puts(
      "Nim Trainer\n----------\n"
      "Nim is a counting game where players take turns removing objects from\n"
      "piles of things. You can take as many as you want from whichever pile\n"
      "you want. The person who takes the last one loses.\n\n"
      "It is possible to play a perfect game if you:\n"
      " o Think of the number in each pile in binary.\n"
      " o Do an exclusive 'or' (xor) on the numbers.\n"
      "   or count up the number of 1s in the binary columns and if there are\n"
      "   an even number write a 1, if an odd number wirte a zero.\n"
      " o The number, in binary or integer, is called a 'nimber'.\n"
      " o If the nimber is zero, you can't win this round.\n"
      " o If the number is not zero find a piece you can take that will leave\n"
      "   your opponent with a zero nimber.\n"
      " o To win the game, when you get to the point where you'd normally "
      "leave\n"
      "   all piles of size 1, make sure there are an odd number of sized 1 "
      "piles\n"
      "   and you won't be taking the last one.\n\n"
      "This program is written so help you learn to win nim by showing you "
      "the\n"
      "piles in binary and doing the xor for you so you can seen how it "
      "works.\n");
}


x86 assembly (clang, -O0):
<intro>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intro>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [1039 x i8] c"Nim Trainer\0A----------\0ANim is a counting game where players take turns removing objects from\0Apiles of things. You can take as many as you want from whichever pile\0Ayou want. The person who takes the last one loses.\0A\0AIt is possible to play a perfect game if you:\0A o Think of the number in each pile in binary.\0A o Do an exclusive 'or' (xor) on the numbers.\0A or count up the number of 1s in the binary columns and if there are\0A an even number write a 1, if an odd number wirte a zero.\0A o The number, in binary or integer, is called a 'nimber'.\0A o If the nimber is zero, you can't win this round.\0A o If the number is not zero find a piece you can take that will leave\0A your opponent with a zero nimber.\0A o To win the game, when you get to the point where you'd normally leave\0A all piles of size 1, make sure there are an odd number of sized 1 piles\0A and you won't be taking the last one.\0A\0AThis program is written so help you learn to win nim by showing you the\0Apiles in binary and doing the xor for you so you can seen how it works.\0A\00"
define void @intro() {
%1 = call i32 @puts(i8* getelementptr inbounds ([1039 x i8], [1039 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1039 x i8] c"Nim Trainer\0A----------\0ANim is a counting game where players take turns removing objects from\0Apiles of things. You can take as many as you want from whichever pile\0Ayou want. The person who takes the last one loses.\0A\0AIt is possible to play a perfect game if you:\0A o Think of the number in each pile in binary.\0A o Do an exclusive 'or' (xor) on the numbers.\0A or count up the number of 1s in the binary columns and if there are\0A an even number write a 1, if an odd number wirte a zero.\0A o The number, in binary or integer, is called a 'nimber'.\0A o If the nimber is zero, you can't win this round.\0A o If the number is not zero find a piece you can take that will leave\0A your opponent with a zero nimber.\0A o To win the game, when you get to the point where you'd normally leave\0A all piles of size 1, make sure there are an odd number of sized 1 piles\0A and you won't be taking the last one.\0A\0AThis program is written so help you learn to win nim by showing you the\0Apiles in binary and doing the xor for you so you can seen how it works.\0A\00"
define void @intro() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1039 x i8], [1039 x i8]* @.str, i64 0, i64 0))
ret void
}