#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*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int main() {
  FILE *f_in;
  FILE *f_out;
  f_in = fopen("in_lab5_9.txt", "rt");
  f_out = fopen("out_lab5_9.txt", "wt");
  int n;
  fscanf(f_in, "%d", &n);
  if (n > 20) {
    fprintf(f_out, "Necorectni dani!");
    return 0;
  }
  float x, a[n][n];
  fscanf(f_in, "%f", &x);
  float s = 0, power = 1;
  for (int i = 0; i < n; i++) {
    power *= x;
    for (int j = 0; j < n; j++)
      fscanf(f_in, "%f", &a[i][j]);
  }
  for (int i = 0; i < n; i++) {
    int c = 1;
    power /= x;
    for (int j = 0; j < n; j++)
      if (a[i][j] > 0) {
        s += a[i][j] * power;
        c = 0;
        j = n;
      }
    if (c == 1)
      s += power;
  }
  fprintf(f_out, "Result: %.*f", 2, s);
  fclose(f_out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeae(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xea8(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe9f(%rip),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
cmpl   $0x14,-0x1c(%rbp)
jle    11bb <main+0x7b>
mov    -0x18(%rbp),%rdi
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d1 <main+0x291>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x28(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x60(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe3a(%rip),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xde4(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12ab <main+0x16b>
movss  -0x20(%rbp),%xmm0
mulss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1298 <main+0x158>
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x10(%rbp),%rdi
movslq -0x44(%rbp),%rax
imul   %rcx,%rax
shl    $0x2,%rax
add    %rax,%rdx
movslq -0x48(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xdb8(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    124a <main+0x10a>
jmp    129d <main+0x15d>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1228 <main+0xe8>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    139a <main+0x25a>
movl   $0x1,-0x50(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x40(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    136e <main+0x22e>
mov    -0x60(%rbp),%rax
mov    -0x68(%rbp),%rdx
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    135b <main+0x21b>
mov    -0x60(%rbp),%rax
mov    -0x68(%rbp),%rdx
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  -0x40(%rbp),%xmm2
movss  -0x3c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    1360 <main+0x220>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12df <main+0x19f>
cmpl   $0x1,-0x50(%rbp)
jne    1387 <main+0x247>
movss  -0x40(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
jmp    138c <main+0x24c>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12b2 <main+0x172>
mov    -0x18(%rbp),%rdi
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc90(%rip),%rsi
mov    $0x2,%edx
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xea0(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r12
lea    0xe9b(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
lea    0xe97(%rip),%rsi
lea    -0x2c(%rbp),%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
mov    -0x2c(%rbp),%r13d
cmp    $0x15,%r13d
jl     11ca <main+0x7a>
lea    0xe7b(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1070 <fwrite@plt>
jmp    138f <main+0x23f>
mov    %rsp,%r15
mov    %r13,%rax
imul   %r13,%rax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xe4f(%rip),%rsi
lea    -0x30(%rbp),%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
mov    -0x2c(%rbp),%eax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
test   %eax,%eax
jle    1369 <main+0x219>
mov    %r15,-0x58(%rbp)
mov    %r14,-0x60(%rbp)
mov    %r13,-0x50(%rbp)
lea    0x0(,%r13,4),%rcx
mov    %rcx,-0x68(%rbp)
movss  0xdcf(%rip),%xmm5
lea    0xe07(%rip),%r15
mov    %rbx,-0x48(%rbp)
xor    %r13d,%r13d
jmp    1260 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq %eax,%rcx
add    $0x1,%r13
add    -0x68(%rbp),%rbx
cmp    %rcx,%r13
jge    12ac <main+0x15c>
mulss  -0x30(%rbp),%xmm5
test   %eax,%eax
jle    1250 <main+0x100>
movss  %xmm5,-0x34(%rbp)
mov    %rbx,-0x70(%rbp)
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
add    $0x1,%r14
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r14
jl     1280 <main+0x130>
movss  -0x34(%rbp),%xmm5
mov    -0x70(%rbp),%rbx
jmp    1250 <main+0x100>
test   %eax,%eax
mov    -0x60(%rbp),%r14
mov    -0x58(%rbp),%r15
jle    1369 <main+0x219>
movss  -0x30(%rbp),%xmm0
mov    %eax,%r8d
xorps  %xmm1,%xmm1
xor    %edx,%edx
movss  0xd33(%rip),%xmm2
xor    %r9d,%r9d
xorps  %xmm3,%xmm3
mov    -0x50(%rbp),%r10
mov    -0x48(%rbp),%r11
jmp    12fd <main+0x1ad>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addss  %xmm4,%xmm3
add    $0x1,%r9
cmp    %r8,%r9
je     135d <main+0x20d>
divss  %xmm0,%xmm5
mov    %r9,%rcx
imul   %r10,%rcx
lea    (%r11,%rcx,4),%rbx
mov    $0x1,%edi
xor    %ecx,%ecx
jmp    132d <main+0x1dd>
cs nopw 0x0(%rax,%rax,1)
nop
cmova  %edx,%edi
cmova  %eax,%ecx
add    $0x1,%ecx
cmp    %eax,%ecx
jge    1350 <main+0x200>
movslq %ecx,%rsi
movss  (%rbx,%rsi,4),%xmm4
ucomiss %xmm1,%xmm4
jbe    1320 <main+0x1d0>
mulss  %xmm5,%xmm4
addss  %xmm4,%xmm3
jmp    1320 <main+0x1d0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movaps %xmm5,%xmm4
cmp    $0x1,%edi
je     12f0 <main+0x1a0>
movaps %xmm2,%xmm4
jmp    12f0 <main+0x1a0>
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    0xcd2(%rip),%rsi
mov    %r14,%rdi
mov    $0x2,%edx
movsd  -0x40(%rbp),%xmm0
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"in_lab5_9.txt\00"
@.str.1 = [3 x i8] c"rt\00"
@.str.2 = [15 x i8] c"out_lab5_9.txt\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [17 x i8] c"Necorectni dani!\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [13 x i8] c"Result: %.*f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca float
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %1
%16 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %16, i32** %2
%17 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %17, i32** %3
%18 = load i32*, i32** %2
%19 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 20
br i1 %21, label %22, label %25
22: ; preds = %0
%23 = load i32*, i32** %3
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %1
br label %123
25: ; preds = %0
%26 = load i32, i32* %4
%27 = zext i32 %26 to i64
%28 = load i32, i32* %4
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %6
%31 = mul nuw i64 %27, %29
%32 = alloca float, i64 %31
store i64 %27, i64* %7
store i64 %29, i64* %8
%33 = load i32*, i32** %2
%34 = call i32 (i32*, i8*, ...) @fscanf(i32* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %5)
store float 0.000000e+00, float* %9
store float 1.000000e+00, float* %10
store i32 0, i32* %11
br label %35
35: ; preds = %61, %25
%36 = load i32, i32* %11
%37 = load i32, i32* %4
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %64
39: ; preds = %35
%40 = load float, float* %5
%41 = load float, float* %10
%42 = fmul float %41, %40
store float %42, float* %10
store i32 0, i32* %12
br label %43
43: ; preds = %57, %39
%44 = load i32, i32* %12
%45 = load i32, i32* %4
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %60
47: ; preds = %43
%48 = load i32*, i32** %2
%49 = load i32, i32* %11
%50 = sext i32 %49 to i64
%51 = mul nsw i64 %50, %29
%52 = getelementptr inbounds float, float* %32, i64 %51
%53 = load i32, i32* %12
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds float, float* %52, i64 %54
%56 = call i32 (i32*, i8*, ...) @fscanf(i32* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %55)
br label %57
57: ; preds = %47
%58 = load i32, i32* %12
%59 = add nsw i32 %58, 1
store i32 %59, i32* %12
br label %43
60: ; preds = %43
br label %61
61: ; preds = %60
%62 = load i32, i32* %11
%63 = add nsw i32 %62, 1
store i32 %63, i32* %11
br label %35
64: ; preds = %35
store i32 0, i32* %13
br label %65
65: ; preds = %112, %64
%66 = load i32, i32* %13
%67 = load i32, i32* %4
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %115
69: ; preds = %65
store i32 1, i32* %14
%70 = load float, float* %5
%71 = load float, float* %10
%72 = fdiv float %71, %70
store float %72, float* %10
store i32 0, i32* %15
br label %73
73: ; preds = %101, %69
%74 = load i32, i32* %15
%75 = load i32, i32* %4
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %104
77: ; preds = %73
%78 = load i32, i32* %13
%79 = sext i32 %78 to i64
%80 = mul nsw i64 %79, %29
%81 = getelementptr inbounds float, float* %32, i64 %80
%82 = load i32, i32* %15
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds float, float* %81, i64 %83
%85 = load float, float* %84
%86 = fcmp ogt float %85, 0.000000e+00
br i1 %86, label %87, label %100
87: ; preds = %77
%88 = load i32, i32* %13
%89 = sext i32 %88 to i64
%90 = mul nsw i64 %89, %29
%91 = getelementptr inbounds float, float* %32, i64 %90
%92 = load i32, i32* %15
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds float, float* %91, i64 %93
%95 = load float, float* %94
%96 = load float, float* %10
%97 = load float, float* %9
%98 = call float @llvm.fmuladd.f32(float %95, float %96, float %97)
store float %98, float* %9
store i32 0, i32* %14
%99 = load i32, i32* %4
store i32 %99, i32* %15
br label %100
100: ; preds = %87, %77
br label %101
101: ; preds = %100
%102 = load i32, i32* %15
%103 = add nsw i32 %102, 1
store i32 %103, i32* %15
br label %73
104: ; preds = %73
%105 = load i32, i32* %14
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %111
107: ; preds = %104
%108 = load float, float* %10
%109 = load float, float* %9
%110 = fadd float %109, %108
store float %110, float* %9
br label %111
111: ; preds = %107, %104
br label %112
112: ; preds = %111
%113 = load i32, i32* %13
%114 = add nsw i32 %113, 1
store i32 %114, i32* %13
br label %65
115: ; preds = %65
%116 = load i32*, i32** %3
%117 = load float, float* %9
%118 = fpext float %117 to double
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 2, double %118)
%120 = load i32*, i32** %3
%121 = call i32 @fclose(i32* %120)
store i32 0, i32* %1
%122 = load i8*, i8** %6
br label %123
123: ; preds = %115, %22
%124 = load i32, i32* %1
ret i32 %124
}

LLVM IR (-O2):
@.str = [14 x i8] c"in_lab5_9.txt\00"
@.str.1 = [3 x i8] c"rt\00"
@.str.2 = [15 x i8] c"out_lab5_9.txt\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [17 x i8] c"Necorectni dani!\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [13 x i8] c"Result: %.*f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
%6 = call i32 (i32*, i8*, ...) @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 20
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i64 16, i64 1, i32* %4)
br label %81
11: ; preds = %0
%12 = bitcast float* %2 to i8*
%13 = zext i32 %7 to i64
%14 = call i8* @llvm.stacksave()
%15 = mul nuw i64 %13, %13
%16 = alloca float, i64 %15
%17 = call i32 (i32*, i8*, ...) @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %2)
%18 = load i32, i32* %1
%19 = icmp sgt i32 %18, 0
br i1 %19, label %25, label %50
20: ; preds = %35
%21 = icmp sgt i32 %36, 0
br i1 %21, label %22, label %50
22: ; preds = %20
%23 = load float, float* %2
%24 = zext i32 %36 to i64
br label %54
25: ; preds = %11, %35
%26 = phi i32 [ %36, %35 ], [ %18, %11 ]
%27 = phi i64 [ %38, %35 ], [ 0, %11 ]
%28 = phi float [ %30, %35 ], [ 1.000000e+00, %11 ]
%29 = load float, float* %2
%30 = fmul float %28, %29
%31 = icmp sgt i32 %26, 0
br i1 %31, label %32, label %35
32: ; preds = %25
%33 = mul nuw nsw i64 %27, %13
%34 = getelementptr inbounds float, float* %16, i64 %33
br label %40
35: ; preds = %40, %25
%36 = phi i32 [ %26, %25 ], [ %45, %40 ]
%37 = sext i32 %36 to i64
%38 = add nuw nsw i64 %27, 1
%39 = icmp slt i64 %38, %37
br i1 %39, label %25, label %20
40: ; preds = %32, %40
%41 = phi i64 [ 0, %32 ], [ %44, %40 ]
%42 = getelementptr inbounds float, float* %34, i64 %41
%43 = call i32 (i32*, i8*, ...) @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %42)
%44 = add nuw nsw i64 %41, 1
%45 = load i32, i32* %1
%46 = sext i32 %45 to i64
%47 = icmp slt i64 %44, %46
br i1 %47, label %40, label %35
48: ; preds = %61
%49 = fpext float %64 to double
br label %50
50: ; preds = %11, %48, %20
%51 = phi double [ 0.000000e+00, %20 ], [ %49, %48 ], [ 0.000000e+00, %11 ]
%52 = call i32 (i32*, i8*, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 2, double %51)
%53 = call i32 @fclose(i32* %4)
br label %81
54: ; preds = %61, %22
%55 = phi i64 [ 0, %22 ], [ %65, %61 ]
%56 = phi float [ %30, %22 ], [ %58, %61 ]
%57 = phi float [ 0.000000e+00, %22 ], [ %64, %61 ]
%58 = fdiv float %56, %23
%59 = mul nuw nsw i64 %55, %13
%60 = getelementptr inbounds float, float* %16, i64 %59
br label %67
61: ; preds = %67
%62 = icmp eq i32 %77, 1
%63 = select i1 %62, float %58, float -0.000000e+00
%64 = fadd float %76, %63
%65 = add nuw nsw i64 %55, 1
%66 = icmp eq i64 %65, %24
br i1 %66, label %48, label %54
67: ; preds = %54, %67
%68 = phi i32 [ 0, %54 ], [ %79, %67 ]
%69 = phi i32 [ 1, %54 ], [ %77, %67 ]
%70 = phi float [ %57, %54 ], [ %76, %67 ]
%71 = sext i32 %68 to i64
%72 = getelementptr inbounds float, float* %60, i64 %71
%73 = load float, float* %72
%74 = fcmp ogt float %73, 0.000000e+00
%75 = call float @llvm.fmuladd.f32(float %73, float %58, float %70)
%76 = select i1 %74, float %75, float %70
%77 = select i1 %74, i32 0, i32 %69
%78 = select i1 %74, i32 %36, i32 %68
%79 = add nsw i32 %78, 1
%80 = icmp slt i32 %79, %36
br i1 %80, label %67, label %61
81: ; preds = %50, %9
ret i32 0
}