#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 atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *);
int main(int argc, char *argv[]) {
  int IO_NETWORK_DIM1 = atoi(argv[1]);
  int IO_NETWORK_DIM2 = atoi(argv[2]);
  int IO_NETWORK_SIZE = IO_NETWORK_DIM1 * IO_NETWORK_DIM2;
  char conFile[100];
  sprintf(conFile, "/home/apostolis/Desktop/mpi_programs/ckpt_infoli/input/"
                   "cellConnections.txt");
  FILE *pConFile = fopen(conFile, "w+");
  printf("Open Sesame\n");
  int i, j, k, x, y;
  for (i = 0; i < IO_NETWORK_SIZE; i++) {
    x = i / IO_NETWORK_DIM2;
    y = i % IO_NETWORK_DIM2;
    for (j = x - 1; j <= x + 1; j++) {
      for (k = y - 1; k <= y + 1; k++) {
        if ((j == x) && (k == y))
          ;
        else if ((j < 0) || (k < 0) || (j >= IO_NETWORK_DIM1) ||
                 (k >= IO_NETWORK_DIM2))
          ;
        else
          fprintf(pConFile, "%d B ", (j * IO_NETWORK_DIM2 + k));
      }
    }
    fprintf(pConFile, "|\n");
  }
  fclose(pConFile);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xe52(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x80(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x88(%rbp)
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1346 <main+0x1e6>
mov    -0x8c(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x98(%rbp)
mov    -0x8c(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %edx,-0x9c(%rbp)
mov    -0x98(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
mov    -0x98(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     131d <main+0x1bd>
mov    -0x9c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
mov    -0x9c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     1304 <main+0x1a4>
mov    -0x90(%rbp),%eax
cmp    -0x98(%rbp),%eax
jne    1284 <main+0x124>
mov    -0x94(%rbp),%eax
cmp    -0x9c(%rbp),%eax
jne    1284 <main+0x124>
jmp    12eb <main+0x18b>
cmpl   $0x0,-0x90(%rbp)
jl     12bc <main+0x15c>
cmpl   $0x0,-0x94(%rbp)
jl     12bc <main+0x15c>
mov    -0x90(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12bc <main+0x15c>
mov    -0x94(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     12c1 <main+0x161>
jmp    12e6 <main+0x186>
mov    -0x88(%rbp),%rdi
mov    -0x90(%rbp),%edx
imul   -0x18(%rbp),%edx
add    -0x94(%rbp),%edx
lea    0xd7c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12eb <main+0x18b>
jmp    12f0 <main+0x190>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1244 <main+0xe4>
jmp    1309 <main+0x1a9>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    121e <main+0xbe>
mov    -0x88(%rbp),%rdi
lea    0xd36(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    11e0 <main+0x80>
mov    -0x88(%rbp),%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%r13d
mov    %eax,%ebx
mov    %ebp,0x4(%rsp)
imul   %ebp,%ebx
movups 0xea0(%rip),%xmm0
movups %xmm0,0x5b(%rsp)
movups 0xe89(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movups 0xe6d(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movups 0xe51(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xe35(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xe74(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1060 <fopen@plt>
mov    %rax,0x8(%rsp)
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,0x18(%rsp)
test   %ebx,%ebx
jle    1407 <main+0x2a7>
xor    %eax,%eax
jmp    123c <main+0xdc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xe33(%rip),%rdi
mov    0x8(%rsp),%rcx
call   1080 <fwrite@plt>
mov    0x1c(%rsp),%eax
add    $0x1,%eax
cmp    %eax,0x18(%rsp)
je     1407 <main+0x2a7>
mov    %eax,0x1c(%rsp)
cltd
idiv   %r13d
mov    %edx,%r15d
mov    %eax,%r12d
mov    %r13d,%eax
lea    -0x1(%r12),%r13d
lea    -0x1(%r15),%ecx
mov    %rcx,0x10(%rsp)
mov    %eax,%ebp
imul   %eax,%r13d
test   %r12d,%r12d
jle    1292 <main+0x132>
test   %r15d,%r15d
jle    1292 <main+0x132>
cmp    0x4(%rsp),%r12d
jg     1292 <main+0x132>
test   %ebp,%ebp
js     1292 <main+0x132>
mov    0x10(%rsp),%rax
lea    (%rax,%r13,1),%edx
mov    0x8(%rsp),%rdi
lea    0xdc3(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %r12d,%r12d
jle    12be <main+0x15e>
test   %r15d,%r15d
js     12be <main+0x15e>
cmp    0x4(%rsp),%r12d
jg     12be <main+0x15e>
test   %ebp,%ebp
js     12be <main+0x15e>
lea    (%r15,%r13,1),%edx
mov    0x8(%rsp),%rdi
lea    0xd97(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0x1(%r15),%r14d
test   %r12d,%r12d
jle    12f1 <main+0x191>
test   %r14d,%r14d
js     12f1 <main+0x191>
cmp    0x4(%rsp),%r12d
jg     12f1 <main+0x191>
cmp    %ebp,%r14d
jge    12f1 <main+0x191>
add    %r14d,%r13d
mov    0x8(%rsp),%rdi
lea    0xd67(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r12d,%ebx
mov    %ebp,%r13d
imul   %ebp,%ebx
test   %r12d,%r12d
js     132b <main+0x1cb>
test   %r15d,%r15d
jle    132b <main+0x1cb>
cmp    0x4(%rsp),%r12d
jge    132b <main+0x1cb>
test   %r13d,%r13d
js     132b <main+0x1cb>
mov    0x10(%rsp),%rax
lea    (%rax,%rbx,1),%edx
mov    0x8(%rsp),%rdi
lea    0xd2a(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %r12d,%r12d
js     1359 <main+0x1f9>
test   %r14d,%r14d
js     1359 <main+0x1f9>
cmp    0x4(%rsp),%r12d
jge    1359 <main+0x1f9>
cmp    %r13d,%r14d
jge    1359 <main+0x1f9>
add    %r14d,%ebx
mov    0x8(%rsp),%rdi
lea    0xcfe(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0x1(%r12),%ebx
mov    %ebx,%ebp
imul   %r13d,%ebp
cmp    $0xffffffff,%r12d
jl     1394 <main+0x234>
test   %r15d,%r15d
jle    1394 <main+0x234>
cmp    0x4(%rsp),%ebx
jge    1394 <main+0x234>
test   %r13d,%r13d
js     1394 <main+0x234>
mov    0x10(%rsp),%rdx
add    %ebp,%edx
mov    0x8(%rsp),%rdi
lea    0xcc1(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    $0xffffffff,%r12d
jl     13c3 <main+0x263>
test   %r15d,%r15d
js     13c3 <main+0x263>
cmp    0x4(%rsp),%ebx
jge    13c3 <main+0x263>
test   %r13d,%r13d
js     13c3 <main+0x263>
add    %ebp,%r15d
mov    0x8(%rsp),%rdi
lea    0xc95(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    $0xffffffff,%r12d
jl     1210 <main+0xb0>
test   %r14d,%r14d
js     1210 <main+0xb0>
cmp    0x4(%rsp),%ebx
jge    1210 <main+0xb0>
cmp    %r13d,%r14d
jge    1210 <main+0xb0>
add    %ebp,%r14d
mov    0x8(%rsp),%rdi
lea    0xc56(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1210 <main+0xb0>
mov    0x8(%rsp),%rdi
call   1040 <fclose@plt>
mov    $0x1,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [75 x i8] c"/home/apostolis/Desktop/mpi_programs/ckpt_infoli/input/cellConnections.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [13 x i8] c"Open Sesame\0A\00"
@.str.3 = [6 x i8] c"%d B \00"
@.str.4 = [3 x i8] c"|\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [100 x i8]
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @atoi(i8* %18)
store i32 %19, i32* %6
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @atoi(i8* %22)
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = mul nsw i32 %24, %25
store i32 %26, i32* %8
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%28 = call i32 @sprintf(i8* %27, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %30, i32** %10
%31 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %11
br label %32
32: ; preds = %102, %2
%33 = load i32, i32* %11
%34 = load i32, i32* %8
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %105
36: ; preds = %32
%37 = load i32, i32* %11
%38 = load i32, i32* %7
%39 = sdiv i32 %37, %38
store i32 %39, i32* %14
%40 = load i32, i32* %11
%41 = load i32, i32* %7
%42 = srem i32 %40, %41
store i32 %42, i32* %15
%43 = load i32, i32* %14
%44 = sub nsw i32 %43, 1
store i32 %44, i32* %12
br label %45
45: ; preds = %96, %36
%46 = load i32, i32* %12
%47 = load i32, i32* %14
%48 = add nsw i32 %47, 1
%49 = icmp sle i32 %46, %48
br i1 %49, label %50, label %99
50: ; preds = %45
%51 = load i32, i32* %15
%52 = sub nsw i32 %51, 1
store i32 %52, i32* %13
br label %53
53: ; preds = %92, %50
%54 = load i32, i32* %13
%55 = load i32, i32* %15
%56 = add nsw i32 %55, 1
%57 = icmp sle i32 %54, %56
br i1 %57, label %58, label %95
58: ; preds = %53
%59 = load i32, i32* %12
%60 = load i32, i32* %14
%61 = icmp eq i32 %59, %60
br i1 %61, label %62, label %67
62: ; preds = %58
%63 = load i32, i32* %13
%64 = load i32, i32* %15
%65 = icmp eq i32 %63, %64
br i1 %65, label %66, label %67
66: ; preds = %62
br label %91
67: ; preds = %62, %58
%68 = load i32, i32* %12
%69 = icmp slt i32 %68, 0
br i1 %69, label %81, label %70
70: ; preds = %67
%71 = load i32, i32* %13
%72 = icmp slt i32 %71, 0
br i1 %72, label %81, label %73
73: ; preds = %70
%74 = load i32, i32* %12
%75 = load i32, i32* %6
%76 = icmp sge i32 %74, %75
br i1 %76, label %81, label %77
77: ; preds = %73
%78 = load i32, i32* %13
%79 = load i32, i32* %7
%80 = icmp sge i32 %78, %79
br i1 %80, label %81, label %82
81: ; preds = %77, %73, %70, %67
br label %90
82: ; preds = %77
%83 = load i32*, i32** %10
%84 = load i32, i32* %12
%85 = load i32, i32* %7
%86 = mul nsw i32 %84, %85
%87 = load i32, i32* %13
%88 = add nsw i32 %86, %87
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %88)
br label %90
90: ; preds = %82, %81
br label %91
91: ; preds = %90, %66
br label %92
92: ; preds = %91
%93 = load i32, i32* %13
%94 = add nsw i32 %93, 1
store i32 %94, i32* %13
br label %53
95: ; preds = %53
br label %96
96: ; preds = %95
%97 = load i32, i32* %12
%98 = add nsw i32 %97, 1
store i32 %98, i32* %12
br label %45
99: ; preds = %45
%100 = load i32*, i32** %10
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %102
102: ; preds = %99
%103 = load i32, i32* %11
%104 = add nsw i32 %103, 1
store i32 %104, i32* %11
br label %32
105: ; preds = %32
%106 = load i32*, i32** %10
%107 = call i32 @fclose(i32* %106)
ret i32 1
}

LLVM IR (-O2):
@.str = [75 x i8] c"/home/apostolis/Desktop/mpi_programs/ckpt_infoli/input/cellConnections.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.3 = [6 x i8] c"%d B \00"
@.str.4 = [3 x i8] c"|\0A\00"
@str = [12 x i8] c"Open Sesame\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = mul i32 %9, %6
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%14 = icmp sgt i32 %10, 0
br i1 %14, label %15, label %108
15: ; preds = %2
%16 = icmp sgt i32 %9, -1
%17 = icmp sgt i32 %9, -1
%18 = icmp sgt i32 %9, -1
%19 = icmp sgt i32 %9, -1
%20 = icmp sgt i32 %9, -1
br label %21
21: ; preds = %104, %15
%22 = phi i32 [ %106, %104 ], [ 0, %15 ]
%23 = sdiv i32 %22, %9
%24 = srem i32 %22, %9
%25 = add nsw i32 %23, -1
%26 = add nsw i32 %24, -1
%27 = icmp sgt i32 %23, 0
%28 = icmp sle i32 %23, %6
%29 = mul nsw i32 %25, %9
%30 = icmp sgt i32 %24, 0
%31 = and i1 %27, %30
%32 = select i1 %31, i1 %28, i1 false
%33 = select i1 %32, i1 %16, i1 false
br i1 %33, label %34, label %37
34: ; preds = %21
%35 = add nsw i32 %26, %29
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %21, %34
%38 = icmp sgt i32 %24, -1
%39 = and i1 %27, %38
%40 = select i1 %39, i1 %28, i1 false
%41 = select i1 %40, i1 %17, i1 false
br i1 %41, label %42, label %45
42: ; preds = %37
%43 = add nsw i32 %24, %29
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %37, %42
%46 = add i32 %24, 1
%47 = icmp sgt i32 %46, -1
%48 = select i1 %27, i1 %47, i1 false
%49 = select i1 %48, i1 %28, i1 false
%50 = icmp slt i32 %46, %9
%51 = select i1 %49, i1 %50, i1 false
br i1 %51, label %52, label %55
52: ; preds = %45
%53 = add nsw i32 %46, %29
%54 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %52, %45
%56 = icmp sgt i32 %23, -1
%57 = icmp slt i32 %23, %6
%58 = mul nsw i32 %23, %9
%59 = icmp sgt i32 %24, 0
%60 = and i1 %56, %59
%61 = select i1 %60, i1 %57, i1 false
%62 = select i1 %61, i1 %18, i1 false
br i1 %62, label %63, label %66
63: ; preds = %55
%64 = add nsw i32 %26, %58
%65 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %55
%67 = icmp sgt i32 %46, -1
%68 = select i1 %56, i1 %67, i1 false
%69 = select i1 %68, i1 %57, i1 false
%70 = icmp slt i32 %46, %9
%71 = select i1 %69, i1 %70, i1 false
br i1 %71, label %72, label %75
72: ; preds = %66
%73 = add nsw i32 %46, %58
%74 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %66, %72
%76 = icmp sgt i32 %24, -1
%77 = icmp sgt i32 %46, -1
%78 = icmp slt i32 %46, %9
%79 = icmp sgt i32 %24, 0
%80 = add nsw i32 %23, 1
%81 = icmp sgt i32 %23, -2
%82 = icmp slt i32 %80, %6
%83 = mul nsw i32 %80, %9
%84 = and i1 %81, %79
%85 = select i1 %84, i1 %82, i1 false
%86 = select i1 %85, i1 %19, i1 false
br i1 %86, label %87, label %90
87: ; preds = %75
%88 = add nsw i32 %26, %83
%89 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %88)
br label %90
90: ; preds = %87, %75
%91 = and i1 %81, %76
%92 = select i1 %91, i1 %82, i1 false
%93 = select i1 %92, i1 %20, i1 false
br i1 %93, label %94, label %97
94: ; preds = %90
%95 = add nsw i32 %24, %83
%96 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %95)
br label %97
97: ; preds = %90, %94
%98 = select i1 %81, i1 %77, i1 false
%99 = select i1 %98, i1 %82, i1 false
%100 = select i1 %99, i1 %78, i1 false
br i1 %100, label %101, label %104
101: ; preds = %97
%102 = add nsw i32 %46, %83
%103 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %102)
br label %104
104: ; preds = %97, %101
%105 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 2, i64 1, i32* %12)
%106 = add nuw i32 %22, 1
%107 = icmp eq i32 %106, %10
br i1 %107, label %108, label %21
108: ; preds = %104, %2
%109 = tail call i32 @fclose(i32* %12)
ret i32 1
}