#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*/ catch ();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ play_more();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  puts(
      "Corral\n-----\n"
      "You are the cowboy trying to catch your horse in the corral!\n"
      "Move toward your horse from 1 to 5 steps at a time.  If you move more "
      "than\n"
      "half the distiance between you and the horse he will bolt. He may also\n"
      "bolt if he's pinned to the rail. Also, if you're close enough he may "
      "kick!"
      "\n\nAfter the '?' type a digit from 1 to 5 for the cowboy's next "
      "move.\n");
  srand(time(NULL));
  do
    catch ();
  while (play_more());
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <catch@plt>
mov    $0x0,%al
call   1070 <play_more@plt>
cmp    $0x0,%rax
jne    118b <main+0x2b>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <catch@plt>
xor    %eax,%eax
call   1070 <play_more@plt>
test   %rax,%rax
jne    1180 <main+0x20>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [364 x i8] c"Corral\0A-----\0AYou are the cowboy trying to catch your horse in the corral!\0AMove toward your horse from 1 to 5 steps at a time. If you move more than\0Ahalf the distiance between you and the horse he will bolt. He may also\0Abolt if he's pinned to the rail. Also, if you're close enough he may kick!\0A\0AAfter the '?' type a digit from 1 to 5 for the cowboy's next move.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([364 x i8], [364 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
br label %5
5: ; preds = %7, %0
%6 = call i32 (...) @catch()
br label %7
7: ; preds = %5
%8 = call i64 (...) @play_more()
%9 = icmp ne i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %7
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [364 x i8] c"Corral\0A-----\0AYou are the cowboy trying to catch your horse in the corral!\0AMove toward your horse from 1 to 5 steps at a time. If you move more than\0Ahalf the distiance between you and the horse he will bolt. He may also\0Abolt if he's pinned to the rail. Also, if you're close enough he may kick!\0A\0AAfter the '?' type a digit from 1 to 5 for the cowboy's next move.\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([364 x i8], [364 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %4, %0
%5 = tail call i32 (...) @catch()
%6 = tail call i64 (...) @play_more()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = tail call i32 @exit(i32 0)
unreachable
}