#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*/ getchar();
int /*<<< orphan*/ printf(char *, int);
void intro(void) {
  printf(
      "BlackBox\n--------\n"
      "Try to find %d atoms that are hidden in a Black Box by firing rays into "
      "the "
      "box\nand observing where they emerge.\nInput the starting place of the "
      "ray "
      "you want to fire. You will be told the\nresult of your shot. When you "
      "are "
      "ready to guess input ZERO (0) for your move.\n\n"
      "Atoms can effect the ray in the following ways:\n"
      " 1) Direct impact is reported as a hit.\n"
      " 2) If a ray passes to one side of the atom it will be deflected.\n"
      " 3) If a ray enters exactly next to an atom it will be reflected out.\n"
      " 4) If a ray passes exactly between two rays it will be reflected, "
      "too.\n\n"
      "\t++++++\n"
      "\t+++O++            +++++   \t+++O    O+++\n"
      "\t--\\+++Deflection  ---O+Hit\t---+ or -+++ Reflection\n"
      "\t++|+++            +++++   \t+++O    ++++\n\n"
      "Score: Each entry and exit are 1 point, so deflections are 2 point, "
      "but\n"
      "reflections and hits are only one. At the end of the game each "
      "incorrect "
      "guess\nadds 5 points to your score.\n\nPress ENTER to begin.\n",
      4);
  getchar();
}


x86 assembly (clang, -O0):
<intro>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intro>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [930 x i8] c"BlackBox\0A--------\0ATry to find %d atoms that are hidden in a Black Box by firing rays into the box\0Aand observing where they emerge.\0AInput the starting place of the ray you want to fire. You will be told the\0Aresult of your shot. When you are ready to guess input ZERO (0) for your move.\0A\0AAtoms can effect the ray in the following ways:\0A 1) Direct impact is reported as a hit.\0A 2) If a ray passes to one side of the atom it will be deflected.\0A 3) If a ray enters exactly next to an atom it will be reflected out.\0A 4) If a ray passes exactly between two rays it will be reflected, too.\0A\0A\09++++++\0A\09+++O++ +++++ \09+++O O+++\0A\09--\\+++Deflection ---O+Hit\09---+ or -+++ Reflection\0A\09++|+++ +++++ \09+++O ++++\0A\0AScore: Each entry and exit are 1 point, so deflections are 2 point, but\0Areflections and hits are only one. At the end of the game each incorrect guess\0Aadds 5 points to your score.\0A\0APress ENTER to begin.\0A\00"
define void @intro() {
%1 = call i32 @printf(i8* getelementptr inbounds ([930 x i8], [930 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [930 x i8] c"BlackBox\0A--------\0ATry to find %d atoms that are hidden in a Black Box by firing rays into the box\0Aand observing where they emerge.\0AInput the starting place of the ray you want to fire. You will be told the\0Aresult of your shot. When you are ready to guess input ZERO (0) for your move.\0A\0AAtoms can effect the ray in the following ways:\0A 1) Direct impact is reported as a hit.\0A 2) If a ray passes to one side of the atom it will be deflected.\0A 3) If a ray enters exactly next to an atom it will be reflected out.\0A 4) If a ray passes exactly between two rays it will be reflected, too.\0A\0A\09++++++\0A\09+++O++ +++++ \09+++O O+++\0A\09--\\+++Deflection ---O+Hit\09---+ or -+++ Reflection\0A\09++|+++ +++++ \09+++O ++++\0A\0AScore: Each entry and exit are 1 point, so deflections are 2 point, but\0Areflections and hits are only one. At the end of the game each incorrect guess\0Aadds 5 points to your score.\0A\0APress ENTER to begin.\0A\00"
define void @intro() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([930 x i8], [930 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (...) @getchar()
ret void
}