#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*/ errhandler(int, char *, char *);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int getboundarytype(int);
int /*<<< orphan*/ isfluid(int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
void write_flag_imatrix(const char *szDebug, int timeStepNumber, int ***m,
                        int nrl, int nrh, int ncl, int nch, int nll, int nlh) {
  int i, j, k;
  FILE *fh = 0;
  char szFileName[80];
  sprintf(szFileName,
          "/media/norbert/940CB6150CB5F27A/Documents/simulation/debug/d%i_%s",
          timeStepNumber, szDebug);
  fh = fopen(szFileName, "w");
  if (fh == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be created", szFileName);
    errhandler(750,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/"
               "master/Backup/FinalProject/helper.c",
               szBuff);
  }
  for (k = nll; k <= nlh; k++) {
    for (j = ncl; j <= nch; j++) {
      for (i = nrl; i <= nrh; i++) {
        if (!isfluid(m[i][j][k])) {
          fprintf(fh, "%d ", getboundarytype(m[i][j][k]));
        } else {
          fprintf(fh, "F ");
        }
      }
      fprintf(fh, "\n");
    }
    fprintf(fh,
            "-----------------------------------------------------------\n");
  }
  if (fclose(fh)) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be closed", szFileName);
    errhandler(775,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/"
               "master/Backup/FinalProject/helper.c",
               szBuff);
  };
}


x86 assembly (clang, -O0):
<write_flag_imatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movq   $0x0,-0x38(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xe49(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x90(%rbp),%rdi
lea    0xe76(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1214 <write_flag_imatrix+0xa4>
lea    -0xe0(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xe4f(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0xe0(%rbp),%rdx
mov    $0x2ee,%edi
lea    0xe55(%rip),%rsi
call   1040 <errhandler@plt>
mov    0x18(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x20(%rbp),%eax
jg     131f <write_flag_imatrix+0x1af>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     12ff <write_flag_imatrix+0x18f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     12df <write_flag_imatrix+0x16f>
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <isfluid@plt>
cmp    $0x0,%eax
jne    12ba <write_flag_imatrix+0x14a>
mov    -0x38(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1060 <getboundarytype@plt>
mov    -0x138(%rbp),%rdi
mov    %eax,%edx
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12cc <write_flag_imatrix+0x15c>
mov    -0x38(%rbp),%rdi
lea    0xe3a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12d1 <write_flag_imatrix+0x161>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    123e <write_flag_imatrix+0xce>
mov    -0x38(%rbp),%rdi
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    122c <write_flag_imatrix+0xbc>
mov    -0x38(%rbp),%rdi
lea    0xdf8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    121a <write_flag_imatrix+0xaa>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
cmp    $0x0,%rax
je     1366 <write_flag_imatrix+0x1f6>
lea    -0x130(%rbp),%rdi
lea    -0x90(%rbp),%rdx
lea    0xdf8(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x130(%rbp),%rdx
mov    $0x307,%edi
lea    0xd03(%rip),%rsi
call   1040 <errhandler@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_flag_imatrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9d,0x4(%rsp)
mov    %r8d,0xc(%rsp)
mov    %ecx,0x8(%rsp)
mov    %rdx,%r13
mov    %esi,%edx
mov    %rdi,%rcx
mov    0x110(%rsp),%ebx
mov    0x108(%rsp),%r14d
lea    0xe33(%rip),%rsi
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   10a0 <sprintf@plt>
lea    0xe5f(%rip),%rsi
mov    %rbp,%rdi
call   1090 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
je     11fd <write_flag_imatrix+0x6d>
cmp    %ebx,%r14d
jg     1231 <write_flag_imatrix+0xa1>
jmp    127f <write_flag_imatrix+0xef>
lea    0xe40(%rip),%rsi
lea    0x70(%rsp),%r12
lea    0x20(%rsp),%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   10a0 <sprintf@plt>
lea    0xe45(%rip),%rsi
mov    $0x2ee,%edi
mov    %r12,%rdx
call   1040 <errhandler@plt>
cmp    %ebx,%r14d
jle    127f <write_flag_imatrix+0xef>
mov    %rbp,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
je     126d <write_flag_imatrix+0xdd>
lea    0xefa(%rip),%rsi
lea    0x70(%rsp),%rbx
lea    0x20(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <sprintf@plt>
lea    0xe04(%rip),%rsi
mov    $0x307,%edi
mov    %rbx,%rdx
call   1040 <errhandler@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x100(%rsp),%ecx
movslq 0x8(%rsp),%rax
movslq 0x4(%rsp),%rdx
mov    %rdx,0x18(%rsp)
add    $0x1,%ecx
mov    %ecx,0x14(%rsp)
movslq %r14d,%r15
add    $0x1,%ebx
lea    0x0(%r13,%rax,8),%r13
mov    0xc(%rsp),%ecx
mov    %ecx,%r14d
sub    %eax,%r14d
add    $0x1,%r14d
mov    %ebx,0x10(%rsp)
jmp    12ea <write_flag_imatrix+0x15a>
nopl   0x0(%rax,%rax,1)
mov    $0x3c,%esi
mov    $0x1,%edx
lea    0xe31(%rip),%rdi
mov    %rbp,%rcx
call   10b0 <fwrite@plt>
add    $0x1,%r15
mov    0x10(%rsp),%ebx
cmp    %r15d,%ebx
je     1231 <write_flag_imatrix+0xa1>
mov    0x100(%rsp),%eax
cmp    %eax,0x4(%rsp)
jg     12c0 <write_flag_imatrix+0x130>
mov    0x18(%rsp),%rbx
jmp    1317 <write_flag_imatrix+0x187>
xchg   %ax,%ax
mov    $0xa,%edi
mov    %rbp,%rsi
call   1070 <fputc@plt>
add    $0x1,%rbx
cmp    %ebx,0x14(%rsp)
je     12c0 <write_flag_imatrix+0x130>
mov    0x8(%rsp),%eax
cmp    0xc(%rsp),%eax
jg     1300 <write_flag_imatrix+0x170>
xor    %r12d,%r12d
jmp    1352 <write_flag_imatrix+0x1c2>
cs nopw 0x0(%rax,%rax,1)
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xdbe(%rip),%rdi
mov    %rbp,%rcx
call   10b0 <fwrite@plt>
add    $0x1,%r12
cmp    %r12d,%r14d
je     1300 <write_flag_imatrix+0x170>
mov    0x0(%r13,%r12,8),%rax
mov    (%rax,%rbx,8),%rax
mov    (%rax,%r15,4),%edi
call   1030 <isfluid@plt>
test   %eax,%eax
jne    1330 <write_flag_imatrix+0x1a0>
mov    0x0(%r13,%r12,8),%rax
mov    (%rax,%rbx,8),%rax
mov    (%rax,%r15,4),%edi
call   1060 <getboundarytype@plt>
mov    %rbp,%rdi
lea    0xd77(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1349 <write_flag_imatrix+0x1b9>

LLVM IR (-O0):
@.str = [66 x i8] c"/media/norbert/940CB6150CB5F27A/Documents/simulation/debug/d%i_%s\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [32 x i8] c"Outputfile %s cannot be created\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/helper.c\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [3 x i8] c"F \00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [61 x i8] c"-----------------------------------------------------------\0A\00"
@.str.8 = [31 x i8] c"Outputfile %s cannot be closed\00"
define void @write_flag_imatrix(i8* %0, i32 %1, i32*** %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32***
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32*
%23 = alloca [80 x i8]
%24 = alloca [80 x i8]
%25 = alloca [80 x i8]
store i8* %0, i8** %10
store i32 %1, i32* %11
store i32*** %2, i32**** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
store i32* null, i32** %22
%26 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%27 = load i32, i32* %11
%28 = load i8*, i8** %10
%29 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %27, i8* %28)
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%31 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %31, i32** %22
%32 = load i32*, i32** %22
%33 = icmp eq i32* %32, null
br i1 %33, label %34, label %40
34: ; preds = %9
%35 = getelementptr inbounds [80 x i8], [80 x i8]* %24, i64 0, i64 0
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %35, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds [80 x i8], [80 x i8]* %24, i64 0, i64 0
%39 = call i32 @errhandler(i32 750, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %38)
br label %40
40: ; preds = %34, %9
%41 = load i32, i32* %17
store i32 %41, i32* %21
br label %42
42: ; preds = %107, %40
%43 = load i32, i32* %21
%44 = load i32, i32* %18
%45 = icmp sle i32 %43, %44
br i1 %45, label %46, label %110
46: ; preds = %42
%47 = load i32, i32* %15
store i32 %47, i32* %20
br label %48
48: ; preds = %101, %46
%49 = load i32, i32* %20
%50 = load i32, i32* %16
%51 = icmp sle i32 %49, %50
br i1 %51, label %52, label %104
52: ; preds = %48
%53 = load i32, i32* %13
store i32 %53, i32* %19
br label %54
54: ; preds = %95, %52
%55 = load i32, i32* %19
%56 = load i32, i32* %14
%57 = icmp sle i32 %55, %56
br i1 %57, label %58, label %98
58: ; preds = %54
%59 = load i32***, i32**** %12
%60 = load i32, i32* %19
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32**, i32*** %59, i64 %61
%63 = load i32**, i32*** %62
%64 = load i32, i32* %20
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32*, i32** %63, i64 %65
%67 = load i32*, i32** %66
%68 = load i32, i32* %21
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i32, i32* %67, i64 %69
%71 = load i32, i32* %70
%72 = call i32 @isfluid(i32 %71)
%73 = icmp ne i32 %72, 0
br i1 %73, label %91, label %74
74: ; preds = %58
%75 = load i32*, i32** %22
%76 = load i32***, i32**** %12
%77 = load i32, i32* %19
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32**, i32*** %76, i64 %78
%80 = load i32**, i32*** %79
%81 = load i32, i32* %20
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32*, i32** %80, i64 %82
%84 = load i32*, i32** %83
%85 = load i32, i32* %21
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %84, i64 %86
%88 = load i32, i32* %87
%89 = call i32 @getboundarytype(i32 %88)
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %89)
br label %94
91: ; preds = %58
%92 = load i32*, i32** %22
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %94
94: ; preds = %91, %74
br label %95
95: ; preds = %94
%96 = load i32, i32* %19
%97 = add nsw i32 %96, 1
store i32 %97, i32* %19
br label %54
98: ; preds = %54
%99 = load i32*, i32** %22
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %101
101: ; preds = %98
%102 = load i32, i32* %20
%103 = add nsw i32 %102, 1
store i32 %103, i32* %20
br label %48
104: ; preds = %48
%105 = load i32*, i32** %22
%106 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0))
br label %107
107: ; preds = %104
%108 = load i32, i32* %21
%109 = add nsw i32 %108, 1
store i32 %109, i32* %21
br label %42
110: ; preds = %42
%111 = load i32*, i32** %22
%112 = call i64 @fclose(i32* %111)
%113 = icmp ne i64 %112, 0
br i1 %113, label %114, label %120
114: ; preds = %110
%115 = getelementptr inbounds [80 x i8], [80 x i8]* %25, i64 0, i64 0
%116 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%117 = call i32 (i8*, i8*, ...) @sprintf(i8* %115, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* %116)
%118 = getelementptr inbounds [80 x i8], [80 x i8]* %25, i64 0, i64 0
%119 = call i32 @errhandler(i32 775, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %118)
br label %120
120: ; preds = %114, %110
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"/media/norbert/940CB6150CB5F27A/Documents/simulation/debug/d%i_%s\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [32 x i8] c"Outputfile %s cannot be created\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/helper.c\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [3 x i8] c"F \00"
@.str.7 = [61 x i8] c"-----------------------------------------------------------\0A\00"
@.str.8 = [31 x i8] c"Outputfile %s cannot be closed\00"
define void @write_flag_imatrix(i8* %0, i32 %1, i32*** nocapture %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca [80 x i8]
%11 = alloca [80 x i8]
%12 = alloca [80 x i8]
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%14 = call i32 (i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
%15 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %21
17: ; preds = %9
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 0
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%20 = call i32 @errhandler(i32 750, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %18)
br label %21
21: ; preds = %17, %9
%22 = icmp sgt i32 %7, %8
br i1 %22, label %70, label %23
23: ; preds = %21
%24 = icmp sgt i32 %5, %6
%25 = icmp sgt i32 %3, %4
%26 = sext i32 %3 to i64
%27 = add i32 %4, 1
%28 = sext i32 %5 to i64
%29 = add i32 %6, 1
%30 = sext i32 %7 to i64
%31 = add i32 %8, 1
br label %32
32: ; preds = %23, %65
%33 = phi i64 [ %30, %23 ], [ %67, %65 ]
br i1 %24, label %65, label %34
34: ; preds = %32, %60
%35 = phi i64 [ %62, %60 ], [ %28, %32 ]
br i1 %25, label %60, label %36
36: ; preds = %34, %56
%37 = phi i64 [ %57, %56 ], [ %26, %34 ]
%38 = getelementptr inbounds i32**, i32*** %2, i64 %37
%39 = load i32**, i32*** %38
%40 = getelementptr inbounds i32*, i32** %39, i64 %35
%41 = load i32*, i32** %40
%42 = getelementptr inbounds i32, i32* %41, i64 %33
%43 = load i32, i32* %42
%44 = call i32 @isfluid(i32 %43)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %54
46: ; preds = %36
%47 = load i32**, i32*** %38
%48 = getelementptr inbounds i32*, i32** %47, i64 %35
%49 = load i32*, i32** %48
%50 = getelementptr inbounds i32, i32* %49, i64 %33
%51 = load i32, i32* %50
%52 = call i32 @getboundarytype(i32 %51)
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %52)
br label %56
54: ; preds = %36
%55 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 2, i64 1, i32* %15)
br label %56
56: ; preds = %46, %54
%57 = add nsw i64 %37, 1
%58 = trunc i64 %57 to i32
%59 = icmp eq i32 %27, %58
br i1 %59, label %60, label %36
60: ; preds = %56, %34
%61 = call i32 @fputc(i32 10, i32* %15)
%62 = add nsw i64 %35, 1
%63 = trunc i64 %62 to i32
%64 = icmp eq i32 %29, %63
br i1 %64, label %65, label %34
65: ; preds = %60, %32
%66 = call i64 @fwrite(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0), i64 60, i64 1, i32* %15)
%67 = add nsw i64 %33, 1
%68 = trunc i64 %67 to i32
%69 = icmp eq i32 %31, %68
br i1 %69, label %70, label %32
70: ; preds = %65, %21
%71 = call i64 @fclose(i32* %15)
%72 = icmp eq i64 %71, 0
br i1 %72, label %77, label %73
73: ; preds = %70
%74 = getelementptr inbounds [80 x i8], [80 x i8]* %12, i64 0, i64 0
%75 = call i32 (i8*, i8*, ...) @sprintf(i8* %74, i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%76 = call i32 @errhandler(i32 775, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i8* %74)
br label %77
77: ; preds = %73, %70
ret void
}