#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 */
char *black_card(char **, int *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ parse_problem(int /*<<< orphan*/ *, char **, int *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, const char *argv[]) {
  FILE *in_file = fopen(argv[1], "r");
  char names[11][100];
  int turns;
  while (!feof(in_file)) {
    parse_problem(in_file, names, &turns);
    printf("%s\n", black_card(names, &turns));
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe88(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    119f <main+0x4f>
jmp    11dd <main+0x8d>
mov    -0x18(%rbp),%rdi
lea    -0x470(%rbp),%rsi
lea    -0x474(%rbp),%rdx
call   1060 <parse_problem@plt>
lea    -0x470(%rbp),%rdi
lea    -0x474(%rbp),%rsi
call   1040 <black_card@plt>
mov    %rax,%rsi
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x31>
xor    %eax,%eax
add    $0x480,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x468,%rsp
mov    0x8(%rsi),%rdi
lea    0xe97(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <feof@plt>
test   %eax,%eax
jne    11c0 <main+0x70>
lea    0x10(%rsp),%r14
lea    0xc(%rsp),%r15
lea    0xe74(%rip),%r12
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <parse_problem@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <black_card@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <feof@plt>
test   %eax,%eax
je     1190 <main+0x40>
xor    %eax,%eax
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [11 x [100 x i8]]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %12, i32** %6
br label %13
13: ; preds = %18, %2
%14 = load i32*, i32** %6
%15 = call i32 @feof(i32* %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %27
18: ; preds = %13
%19 = load i32*, i32** %6
%20 = getelementptr inbounds [11 x [100 x i8]], [11 x [100 x i8]]* %7, i64 0, i64 0
%21 = bitcast [100 x i8]* %20 to i8**
%22 = call i32 @parse_problem(i32* %19, i8** %21, i32* %8)
%23 = getelementptr inbounds [11 x [100 x i8]], [11 x [100 x i8]]* %7, i64 0, i64 0
%24 = bitcast [100 x i8]* %23 to i8**
%25 = call i8* @black_card(i8** %24, i32* %8)
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %25)
br label %13
27: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [11 x [100 x i8]]
%4 = alloca i32
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [11 x [100 x i8]], [11 x [100 x i8]]* %3, i64 0, i64 0, i64 0
%9 = bitcast i32* %4 to i8*
%10 = call i32 @feof(i32* %7)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %2
%13 = bitcast [11 x [100 x i8]]* %3 to i8**
br label %14
14: ; preds = %12, %14
%15 = call i32 @parse_problem(i32* %7, i8** %13, i32* %4)
%16 = call i8* @black_card(i8** %13, i32* %4)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = call i32 @feof(i32* %7)
%19 = icmp eq i32 %18, 0
br i1 %19, label %14, label %20
20: ; preds = %14, %2
ret i32 0
}