#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void printUsage(FILE *file) {
  fprintf(file, "Sample usages:\n");
  fprintf(file, "  bm_run_matches <bm_hostname> <bm_port> <username> <pw> "
                "games\n");
  fprintf(file, "    See a list of possible opponents\n");
  fprintf(file, "  bm_run_matches <bm_hostname> <bm_port> <username> <pw> "
                "run 2pl <local script> <# runs> <tag> <seed> <player1> "
                "<player2>\n");
  fprintf(file, "    Run two-player limit matches\n");
  fprintf(file, "  bm_run_matches <bm_hostname> <bm_port> <username> <pw> "
                "run 2pn <local script> <# runs> <tag> <seed> <player1> "
                "<player2>\n");
  fprintf(file, "    Run two-player no-limit matches\n");
  fprintf(file,
          "  bm_run_matches <bm_hostname> <bm_port> <username> <pw> "
          "run 3pl <local script> <# runs> <tag> <seed> <player1> <player2> "
          "<player3>\n");
  fprintf(file, "    Run three-player limit matches\n");
  fprintf(file, "  bm_run_matches <bm_hostname> <bm_port> <username> <pw> "
                "rerun 2pl <local script> <match index> <tag> <seed> <player1> "
                "<player2> (<player3>)\n");
  fprintf(file, "    Rerun a match that failed\n");
  fprintf(file, "\n");
  fprintf(file, "<username> is your benchmark server username assigned to "
                "you by the competition chair\n");
  fprintf(file, "<pw> is your benchmark server password assigned to you by "
                "the competition chair\n");
  fprintf(file, "<local script> is the script that runs your agent locally.  "
                "It must take a hostname/IP and a port\n");
  fprintf(file, "<num runs> is the number of matches you want to run\n");
  fprintf(file, "<tag> is a name for this set of matches which will appear "
                "in the names of the log files\n");
  fprintf(file, "<seed> is a seed used to generate the random seeds that "
                "determine the cards in each match\n");
  fprintf(file, "<player-n> is either the name of an opponent or \"local\" "
                "for your local agent\n");
  fprintf(file, "\n");
  fprintf(file, "To run N duplicate heads-up matches, do one run of N "
                "matches with a given seed, then run a second set of N matches "
                "with the same seed but the order of the players reversed\n");
  fprintf(file, "\n");
  fprintf(file,
          "If one match in a set fails, you can use the \"rerun\" "
          "command to rerun the specified match with the specified seed.  "
          "For example, if you tried to run twenty matches with seed 0 and "
          "the last match failed, you could use the \"rerun\" command with "
          "seed 0 and match index 19.\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf09(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf8a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1007(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x101c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1091(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10a5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1123(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1111(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1122(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1169(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x11aa(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x11fd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1222(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x126b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x12b6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1091(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x12e4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1071(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1371(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xecc(%rip),%rdi
mov    $0x3f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xef3(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf00(%rip),%rdi
mov    $0x7a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf62(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf6b(%rip),%rdi
mov    $0x7a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfcd(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfd9(%rip),%rdi
mov    $0x84,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x1045(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x1050(%rip),%rdi
mov    $0x8d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x10c5(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0x10be(%rip),%rdi
mov    $0x56,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x10fc(%rip),%rdi
mov    $0x50,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x1134(%rip),%rdi
mov    $0x62,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x117e(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x119a(%rip),%rdi
mov    $0x58,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x11da(%rip),%rdi
mov    $0x5a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x121c(%rip),%rdi
mov    $0x4d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0x1244(%rip),%rdi
mov    $0xac,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0x12cb(%rip),%rdi
mov    $0x10d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Sample usages:\0A\00"
@.str.1 = [64 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> games\0A\00"
@.str.2 = [38 x i8] c" See a list of possible opponents\0A\00"
@.str.3 = [123 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 2pl <local script> <# runs> <tag> <seed> <player1> <player2>\0A\00"
@.str.4 = [34 x i8] c" Run two-player limit matches\0A\00"
@.str.5 = [123 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 2pn <local script> <# runs> <tag> <seed> <player1> <player2>\0A\00"
@.str.6 = [37 x i8] c" Run two-player no-limit matches\0A\00"
@.str.7 = [133 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 3pl <local script> <# runs> <tag> <seed> <player1> <player2> <player3>\0A\00"
@.str.8 = [36 x i8] c" Run three-player limit matches\0A\00"
@.str.9 = [142 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> rerun 2pl <local script> <match index> <tag> <seed> <player1> <player2> (<player3>)\0A\00"
@.str.10 = [31 x i8] c" Rerun a match that failed\0A\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [87 x i8] c"<username> is your benchmark server username assigned to you by the competition chair\0A\00"
@.str.13 = [81 x i8] c"<pw> is your benchmark server password assigned to you by the competition chair\0A\00"
@.str.14 = [99 x i8] c"<local script> is the script that runs your agent locally. It must take a hostname/IP and a port\0A\00"
@.str.15 = [53 x i8] c"<num runs> is the number of matches you want to run\0A\00"
@.str.16 = [89 x i8] c"<tag> is a name for this set of matches which will appear in the names of the log files\0A\00"
@.str.17 = [91 x i8] c"<seed> is a seed used to generate the random seeds that determine the cards in each match\0A\00"
@.str.18 = [78 x i8] c"<player-n> is either the name of an opponent or \22local\22 for your local agent\0A\00"
@.str.19 = [173 x i8] c"To run N duplicate heads-up matches, do one run of N matches with a given seed, then run a second set of N matches with the same seed but the order of the players reversed\0A\00"
@.str.20 = [270 x i8] c"If one match in a set fails, you can use the \22rerun\22 command to rerun the specified match with the specified seed. For example, if you tried to run twenty matches with seed 0 and the last match failed, you could use the \22rerun\22 command with seed 0 and match index 19.\0A\00"
define void @printUsage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32*, i32** %2
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32*, i32** %2
%26 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32*, i32** %2
%28 = call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32*, i32** %2
%30 = call i32 @fprintf(i32* %29, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32*, i32** %2
%32 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32*, i32** %2
%34 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32*, i32** %2
%36 = call i32 @fprintf(i32* %35, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.16, i64 0, i64 0))
%37 = load i32*, i32** %2
%38 = call i32 @fprintf(i32* %37, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.17, i64 0, i64 0))
%39 = load i32*, i32** %2
%40 = call i32 @fprintf(i32* %39, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.18, i64 0, i64 0))
%41 = load i32*, i32** %2
%42 = call i32 @fprintf(i32* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%43 = load i32*, i32** %2
%44 = call i32 @fprintf(i32* %43, i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.19, i64 0, i64 0))
%45 = load i32*, i32** %2
%46 = call i32 @fprintf(i32* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%47 = load i32*, i32** %2
%48 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str.20, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Sample usages:\0A\00"
@.str.1 = [64 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> games\0A\00"
@.str.2 = [38 x i8] c" See a list of possible opponents\0A\00"
@.str.3 = [123 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 2pl <local script> <# runs> <tag> <seed> <player1> <player2>\0A\00"
@.str.4 = [34 x i8] c" Run two-player limit matches\0A\00"
@.str.5 = [123 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 2pn <local script> <# runs> <tag> <seed> <player1> <player2>\0A\00"
@.str.6 = [37 x i8] c" Run two-player no-limit matches\0A\00"
@.str.7 = [133 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> run 3pl <local script> <# runs> <tag> <seed> <player1> <player2> <player3>\0A\00"
@.str.8 = [36 x i8] c" Run three-player limit matches\0A\00"
@.str.9 = [142 x i8] c" bm_run_matches <bm_hostname> <bm_port> <username> <pw> rerun 2pl <local script> <match index> <tag> <seed> <player1> <player2> (<player3>)\0A\00"
@.str.10 = [31 x i8] c" Rerun a match that failed\0A\00"
@.str.12 = [87 x i8] c"<username> is your benchmark server username assigned to you by the competition chair\0A\00"
@.str.13 = [81 x i8] c"<pw> is your benchmark server password assigned to you by the competition chair\0A\00"
@.str.14 = [99 x i8] c"<local script> is the script that runs your agent locally. It must take a hostname/IP and a port\0A\00"
@.str.15 = [53 x i8] c"<num runs> is the number of matches you want to run\0A\00"
@.str.16 = [89 x i8] c"<tag> is a name for this set of matches which will appear in the names of the log files\0A\00"
@.str.17 = [91 x i8] c"<seed> is a seed used to generate the random seeds that determine the cards in each match\0A\00"
@.str.18 = [78 x i8] c"<player-n> is either the name of an opponent or \22local\22 for your local agent\0A\00"
@.str.19 = [173 x i8] c"To run N duplicate heads-up matches, do one run of N matches with a given seed, then run a second set of N matches with the same seed but the order of the players reversed\0A\00"
@.str.20 = [270 x i8] c"If one match in a set fails, you can use the \22rerun\22 command to rerun the specified match with the specified seed. For example, if you tried to run twenty matches with seed 0 and the last match failed, you could use the \22rerun\22 command with seed 0 and match index 19.\0A\00"
define void @printUsage(i32* %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 15, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i64 63, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 37, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.3, i64 0, i64 0), i64 122, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 33, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.5, i64 0, i64 0), i64 122, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i64 36, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.7, i64 0, i64 0), i64 132, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i64 35, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.9, i64 0, i64 0), i64 141, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i64 30, i64 1, i32* %0)
%13 = tail call i32 @fputc(i32 10, i32* %0)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0), i64 86, i64 1, i32* %0)
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0), i64 80, i64 1, i32* %0)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.14, i64 0, i64 0), i64 98, i64 1, i32* %0)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0), i64 52, i64 1, i32* %0)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.16, i64 0, i64 0), i64 88, i64 1, i32* %0)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.17, i64 0, i64 0), i64 90, i64 1, i32* %0)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.18, i64 0, i64 0), i64 77, i64 1, i32* %0)
%21 = tail call i32 @fputc(i32 10, i32* %0)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.19, i64 0, i64 0), i64 172, i64 1, i32* %0)
%23 = tail call i32 @fputc(i32 10, i32* %0)
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str.20, i64 0, i64 0), i64 269, i64 1, i32* %0)
ret void
}