#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__ clock_t;

/* Variables and functions */
float CLOCKS_PER_SEC;
int atoi(char *);
scalar_t__ clock();
int /*<<< orphan*/ free_2d(float **);
int /*<<< orphan*/ init(float **, int, int);
float **malloc_2d(int, int);
int /*<<< orphan*/ printf(char *, float, float, ...);
int /*<<< orphan*/ update(float **, float **, float *, int, int);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  float eps;
  float **u, **unew;
  float norm = 0e0, mlups = 0e0;
  int maxiter, nx, ny, iter, ndef = 2400;
  clock_t t_start, t_end;
  float dt;
  eps = 0.5e-3;
  maxiter = (int)(1e0 / eps);
  switch (argc) {
  case 1:
    nx = ndef;
    ny = nx;
    break;
  case 2:
    nx = atoi(argv[1]);
    ny = nx;
    break;
  case 3:
    nx = atoi(argv[1]);
    ny = atoi(argv[2]);
    break;
  default:
    usage(argv[0]);
    return -1;
  }
  printf("Stencil: nx,ny,maxiter,eps=%d %d %d %18.16f\n", nx, ny, maxiter, eps);
  u = malloc_2d(nx + 2, ny + 2);
  unew = malloc_2d(nx + 2, ny + 2);
  init(u, nx, ny);
  init(unew, nx, ny);
  t_start = clock();
  norm = eps + 1;
  iter = 0;
  while (iter <= maxiter && norm >= eps) {
    update(unew, u, NULL, nx, ny);
    update(u, unew, &norm, nx, ny);
    iter = iter + 2;
    if (iter % 100 == 0 || norm < eps) {
      printf(": norm, eps= %18.16f %18.16f\n", norm, eps);
    }
  }
  free_2d(u);
  free_2d(unew);
  mlups = 1.0e-6 * iter * nx * ny;
  t_end = clock();
  dt = ((float)(t_end - t_start)) / CLOCKS_PER_SEC;
  printf("'Stencil: norm =%18.16f with iter = %d\n", norm, iter);
  printf("'Stencil: Time =%18.16f sec, MLups/s=%18.16f\n", dt,
         (float)mlups / dt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x960,-0x44(%rbp)
movl   $0x3a03126f,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe3d(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
sub    $0x1,%eax
je     1204 <main+0x84>
jmp    11e2 <main+0x62>
mov    -0x60(%rbp),%eax
sub    $0x2,%eax
je     1215 <main+0x95>
jmp    11f3 <main+0x73>
mov    -0x60(%rbp),%eax
sub    $0x3,%eax
je     1230 <main+0xb0>
jmp    1255 <main+0xd5>
mov    -0x44(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    126d <main+0xed>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    126d <main+0xed>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x3c(%rbp)
jmp    126d <main+0xed>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    144c <main+0x2cc>
cvtsi2ssl -0x38(%rbp),%xmm0
cvtsi2ssl -0x3c(%rbp),%xmm1
mov    -0x34(%rbp),%esi
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd8a(%rip),%rdi
mov    $0x3,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%edi
add    $0x2,%edi
mov    -0x3c(%rbp),%esi
add    $0x2,%esi
call   1040 <malloc_2d@plt>
mov    %rax,-0x20(%rbp)
mov    -0x38(%rbp),%edi
add    $0x2,%edi
mov    -0x3c(%rbp),%esi
add    $0x2,%esi
call   1040 <malloc_2d@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1070 <init@plt>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1070 <init@plt>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x50(%rbp)
movss  0xd24(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%ecx
xor    %eax,%eax
cmp    -0x34(%rbp),%ecx
mov    %al,-0x61(%rbp)
jg     131d <main+0x19d>
movss  -0x2c(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
setae  %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    132d <main+0x1ad>
jmp    13aa <main+0x22a>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edx
call   1030 <update@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
lea    -0x2c(%rbp),%rdx
call   1030 <update@plt>
mov    -0x40(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     138d <main+0x20d>
movss  -0x2c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    13a5 <main+0x225>
movss  -0x2c(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xca3(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    12fd <main+0x17d>
mov    -0x20(%rbp),%rdi
call   1080 <free_2d@plt>
mov    -0x28(%rbp),%rdi
call   1080 <free_2d@plt>
cvtsi2sdl -0x40(%rbp),%xmm1
movsd  0xc3f(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
sub    -0x50(%rbp),%rax
cvtsi2ss %rax,%xmm0
mov    0x2be1(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtsi2ssl -0x40(%rbp),%xmm1
lea    0xc3e(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movss  -0x5c(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
divss  -0x5c(%rbp),%xmm1
lea    0xc49(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x1,%edi
je     11b5 <main+0x35>
mov    %rsi,%rbx
cmp    $0x3,%edi
je     11c3 <main+0x43>
cmp    $0x2,%edi
jne    13ce <main+0x24e>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
mov    %eax,%r12d
jmp    11db <main+0x5b>
mov    $0x960,%r14d
mov    $0x960,%r12d
jmp    11db <main+0x5b>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r12d
mov    0x10(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
cvtsi2ss %r12d,%xmm0
cvtsi2ss %r14d,%xmm1
lea    0xe28(%rip),%rdi
movsd  0xe0c(%rip),%xmm2
mov    $0x7cf,%esi
mov    $0x3,%al
call   1060 <printf@plt>
lea    0x2(%r12),%r15d
lea    0x2(%r14),%ebp
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <malloc_2d@plt>
mov    %rax,%rbx
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <malloc_2d@plt>
mov    %rax,%rbp
mov    %rbx,0x20(%rsp)
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %r14d,%edx
call   1070 <init@plt>
mov    %rbp,0x18(%rsp)
mov    %rbp,%rdi
mov    %r12,0x28(%rsp)
mov    %r12d,%esi
mov    %r14,0x8(%rsp)
mov    %r14d,%edx
call   1070 <init@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,0x30(%rsp)
movl   $0x3f801062,0x4(%rsp)
3f
mov    $0x2,%r12w
mov    0x18(%rsp),%r13
mov    0x20(%rsp),%r15
mov    0x8(%rsp),%rbp
nopl   (%rax)
mov    %rbx,0x10(%rsp)
movzwl %r12w,%eax
shr    $0x2,%eax
imul   $0x147b,%eax,%eax
shr    $0x11,%eax
imul   $0x64,%eax,%r14d
mov    %r13,%rdi
mov    %r15,%rsi
xor    %edx,%edx
mov    0x28(%rsp),%rbx
mov    %ebx,%ecx
mov    %ebp,%r8d
call   1030 <update@plt>
mov    %r15,%rdi
mov    %r13,%rsi
lea    0x4(%rsp),%rdx
mov    %ebx,%ecx
mov    0x10(%rsp),%rbx
mov    %ebp,%r8d
call   1030 <update@plt>
add    $0xfffffffe,%r14d
movss  0x4(%rsp),%xmm0
cmp    %bx,%r14w
je     12e7 <main+0x167>
movss  0xd2e(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1303 <main+0x183>
lea    0xd53(%rip),%rdi
movss  0xd1a(%rip),%xmm1
mov    $0x2,%al
call   1060 <printf@plt>
movss  0x4(%rsp),%xmm0
lea    0x2(%rbx),%r14d
cmp    $0x7cd,%ebx
ja     1323 <main+0x1a3>
add    $0x2,%r12d
ucomiss 0xcf6(%rip),%xmm0
mov    %r14d,%ebx
jae    1280 <main+0x100>
mov    0x20(%rsp),%rdi
call   1080 <free_2d@plt>
mov    0x18(%rsp),%rdi
call   1080 <free_2d@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xcc1(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x28(%rsp),%xmm1
cvtsi2sdl 0x8(%rsp),%xmm2
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0x10(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clock@plt>
sub    0x30(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2c60(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %r14d,%xmm1
lea    0xcb8(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
movss  0x10(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
divss  %xmm0,%xmm1
lea    0xcc2(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
jmp    13db <main+0x25b>
mov    (%rbx),%rdi
call   1090 <usage@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Stencil: nx,ny,maxiter,eps=%d %d %d %18.16f\0A\00"
@.str.1 = [30 x i8] c": norm, eps= %18.16f %18.16f\0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
@.str.2 = [40 x i8] c"'Stencil: norm =%18.16f with iter = %d\0A\00"
@.str.3 = [46 x i8] c"'Stencil: Time =%18.16f sec, MLups/s=%18.16f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float**
%8 = alloca float**
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i64
%17 = alloca i64
%18 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %9
store float 0.000000e+00, float* %10
store i32 2400, i32* %15
store float 0x3F40624DE0000000, float* %6
%19 = load float, float* %6
%20 = fpext float %19 to double
%21 = fdiv double 1.000000e+00, %20
%22 = fptosi double %21 to i32
store i32 %22, i32* %11
%23 = load i32, i32* %4
switch i32 %23, label %42 [
i32 1, label %24
i32 2, label %27
i32 3, label %33
]
24: ; preds = %2
%25 = load i32, i32* %15
store i32 %25, i32* %12
%26 = load i32, i32* %12
store i32 %26, i32* %13
br label %47
27: ; preds = %2
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 @atoi(i8* %30)
store i32 %31, i32* %12
%32 = load i32, i32* %12
store i32 %32, i32* %13
br label %47
33: ; preds = %2
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %12
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @atoi(i8* %40)
store i32 %41, i32* %13
br label %47
42: ; preds = %2
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 0
%45 = load i8*, i8** %44
%46 = call i32 @usage(i8* %45)
store i32 -1, i32* %3
br label %143
47: ; preds = %33, %27, %24
%48 = load i32, i32* %12
%49 = sitofp i32 %48 to float
%50 = load i32, i32* %13
%51 = sitofp i32 %50 to float
%52 = load i32, i32* %11
%53 = load float, float* %6
%54 = fpext float %53 to double
%55 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), float %49, float %51, i32 %52, double %54)
%56 = load i32, i32* %12
%57 = add nsw i32 %56, 2
%58 = load i32, i32* %13
%59 = add nsw i32 %58, 2
%60 = call float** @malloc_2d(i32 %57, i32 %59)
store float** %60, float*** %7
%61 = load i32, i32* %12
%62 = add nsw i32 %61, 2
%63 = load i32, i32* %13
%64 = add nsw i32 %63, 2
%65 = call float** @malloc_2d(i32 %62, i32 %64)
store float** %65, float*** %8
%66 = load float**, float*** %7
%67 = load i32, i32* %12
%68 = load i32, i32* %13
%69 = call i32 @init(float** %66, i32 %67, i32 %68)
%70 = load float**, float*** %8
%71 = load i32, i32* %12
%72 = load i32, i32* %13
%73 = call i32 @init(float** %70, i32 %71, i32 %72)
%74 = call i64 (...) @clock()
store i64 %74, i64* %16
%75 = load float, float* %6
%76 = fadd float %75, 1.000000e+00
store float %76, float* %9
store i32 0, i32* %14
br label %77
77: ; preds = %111, %47
%78 = load i32, i32* %14
%79 = load i32, i32* %11
%80 = icmp sle i32 %78, %79
br i1 %80, label %81, label %85
81: ; preds = %77
%82 = load float, float* %9
%83 = load float, float* %6
%84 = fcmp oge float %82, %83
br label %85
85: ; preds = %81, %77
%86 = phi i1 [ false, %77 ], [ %84, %81 ]
br i1 %86, label %87, label %112
87: ; preds = %85
%88 = load float**, float*** %8
%89 = load float**, float*** %7
%90 = load i32, i32* %12
%91 = load i32, i32* %13
%92 = call i32 @update(float** %88, float** %89, float* null, i32 %90, i32 %91)
%93 = load float**, float*** %7
%94 = load float**, float*** %8
%95 = load i32, i32* %12
%96 = load i32, i32* %13
%97 = call i32 @update(float** %93, float** %94, float* %9, i32 %95, i32 %96)
%98 = load i32, i32* %14
%99 = add nsw i32 %98, 2
store i32 %99, i32* %14
%100 = load i32, i32* %14
%101 = srem i32 %100, 100
%102 = icmp eq i32 %101, 0
br i1 %102, label %107, label %103
103: ; preds = %87
%104 = load float, float* %9
%105 = load float, float* %6
%106 = fcmp olt float %104, %105
br i1 %106, label %107, label %111
107: ; preds = %103, %87
%108 = load float, float* %9
%109 = load float, float* %6
%110 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), float %108, float %109)
br label %111
111: ; preds = %107, %103
br label %77
112: ; preds = %85
%113 = load float**, float*** %7
%114 = call i32 @free_2d(float** %113)
%115 = load float**, float*** %8
%116 = call i32 @free_2d(float** %115)
%117 = load i32, i32* %14
%118 = sitofp i32 %117 to double
%119 = fmul double 0x3EB0C6F7A0B5ED8D, %118
%120 = load i32, i32* %12
%121 = sitofp i32 %120 to double
%122 = fmul double %119, %121
%123 = load i32, i32* %13
%124 = sitofp i32 %123 to double
%125 = fmul double %122, %124
%126 = fptrunc double %125 to float
store float %126, float* %10
%127 = call i64 (...) @clock()
store i64 %127, i64* %17
%128 = load i64, i64* %17
%129 = load i64, i64* %16
%130 = sub nsw i64 %128, %129
%131 = sitofp i64 %130 to float
%132 = load float, float* @CLOCKS_PER_SEC
%133 = fdiv float %131, %132
store float %133, float* %18
%134 = load float, float* %9
%135 = load i32, i32* %14
%136 = sitofp i32 %135 to float
%137 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), float %134, float %136)
%138 = load float, float* %18
%139 = load float, float* %10
%140 = load float, float* %18
%141 = fdiv float %139, %140
%142 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), float %138, float %141)
store i32 0, i32* %3
br label %143
143: ; preds = %112, %42
%144 = load i32, i32* %3
ret i32 %144
}

LLVM IR (-O2):
@.str = [45 x i8] c"Stencil: nx,ny,maxiter,eps=%d %d %d %18.16f\0A\00"
@.str.1 = [30 x i8] c": norm, eps= %18.16f %18.16f\0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
@.str.2 = [40 x i8] c"'Stencil: norm =%18.16f with iter = %d\0A\00"
@.str.3 = [46 x i8] c"'Stencil: Time =%18.16f sec, MLups/s=%18.16f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
switch i32 %0, label %16 [
i32 1, label %19
i32 2, label %5
i32 3, label %9
]
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
br label %19
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
br label %19
16: ; preds = %2
%17 = load i8*, i8** %1
%18 = tail call i32 @usage(i8* %17)
br label %71
19: ; preds = %5, %9, %2
%20 = phi i32 [ %15, %9 ], [ %8, %5 ], [ 2400, %2 ]
%21 = phi i32 [ %12, %9 ], [ %8, %5 ], [ 2400, %2 ]
%22 = sitofp i32 %21 to float
%23 = sitofp i32 %20 to float
%24 = tail call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), float %22, float %23, i32 1999, double 0x3F40624DE0000000)
%25 = add nsw i32 %21, 2
%26 = add nsw i32 %20, 2
%27 = tail call float** @malloc_2d(i32 %25, i32 %26)
%28 = tail call float** @malloc_2d(i32 %25, i32 %26)
%29 = tail call i32 @init(float** %27, i32 %21, i32 %20)
%30 = tail call i32 @init(float** %28, i32 %21, i32 %20)
%31 = tail call i64 (...) @clock()
store float 0x3FF0020C40000000, float* %3
br label %32
32: ; preds = %19, %46
%33 = phi i32 [ %36, %46 ], [ 0, %19 ]
%34 = call i32 @update(float** %28, float** %27, float* null, i32 %21, i32 %20)
%35 = call i32 @update(float** %27, float** %28, float* %3, i32 %21, i32 %20)
%36 = add nuw nsw i32 %33, 2
%37 = trunc i32 %36 to i16
%38 = urem i16 %37, 100
%39 = icmp eq i16 %38, 0
%40 = load float, float* %3
%41 = fcmp olt float %40, 0x3F40624DE0000000
%42 = select i1 %39, i1 true, i1 %41
br i1 %42, label %43, label %46
43: ; preds = %32
%44 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), float %40, float 0x3F40624DE0000000)
%45 = load float, float* %3
br label %46
46: ; preds = %32, %43
%47 = phi float [ %40, %32 ], [ %45, %43 ]
%48 = icmp ult i32 %33, 1998
%49 = fcmp oge float %47, 0x3F40624DE0000000
%50 = select i1 %48, i1 %49, i1 false
br i1 %50, label %32, label %51
51: ; preds = %46
%52 = call i32 @free_2d(float** %27)
%53 = call i32 @free_2d(float** %28)
%54 = sitofp i32 %36 to double
%55 = fmul double %54, 0x3EB0C6F7A0B5ED8D
%56 = sitofp i32 %21 to double
%57 = fmul double %55, %56
%58 = sitofp i32 %20 to double
%59 = fmul double %57, %58
%60 = fptrunc double %59 to float
%61 = call i64 (...) @clock()
%62 = sub nsw i64 %61, %31
%63 = sitofp i64 %62 to float
%64 = load float, float* @CLOCKS_PER_SEC
%65 = fdiv float %63, %64
%66 = load float, float* %3
%67 = sitofp i32 %36 to float
%68 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), float %66, float %67)
%69 = fdiv float %60, %65
%70 = call i32 (i8*, float, float, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), float %65, float %69)
br label %71
71: ; preds = %51, %16
%72 = phi i32 [ -1, %16 ], [ 0, %51 ]
ret i32 %72
}