#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 */
scalar_t__ EOF;
int calculateOutput(float *, float, float);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, float *, float *, int *);
int /*<<< orphan*/ printf(char *, ...);
float randomFloat();
double sqrt(float);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  srand(time(NULL));
  float x[208], y[208], weights[3], localError, globalError;
  int outputs[208], patternCount, i, p, iteration, output;
  FILE *fp;
  if ((fp = fopen("test1.txt", "r")) == NULL) {
    printf("Cannot open file.\n");
    exit(1);
  }
  i = 0;
  while (fscanf(fp, "%f %f %d", &x[i], &y[i], &outputs[i]) != EOF) {
    if (outputs[i] == 0) {
      outputs[i] = -1;
    }
    i++;
  }
  patternCount = i;
  weights[0] = randomFloat();
  weights[1] = randomFloat();
  weights[2] = randomFloat();
  iteration = 0;
  do {
    iteration++;
    globalError = 0;
    for (p = 0; p < patternCount; p++) {
      output = calculateOutput(weights, x[p], y[p]);
      localError = outputs[p] - output;
      weights[0] += 0.1 * localError * x[p];
      weights[1] += 0.1 * localError * y[p];
      weights[2] += 0.1 * localError;
      globalError += (localError * localError);
    }
    printf("Iteration %d : RMSE = %.4f\n", iteration,
           sqrt(globalError / patternCount));
  } while (globalError != 0 && iteration <= 100);
  printf("\nDecision boundary (line) equation: %.2f*x + %.2f*y + %.2f = 0\n",
         weights[0], weights[1], weights[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
lea    0xe48(%rip),%rdi
lea    0xe4b(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xa10(%rbp)
cmp    $0x0,%rax
jne    11f5 <main+0x65>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
movl   $0x0,-0x9f8(%rbp)
mov    -0xa10(%rbp),%rdi
movslq -0x9f8(%rbp),%rax
lea    -0x350(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
movslq -0x9f8(%rbp),%rax
lea    -0x690(%rbp),%rcx
shl    $0x2,%rax
add    %rax,%rcx
movslq -0x9f8(%rbp),%rax
lea    -0x9f0(%rbp),%r8
shl    $0x2,%rax
add    %rax,%r8
lea    0xddb(%rip),%rsi
call   1050 <fscanf@plt>
mov    0x2d90(%rip),%rcx
cmp    (%rcx),%rax
je     129c <main+0x10c>
movslq -0x9f8(%rbp),%rax
cmpl   $0x0,-0x9f0(%rbp,%rax,4)
jne    1288 <main+0xf8>
movslq -0x9f8(%rbp),%rax
movl   $0xffffffff,-0x9f0(%rbp,%rax,4)
ff ff ff ff
mov    -0x9f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9f8(%rbp)
jmp    11ff <main+0x6f>
mov    -0x9f8(%rbp),%eax
mov    %eax,-0x9f4(%rbp)
mov    $0x0,%al
call   1080 <randomFloat@plt>
movss  %xmm0,-0x69c(%rbp)
ff
mov    $0x0,%al
call   1080 <randomFloat@plt>
movss  %xmm0,-0x698(%rbp)
ff
mov    $0x0,%al
call   1080 <randomFloat@plt>
movss  %xmm0,-0x694(%rbp)
ff
movl   $0x0,-0xa00(%rbp)
mov    -0xa00(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa00(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6a4(%rbp)
ff
movl   $0x0,-0x9fc(%rbp)
mov    -0x9fc(%rbp),%eax
cmp    -0x9f4(%rbp),%eax
jge    146f <main+0x2df>
lea    -0x69c(%rbp),%rdi
movslq -0x9fc(%rbp),%rax
movss  -0x350(%rbp,%rax,4),%xmm0
ff ff
movslq -0x9fc(%rbp),%rax
movss  -0x690(%rbp,%rax,4),%xmm1
ff ff
call   1030 <calculateOutput@plt>
mov    %eax,-0xa04(%rbp)
movslq -0x9fc(%rbp),%rax
mov    -0x9f0(%rbp,%rax,4),%eax
sub    -0xa04(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x6a0(%rbp)
ff
movss  -0x6a0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xc85(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0x9fc(%rbp),%rax
movss  -0x350(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm2
movss  -0x69c(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x69c(%rbp)
ff
movss  -0x6a0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xc39(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0x9fc(%rbp),%rax
movss  -0x690(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm2
movss  -0x698(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x698(%rbp)
ff
movss  -0x6a0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x694(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movsd  0xbe1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x694(%rbp)
ff
movss  -0x6a0(%rbp),%xmm0
ff
movss  -0x6a0(%rbp),%xmm2
ff
movss  -0x6a4(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6a4(%rbp)
ff
mov    -0x9fc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9fc(%rbp)
jmp    1303 <main+0x173>
mov    -0xa00(%rbp),%eax
mov    %eax,-0xa14(%rbp)
movss  -0x6a4(%rbp),%xmm0
ff
cvtsi2ssl -0x9f4(%rbp),%xmm1
ff
divss  %xmm1,%xmm0
call   10a0 <sqrt@plt>
mov    -0xa14(%rbp),%esi
lea    0xb8f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x6a4(%rbp),%xmm0
ff
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xa15(%rbp)
jne    14cf <main+0x33f>
jp     14cf <main+0x33f>
jmp    14df <main+0x34f>
cmpl   $0x64,-0xa00(%rbp)
setle  %al
mov    %al,-0xa15(%rbp)
mov    -0xa15(%rbp),%al
test   $0x1,%al
jne    12df <main+0x14f>
movss  -0x69c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x698(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x694(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xb34(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9e8,%rsp
xor    %r13d,%r13d
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    0xe43(%rip),%rdi
lea    0xe46(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1433 <main+0x293>
mov    %rax,%r14
lea    0xe30(%rip),%rsi
lea    0x360(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x6a0(%rsp),%r8
mov    %rax,%rdi
call   1060 <fscanf@plt>
mov    0x2ddc(%rip),%rcx
cmp    (%rcx),%rax
jne    13c4 <main+0x224>
xor    %r12d,%r12d
xor    %eax,%eax
call   1090 <randomFloat@plt>
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1090 <randomFloat@plt>
movss  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1090 <randomFloat@plt>
movss  %xmm0,0x14(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
movss  %xmm0,0x1c(%rsp)
mov    %r13d,%ebp
lea    0xdca(%rip),%r14
lea    0xc(%rsp),%r13
nopl   0x0(%rax)
lea    0x1(%r12),%r15d
xorps  %xmm1,%xmm1
test   %rbp,%rbp
je     1345 <main+0x1a5>
xorps  %xmm1,%xmm1
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movss  %xmm1,0x18(%rsp)
movss  0x360(%rsp,%rbx,4),%xmm0
movss  0x20(%rsp,%rbx,4),%xmm1
mov    %r13,%rdi
call   1030 <calculateOutput@plt>
movsd  0xd5b(%rip),%xmm5
mov    0x6a0(%rsp,%rbx,4),%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  0x360(%rsp,%rbx,4),%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
cvtss2sd %xmm1,%xmm1
movss  0xc(%rsp),%xmm3
movss  0x10(%rsp),%xmm4
mulsd  %xmm5,%xmm2
cvtss2sd %xmm3,%xmm3
mulsd  %xmm2,%xmm1
movss  0x20(%rsp,%rbx,4),%xmm5
addsd  %xmm3,%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm5,%xmm3
cvtss2sd %xmm4,%xmm4
cvtsd2ss %xmm1,%xmm1
mulsd  %xmm2,%xmm3
addsd  %xmm4,%xmm3
cvtsd2ss %xmm3,%xmm3
movss  %xmm1,0xc(%rsp)
movss  %xmm3,0x10(%rsp)
movss  0x14(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x14(%rsp)
movss  0x18(%rsp),%xmm1
mulss  %xmm0,%xmm0
addss  %xmm0,%xmm1
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1280 <main+0xe0>
movss  %xmm1,0x18(%rsp)
movaps %xmm1,%xmm0
divss  0x1c(%rsp),%xmm0
call   10b0 <sqrt@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x18(%rsp),%xmm0
ucomiss 0xc95(%rip),%xmm0
jne    1377 <main+0x1d7>
jnp    1384 <main+0x1e4>
cmp    $0x64,%r12d
mov    %r15d,%r12d
jb     1260 <main+0xc0>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x14(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xc94(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x9e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x6a4(%rsp),%rbp
lea    0x24(%rsp),%r15
lea    0x364(%rsp),%rbx
xor    %r13d,%r13d
lea    0xc35(%rip),%r12
jmp    1424 <main+0x284>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %rbp,%r8
call   1060 <fscanf@plt>
add    $0x1,%r13d
add    $0x4,%rbp
add    $0x4,%r15
add    $0x4,%rbx
mov    0x2bcd(%rip),%rcx
cmp    (%rcx),%rax
je     1215 <main+0x75>
cmpl   $0x0,-0x4(%rbp)
jne    13f0 <main+0x250>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x250>
lea    0xc43(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"test1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [19 x i8] c"Cannot open file.\0A\00"
@.str.3 = [9 x i8] c"%f %f %d\00"
@EOF = global i64 0
@.str.4 = [28 x i8] c"Iteration %d : RMSE = %.4f\0A\00"
@.str.5 = [64 x i8] c"\0ADecision boundary (line) equation: %.2f*x + %.2f*y + %.2f = 0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [208 x float]
%7 = alloca [208 x float]
%8 = alloca [3 x float]
%9 = alloca float
%10 = alloca float
%11 = alloca [208 x i32]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = call i32 @time(i32* null)
%19 = call i32 @srand(i32 %18)
%20 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %17
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %25
22: ; preds = %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 @exit(i32 1)
unreachable
25: ; preds = %2
store i32 0, i32* %13
br label %26
26: ; preds = %50, %25
%27 = load i32*, i32** %17
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [208 x float], [208 x float]* %6, i64 0, i64 %29
%31 = load i32, i32* %13
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [208 x float], [208 x float]* %7, i64 0, i64 %32
%34 = load i32, i32* %13
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [208 x i32], [208 x i32]* %11, i64 0, i64 %35
%37 = call i64 @fscanf(i32* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float* %30, float* %33, i32* %36)
%38 = load i64, i64* @EOF
%39 = icmp ne i64 %37, %38
br i1 %39, label %40, label %53
40: ; preds = %26
%41 = load i32, i32* %13
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [208 x i32], [208 x i32]* %11, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %40
%47 = load i32, i32* %13
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [208 x i32], [208 x i32]* %11, i64 0, i64 %48
store i32 -1, i32* %49
br label %50
50: ; preds = %46, %40
%51 = load i32, i32* %13
%52 = add nsw i32 %51, 1
store i32 %52, i32* %13
br label %26
53: ; preds = %26
%54 = load i32, i32* %13
store i32 %54, i32* %12
%55 = call float (...) @randomFloat()
%56 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
store float %55, float* %56
%57 = call float (...) @randomFloat()
%58 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
store float %57, float* %58
%59 = call float (...) @randomFloat()
%60 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
store float %59, float* %60
store i32 0, i32* %15
br label %61
61: ; preds = %140, %53
%62 = load i32, i32* %15
%63 = add nsw i32 %62, 1
store i32 %63, i32* %15
store float 0.000000e+00, float* %10
store i32 0, i32* %14
br label %64
64: ; preds = %123, %61
%65 = load i32, i32* %14
%66 = load i32, i32* %12
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %126
68: ; preds = %64
%69 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%70 = load i32, i32* %14
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [208 x float], [208 x float]* %6, i64 0, i64 %71
%73 = load float, float* %72
%74 = load i32, i32* %14
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [208 x float], [208 x float]* %7, i64 0, i64 %75
%77 = load float, float* %76
%78 = call i32 @calculateOutput(float* %69, float %73, float %77)
store i32 %78, i32* %16
%79 = load i32, i32* %14
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [208 x i32], [208 x i32]* %11, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = load i32, i32* %16
%84 = sub nsw i32 %82, %83
%85 = sitofp i32 %84 to float
store float %85, float* %9
%86 = load float, float* %9
%87 = fpext float %86 to double
%88 = fmul double 1.000000e-01, %87
%89 = load i32, i32* %14
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [208 x float], [208 x float]* %6, i64 0, i64 %90
%92 = load float, float* %91
%93 = fpext float %92 to double
%94 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%95 = load float, float* %94
%96 = fpext float %95 to double
%97 = call double @llvm.fmuladd.f64(double %88, double %93, double %96)
%98 = fptrunc double %97 to float
store float %98, float* %94
%99 = load float, float* %9
%100 = fpext float %99 to double
%101 = fmul double 1.000000e-01, %100
%102 = load i32, i32* %14
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [208 x float], [208 x float]* %7, i64 0, i64 %103
%105 = load float, float* %104
%106 = fpext float %105 to double
%107 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
%108 = load float, float* %107
%109 = fpext float %108 to double
%110 = call double @llvm.fmuladd.f64(double %101, double %106, double %109)
%111 = fptrunc double %110 to float
store float %111, float* %107
%112 = load float, float* %9
%113 = fpext float %112 to double
%114 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
%115 = load float, float* %114
%116 = fpext float %115 to double
%117 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %113, double %116)
%118 = fptrunc double %117 to float
store float %118, float* %114
%119 = load float, float* %9
%120 = load float, float* %9
%121 = load float, float* %10
%122 = call float @llvm.fmuladd.f32(float %119, float %120, float %121)
store float %122, float* %10
br label %123
123: ; preds = %68
%124 = load i32, i32* %14
%125 = add nsw i32 %124, 1
store i32 %125, i32* %14
br label %64
126: ; preds = %64
%127 = load i32, i32* %15
%128 = load float, float* %10
%129 = load i32, i32* %12
%130 = sitofp i32 %129 to float
%131 = fdiv float %128, %130
%132 = call double @sqrt(float %131)
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %127, double %132)
br label %134
134: ; preds = %126
%135 = load float, float* %10
%136 = fcmp une float %135, 0.000000e+00
br i1 %136, label %137, label %140
137: ; preds = %134
%138 = load i32, i32* %15
%139 = icmp sle i32 %138, 100
br label %140
140: ; preds = %137, %134
%141 = phi i1 [ false, %134 ], [ %139, %137 ]
br i1 %141, label %61, label %142
142: ; preds = %140
%143 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%144 = load float, float* %143
%145 = fpext float %144 to double
%146 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
%147 = load float, float* %146
%148 = fpext float %147 to double
%149 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
%150 = load float, float* %149
%151 = fpext float %150 to double
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), double %145, double %148, double %151)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"test1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [9 x i8] c"%f %f %d\00"
@EOF = global i64 0
@.str.4 = [28 x i8] c"Iteration %d : RMSE = %.4f\0A\00"
@.str.5 = [64 x i8] c"\0ADecision boundary (line) equation: %.2f*x + %.2f*y + %.2f = 0\0A\00"
@str = [18 x i8] c"Cannot open file.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [208 x float]
%4 = alloca [208 x float]
%5 = alloca [3 x float]
%6 = alloca [208 x i32]
%7 = tail call i32 @time(i32* null)
%8 = tail call i32 @srand(i32 %7)
%9 = bitcast [208 x float]* %3 to i8*
%10 = bitcast [208 x float]* %4 to i8*
%11 = bitcast [3 x float]* %5 to i8*
%12 = bitcast [208 x i32]* %6 to i8*
%13 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %22, label %15
15: ; preds = %2
%16 = getelementptr inbounds [208 x float], [208 x float]* %3, i64 0, i64 0
%17 = getelementptr inbounds [208 x float], [208 x float]* %4, i64 0, i64 0
%18 = getelementptr inbounds [208 x i32], [208 x i32]* %6, i64 0, i64 0
%19 = call i64 @fscanf(i32* %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float* %16, float* %17, i32* %18)
%20 = load i64, i64* @EOF
%21 = icmp eq i64 %19, %20
br i1 %21, label %41, label %25
22: ; preds = %2
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%24 = tail call i32 @exit(i32 1)
unreachable
25: ; preds = %15, %31
%26 = phi i64 [ %32, %31 ], [ 0, %15 ]
%27 = phi i32* [ %35, %31 ], [ %18, %15 ]
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %25
store i32 -1, i32* %27
br label %31
31: ; preds = %30, %25
%32 = add nuw i64 %26, 1
%33 = getelementptr inbounds [208 x float], [208 x float]* %3, i64 0, i64 %32
%34 = getelementptr inbounds [208 x float], [208 x float]* %4, i64 0, i64 %32
%35 = getelementptr inbounds [208 x i32], [208 x i32]* %6, i64 0, i64 %32
%36 = call i64 @fscanf(i32* %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float* %33, float* %34, i32* %35)
%37 = load i64, i64* @EOF
%38 = icmp eq i64 %36, %37
br i1 %38, label %39, label %25
39: ; preds = %31
%40 = trunc i64 %32 to i32
br label %41
41: ; preds = %39, %15
%42 = phi i32 [ 0, %15 ], [ %40, %39 ]
%43 = call float (...) @randomFloat()
%44 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
store float %43, float* %44
%45 = call float (...) @randomFloat()
%46 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
store float %45, float* %46
%47 = call float (...) @randomFloat()
%48 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
store float %47, float* %48
%49 = icmp eq i32 %42, 0
%50 = sitofp i32 %42 to float
%51 = zext i32 %42 to i64
br label %52
52: ; preds = %88, %41
%53 = phi i32 [ 0, %41 ], [ %54, %88 ]
%54 = add nuw nsw i32 %53, 1
br i1 %49, label %88, label %55
55: ; preds = %52, %55
%56 = phi i64 [ %86, %55 ], [ 0, %52 ]
%57 = phi float [ %85, %55 ], [ 0.000000e+00, %52 ]
%58 = getelementptr inbounds [208 x float], [208 x float]* %3, i64 0, i64 %56
%59 = load float, float* %58
%60 = getelementptr inbounds [208 x float], [208 x float]* %4, i64 0, i64 %56
%61 = load float, float* %60
%62 = call i32 @calculateOutput(float* %44, float %59, float %61)
%63 = getelementptr inbounds [208 x i32], [208 x i32]* %6, i64 0, i64 %56
%64 = load i32, i32* %63
%65 = sub nsw i32 %64, %62
%66 = sitofp i32 %65 to float
%67 = fpext float %66 to double
%68 = fmul double %67, 1.000000e-01
%69 = load float, float* %58
%70 = fpext float %69 to double
%71 = load float, float* %44
%72 = fpext float %71 to double
%73 = call double @llvm.fmuladd.f64(double %68, double %70, double %72)
%74 = fptrunc double %73 to float
store float %74, float* %44
%75 = load float, float* %60
%76 = fpext float %75 to double
%77 = load float, float* %46
%78 = fpext float %77 to double
%79 = call double @llvm.fmuladd.f64(double %68, double %76, double %78)
%80 = fptrunc double %79 to float
store float %80, float* %46
%81 = load float, float* %48
%82 = fpext float %81 to double
%83 = call double @llvm.fmuladd.f64(double %67, double 1.000000e-01, double %82)
%84 = fptrunc double %83 to float
store float %84, float* %48
%85 = call float @llvm.fmuladd.f32(float %66, float %66, float %57)
%86 = add nuw nsw i64 %56, 1
%87 = icmp eq i64 %86, %51
br i1 %87, label %88, label %55
88: ; preds = %55, %52
%89 = phi float [ 0.000000e+00, %52 ], [ %85, %55 ]
%90 = fdiv float %89, %50
%91 = call double @sqrt(float %90)
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %54, double %91)
%93 = fcmp une float %89, 0.000000e+00
%94 = icmp ult i32 %53, 100
%95 = select i1 %93, i1 %94, i1 false
br i1 %95, label %52, label %96
96: ; preds = %88
%97 = load float, float* %44
%98 = fpext float %97 to double
%99 = load float, float* %46
%100 = fpext float %99 to double
%101 = load float, float* %48
%102 = fpext float %101 to double
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), double %98, double %100, double %102)
ret i32 0
}