#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*/ printf(char *);
int /*<<< orphan*/ version();
void usage() {
  version();
  printf("\nusage:       chess [-s,-m,-x] <command>\n\n");
  printf("commands and options:\n");
  printf(" <move>       Make a move in an ongoing game. The computer player "
         "will respond\n");
  printf("              with a move. The move should be in a algebraic "
         "notation like so:\n");
  printf("              'Ndxe5+' (no quotes). If the move is a pawn promotion, "
         "an extra\n");
  printf("              capital letter must denote what piece to promote to, "
         "e.g.:\n");
  printf("              'e8=Q'. Castling can be performed by 'O-O' or 'O-O-O' "
         "(i.e.\n");
  printf("              capital 'oh', not zeros).\n");
  printf("  new         Starts a new game, where a virtual coin toss "
         "determines who plays\n");
  printf("              white. The game files are stored in ~/.BitChess/.\n");
  printf("  print       Shows the current board position.\n");
  printf("  reset       Restarts an ongoing game.\n");
  printf("  switch      Switches sides in an ongoing game. The computer player "
         "will make\n");
  printf("              a move.\n");
  printf("  backup <n>  Backs up the current game to a file with the specified "
         "number\n");
  printf("              <n>. Can be restored using the restore command.\n");
  printf("  restore <n> Restores a backed-up game from the file with the given "
         "number\n");
  printf("              <n>. Requires a <n>.game file to be present.\n");
  printf("-s            Silences output to only critical messages, such as "
         "moves.\n");
  printf("-m            Uses simple move notation. When used, moves must be "
         "written like\n");
  printf("              so: 'd7-d5'. No indications for pieces, captures or "
         "check are\n");
  printf("              used. For pawn promotions, append an extra capital "
         "letter:\n");
  printf("              'e7-e4Q'. Automatically also enables silent mode, "
         "i.e.: -s.\n");
  printf("-x            Performs the move without having the AI player do a "
         "counter move.\n");
  printf("-h --help     Shows this help message.\n");
  printf("-v --version  Shows the application version.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <version@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc3(%rip),%rdi
call   1030 <printf@plt>
lea    0x1001(%rip),%rdi
call   1030 <printf@plt>
lea    0x1040(%rip),%rdi
call   1030 <printf@plt>
lea    0x105d(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a2(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d7(%rip),%rdi
call   1030 <printf@plt>
lea    0x10fc(%rip),%rdi
call   1030 <printf@plt>
lea    0x1119(%rip),%rdi
call   1030 <printf@plt>
lea    0x115d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1168(%rip),%rdi
call   1030 <printf@plt>
lea    0x11a9(%rip),%rdi
call   1030 <printf@plt>
lea    0x11dc(%rip),%rdi
call   1030 <printf@plt>
lea    0x121d(%rip),%rdi
call   1030 <printf@plt>
lea    0x124d(%rip),%rdi
call   1030 <printf@plt>
lea    0x128a(%rip),%rdi
call   1030 <printf@plt>
lea    0x12ce(%rip),%rdi
call   1030 <printf@plt>
lea    0x130f(%rip),%rdi
call   1030 <printf@plt>
lea    0x134d(%rip),%rdi
call   1030 <printf@plt>
lea    0x138c(%rip),%rdi
call   1030 <printf@plt>
lea    0x13d1(%rip),%rdi
call   1030 <printf@plt>
lea    0x13ed(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
xor    %eax,%eax
call   1040 <version@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc1(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x103c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1058(%rip),%rdi
call   1030 <puts@plt>
lea    0x109c(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1110(%rip),%rdi
call   1030 <puts@plt>
lea    0x1153(%rip),%rdi
call   1030 <puts@plt>
lea    0x115d(%rip),%rdi
call   1030 <puts@plt>
lea    0x119d(%rip),%rdi
call   1030 <puts@plt>
lea    0x11cf(%rip),%rdi
call   1030 <puts@plt>
lea    0x120f(%rip),%rdi
call   1030 <puts@plt>
lea    0x123e(%rip),%rdi
call   1030 <puts@plt>
lea    0x127a(%rip),%rdi
call   1030 <puts@plt>
lea    0x12bd(%rip),%rdi
call   1030 <puts@plt>
lea    0x12fd(%rip),%rdi
call   1030 <puts@plt>
lea    0x133a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1378(%rip),%rdi
call   1030 <puts@plt>
lea    0x13bc(%rip),%rdi
call   1030 <puts@plt>
lea    0x13d7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0Ausage: chess [-s,-m,-x] <command>\0A\0A\00"
@.str.1 = [23 x i8] c"commands and options:\0A\00"
@.str.2 = [80 x i8] c" <move> Make a move in an ongoing game. The computer player will respond\0A\00"
@.str.3 = [80 x i8] c" with a move. The move should be in a algebraic notation like so:\0A\00"
@.str.4 = [79 x i8] c" 'Ndxe5+' (no quotes). If the move is a pawn promotion, an extra\0A\00"
@.str.5 = [74 x i8] c" capital letter must denote what piece to promote to, e.g.:\0A\00"
@.str.6 = [75 x i8] c" 'e8=Q'. Castling can be performed by 'O-O' or 'O-O-O' (i.e.\0A\00"
@.str.7 = [41 x i8] c" capital 'oh', not zeros).\0A\00"
@.str.8 = [81 x i8] c" new Starts a new game, where a virtual coin toss determines who plays\0A\00"
@.str.9 = [65 x i8] c" white. The game files are stored in ~/.BitChess/.\0A\00"
@.str.10 = [49 x i8] c" print Shows the current board position.\0A\00"
@.str.11 = [41 x i8] c" reset Restarts an ongoing game.\0A\00"
@.str.12 = [80 x i8] c" switch Switches sides in an ongoing game. The computer player will make\0A\00"
@.str.13 = [23 x i8] c" a move.\0A\00"
@.str.14 = [77 x i8] c" backup <n> Backs up the current game to a file with the specified number\0A\00"
@.str.15 = [63 x i8] c" <n>. Can be restored using the restore command.\0A\00"
@.str.16 = [77 x i8] c" restore <n> Restores a backed-up game from the file with the given number\0A\00"
@.str.17 = [60 x i8] c" <n>. Requires a <n>.game file to be present.\0A\00"
@.str.18 = [73 x i8] c"-s Silences output to only critical messages, such as moves.\0A\00"
@.str.19 = [80 x i8] c"-m Uses simple move notation. When used, moves must be written like\0A\00"
@.str.20 = [77 x i8] c" so: 'd7-d5'. No indications for pieces, captures or check are\0A\00"
@.str.21 = [74 x i8] c" used. For pawn promotions, append an extra capital letter:\0A\00"
@.str.22 = [75 x i8] c" 'e7-e4Q'. Automatically also enables silent mode, i.e.: -s.\0A\00"
@.str.23 = [81 x i8] c"-x Performs the move without having the AI player do a counter move.\0A\00"
@.str.24 = [40 x i8] c"-h --help Shows this help message.\0A\00"
@.str.25 = [46 x i8] c"-v --version Shows the application version.\0A\00"
define void @usage() {
%1 = call i32 (...) @version()
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.15, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.16, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.17, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.18, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.19, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.20, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.21, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.22, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.23, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.25, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"\0Ausage: chess [-s,-m,-x] <command>\0A\00"
@str.26 = [22 x i8] c"commands and options:\00"
@str.27 = [79 x i8] c" <move> Make a move in an ongoing game. The computer player will respond\00"
@str.28 = [79 x i8] c" with a move. The move should be in a algebraic notation like so:\00"
@str.29 = [78 x i8] c" 'Ndxe5+' (no quotes). If the move is a pawn promotion, an extra\00"
@str.30 = [73 x i8] c" capital letter must denote what piece to promote to, e.g.:\00"
@str.31 = [74 x i8] c" 'e8=Q'. Castling can be performed by 'O-O' or 'O-O-O' (i.e.\00"
@str.32 = [40 x i8] c" capital 'oh', not zeros).\00"
@str.33 = [80 x i8] c" new Starts a new game, where a virtual coin toss determines who plays\00"
@str.34 = [64 x i8] c" white. The game files are stored in ~/.BitChess/.\00"
@str.35 = [48 x i8] c" print Shows the current board position.\00"
@str.36 = [40 x i8] c" reset Restarts an ongoing game.\00"
@str.37 = [79 x i8] c" switch Switches sides in an ongoing game. The computer player will make\00"
@str.38 = [22 x i8] c" a move.\00"
@str.39 = [76 x i8] c" backup <n> Backs up the current game to a file with the specified number\00"
@str.40 = [62 x i8] c" <n>. Can be restored using the restore command.\00"
@str.41 = [76 x i8] c" restore <n> Restores a backed-up game from the file with the given number\00"
@str.42 = [59 x i8] c" <n>. Requires a <n>.game file to be present.\00"
@str.43 = [72 x i8] c"-s Silences output to only critical messages, such as moves.\00"
@str.44 = [79 x i8] c"-m Uses simple move notation. When used, moves must be written like\00"
@str.45 = [76 x i8] c" so: 'd7-d5'. No indications for pieces, captures or check are\00"
@str.46 = [73 x i8] c" used. For pawn promotions, append an extra capital letter:\00"
@str.47 = [74 x i8] c" 'e7-e4Q'. Automatically also enables silent mode, i.e.: -s.\00"
@str.48 = [80 x i8] c"-x Performs the move without having the AI player do a counter move.\00"
@str.49 = [39 x i8] c"-h --help Shows this help message.\00"
@str.50 = [45 x i8] c"-v --version Shows the application version.\00"
define void @usage() {
%1 = tail call i32 (...) @version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.26, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.27, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.28, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.29, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.30, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.31, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.32, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.33, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.34, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.35, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.36, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.37, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.38, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.39, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.40, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.41, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.42, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.43, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.44, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.45, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.46, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.47, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.48, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.49, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.50, i64 0, i64 0))
ret void
}