#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*/ error(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int,
                           int, int, int, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int, int, int, int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  FILE *output;
  int columnValues[3] = {2, 4, 5};
  int pebbleValues[3] = {1, 2, 3};
  int plyValues[3] = {1, 3, 5};
  int columnCounter = 0, pebbleCounter = 0, plyCounter = 0;
  int p1Algorithm, p2Algorithm;
  int p1Heuristic, p2Heuristic;
  char python_command[512];
  srand(time(NULL));
  for (columnCounter = 0; columnCounter < 3; columnCounter++) {
    int columnValue = columnValues[columnCounter];
    for (pebbleCounter = 0; pebbleCounter < 3; pebbleCounter++) {
      int pebbleValue = pebbleValues[pebbleCounter];
      for (plyCounter = 0; plyCounter < 3; plyCounter++) {
        int plyValue = plyValues[plyCounter];
        for (p1Algorithm = 1; p1Algorithm <= 2; p1Algorithm++) {
          for (p2Algorithm = 1; p2Algorithm <= 2; p2Algorithm++) {
            for (p1Heuristic = 1; p1Heuristic <= 2; p1Heuristic++) {
              for (p2Heuristic = 1; p2Heuristic <= 2; p2Heuristic++) {
                sprintf(python_command,
                        "python pebbleAuto.py %d %d %d %d %d %d %d",
                        columnValue, pebbleValue, plyValue, p1Algorithm,
                        p2Algorithm, p1Heuristic, p2Heuristic);
                system(python_command);
                int winner = 0;
                FILE *input = fopen("auto_out.res", "r");
                fscanf(input, "%d", &winner);
                output = fopen("output.txt", "a+");
                if (!output)
                  error("Error Opening output file 'output.txt'\n");
                fprintf(output, "%d %d %d %d %d %d %d - %d\n", columnValue,
                        pebbleValue, plyValue, p1Algorithm, p2Algorithm,
                        p1Heuristic, p2Heuristic, winner);
                fclose(output);
              }
            }
          }
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x298,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    0xe4f(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xe4d(%rip),%eax
mov    %eax,-0x24(%rbp)
mov    0xe47(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe45(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xe3f(%rip),%rax
mov    %rax,-0x44(%rbp)
mov    0xe3d(%rip),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x0,-0x48(%rbp)
cmpl   $0x3,-0x48(%rbp)
jge    1438 <main+0x2a8>
movslq -0x48(%rbp),%rax
mov    -0x2c(%rbp,%rax,4),%eax
mov    %eax,-0x264(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1425 <main+0x295>
movslq -0x4c(%rbp),%rax
mov    -0x38(%rbp,%rax,4),%eax
mov    %eax,-0x268(%rbp)
movl   $0x0,-0x50(%rbp)
cmpl   $0x3,-0x50(%rbp)
jge    1412 <main+0x282>
movslq -0x50(%rbp),%rax
mov    -0x44(%rbp,%rax,4),%eax
mov    %eax,-0x26c(%rbp)
movl   $0x1,-0x54(%rbp)
cmpl   $0x2,-0x54(%rbp)
jg     13ff <main+0x26f>
movl   $0x1,-0x58(%rbp)
cmpl   $0x2,-0x58(%rbp)
jg     13ec <main+0x25c>
movl   $0x1,-0x5c(%rbp)
cmpl   $0x2,-0x5c(%rbp)
jg     13d9 <main+0x249>
movl   $0x1,-0x60(%rbp)
cmpl   $0x2,-0x60(%rbp)
jg     13c6 <main+0x236>
lea    -0x260(%rbp),%rdi
mov    -0x264(%rbp),%edx
mov    -0x268(%rbp),%ecx
mov    -0x26c(%rbp),%r8d
mov    -0x54(%rbp),%r9d
mov    -0x58(%rbp),%r11d
mov    -0x5c(%rbp),%r10d
mov    -0x60(%rbp),%eax
lea    0xd48(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   10b0 <sprintf@plt>
lea    -0x260(%rbp),%rdi
call   1040 <system@plt>
movl   $0x0,-0x270(%rbp)
lea    0xd43(%rip),%rdi
lea    0xd49(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x278(%rbp)
mov    -0x278(%rbp),%rdi
lea    0xd1f(%rip),%rsi
lea    -0x270(%rbp),%rdx
call   1050 <fscanf@plt>
lea    0xd1e(%rip),%rdi
lea    0xd22(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1366 <main+0x1d6>
lea    0xd0a(%rip),%rdi
call   1090 <error@plt>
mov    -0x20(%rbp),%rdi
mov    -0x264(%rbp),%edx
mov    -0x268(%rbp),%ecx
mov    -0x26c(%rbp),%r8d
mov    -0x54(%rbp),%r9d
mov    -0x58(%rbp),%ebx
mov    -0x5c(%rbp),%r11d
mov    -0x60(%rbp),%r10d
mov    -0x270(%rbp),%eax
lea    0xcfa(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    12a2 <main+0x112>
jmp    13cb <main+0x23b>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1291 <main+0x101>
jmp    13de <main+0x24e>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1280 <main+0xf0>
jmp    13f1 <main+0x261>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    126f <main+0xdf>
jmp    1404 <main+0x274>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1250 <main+0xc0>
jmp    1417 <main+0x287>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1231 <main+0xa1>
jmp    142a <main+0x29a>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1212 <main+0x82>
xor    %eax,%eax
add    $0x298,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
xor    %ebx,%ebx
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
lea    0xe6c(%rip),%r12
lea    0xe8f(%rip),%r14
lea    0xe95(%rip),%rdi
lea    0x4(%rsp),%r10
lea    0xe8b(%rip),%r11
jmp    11f3 <main+0x63>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x20(%rsp),%rbx
add    $0x1,%rbx
cmp    $0x3,%rbx
je     148d <main+0x2fd>
mov    %rbx,0x20(%rsp)
lea    0xe01(%rip),%rax
mov    (%rax,%rbx,4),%edx
xor    %ecx,%ecx
lea    0x40(%rsp),%rbx
mov    %edx,0x8(%rsp)
jmp    121f <main+0x8f>
nop
mov    0x28(%rsp),%rcx
add    $0x1,%rcx
cmp    $0x3,%rcx
je     11e0 <main+0x50>
lea    0xde6(%rip),%rax
mov    %rcx,0x28(%rsp)
mov    (%rax,%rcx,4),%ecx
xor    %esi,%esi
mov    %ecx,0xc(%rsp)
jmp    124f <main+0xbf>
cs nopw 0x0(%rax,%rax,1)
mov    0x30(%rsp),%rsi
add    $0x1,%rsi
cmp    $0x3,%rsi
je     1210 <main+0x80>
lea    0xdc2(%rip),%rax
mov    %rsi,0x30(%rsp)
mov    (%rax,%rsi,4),%r8d
mov    $0x1,%r9d
mov    %r8d,0x10(%rsp)
jmp    127a <main+0xea>
nopl   0x0(%rax)
add    $0x1,%r9d
cmp    $0x3,%r9d
je     1240 <main+0xb0>
mov    $0x1,%eax
mov    %r9d,0x14(%rsp)
jmp    1298 <main+0x108>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
cmp    $0x3,%eax
je     1270 <main+0xe0>
mov    $0x1,%ebp
mov    %rax,0x18(%rsp)
jmp    132e <main+0x19e>
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%eax
mov    %rbx,%rdi
lea    0xdd5(%rip),%rsi
mov    %r14d,%edx
mov    0xc(%rsp),%ecx
mov    0x10(%rsp),%r8d
mov    0x14(%rsp),%r13d
mov    %r13d,%r9d
push   %rax
push   $0x2
push   %rbp
mov    0x30(%rsp),%r12
push   %r12
call   1070 <fprintf@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1030 <fclose@plt>
add    $0x1,%ebp
cmp    $0x3,%ebp
lea    0x40(%rsp),%rbx
mov    %r14d,%edx
lea    0xd4b(%rip),%r14
mov    %r15,%rdi
lea    0x4(%rsp),%r10
lea    0xd4b(%rip),%r11
mov    0xc(%rsp),%ecx
mov    0x10(%rsp),%r8d
mov    %r13d,%r9d
mov    %r12,%rax
lea    0xcfc(%rip),%r12
je     1290 <main+0x100>
mov    %rbp,0x38(%rsp)
sub    $0x8,%rsp
mov    %rdi,%r13
mov    %rbx,%rdi
mov    %r12,%rsi
push   $0x1
push   %rbp
push   %rax
mov    %r10,%r15
mov    %rbx,%rbp
mov    %r11,%rbx
call   10b0 <sprintf@plt>
add    $0x20,%rsp
mov    %rbp,%rdi
call   1040 <system@plt>
movl   $0x0,0x4(%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
call   10a0 <fopen@plt>
mov    %rax,%rdi
lea    0xcd0(%rip),%rsi
mov    %r15,%rdx
call   1050 <fscanf@plt>
mov    %rbx,%rdi
lea    0xcdb(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    13a6 <main+0x216>
lea    0xcca(%rip),%rdi
call   1090 <error@plt>
mov    0x4(%rsp),%eax
mov    %r12,%rdi
lea    0xcdf(%rip),%rsi
mov    0x8(%rsp),%edx
mov    0xc(%rsp),%r15d
mov    %r15d,%ecx
mov    0x10(%rsp),%r13d
mov    %r13d,%r8d
mov    0x14(%rsp),%ebx
mov    %ebx,%r9d
push   %rax
push   $0x1
mov    0x48(%rsp),%rbp
push   %rbp
mov    0x30(%rsp),%r14
push   %r14
call   1070 <fprintf@plt>
add    $0x20,%rsp
mov    %r12,%rdi
call   1030 <fclose@plt>
sub    $0x8,%rsp
lea    0x48(%rsp),%r12
mov    %r12,%rdi
lea    0xc21(%rip),%rsi
mov    0x10(%rsp),%edx
mov    %r15d,%ecx
mov    %r13d,%r8d
mov    %ebx,%r9d
push   $0x2
push   %rbp
push   %r14
call   10b0 <sprintf@plt>
add    $0x20,%rsp
mov    %r12,%rdi
call   1040 <system@plt>
movl   $0x0,0x4(%rsp)
lea    0xc19(%rip),%rdi
lea    0xc1f(%rip),%rsi
mov    %rsi,%r15
call   10a0 <fopen@plt>
mov    %rax,%rdi
lea    0xbfd(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1050 <fscanf@plt>
lea    0xbfe(%rip),%rdi
lea    0xc02(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
mov    0x8(%rsp),%r14d
jne    12b0 <main+0x120>
lea    0xbe8(%rip),%rdi
call   1090 <error@plt>
jmp    12b0 <main+0x120>
xor    %eax,%eax
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.columnValues = [3 x i32] [i32 2, i32 4, i32 5]
@__const.main.pebbleValues = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.plyValues = [3 x i32] [i32 1, i32 3, i32 5]
@.str = [42 x i8] c"python pebbleAuto.py %d %d %d %d %d %d %d\00"
@.str.1 = [13 x i8] c"auto_out.res\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [11 x i8] c"output.txt\00"
@.str.5 = [3 x i8] c"a+\00"
@.str.6 = [40 x i8] c"Error Opening output file 'output.txt'\0A\00"
@.str.7 = [27 x i8] c"%d %d %d %d %d %d %d - %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [3 x i32]
%8 = alloca [3 x i32]
%9 = alloca [3 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [512 x i8]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%23 = bitcast [3 x i32]* %7 to i8*
%24 = bitcast [3 x i32]* %8 to i8*
%25 = bitcast [3 x i32]* %9 to i8*
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
%26 = call i32 @time(i32* null)
%27 = call i32 @srand(i32 %26)
store i32 0, i32* %10
br label %28
28: ; preds = %124, %2
%29 = load i32, i32* %10
%30 = icmp slt i32 %29, 3
br i1 %30, label %31, label %127
31: ; preds = %28
%32 = load i32, i32* %10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 %33
%35 = load i32, i32* %34
store i32 %35, i32* %18
store i32 0, i32* %11
br label %36
36: ; preds = %120, %31
%37 = load i32, i32* %11
%38 = icmp slt i32 %37, 3
br i1 %38, label %39, label %123
39: ; preds = %36
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %41
%43 = load i32, i32* %42
store i32 %43, i32* %19
store i32 0, i32* %12
br label %44
44: ; preds = %116, %39
%45 = load i32, i32* %12
%46 = icmp slt i32 %45, 3
br i1 %46, label %47, label %119
47: ; preds = %44
%48 = load i32, i32* %12
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 %49
%51 = load i32, i32* %50
store i32 %51, i32* %20
store i32 1, i32* %13
br label %52
52: ; preds = %112, %47
%53 = load i32, i32* %13
%54 = icmp sle i32 %53, 2
br i1 %54, label %55, label %115
55: ; preds = %52
store i32 1, i32* %14
br label %56
56: ; preds = %108, %55
%57 = load i32, i32* %14
%58 = icmp sle i32 %57, 2
br i1 %58, label %59, label %111
59: ; preds = %56
store i32 1, i32* %15
br label %60
60: ; preds = %104, %59
%61 = load i32, i32* %15
%62 = icmp sle i32 %61, 2
br i1 %62, label %63, label %107
63: ; preds = %60
store i32 1, i32* %16
br label %64
64: ; preds = %100, %63
%65 = load i32, i32* %16
%66 = icmp sle i32 %65, 2
br i1 %66, label %67, label %103
67: ; preds = %64
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %17, i64 0, i64 0
%69 = load i32, i32* %18
%70 = load i32, i32* %19
%71 = load i32, i32* %20
%72 = load i32, i32* %13
%73 = load i32, i32* %14
%74 = load i32, i32* %15
%75 = load i32, i32* %16
%76 = call i32 @sprintf(i8* %68, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %69, i32 %70, i32 %71, i32 %72, i32 %73, i32 %74, i32 %75)
%77 = getelementptr inbounds [512 x i8], [512 x i8]* %17, i64 0, i64 0
%78 = call i32 @system(i8* %77)
store i32 0, i32* %21
%79 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %79, i32** %22
%80 = load i32*, i32** %22
%81 = call i32 @fscanf(i32* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %21)
%82 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %82, i32** %6
%83 = load i32*, i32** %6
%84 = icmp ne i32* %83, null
br i1 %84, label %87, label %85
85: ; preds = %67
%86 = call i32 @error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %87
87: ; preds = %85, %67
%88 = load i32*, i32** %6
%89 = load i32, i32* %18
%90 = load i32, i32* %19
%91 = load i32, i32* %20
%92 = load i32, i32* %13
%93 = load i32, i32* %14
%94 = load i32, i32* %15
%95 = load i32, i32* %16
%96 = load i32, i32* %21
%97 = call i32 @fprintf(i32* %88, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %89, i32 %90, i32 %91, i32 %92, i32 %93, i32 %94, i32 %95, i32 %96)
%98 = load i32*, i32** %6
%99 = call i32 @fclose(i32* %98)
br label %100
100: ; preds = %87
%101 = load i32, i32* %16
%102 = add nsw i32 %101, 1
store i32 %102, i32* %16
br label %64
103: ; preds = %64
br label %104
104: ; preds = %103
%105 = load i32, i32* %15
%106 = add nsw i32 %105, 1
store i32 %106, i32* %15
br label %60
107: ; preds = %60
br label %108
108: ; preds = %107
%109 = load i32, i32* %14
%110 = add nsw i32 %109, 1
store i32 %110, i32* %14
br label %56
111: ; preds = %56
br label %112
112: ; preds = %111
%113 = load i32, i32* %13
%114 = add nsw i32 %113, 1
store i32 %114, i32* %13
br label %52
115: ; preds = %52
br label %116
116: ; preds = %115
%117 = load i32, i32* %12
%118 = add nsw i32 %117, 1
store i32 %118, i32* %12
br label %44
119: ; preds = %44
br label %120
120: ; preds = %119
%121 = load i32, i32* %11
%122 = add nsw i32 %121, 1
store i32 %122, i32* %11
br label %36
123: ; preds = %36
br label %124
124: ; preds = %123
%125 = load i32, i32* %10
%126 = add nsw i32 %125, 1
store i32 %126, i32* %10
br label %28
127: ; preds = %28
ret i32 0
}

LLVM IR (-O2):
@__const.main.columnValues = [3 x i32] [i32 2, i32 4, i32 5]
@__const.main.pebbleValues = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.plyValues = [3 x i32] [i32 1, i32 3, i32 5]
@.str = [42 x i8] c"python pebbleAuto.py %d %d %d %d %d %d %d\00"
@.str.1 = [13 x i8] c"auto_out.res\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [11 x i8] c"output.txt\00"
@.str.5 = [3 x i8] c"a+\00"
@.str.6 = [40 x i8] c"Error Opening output file 'output.txt'\0A\00"
@.str.7 = [27 x i8] c"%d %d %d %d %d %d %d - %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%6 = tail call i32 @time(i32* null)
%7 = tail call i32 @srand(i32 %6)
%8 = bitcast i32* %4 to i8*
br label %9
9: ; preds = %2, %65
%10 = phi i64 [ 0, %2 ], [ %66, %65 ]
%11 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.main.columnValues, i64 0, i64 %10
%12 = load i32, i32* %11
br label %13
13: ; preds = %9, %62
%14 = phi i64 [ 0, %9 ], [ %63, %62 ]
%15 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.main.pebbleValues, i64 0, i64 %14
%16 = load i32, i32* %15
br label %17
17: ; preds = %13, %59
%18 = phi i64 [ 0, %13 ], [ %60, %59 ]
%19 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.main.plyValues, i64 0, i64 %18
%20 = load i32, i32* %19
br label %21
21: ; preds = %17, %56
%22 = phi i32 [ 1, %17 ], [ %57, %56 ]
br label %23
23: ; preds = %21, %53
%24 = phi i32 [ 1, %21 ], [ %54, %53 ]
br label %25
25: ; preds = %23, %47
%26 = phi i32 [ 1, %23 ], [ %51, %47 ]
%27 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %16, i32 %20, i32 %22, i32 %24, i32 %26, i32 1)
%28 = call i32 @system(i8* %5)
store i32 0, i32* %4
%29 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @fscanf(i32* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%31 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %35
33: ; preds = %25
%34 = call i32 @error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %35
35: ; preds = %33, %25
%36 = load i32, i32* %4
%37 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %12, i32 %16, i32 %20, i32 %22, i32 %24, i32 %26, i32 1, i32 %36)
%38 = call i32 @fclose(i32* %31)
%39 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %16, i32 %20, i32 %22, i32 %24, i32 %26, i32 2)
%40 = call i32 @system(i8* %5)
store i32 0, i32* %4
%41 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @fscanf(i32* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%43 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%44 = icmp eq i32* %43, null
br i1 %44, label %45, label %47
45: ; preds = %35
%46 = call i32 @error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %47
47: ; preds = %45, %35
%48 = load i32, i32* %4
%49 = call i32 @fprintf(i32* %43, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %12, i32 %16, i32 %20, i32 %22, i32 %24, i32 %26, i32 2, i32 %48)
%50 = call i32 @fclose(i32* %43)
%51 = add nuw nsw i32 %26, 1
%52 = icmp eq i32 %51, 3
br i1 %52, label %53, label %25
53: ; preds = %47
%54 = add nuw nsw i32 %24, 1
%55 = icmp eq i32 %54, 3
br i1 %55, label %56, label %23
56: ; preds = %53
%57 = add nuw nsw i32 %22, 1
%58 = icmp eq i32 %57, 3
br i1 %58, label %59, label %21
59: ; preds = %56
%60 = add nuw nsw i64 %18, 1
%61 = icmp eq i64 %60, 3
br i1 %61, label %62, label %17
62: ; preds = %59
%63 = add nuw nsw i64 %14, 1
%64 = icmp eq i64 %63, 3
br i1 %64, label %65, label %13
65: ; preds = %62
%66 = add nuw nsw i64 %10, 1
%67 = icmp eq i64 %66, 3
br i1 %67, label %68, label %9
68: ; preds = %65
ret i32 0
}