#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
void write_data(char *filename, int frameNo, int frames_processed,
                int endoPoints, int *input_a, int *input_b, int epiPoints,
                int *input_2a, int *input_2b) {
  FILE *fid;
  int i, j;
  char c;
  fid = fopen(filename, "w+");
  if (fid == NULL) {
    printf("The file was not opened for writing\n");
    return;
  }
  fprintf(fid, "Total AVI Frames: %d\n", frameNo);
  fprintf(fid, "Frames Processed: %d\n", frames_processed);
  fprintf(fid, "endoPoints: %d\n", endoPoints);
  fprintf(fid, "epiPoints: %d", epiPoints);
  for (j = 0; j < frames_processed; j++) {
    fprintf(fid, "\n---Frame %d---", j);
    fprintf(fid, "\n--endo--\n", j);
    for (i = 0; i < endoPoints; i++) {
      fprintf(fid, "%d\t", input_a[j + i * frameNo]);
    }
    fprintf(fid, "\n");
    for (i = 0; i < endoPoints; i++) {
      fprintf(fid, "%d\t", input_b[j + i * frameNo]);
    }
    fprintf(fid, "\n--epi--\n", j);
    for (i = 0; i < epiPoints; i++) {
      fprintf(fid, "%d\t", input_2a[j + i * frameNo]);
    }
    fprintf(fid, "\n");
    for (i = 0; i < epiPoints; i++) {
      fprintf(fid, "%d\t", input_2b[j + i * frameNo]);
    }
  }
  fclose(fid);
}


x86 assembly (clang, -O0):
<write_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1198 <write_data+0x58>
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
jmp    13a2 <write_data+0x262>
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xe83(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe84(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1399 <write_data+0x259>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1272 <write_data+0x132>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe30(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1230 <write_data+0xf0>
mov    -0x30(%rbp),%rdi
lea    0xe1c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12cd <write_data+0x18d>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    128b <write_data+0x14b>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xdb6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    132b <write_data+0x1eb>
mov    -0x30(%rbp),%rdi
mov    0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
lea    0xd77(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12e9 <write_data+0x1a9>
mov    -0x30(%rbp),%rdi
lea    0xd63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1386 <write_data+0x246>
mov    -0x30(%rbp),%rdi
mov    0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
lea    0xd1c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1344 <write_data+0x204>
jmp    138b <write_data+0x24b>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11f3 <write_data+0xb3>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_data>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x8(%rsp)
mov    %r8,%rbp
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%r13d
mov    0x90(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x88(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x80(%rsp),%r12d
lea    0xe69(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     13e4 <write_data+0x294>
mov    %rax,%r15
lea    0xe54(%rip),%rsi
mov    %rax,%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe56(%rip),%rsi
mov    %r15,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe58(%rip),%rsi
mov    %r15,%rdi
mov    %ebx,0x4(%rsp)
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe51(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,(%rsp)
mov    %r12d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r14d,%r14d
mov    0x8(%rsp),%rax
jle    13ce <write_data+0x27e>
movslq %r13d,%r12
mov    %r14d,%ecx
mov    %rcx,0x38(%rsp)
mov    0x4(%rsp),%ecx
mov    %rcx,0x20(%rsp)
mov    (%rsp),%ecx
mov    %rcx,0x18(%rsp)
shl    $0x2,%r12
lea    0xe34(%rip),%r13
xor    %ebx,%ebx
jmp    1282 <write_data+0x132>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
mov    0x30(%rsp),%rbx
add    $0x1,%rbx
mov    0x40(%rsp),%rbp
add    $0x4,%rbp
mov    0x8(%rsp),%rax
add    $0x4,%rax
addq   $0x4,0x28(%rsp)
add    $0x4,%r14
mov    %r14,0x10(%rsp)
cmp    0x38(%rsp),%rbx
je     13ce <write_data+0x27e>
mov    %rbp,%r14
mov    %rax,%rbp
mov    %r15,%rdi
lea    0xdbb(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r15,%rdi
lea    0xdb8(%rip),%rsi
mov    %rbx,0x30(%rsp)
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x20(%rsp),%rbx
mov    %r14,0x40(%rsp)
cmpl   $0x0,0x4(%rsp)
mov    %rbp,0x8(%rsp)
jle    1330 <write_data+0x1e0>
nopl   0x0(%rax)
mov    (%r14),%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    %r12,%r14
add    $0xffffffffffffffff,%rbx
jne    12d0 <write_data+0x180>
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
cmpl   $0x0,0x4(%rsp)
mov    0x10(%rsp),%r14
jle    1342 <write_data+0x1f2>
mov    0x20(%rsp),%rbx
mov    0x8(%rsp),%rbp
nopl   0x0(%rax)
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    %r12,%rbp
add    $0xffffffffffffffff,%rbx
jne    1310 <write_data+0x1c0>
jmp    1342 <write_data+0x1f2>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
mov    0x10(%rsp),%r14
mov    %r15,%rdi
lea    0xd20(%rip),%rsi
mov    0x30(%rsp),%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x18(%rsp),%rbx
mov    0x28(%rsp),%rbp
cmpl   $0x0,(%rsp)
jle    1240 <write_data+0xf0>
nopl   0x0(%rax)
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    %r12,%rbp
add    $0xffffffffffffffff,%rbx
jne    1370 <write_data+0x220>
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
cmpl   $0x0,(%rsp)
jle    124d <write_data+0xfd>
mov    0x18(%rsp),%rbx
mov    %r14,%rbp
nopl   0x0(%rax,%rax,1)
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    %r12,%rbp
add    $0xffffffffffffffff,%rbx
jne    13b0 <write_data+0x260>
jmp    124d <write_data+0xfd>
mov    %r15,%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fclose@plt>
lea    0xc8b(%rip),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"w+\00"
@.str.1 = [37 x i8] c"The file was not opened for writing\0A\00"
@.str.2 = [22 x i8] c"Total AVI Frames: %d\0A\00"
@.str.3 = [22 x i8] c"Frames Processed: %d\0A\00"
@.str.4 = [16 x i8] c"endoPoints: %d\0A\00"
@.str.5 = [14 x i8] c"epiPoints: %d\00"
@.str.6 = [16 x i8] c"\0A---Frame %d---\00"
@.str.7 = [11 x i8] c"\0A--endo--\0A\00"
@.str.8 = [4 x i8] c"%d\09\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [10 x i8] c"\0A--epi--\0A\00"
define void @write_data(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 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
%23 = load i8*, i8** %10
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %19
%25 = load i32*, i32** %19
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %29
27: ; preds = %9
%28 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
br label %146
29: ; preds = %9
%30 = load i32*, i32** %19
%31 = load i32, i32* %11
%32 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%33 = load i32*, i32** %19
%34 = load i32, i32* %12
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = load i32*, i32** %19
%37 = load i32, i32* %13
%38 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = load i32*, i32** %19
%40 = load i32, i32* %16
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %40)
store i32 0, i32* %21
br label %42
42: ; preds = %140, %29
%43 = load i32, i32* %21
%44 = load i32, i32* %12
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %143
46: ; preds = %42
%47 = load i32*, i32** %19
%48 = load i32, i32* %21
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %48)
%50 = load i32*, i32** %19
%51 = load i32, i32* %21
%52 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %51)
store i32 0, i32* %20
br label %53
53: ; preds = %69, %46
%54 = load i32, i32* %20
%55 = load i32, i32* %13
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %72
57: ; preds = %53
%58 = load i32*, i32** %19
%59 = load i32*, i32** %14
%60 = load i32, i32* %21
%61 = load i32, i32* %20
%62 = load i32, i32* %11
%63 = mul nsw i32 %61, %62
%64 = add nsw i32 %60, %63
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %59, i64 %65
%67 = load i32, i32* %66
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %57
%70 = load i32, i32* %20
%71 = add nsw i32 %70, 1
store i32 %71, i32* %20
br label %53
72: ; preds = %53
%73 = load i32*, i32** %19
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %20
br label %75
75: ; preds = %91, %72
%76 = load i32, i32* %20
%77 = load i32, i32* %13
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %94
79: ; preds = %75
%80 = load i32*, i32** %19
%81 = load i32*, i32** %15
%82 = load i32, i32* %21
%83 = load i32, i32* %20
%84 = load i32, i32* %11
%85 = mul nsw i32 %83, %84
%86 = add nsw i32 %82, %85
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i32, i32* %81, i64 %87
%89 = load i32, i32* %88
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %79
%92 = load i32, i32* %20
%93 = add nsw i32 %92, 1
store i32 %93, i32* %20
br label %75
94: ; preds = %75
%95 = load i32*, i32** %19
%96 = load i32, i32* %21
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %96)
store i32 0, i32* %20
br label %98
98: ; preds = %114, %94
%99 = load i32, i32* %20
%100 = load i32, i32* %16
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %117
102: ; preds = %98
%103 = load i32*, i32** %19
%104 = load i32*, i32** %17
%105 = load i32, i32* %21
%106 = load i32, i32* %20
%107 = load i32, i32* %11
%108 = mul nsw i32 %106, %107
%109 = add nsw i32 %105, %108
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %104, i64 %110
%112 = load i32, i32* %111
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %112)
br label %114
114: ; preds = %102
%115 = load i32, i32* %20
%116 = add nsw i32 %115, 1
store i32 %116, i32* %20
br label %98
117: ; preds = %98
%118 = load i32*, i32** %19
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %20
br label %120
120: ; preds = %136, %117
%121 = load i32, i32* %20
%122 = load i32, i32* %16
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %139
124: ; preds = %120
%125 = load i32*, i32** %19
%126 = load i32*, i32** %18
%127 = load i32, i32* %21
%128 = load i32, i32* %20
%129 = load i32, i32* %11
%130 = mul nsw i32 %128, %129
%131 = add nsw i32 %127, %130
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i32, i32* %126, i64 %132
%134 = load i32, i32* %133
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %134)
br label %136
136: ; preds = %124
%137 = load i32, i32* %20
%138 = add nsw i32 %137, 1
store i32 %138, i32* %20
br label %120
139: ; preds = %120
br label %140
140: ; preds = %139
%141 = load i32, i32* %21
%142 = add nsw i32 %141, 1
store i32 %142, i32* %21
br label %42
143: ; preds = %42
%144 = load i32*, i32** %19
%145 = call i32 @fclose(i32* %144)
br label %146
146: ; preds = %143, %27
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"w+\00"
@.str.2 = [22 x i8] c"Total AVI Frames: %d\0A\00"
@.str.3 = [22 x i8] c"Frames Processed: %d\0A\00"
@.str.4 = [16 x i8] c"endoPoints: %d\0A\00"
@.str.5 = [14 x i8] c"epiPoints: %d\00"
@.str.6 = [16 x i8] c"\0A---Frame %d---\00"
@.str.7 = [11 x i8] c"\0A--endo--\0A\00"
@.str.8 = [4 x i8] c"%d\09\00"
@.str.10 = [10 x i8] c"\0A--epi--\0A\00"
@str = [36 x i8] c"The file was not opened for writing\00"
define void @write_data(i8* nocapture %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5, i32 %6, i32* nocapture %7, i32* nocapture %8) {
%10 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %85
14: ; preds = %9
%15 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %2)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %3)
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %6)
%19 = icmp sgt i32 %2, 0
br i1 %19, label %20, label %83
20: ; preds = %14
%21 = icmp sgt i32 %3, 0
%22 = icmp sgt i32 %6, 0
%23 = sext i32 %1 to i64
%24 = zext i32 %2 to i64
%25 = zext i32 %3 to i64
%26 = zext i32 %3 to i64
%27 = zext i32 %6 to i64
%28 = zext i32 %6 to i64
br label %29
29: ; preds = %20, %80
%30 = phi i64 [ 0, %20 ], [ %81, %80 ]
%31 = trunc i64 %30 to i32
%32 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %31)
br i1 %21, label %36, label %34
34: ; preds = %29
%35 = tail call i32 @fputc(i32 10, i32* %10)
br label %56
36: ; preds = %29, %36
%37 = phi i64 [ %43, %36 ], [ 0, %29 ]
%38 = mul nsw i64 %37, %23
%39 = add nsw i64 %38, %30
%40 = getelementptr inbounds i32, i32* %4, i64 %39
%41 = load i32, i32* %40
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %41)
%43 = add nuw nsw i64 %37, 1
%44 = icmp eq i64 %43, %25
br i1 %44, label %45, label %36
45: ; preds = %36
%46 = tail call i32 @fputc(i32 10, i32* %10)
br i1 %21, label %47, label %56
47: ; preds = %45, %47
%48 = phi i64 [ %54, %47 ], [ 0, %45 ]
%49 = mul nsw i64 %48, %23
%50 = add nsw i64 %49, %30
%51 = getelementptr inbounds i32, i32* %5, i64 %50
%52 = load i32, i32* %51
%53 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %52)
%54 = add nuw nsw i64 %48, 1
%55 = icmp eq i64 %54, %26
br i1 %55, label %56, label %47
56: ; preds = %47, %34, %45
%57 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %31)
br i1 %22, label %60, label %58
58: ; preds = %56
%59 = tail call i32 @fputc(i32 10, i32* %10)
br label %80
60: ; preds = %56, %60
%61 = phi i64 [ %67, %60 ], [ 0, %56 ]
%62 = mul nsw i64 %61, %23
%63 = add nsw i64 %62, %30
%64 = getelementptr inbounds i32, i32* %7, i64 %63
%65 = load i32, i32* %64
%66 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %65)
%67 = add nuw nsw i64 %61, 1
%68 = icmp eq i64 %67, %27
br i1 %68, label %69, label %60
69: ; preds = %60
%70 = tail call i32 @fputc(i32 10, i32* %10)
br i1 %22, label %71, label %80
71: ; preds = %69, %71
%72 = phi i64 [ %78, %71 ], [ 0, %69 ]
%73 = mul nsw i64 %72, %23
%74 = add nsw i64 %73, %30
%75 = getelementptr inbounds i32, i32* %8, i64 %74
%76 = load i32, i32* %75
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %76)
%78 = add nuw nsw i64 %72, 1
%79 = icmp eq i64 %78, %28
br i1 %79, label %80, label %71
80: ; preds = %71, %58, %69
%81 = add nuw nsw i64 %30, 1
%82 = icmp eq i64 %81, %24
br i1 %82, label %83, label %29
83: ; preds = %80, %14
%84 = tail call i32 @fclose(i32* %10)
br label %85
85: ; preds = %83, %12
ret void
}