#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*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ memset(char **, int /*<<< orphan*/, int);
int /*<<< orphan*/ strcpy(char *, char *);
void parse_problem(FILE *in_file, char names[11][100], int *turns) {
  memset(names, 0, sizeof(char) * 11 * 100);
  char tmp_string[100];
  for (int i = 0; i < 11; i++) {
    fscanf(in_file, "%s ", &tmp_string);
    if (tmp_string[0] == '|')
      break;
    else
      strcpy(names[i], tmp_string);
  }
  fscanf(in_file, "%i\n", turns);
}


x86 assembly (clang, -O0):
<parse_problem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x44c,%edx
call   1040 <memset@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0xb,-0x84(%rbp)
jge    11ca <parse_problem+0x9a>
mov    -0x8(%rbp),%rdi
lea    0xe87(%rip),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
movsbl -0x80(%rbp),%eax
cmp    $0x7c,%eax
jne    1196 <parse_problem+0x66>
jmp    11ca <parse_problem+0x9a>
mov    -0x10(%rbp),%rdi
movslq -0x84(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rdi
lea    -0x80(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    11b6 <parse_problem+0x86>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1161 <parse_problem+0x31>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1050 <fscanf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_problem>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x44c,%edx
call   1040 <memset@plt>
lea    0xea6(%rip),%rsi
mov    %rsp,%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe7a(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x64(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe4d(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0xc8(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe1d(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x12c(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xded(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x190(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xdbd(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x1f4(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xd8d(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x258(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xd5d(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x2bc(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xd2d(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x320(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xd01(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
lea    0x384(%r15),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xcd5(%rip),%rsi
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmpb   $0x7c,(%rsp)
je     1350 <parse_problem+0x220>
add    $0x3e8,%r15
mov    %rsp,%rsi
mov    %r15,%rdi
call   1030 <strcpy@plt>
lea    0xcad(%rip),%rsi
mov    %r12,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [4 x i8] c"%i\0A\00"
define void @parse_problem(i32* %0, [100 x i8]* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca [100 x i8]*
%6 = alloca i32*
%7 = alloca [100 x i8]
%8 = alloca i32
store i32* %0, i32** %4
store [100 x i8]* %1, [100 x i8]** %5
store i32* %2, i32** %6
%9 = load [100 x i8]*, [100 x i8]** %5
%10 = bitcast [100 x i8]* %9 to i8**
%11 = call i32 @memset(i8** %10, i32 0, i32 1100)
store i32 0, i32* %8
br label %12
12: ; preds = %32, %3
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 11
br i1 %14, label %15, label %35
15: ; preds = %12
%16 = load i32*, i32** %4
%17 = call i32 (i32*, i8*, ...) @fscanf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %7)
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 124
br i1 %21, label %22, label %23
22: ; preds = %15
br label %35
23: ; preds = %15
%24 = load [100 x i8]*, [100 x i8]** %5
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %24, i64 %26
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i64 0, i64 0
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%30 = call i32 @strcpy(i8* %28, i8* %29)
br label %31
31: ; preds = %23
br label %32
32: ; preds = %31
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %12
35: ; preds = %22, %12
%36 = load i32*, i32** %4
%37 = load i32*, i32** %6
%38 = call i32 (i32*, i8*, ...) @fscanf(i32* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %37)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [4 x i8] c"%i\0A\00"
define void @parse_problem(i32* nocapture %0, [100 x i8]* %1, i32* %2) {
%4 = alloca [100 x i8]
%5 = bitcast [100 x i8]* %1 to i8**
%6 = tail call i32 @memset(i8** %5, i32 0, i32 1100)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 124
br i1 %10, label %74, label %11
11: ; preds = %3
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%13 = call i32 @strcpy(i8* %12, i8* %7)
%14 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%15 = load i8, i8* %7
%16 = icmp eq i8 %15, 124
br i1 %16, label %74, label %17
17: ; preds = %11
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 1, i64 0
%19 = call i32 @strcpy(i8* %18, i8* %7)
%20 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%21 = load i8, i8* %7
%22 = icmp eq i8 %21, 124
br i1 %22, label %74, label %23
23: ; preds = %17
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 2, i64 0
%25 = call i32 @strcpy(i8* %24, i8* %7)
%26 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%27 = load i8, i8* %7
%28 = icmp eq i8 %27, 124
br i1 %28, label %74, label %29
29: ; preds = %23
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 3, i64 0
%31 = call i32 @strcpy(i8* %30, i8* %7)
%32 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%33 = load i8, i8* %7
%34 = icmp eq i8 %33, 124
br i1 %34, label %74, label %35
35: ; preds = %29
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 4, i64 0
%37 = call i32 @strcpy(i8* %36, i8* %7)
%38 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%39 = load i8, i8* %7
%40 = icmp eq i8 %39, 124
br i1 %40, label %74, label %41
41: ; preds = %35
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 5, i64 0
%43 = call i32 @strcpy(i8* %42, i8* %7)
%44 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%45 = load i8, i8* %7
%46 = icmp eq i8 %45, 124
br i1 %46, label %74, label %47
47: ; preds = %41
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 6, i64 0
%49 = call i32 @strcpy(i8* %48, i8* %7)
%50 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%51 = load i8, i8* %7
%52 = icmp eq i8 %51, 124
br i1 %52, label %74, label %53
53: ; preds = %47
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 7, i64 0
%55 = call i32 @strcpy(i8* %54, i8* %7)
%56 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%57 = load i8, i8* %7
%58 = icmp eq i8 %57, 124
br i1 %58, label %74, label %59
59: ; preds = %53
%60 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 8, i64 0
%61 = call i32 @strcpy(i8* %60, i8* %7)
%62 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%63 = load i8, i8* %7
%64 = icmp eq i8 %63, 124
br i1 %64, label %74, label %65
65: ; preds = %59
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 9, i64 0
%67 = call i32 @strcpy(i8* %66, i8* %7)
%68 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), [100 x i8]* %4)
%69 = load i8, i8* %7
%70 = icmp eq i8 %69, 124
br i1 %70, label %74, label %71
71: ; preds = %65
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 10, i64 0
%73 = call i32 @strcpy(i8* %72, i8* %7)
br label %74
74: ; preds = %71, %65, %59, %53, %47, %41, %35, %29, %23, %17, %11, %3
%75 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
ret void
}