#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 scalar_t__ n;
typedef scalar_t__ m;
typedef size_t j;
typedef scalar_t__ *i;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void save_vtk(double *Q, double *x, double *y, int m, int n, char *file) {
  int i, j;
  FILE *fp = fopen(file, "w");
  fprintf(fp, "# vtk DataFile Version 2.0\n");
  fprintf(fp, "VTK\nASCII\nDATASET POLYDATA\n");
  fprintf(fp, "\nPOINTS %d double\n", m * n);
  for (j = 0; j < n; j++)
    for (i = 0; i < m; i++)
      fprintf(fp, "%e %e %e\n", x[i], y[j], Q[((j) + (n) * ((i) + (m) * (0)))]);
  fprintf(fp, "\nVERTICES %d %d\n", n, n * (m + 1));
  for (j = 0; j < n; j++) {
    fprintf(fp, "%d ", m);
    for (i = 0; i < m; i++)
      fprintf(fp, "%d ", i + j * m);
    fprintf(fp, "\n");
  }
  fprintf(fp, "POINT_DATA %d\nSCALARS height double 1\nLOOKUP_TABLE default\n",
          m * n);
  for (j = 0; j < n; j++)
    for (i = 0; i < m; i++)
      fprintf(fp, "%e\n", Q[((j) + (n) * ((i) + (m) * (0)))]);
  fclose(fp);
}


x86 assembly (clang, -O0):
<save_vtk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x1c(%rbp),%edx
imul   -0x20(%rbp),%edx
lea    0xea1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1235 <save_vtk+0x105>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1222 <save_vtk+0xf2>
mov    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x20(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   $0x0,-0x1c(%rbp),%r8d
add    %r8d,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
lea    0xe40(%rip),%rsi
mov    $0x3,%al
call   1040 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ba <save_vtk+0x8a>
jmp    1227 <save_vtk+0xf7>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a7 <save_vtk+0x77>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
imul   %eax,%ecx
lea    0xe08(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12dd <save_vtk+0x1ad>
mov    -0x38(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xdf1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12bd <save_vtk+0x18d>
mov    -0x38(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%eax
imul   -0x1c(%rbp),%eax
add    %eax,%edx
lea    0xdc0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1285 <save_vtk+0x155>
mov    -0x38(%rbp),%rdi
lea    0xd54(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    125d <save_vtk+0x12d>
mov    -0x38(%rbp),%rdi
mov    -0x1c(%rbp),%edx
imul   -0x20(%rbp),%edx
lea    0xd7d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1371 <save_vtk+0x241>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    135e <save_vtk+0x22e>
mov    -0x38(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x20(%rbp),%edx
mov    -0x2c(%rbp),%esi
imul   $0x0,-0x1c(%rbp),%r8d
add    %r8d,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd0a(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1310 <save_vtk+0x1e0>
jmp    1363 <save_vtk+0x233>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12fd <save_vtk+0x1cd>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_vtk>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8d,%ebx
mov    %ecx,%ebp
mov    %rdx,%r13
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xe8d(%rip),%rsi
mov    %r9,%rdi
call   1060 <fopen@plt>
mov    %rax,%r15
lea    0xe7d(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1070 <fwrite@plt>
lea    0xe80(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1070 <fwrite@plt>
mov    %ebx,%edx
imul   %ebp,%edx
lea    0xe7e(%rip),%rsi
mov    %r15,%rdi
mov    %edx,0x8(%rsp)
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %ebx,%ebx
mov    %r15,0x10(%rsp)
jle    1339 <save_vtk+0x1e9>
mov    %r12,0x40(%rsp)
mov    %r13,0x48(%rsp)
mov    %ebx,0xc(%rsp)
mov    %ebx,%eax
mov    %ebp,%ecx
mov    %rcx,0x38(%rsp)
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,8),%rax
xor    %ecx,%ecx
lea    0xe49(%rip),%r12
mov    %r14,0x28(%rsp)
mov    %r14,0x30(%rsp)
mov    %rbp,0x18(%rsp)
mov    %rax,0x50(%rsp)
mov    0x10(%rsp),%rbx
mov    0x48(%rsp),%r15
jmp    1246 <save_vtk+0xf6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rcx
addq   $0x8,0x30(%rsp)
cmp    0x20(%rsp),%rcx
mov    0x18(%rsp),%rbp
je     129f <save_vtk+0x14f>
test   %ebp,%ebp
mov    0x40(%rsp),%rsi
jle    1230 <save_vtk+0xe0>
mov    0x30(%rsp),%r13
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%r14,8),%xmm0
movsd  (%r15,%rcx,8),%xmm1
movsd  0x0(%r13),%xmm2
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%al
mov    %rcx,%rbp
call   1050 <fprintf@plt>
mov    0x40(%rsp),%rsi
mov    %rbp,%rcx
mov    0x50(%rsp),%rax
add    $0x1,%r14
add    %rax,%r13
cmp    %r14,0x38(%rsp)
jne    1260 <save_vtk+0x110>
jmp    1230 <save_vtk+0xe0>
lea    0x1(%rbp),%ecx
mov    0xc(%rsp),%ebx
imul   %ebx,%ecx
lea    0xda7(%rip),%rsi
mov    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %ebx,%ebx
jle    1354 <save_vtk+0x204>
lea    0xd98(%rip),%r12
xor    %r13d,%r13d
xor    %r14d,%r14d
jmp    1302 <save_vtk+0x1b2>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %r15,%rsi
call   1040 <fputc@plt>
add    $0x1,%r14d
mov    0x18(%rsp),%rbp
add    %ebp,%r13d
mov    0xc(%rsp),%ebx
cmp    %ebx,%r14d
je     136e <save_vtk+0x21e>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %ebp,%ebp
jle    12e0 <save_vtk+0x190>
mov    %r13d,%ebp
mov    0x18(%rsp),%rax
mov    %eax,%ebx
nop
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
jne    1320 <save_vtk+0x1d0>
jmp    12e0 <save_vtk+0x190>
add    $0x1,%ebp
imul   %ebx,%ebp
lea    0xd11(%rip),%rsi
mov    %r15,%rdi
mov    %ebx,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xd11(%rip),%rsi
mov    %r15,%rdi
mov    0x8(%rsp),%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    13fc <save_vtk+0x2ac>
lea    0xcf7(%rip),%rsi
mov    %r15,%rdi
mov    0x8(%rsp),%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %ebx,%ebx
jle    13fc <save_vtk+0x2ac>
mov    0x20(%rsp),%rax
lea    0x0(,%rax,8),%r12
xor    %r15d,%r15d
lea    0xcb5(%rip),%r14
mov    0x10(%rsp),%r13
jmp    13c6 <save_vtk+0x276>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r15
addq   $0x8,0x28(%rsp)
cmp    0x20(%rsp),%r15
mov    0x18(%rsp),%rbp
je     13fc <save_vtk+0x2ac>
test   %ebp,%ebp
jle    13b0 <save_vtk+0x260>
mov    0x38(%rsp),%rbp
mov    0x28(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx),%xmm0
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
add    %r12,%rbx
add    $0xffffffffffffffff,%rbp
jne    13e0 <save_vtk+0x290>
jmp    13b0 <save_vtk+0x260>
mov    0x10(%rsp),%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [28 x i8] c"# vtk DataFile Version 2.0\0A\00"
@.str.2 = [28 x i8] c"VTK\0AASCII\0ADATASET POLYDATA\0A\00"
@.str.3 = [19 x i8] c"\0APOINTS %d double\0A\00"
@.str.4 = [10 x i8] c"%e %e %e\0A\00"
@.str.5 = [17 x i8] c"\0AVERTICES %d %d\0A\00"
@.str.6 = [4 x i8] c"%d \00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [60 x i8] c"POINT_DATA %d\0ASCALARS height double 1\0ALOOKUP_TABLE default\0A\00"
@.str.9 = [4 x i8] c"%e\0A\00"
define void @save_vtk(double* %0, double* %1, double* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32*
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%16 = load i8*, i8** %12
%17 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %17, i32** %15
%18 = load i32*, i32** %15
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32*, i32** %15
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32*, i32** %15
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = mul nsw i32 %23, %24
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %25)
store i32 0, i32* %14
br label %27
27: ; preds = %65, %6
%28 = load i32, i32* %14
%29 = load i32, i32* %11
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %68
31: ; preds = %27
store i32 0, i32* %13
br label %32
32: ; preds = %61, %31
%33 = load i32, i32* %13
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %64
36: ; preds = %32
%37 = load i32*, i32** %15
%38 = load double*, double** %8
%39 = load i32, i32* %13
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
%42 = load double, double* %41
%43 = load double*, double** %9
%44 = load i32, i32* %14
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %43, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %7
%49 = load i32, i32* %14
%50 = load i32, i32* %11
%51 = load i32, i32* %13
%52 = load i32, i32* %10
%53 = mul nsw i32 %52, 0
%54 = add nsw i32 %51, %53
%55 = mul nsw i32 %50, %54
%56 = add nsw i32 %49, %55
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %48, i64 %57
%59 = load double, double* %58
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %42, double %47, double %59)
br label %61
61: ; preds = %36
%62 = load i32, i32* %13
%63 = add nsw i32 %62, 1
store i32 %63, i32* %13
br label %32
64: ; preds = %32
br label %65
65: ; preds = %64
%66 = load i32, i32* %14
%67 = add nsw i32 %66, 1
store i32 %67, i32* %14
br label %27
68: ; preds = %27
%69 = load i32*, i32** %15
%70 = load i32, i32* %11
%71 = load i32, i32* %11
%72 = load i32, i32* %10
%73 = add nsw i32 %72, 1
%74 = mul nsw i32 %71, %73
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %70, i32 %74)
store i32 0, i32* %14
br label %76
76: ; preds = %102, %68
%77 = load i32, i32* %14
%78 = load i32, i32* %11
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %105
80: ; preds = %76
%81 = load i32*, i32** %15
%82 = load i32, i32* %10
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %82)
store i32 0, i32* %13
br label %84
84: ; preds = %96, %80
%85 = load i32, i32* %13
%86 = load i32, i32* %10
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %99
88: ; preds = %84
%89 = load i32*, i32** %15
%90 = load i32, i32* %13
%91 = load i32, i32* %14
%92 = load i32, i32* %10
%93 = mul nsw i32 %91, %92
%94 = add nsw i32 %90, %93
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %88
%97 = load i32, i32* %13
%98 = add nsw i32 %97, 1
store i32 %98, i32* %13
br label %84
99: ; preds = %84
%100 = load i32*, i32** %15
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %102
102: ; preds = %99
%103 = load i32, i32* %14
%104 = add nsw i32 %103, 1
store i32 %104, i32* %14
br label %76
105: ; preds = %76
%106 = load i32*, i32** %15
%107 = load i32, i32* %10
%108 = load i32, i32* %11
%109 = mul nsw i32 %107, %108
%110 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0), i32 %109)
store i32 0, i32* %14
br label %111
111: ; preds = %139, %105
%112 = load i32, i32* %14
%113 = load i32, i32* %11
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %142
115: ; preds = %111
store i32 0, i32* %13
br label %116
116: ; preds = %135, %115
%117 = load i32, i32* %13
%118 = load i32, i32* %10
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %138
120: ; preds = %116
%121 = load i32*, i32** %15
%122 = load double*, double** %7
%123 = load i32, i32* %14
%124 = load i32, i32* %11
%125 = load i32, i32* %13
%126 = load i32, i32* %10
%127 = mul nsw i32 %126, 0
%128 = add nsw i32 %125, %127
%129 = mul nsw i32 %124, %128
%130 = add nsw i32 %123, %129
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %122, i64 %131
%133 = load double, double* %132
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %121, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double %133)
br label %135
135: ; preds = %120
%136 = load i32, i32* %13
%137 = add nsw i32 %136, 1
store i32 %137, i32* %13
br label %116
138: ; preds = %116
br label %139
139: ; preds = %138
%140 = load i32, i32* %14
%141 = add nsw i32 %140, 1
store i32 %141, i32* %14
br label %111
142: ; preds = %111
%143 = load i32*, i32** %15
%144 = call i32 @fclose(i32* %143)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [28 x i8] c"# vtk DataFile Version 2.0\0A\00"
@.str.2 = [28 x i8] c"VTK\0AASCII\0ADATASET POLYDATA\0A\00"
@.str.3 = [19 x i8] c"\0APOINTS %d double\0A\00"
@.str.4 = [10 x i8] c"%e %e %e\0A\00"
@.str.5 = [17 x i8] c"\0AVERTICES %d %d\0A\00"
@.str.6 = [4 x i8] c"%d \00"
@.str.8 = [60 x i8] c"POINT_DATA %d\0ASCALARS height double 1\0ALOOKUP_TABLE default\0A\00"
@.str.9 = [4 x i8] c"%e\0A\00"
define void @save_vtk(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3, i32 %4, i8* nocapture %5) {
%7 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i64 27, i64 1, i32* %7)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 27, i64 1, i32* %7)
%10 = mul nsw i32 %4, %3
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = icmp sgt i32 %4, 0
br i1 %12, label %17, label %13
13: ; preds = %6
%14 = add nsw i32 %3, 1
%15 = mul nsw i32 %14, %4
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %4, i32 %15)
br label %62
17: ; preds = %6
%18 = icmp sgt i32 %3, 0
%19 = zext i32 %4 to i64
%20 = zext i32 %4 to i64
%21 = zext i32 %3 to i64
br label %22
22: ; preds = %17, %38
%23 = phi i64 [ 0, %17 ], [ %39, %38 ]
br i1 %18, label %24, label %38
24: ; preds = %22
%25 = getelementptr inbounds double, double* %2, i64 %23
br label %26
26: ; preds = %24, %26
%27 = phi i64 [ 0, %24 ], [ %36, %26 ]
%28 = getelementptr inbounds double, double* %1, i64 %27
%29 = load double, double* %28
%30 = load double, double* %25
%31 = mul nsw i64 %27, %19
%32 = add nuw nsw i64 %31, %23
%33 = getelementptr inbounds double, double* %0, i64 %32
%34 = load double, double* %33
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %29, double %30, double %34)
%36 = add nuw nsw i64 %27, 1
%37 = icmp eq i64 %36, %21
br i1 %37, label %38, label %26
38: ; preds = %26, %22
%39 = add nuw nsw i64 %23, 1
%40 = icmp eq i64 %39, %20
br i1 %40, label %41, label %22
41: ; preds = %38
%42 = add nsw i32 %3, 1
%43 = mul nsw i32 %42, %4
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %4, i32 %43)
br i1 %12, label %45, label %62
45: ; preds = %41
%46 = icmp sgt i32 %3, 0
br label %47
47: ; preds = %45, %58
%48 = phi i32 [ 0, %45 ], [ %60, %58 ]
%49 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %3)
br i1 %46, label %50, label %58
50: ; preds = %47
%51 = mul nsw i32 %48, %3
br label %52
52: ; preds = %50, %52
%53 = phi i32 [ 0, %50 ], [ %56, %52 ]
%54 = add nsw i32 %53, %51
%55 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %54)
%56 = add nuw nsw i32 %53, 1
%57 = icmp eq i32 %56, %3
br i1 %57, label %58, label %52
58: ; preds = %52, %47
%59 = tail call i32 @fputc(i32 10, i32* %7)
%60 = add nuw nsw i32 %48, 1
%61 = icmp eq i32 %60, %4
br i1 %61, label %64, label %47
62: ; preds = %13, %41
%63 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0), i32 %10)
br label %85
64: ; preds = %58
%65 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0), i32 %10)
br i1 %12, label %66, label %85
66: ; preds = %64
%67 = icmp sgt i32 %3, 0
%68 = zext i32 %4 to i64
%69 = zext i32 %4 to i64
%70 = zext i32 %3 to i64
br label %71
71: ; preds = %66, %82
%72 = phi i64 [ 0, %66 ], [ %83, %82 ]
br i1 %67, label %73, label %82
73: ; preds = %71, %73
%74 = phi i64 [ %80, %73 ], [ 0, %71 ]
%75 = mul nsw i64 %74, %68
%76 = add nuw nsw i64 %75, %72
%77 = getelementptr inbounds double, double* %0, i64 %76
%78 = load double, double* %77
%79 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double %78)
%80 = add nuw nsw i64 %74, 1
%81 = icmp eq i64 %80, %70
br i1 %81, label %82, label %73
82: ; preds = %73, %71
%83 = add nuw nsw i64 %72, 1
%84 = icmp eq i64 %83, %69
br i1 %84, label %85, label %71
85: ; preds = %82, %62, %64
%86 = tail call i32 @fclose(i32* %7)
ret void
}