#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 checkCol(int **, int);
int checkRow(int **, int);
int checkSquare(int **, int, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int numBoards;
  int i, j;
  int check;
  int sudoku[9][9];
  char c;
  int caseNum;
  FILE *in = fopen("sudokode.in", "r");
  fscanf(in, "%d ", &numBoards);
  for (caseNum = 1; caseNum <= numBoards; caseNum++) {
    for (i = 0; i < 9; i++) {
      for (j = 0; j < 9; j++) {
        fscanf(in, "%c ", &c);
        sudoku[i][j] = c - '1';
      }
    }
    check = 1;
    for (i = 0; i < 9 && check == 1; i++)
      check = checkRow(sudoku, i);
    for (j = 0; j < 9 && check == 1; j++)
      check = checkCol(sudoku, j);
    for (i = 0; i < 9 && check == 1; i += 3) {
      for (j = 0; j < 9 && check == 1; j += 3) {
        check = checkSquare(sudoku, i, j);
      }
    }
    printf("Sudoku #%d:  ", caseNum);
    if (check)
      printf("Dave's the man!\n\n");
    else
      printf("Try again, Dave!\n\n");
  }
  fclose(in);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe77(%rip),%rdi
lea    0xe7c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x170(%rbp)
mov    -0x170(%rbp),%rdi
lea    0xe64(%rip),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
movl   $0x1,-0x168(%rbp)
mov    -0x168(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1409 <main+0x299>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    1250 <main+0xe0>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    123d <main+0xcd>
mov    -0x170(%rbp),%rdi
lea    0xe14(%rip),%rsi
lea    -0x161(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
movsbl -0x161(%rbp),%edx
sub    $0x31,%edx
movslq -0xc(%rbp),%rcx
lea    -0x160(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11e6 <main+0x76>
jmp    1242 <main+0xd2>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d5 <main+0x65>
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x9,-0xc(%rbp)
mov    %al,-0x171(%rbp)
jge    127d <main+0x10d>
cmpl   $0x1,-0x14(%rbp)
sete   %al
mov    %al,-0x171(%rbp)
mov    -0x171(%rbp),%al
test   $0x1,%al
jne    1290 <main+0x120>
jmp    12b0 <main+0x140>
lea    -0x160(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1080 <checkRow@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    125e <main+0xee>
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x9,-0x10(%rbp)
mov    %al,-0x172(%rbp)
jge    12d6 <main+0x166>
cmpl   $0x1,-0x14(%rbp)
sete   %al
mov    %al,-0x172(%rbp)
mov    -0x172(%rbp),%al
test   $0x1,%al
jne    12e9 <main+0x179>
jmp    1309 <main+0x199>
lea    -0x160(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1070 <checkCol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12b7 <main+0x147>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x9,-0xc(%rbp)
mov    %al,-0x173(%rbp)
jge    132f <main+0x1bf>
cmpl   $0x1,-0x14(%rbp)
sete   %al
mov    %al,-0x173(%rbp)
mov    -0x173(%rbp),%al
test   $0x1,%al
jne    1342 <main+0x1d2>
jmp    13b1 <main+0x241>
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x9,-0x10(%rbp)
mov    %al,-0x174(%rbp)
jge    1368 <main+0x1f8>
cmpl   $0x1,-0x14(%rbp)
sete   %al
mov    %al,-0x174(%rbp)
mov    -0x174(%rbp),%al
test   $0x1,%al
jne    137b <main+0x20b>
jmp    139e <main+0x22e>
lea    -0x160(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <checkSquare@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
jmp    1349 <main+0x1d9>
jmp    13a3 <main+0x233>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    1310 <main+0x1a0>
mov    -0x168(%rbp),%esi
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     13e2 <main+0x272>
lea    0xc4e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f0 <main+0x280>
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f5 <main+0x285>
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    11bf <main+0x4f>
mov    -0x170(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
lea    0xe68(%rip),%rdi
lea    0xe6d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r14
lea    0xe60(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1070 <fscanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    13e4 <main+0x264>
mov    $0x1,%eax
lea    0xe3e(%rip),%rbp
lea    0x3(%rsp),%r12
lea    0x10(%rsp),%r13
jmp    1222 <main+0xa2>
lea    0xe2f(%rip),%rdi
mov    0x8(%rsp),%rbx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebp,%ebp
lea    0xe38(%rip),%rdi
lea    0xe1f(%rip),%rax
cmove  %rax,%rdi
call   1040 <puts@plt>
lea    0x1(%rbx),%eax
cmp    0x4(%rsp),%ebx
lea    0xdf6(%rip),%rbp
jge    13e4 <main+0x264>
mov    %rax,0x8(%rsp)
mov    $0x20,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,-0x10(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,-0xc(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,-0x8(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,-0x4(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,0x4(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,0x8(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,0xc(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffcf,%eax
mov    %eax,0x10(%rsp,%rbx,1)
add    $0x24,%rbx
cmp    $0x164,%rbx
jne    1230 <main+0xb0>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r13,%rdi
mov    %ebx,%esi
call   1090 <checkRow@plt>
mov    %eax,%ebp
cmp    $0x7,%ebx
ja     1359 <main+0x1d9>
add    $0x1,%ebx
cmp    $0x1,%ebp
je     1340 <main+0x1c0>
cmp    $0x1,%ebp
jne    11e0 <main+0x60>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %ebx,%esi
call   1080 <checkCol@plt>
mov    %eax,%ebp
cmp    $0x7,%ebx
ja     1389 <main+0x209>
add    $0x1,%ebx
cmp    $0x1,%ebp
je     1370 <main+0x1f0>
cmp    $0x1,%ebp
jne    11e0 <main+0x60>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <checkSquare@plt>
mov    %eax,%ebp
cmp    $0x5,%ebx
ja     13cc <main+0x24c>
add    $0x3,%ebx
cmp    $0x1,%ebp
je     13b0 <main+0x230>
cmp    $0x5,%r15d
ja     11e0 <main+0x60>
add    $0x3,%r15d
cmp    $0x1,%ebp
je     13a0 <main+0x220>
jmp    11e0 <main+0x60>
mov    %r14,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"sudokode.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [4 x i8] c"%c \00"
@.str.4 = [14 x i8] c"Sudoku #%d: \00"
@.str.5 = [18 x i8] c"Dave's the man!\0A\0A\00"
@.str.6 = [19 x i8] c"Try again, Dave!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [9 x [9 x i32]]
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32*
store i32 0, i32* %1
%10 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %9
%11 = load i32*, i32** %9
%12 = call i32 (i32*, i8*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 1, i32* %8
br label %13
13: ; preds = %119, %0
%14 = load i32, i32* %8
%15 = load i32, i32* %2
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %122
17: ; preds = %13
store i32 0, i32* %3
br label %18
18: ; preds = %41, %17
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 9
br i1 %20, label %21, label %44
21: ; preds = %18
store i32 0, i32* %4
br label %22
22: ; preds = %37, %21
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 9
br i1 %24, label %25, label %40
25: ; preds = %22
%26 = load i32*, i32** %9
%27 = call i32 (i32*, i8*, ...) @fscanf(i32* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%28 = load i8, i8* %7
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 49
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 %32
%34 = load i32, i32* %4
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [9 x i32], [9 x i32]* %33, i64 0, i64 %35
store i32 %30, i32* %36
br label %37
37: ; preds = %25
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %22
40: ; preds = %22
br label %41
41: ; preds = %40
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
store i32 %43, i32* %3
br label %18
44: ; preds = %18
store i32 1, i32* %5
store i32 0, i32* %3
br label %45
45: ; preds = %58, %44
%46 = load i32, i32* %3
%47 = icmp slt i32 %46, 9
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = load i32, i32* %5
%50 = icmp eq i32 %49, 1
br label %51
51: ; preds = %48, %45
%52 = phi i1 [ false, %45 ], [ %50, %48 ]
br i1 %52, label %53, label %61
53: ; preds = %51
%54 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%55 = bitcast [9 x i32]* %54 to i32**
%56 = load i32, i32* %3
%57 = call i32 @checkRow(i32** %55, i32 %56)
store i32 %57, i32* %5
br label %58
58: ; preds = %53
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
store i32 %60, i32* %3
br label %45
61: ; preds = %51
store i32 0, i32* %4
br label %62
62: ; preds = %75, %61
%63 = load i32, i32* %4
%64 = icmp slt i32 %63, 9
br i1 %64, label %65, label %68
65: ; preds = %62
%66 = load i32, i32* %5
%67 = icmp eq i32 %66, 1
br label %68
68: ; preds = %65, %62
%69 = phi i1 [ false, %62 ], [ %67, %65 ]
br i1 %69, label %70, label %78
70: ; preds = %68
%71 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%72 = bitcast [9 x i32]* %71 to i32**
%73 = load i32, i32* %4
%74 = call i32 @checkCol(i32** %72, i32 %73)
store i32 %74, i32* %5
br label %75
75: ; preds = %70
%76 = load i32, i32* %4
%77 = add nsw i32 %76, 1
store i32 %77, i32* %4
br label %62
78: ; preds = %68
store i32 0, i32* %3
br label %79
79: ; preds = %106, %78
%80 = load i32, i32* %3
%81 = icmp slt i32 %80, 9
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = load i32, i32* %5
%84 = icmp eq i32 %83, 1
br label %85
85: ; preds = %82, %79
%86 = phi i1 [ false, %79 ], [ %84, %82 ]
br i1 %86, label %87, label %109
87: ; preds = %85
store i32 0, i32* %4
br label %88
88: ; preds = %102, %87
%89 = load i32, i32* %4
%90 = icmp slt i32 %89, 9
br i1 %90, label %91, label %94
91: ; preds = %88
%92 = load i32, i32* %5
%93 = icmp eq i32 %92, 1
br label %94
94: ; preds = %91, %88
%95 = phi i1 [ false, %88 ], [ %93, %91 ]
br i1 %95, label %96, label %105
96: ; preds = %94
%97 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%98 = bitcast [9 x i32]* %97 to i32**
%99 = load i32, i32* %3
%100 = load i32, i32* %4
%101 = call i32 @checkSquare(i32** %98, i32 %99, i32 %100)
store i32 %101, i32* %5
br label %102
102: ; preds = %96
%103 = load i32, i32* %4
%104 = add nsw i32 %103, 3
store i32 %104, i32* %4
br label %88
105: ; preds = %94
br label %106
106: ; preds = %105
%107 = load i32, i32* %3
%108 = add nsw i32 %107, 3
store i32 %108, i32* %3
br label %79
109: ; preds = %85
%110 = load i32, i32* %8
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %110)
%112 = load i32, i32* %5
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %116
114: ; preds = %109
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
br label %118
116: ; preds = %109
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %118
118: ; preds = %116, %114
br label %119
119: ; preds = %118
%120 = load i32, i32* %8
%121 = add nsw i32 %120, 1
store i32 %121, i32* %8
br label %13
122: ; preds = %13
%123 = load i32*, i32** %9
%124 = call i32 @fclose(i32* %123)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"sudokode.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [4 x i8] c"%c \00"
@.str.4 = [14 x i8] c"Sudoku #%d: \00"
@str = [18 x i8] c"Try again, Dave!\0A\00"
@str.7 = [17 x i8] c"Dave's the man!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x [9 x i32]]
%3 = alloca i8
%4 = bitcast i32* %1 to i8*
%5 = bitcast [9 x [9 x i32]]* %2 to i8*
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 1
br i1 %9, label %102, label %10
10: ; preds = %0
%11 = bitcast [9 x [9 x i32]]* %2 to i32**
br label %12
12: ; preds = %10, %93
%13 = phi i32 [ 1, %10 ], [ %99, %93 ]
br label %14
14: ; preds = %12, %14
%15 = phi i64 [ 0, %12 ], [ %61, %14 ]
%16 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = add nsw i32 %18, -49
%20 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 0
store i32 %19, i32* %20
%21 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = add nsw i32 %23, -49
%25 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 1
store i32 %24, i32* %25
%26 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = add nsw i32 %28, -49
%30 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 2
store i32 %29, i32* %30
%31 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = add nsw i32 %33, -49
%35 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 3
store i32 %34, i32* %35
%36 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%37 = load i8, i8* %3
%38 = sext i8 %37 to i32
%39 = add nsw i32 %38, -49
%40 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 4
store i32 %39, i32* %40
%41 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%42 = load i8, i8* %3
%43 = sext i8 %42 to i32
%44 = add nsw i32 %43, -49
%45 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 5
store i32 %44, i32* %45
%46 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%47 = load i8, i8* %3
%48 = sext i8 %47 to i32
%49 = add nsw i32 %48, -49
%50 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 6
store i32 %49, i32* %50
%51 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%52 = load i8, i8* %3
%53 = sext i8 %52 to i32
%54 = add nsw i32 %53, -49
%55 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 7
store i32 %54, i32* %55
%56 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%57 = load i8, i8* %3
%58 = sext i8 %57 to i32
%59 = add nsw i32 %58, -49
%60 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %2, i64 0, i64 %15, i64 8
store i32 %59, i32* %60
%61 = add nuw nsw i64 %15, 1
%62 = icmp eq i64 %61, 9
br i1 %62, label %64, label %14
63: ; preds = %64
br i1 %69, label %73, label %93
64: ; preds = %14, %64
%65 = phi i32 [ %67, %64 ], [ 0, %14 ]
%66 = call i32 @checkRow(i32** %11, i32 %65)
%67 = add nuw nsw i32 %65, 1
%68 = icmp ult i32 %65, 8
%69 = icmp eq i32 %66, 1
%70 = select i1 %68, i1 %69, i1 false
br i1 %70, label %64, label %63
71: ; preds = %73
%72 = icmp eq i32 %75, 1
br i1 %72, label %80, label %93
73: ; preds = %63, %73
%74 = phi i32 [ %76, %73 ], [ 0, %63 ]
%75 = call i32 @checkCol(i32** %11, i32 %74)
%76 = add nuw nsw i32 %74, 1
%77 = icmp ult i32 %74, 8
%78 = icmp eq i32 %75, 1
%79 = select i1 %77, i1 %78, i1 false
br i1 %79, label %73, label %71
80: ; preds = %71, %89
%81 = phi i32 [ %90, %89 ], [ 0, %71 ]
br label %82
82: ; preds = %80, %82
%83 = phi i32 [ 0, %80 ], [ %85, %82 ]
%84 = call i32 @checkSquare(i32** %11, i32 %81, i32 %83)
%85 = add nuw nsw i32 %83, 3
%86 = icmp ult i32 %83, 6
%87 = icmp eq i32 %84, 1
%88 = select i1 %86, i1 %87, i1 false
br i1 %88, label %82, label %89
89: ; preds = %82
%90 = add nuw nsw i32 %81, 3
%91 = icmp ult i32 %81, 6
%92 = select i1 %91, i1 %87, i1 false
br i1 %92, label %80, label %93
93: ; preds = %89, %63, %71
%94 = phi i32 [ %75, %71 ], [ %66, %63 ], [ %84, %89 ]
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%96 = icmp eq i32 %94, 0
%97 = select i1 %96, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.7, i64 0, i64 0)
%98 = call i32 @puts(i8* dereferenceable(1) %97)
%99 = add nuw nsw i32 %13, 1
%100 = load i32, i32* %1
%101 = icmp slt i32 %13, %100
br i1 %101, label %12, label %102
102: ; preds = %93, %0
%103 = call i32 @fclose(i32* %6)
ret i32 0
}