#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ *stderr;
int write_arcinfo_grid(char *filename, double *values, double *lat, double *lng,
                       int ncols, int nrows, double ll_lat, double ll_lng,
                       double cellsize, int NODATA, int Ncells) {
  FILE *farc;
  int i, j;
  int cell;
  int tmpvalue;
  if ((farc = fopen(filename, "w")) == NULL) {
    fprintf(stderr, "ERROR: Unable of open ARCINFO grid %s for writing.\n",
            filename);
    exit(0);
  }
  fprintf(farc, "ncols\t%i\n", ncols);
  fprintf(farc, "nrows\t%i\n", nrows);
  fprintf(farc, "xllcorner\t%lf\n", ll_lng);
  fprintf(farc, "yllcorner\t%lf\n", ll_lat);
  fprintf(farc, "cellsize\t%lf\n", cellsize);
  fprintf(farc, "NODATA_value\t%i\n", NODATA);
  cell = 0;
  for (j = 0; j < nrows; j++) {
    for (i = 0; i < ncols; i++) {
      if (values[cell] != NODATA)
        fprintf(farc, "%lf", values[cell]);
      else
        fprintf(farc, "%i", NODATA);
      cell++;
      if (i < ncols - 1)
        fprintf(farc, "\t");
      else
        fprintf(farc, "\n");
    }
  }
  fclose(farc);
  if (Ncells != cell) {
    fprintf(stderr, "ERROR: number of cells printed does not equal number of "
                    "cells defined.\n");
    exit(0);
  }
  return cell;
}


x86 assembly (clang, -O0):
<write_arcinfo_grid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
movsd  %xmm2,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    11b6 <write_arcinfo_grid+0x76>
mov    0x2e46(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe5a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xe72(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%edx
lea    0xe67(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x48(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
lea    0xe5a(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x48(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
lea    0xe52(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x48(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
lea    0xe4a(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x48(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xe43(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1330 <write_arcinfo_grid+0x1f0>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    131d <write_arcinfo_grid+0x1dd>
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jne    128e <write_arcinfo_grid+0x14e>
jp     128e <write_arcinfo_grid+0x14e>
jmp    12b2 <write_arcinfo_grid+0x172>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xde1(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    12c7 <write_arcinfo_grid+0x187>
mov    -0x48(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12f8 <write_arcinfo_grid+0x1b8>
mov    -0x48(%rbp),%rdi
lea    0xda2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    130a <write_arcinfo_grid+0x1ca>
mov    -0x48(%rbp),%rdi
lea    0xdd3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    130f <write_arcinfo_grid+0x1cf>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    125b <write_arcinfo_grid+0x11b>
jmp    1322 <write_arcinfo_grid+0x1e2>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1248 <write_arcinfo_grid+0x108>
mov    -0x48(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x18(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     1364 <write_arcinfo_grid+0x224>
mov    0x2c94(%rip),%rax
mov    (%rax),%rdi
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x54(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_arcinfo_grid>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x20(%rsp)
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rsi,0x30(%rsp)
mov    %rdi,%rbx
lea    0xe6b(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1319 <write_arcinfo_grid+0x1b9>
mov    %rax,%rbp
mov    0x70(%rsp),%ebx
lea    0xe85(%rip),%rsi
movl   $0x0,0x4(%rsp)
mov    %rax,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe73(%rip),%rsi
mov    %rbp,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe69(%rip),%rsi
mov    %rbp,%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1050 <fprintf@plt>
lea    0xe61(%rip),%rsi
mov    %rbp,%rdi
movsd  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1050 <fprintf@plt>
lea    0xe59(%rip),%rsi
mov    %rbp,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <fprintf@plt>
lea    0xe50(%rip),%rsi
mov    %rbp,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %r14d,%r14d
jle    12f8 <write_arcinfo_grid+0x198>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x70(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    -0x1(%r15),%r13d
mov    %r15d,%r12d
movl   $0x0,0x4(%rsp)
xor    %ebx,%ebx
mov    %r14d,0x14(%rsp)
mov    %r15,0x28(%rsp)
jmp    1287 <write_arcinfo_grid+0x127>
nopw   0x0(%rax,%rax,1)
add    %r14d,0x4(%rsp)
mov    0x14(%rsp),%r14d
mov    0x28(%rsp),%r15
add    $0x1,%ebx
cmp    %r14d,%ebx
je     12f8 <write_arcinfo_grid+0x198>
test   %r15d,%r15d
jle    127f <write_arcinfo_grid+0x11f>
movslq 0x4(%rsp),%rax
mov    0x30(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
xor    %r14d,%r14d
jmp    12d5 <write_arcinfo_grid+0x175>
nop
mov    %rbp,%rdi
lea    0xde1(%rip),%rsi
mov    0x70(%rsp),%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
cmp    %r13d,%r14d
setl   %al
mov    $0xa,%edi
sub    %eax,%edi
mov    %rbp,%rsi
call   1040 <fputc@plt>
add    $0x1,%r14
cmp    %r14d,%r12d
je     1270 <write_arcinfo_grid+0x110>
movsd  (%r15,%r14,8),%xmm0
ucomisd 0x8(%rsp),%xmm0
jne    12e5 <write_arcinfo_grid+0x185>
jnp    12a0 <write_arcinfo_grid+0x140>
mov    %rbp,%rdi
lea    0xd98(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
jmp    12b5 <write_arcinfo_grid+0x155>
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    0x78(%rsp),%eax
cmp    %eax,0x4(%rsp)
jne    133b <write_arcinfo_grid+0x1db>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cc0(%rip),%rax
mov    (%rax),%rdi
lea    0xcd8(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    0x2c9e(%rip),%rax
mov    (%rax),%rcx
lea    0xd42(%rip),%rdi
mov    $0x47,%esi
mov    $0x1,%edx
call   1080 <fwrite@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [52 x i8] c"ERROR: Unable of open ARCINFO grid %s for writing.\0A\00"
@.str.2 = [10 x i8] c"ncols\09%i\0A\00"
@.str.3 = [10 x i8] c"nrows\09%i\0A\00"
@.str.4 = [15 x i8] c"xllcorner\09%lf\0A\00"
@.str.5 = [15 x i8] c"yllcorner\09%lf\0A\00"
@.str.6 = [14 x i8] c"cellsize\09%lf\0A\00"
@.str.7 = [17 x i8] c"NODATA_value\09%i\0A\00"
@.str.8 = [4 x i8] c"%lf\00"
@.str.9 = [3 x i8] c"%i\00"
@.str.10 = [2 x i8] c"\09\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [72 x i8] c"ERROR: number of cells printed does not equal number of cells defined.\0A\00"
define i32 @write_arcinfo_grid(i8* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5, double %6, double %7, double %8, i32 %9, i32 %10) {
%12 = alloca i8*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
store i8* %0, i8** %12
store double* %1, double** %13
store double* %2, double** %14
store double* %3, double** %15
store i32 %4, i32* %16
store i32 %5, i32* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store i32 %9, i32* %21
store i32 %10, i32* %22
%28 = load i8*, i8** %12
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %29, i32** %23
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %36
31: ; preds = %11
%32 = load i32*, i32** @stderr
%33 = load i8*, i8** %12
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = call i32 @exit(i32 0)
unreachable
36: ; preds = %11
%37 = load i32*, i32** %23
%38 = load i32, i32* %16
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = load i32*, i32** %23
%41 = load i32, i32* %17
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %41)
%43 = load i32*, i32** %23
%44 = load double, double* %19
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %44)
%46 = load i32*, i32** %23
%47 = load double, double* %18
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), double %47)
%49 = load i32*, i32** %23
%50 = load double, double* %20
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %50)
%52 = load i32*, i32** %23
%53 = load i32, i32* %21
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %53)
store i32 0, i32* %26
store i32 0, i32* %25
br label %55
55: ; preds = %103, %36
%56 = load i32, i32* %25
%57 = load i32, i32* %17
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %106
59: ; preds = %55
store i32 0, i32* %24
br label %60
60: ; preds = %99, %59
%61 = load i32, i32* %24
%62 = load i32, i32* %16
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %102
64: ; preds = %60
%65 = load double*, double** %13
%66 = load i32, i32* %26
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double, double* %65, i64 %67
%69 = load double, double* %68
%70 = load i32, i32* %21
%71 = sitofp i32 %70 to double
%72 = fcmp une double %69, %71
br i1 %72, label %73, label %81
73: ; preds = %64
%74 = load i32*, i32** %23
%75 = load double*, double** %13
%76 = load i32, i32* %26
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
%79 = load double, double* %78
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), double %79)
br label %85
81: ; preds = %64
%82 = load i32*, i32** %23
%83 = load i32, i32* %21
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %83)
br label %85
85: ; preds = %81, %73
%86 = load i32, i32* %26
%87 = add nsw i32 %86, 1
store i32 %87, i32* %26
%88 = load i32, i32* %24
%89 = load i32, i32* %16
%90 = sub nsw i32 %89, 1
%91 = icmp slt i32 %88, %90
br i1 %91, label %92, label %95
92: ; preds = %85
%93 = load i32*, i32** %23
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %98
95: ; preds = %85
%96 = load i32*, i32** %23
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %98
98: ; preds = %95, %92
br label %99
99: ; preds = %98
%100 = load i32, i32* %24
%101 = add nsw i32 %100, 1
store i32 %101, i32* %24
br label %60
102: ; preds = %60
br label %103
103: ; preds = %102
%104 = load i32, i32* %25
%105 = add nsw i32 %104, 1
store i32 %105, i32* %25
br label %55
106: ; preds = %55
%107 = load i32*, i32** %23
%108 = call i32 @fclose(i32* %107)
%109 = load i32, i32* %22
%110 = load i32, i32* %26
%111 = icmp ne i32 %109, %110
br i1 %111, label %112, label %116
112: ; preds = %106
%113 = load i32*, i32** @stderr
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.12, i64 0, i64 0))
%115 = call i32 @exit(i32 0)
unreachable
116: ; preds = %106
%117 = load i32, i32* %26
ret i32 %117
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [52 x i8] c"ERROR: Unable of open ARCINFO grid %s for writing.\0A\00"
@.str.2 = [10 x i8] c"ncols\09%i\0A\00"
@.str.3 = [10 x i8] c"nrows\09%i\0A\00"
@.str.4 = [15 x i8] c"xllcorner\09%lf\0A\00"
@.str.5 = [15 x i8] c"yllcorner\09%lf\0A\00"
@.str.6 = [14 x i8] c"cellsize\09%lf\0A\00"
@.str.7 = [17 x i8] c"NODATA_value\09%i\0A\00"
@.str.8 = [4 x i8] c"%lf\00"
@.str.9 = [3 x i8] c"%i\00"
@.str.12 = [72 x i8] c"ERROR: number of cells printed does not equal number of cells defined.\0A\00"
define i32 @write_arcinfo_grid(i8* %0, double* nocapture %1, double* nocapture readnone %2, double* nocapture readnone %3, i32 %4, i32 %5, double %6, double %7, double %8, i32 %9, i32 %10) {
%12 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32*, i32** @stderr
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%17 = tail call i32 @exit(i32 0)
unreachable
18: ; preds = %11
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%21 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %7)
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), double %6)
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %8)
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %9)
%25 = icmp sgt i32 %5, 0
br i1 %25, label %26, label %58
26: ; preds = %18
%27 = icmp sgt i32 %4, 0
%28 = sitofp i32 %9 to double
%29 = add nsw i32 %4, -1
br label %30
30: ; preds = %26, %54
%31 = phi i32 [ 0, %26 ], [ %55, %54 ]
%32 = phi i32 [ 0, %26 ], [ %56, %54 ]
br i1 %27, label %33, label %54
33: ; preds = %30
%34 = sext i32 %31 to i64
br label %35
35: ; preds = %33, %45
%36 = phi i64 [ %34, %33 ], [ %46, %45 ]
%37 = phi i32 [ 0, %33 ], [ %50, %45 ]
%38 = getelementptr inbounds double, double* %1, i64 %36
%39 = load double, double* %38
%40 = fcmp une double %39, %28
br i1 %40, label %41, label %43
41: ; preds = %35
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), double %39)
br label %45
43: ; preds = %35
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %9)
br label %45
45: ; preds = %43, %41
%46 = add nsw i64 %36, 1
%47 = icmp slt i32 %37, %29
%48 = select i1 %47, i32 9, i32 10
%49 = tail call i32 @fputc(i32 %48, i32* %12)
%50 = add nuw nsw i32 %37, 1
%51 = icmp eq i32 %50, %4
br i1 %51, label %52, label %35
52: ; preds = %45
%53 = trunc i64 %46 to i32
br label %54
54: ; preds = %52, %30
%55 = phi i32 [ %31, %30 ], [ %53, %52 ]
%56 = add nuw nsw i32 %32, 1
%57 = icmp eq i32 %56, %5
br i1 %57, label %58, label %30
58: ; preds = %54, %18
%59 = phi i32 [ 0, %18 ], [ %55, %54 ]
%60 = tail call i32 @fclose(i32* %12)
%61 = icmp eq i32 %59, %10
br i1 %61, label %66, label %62
62: ; preds = %58
%63 = load i32*, i32** @stderr
%64 = tail call i64 @fwrite(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.12, i64 0, i64 0), i64 71, i64 1, i32* %63)
%65 = tail call i32 @exit(i32 0)
unreachable
66: ; preds = %58
ret i32 %10
}