#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 */

/* Variables and functions */
double DBL_MIN;
int calculate_output(double aux_real[1000], double aux_img[1000],
                     double matrice_real[1000][1000],
                     double matrice_img[1000][1000], double snapshot_real[1000],
                     double snapshot_img[1000]) {
  int i, j, t;
  double val, t_val;
  int t1, t2, t3, t4;
  int lb, ub, lbp, ubp, lb2, ub2;
  register int lbv, ubv;
  lbp = 0;
  ubp = 1000 - 1;
#pragma omp parallel for private(lbv, ubv, t3, t4)
  for (t2 = lbp; t2 <= ubp; t2++) {
    aux_real[t2] = 0;
    ;
  }
  if (1000 >= 1) {
    lbp = 0;
    ubp = 1000 - 1;
#pragma omp parallel for private(lbv, ubv, t3, t4)
    for (t2 = lbp; t2 <= ubp; t2++) {
      for (t3 = 0; t3 <= 1000 - 1; t3++) {
        aux_real[t2] += snapshot_real[t3] * matrice_real[t2][t3] -
                        snapshot_img[t3] * matrice_img[t2][t3];
        ;
      }
    }
  }
  lbp = 0;
  ubp = 1000 - 1;
#pragma omp parallel for private(lbv, ubv, t3, t4)
  for (t2 = lbp; t2 <= ubp; t2++) {
    aux_img[t2] = 0;
    ;
  }
  if (1000 >= 1) {
    lbp = 0;
    ubp = 1000 - 1;
#pragma omp parallel for private(lbv, ubv, t3, t4)
    for (t2 = lbp; t2 <= ubp; t2++) {
      for (t3 = 0; t3 <= 1000 - 1; t3++) {
        aux_img[t2] += snapshot_img[t3] * matrice_real[t2][t3] +
                       snapshot_real[t3] * matrice_img[t2][t3];
        ;
      }
    }
  }
  t_val = DBL_MIN;
  ;
  t = 0;
  ;
  for (t2 = 0; t2 <= 1000 - 1; t2++) {
    val = aux_real[t2] * aux_real[t2] + aux_img[t2] * aux_img[t2];
    ;
    t = (val >= t_val) ? (t_val = val, t2) : t;
    ;
  }
  return t;
}


x86 assembly (clang, -O0):
<calculate_output>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x3e7,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x70(%rbp),%eax
jg     115b <calculate_output+0x5b>
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1131 <calculate_output+0x31>
movl   $0x0,-0x6c(%rbp)
movl   $0x3e7,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x70(%rbp),%eax
jg     1231 <calculate_output+0x131>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x3e7,-0x5c(%rbp)
jg     121e <calculate_output+0x11e>
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x58(%rbp),%rcx
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x58(%rbp),%rcx
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1182 <calculate_output+0x82>
jmp    1223 <calculate_output+0x123>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    116f <calculate_output+0x6f>
movl   $0x0,-0x6c(%rbp)
movl   $0x3e7,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x70(%rbp),%eax
jg     126f <calculate_output+0x16f>
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1245 <calculate_output+0x145>
movl   $0x0,-0x6c(%rbp)
movl   $0x3e7,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x70(%rbp),%eax
jg     132e <calculate_output+0x22e>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x3e7,-0x5c(%rbp)
jg     131b <calculate_output+0x21b>
mov    -0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x58(%rbp),%rcx
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x58(%rbp),%rcx
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x5c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1296 <calculate_output+0x196>
jmp    1320 <calculate_output+0x220>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1283 <calculate_output+0x183>
mov    0x2cab(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x58(%rbp)
cmpl   $0x3e7,-0x58(%rbp)
jg     13e2 <calculate_output+0x2e2>
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jb     13c2 <calculate_output+0x2c2>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x84(%rbp)
jmp    13cb <calculate_output+0x2cb>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    134c <calculate_output+0x24c>
mov    -0x3c(%rbp),%eax
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_output>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r12
mov    %r8,%rbx
mov    %rcx,%r13
mov    %rdx,%r15
mov    %rsi,0x10(%rsp)
mov    %rdi,%r14
xor    %ebp,%ebp
mov    $0x1f40,%edx
xor    %esi,%esi
call   1030 <memset@plt>
xorpd  %xmm0,%xmm0
mov    %r15,%rax
mov    %r13,%rcx
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rcx,%rdx,8),%xmm1
mulsd  (%r12,%rdx,8),%xmm1
movsd  (%rbx,%rdx,8),%xmm2
mulsd  (%rax,%rdx,8),%xmm2
subsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rdx
cmp    $0x3e8,%rdx
jne    1160 <calculate_output+0x50>
add    $0x1,%rbp
cmp    $0x3e8,%rbp
je     11b2 <calculate_output+0xa2>
movsd  (%r14,%rbp,8),%xmm0
add    $0x1f40,%rcx
add    $0x1f40,%rax
jmp    1150 <calculate_output+0x40>
mov    %r14,0x8(%rsp)
xor    %r14d,%r14d
mov    $0x1f40,%edx
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%r12,%rax,8),%xmm1
movsd  -0x8(%rbx,%rax,8),%xmm2
mulsd  -0x8(%r13,%rax,8),%xmm2
mulsd  -0x8(%r15,%rax,8),%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%r14,8)
movsd  (%rbx,%rax,8),%xmm2
mulsd  0x0(%r13,%rax,8),%xmm2
movsd  (%r12,%rax,8),%xmm0
mulsd  (%r15,%rax,8),%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%rbp,%r14,8)
add    $0x2,%rax
cmp    $0x3e9,%rax
jne    11f0 <calculate_output+0xe0>
add    $0x1,%r14
cmp    $0x3e8,%r14
je     1274 <calculate_output+0x164>
movsd  0x0(%rbp,%r14,8),%xmm0
add    $0x1f40,%r15
add    $0x1f40,%r13
jmp    11e0 <calculate_output+0xd0>
mov    0x2d65(%rip),%rax
movsd  (%rax),%xmm0
xor    %ecx,%ecx
xor    %eax,%eax
mov    0x8(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rcx,8),%xmm1
movsd  0x8(%rbp,%rcx,8),%xmm2
mulsd  %xmm1,%xmm1
movsd  (%rsi,%rcx,8),%xmm3
movsd  0x8(%rsi,%rcx,8),%xmm4
mulsd  %xmm3,%xmm3
addsd  %xmm1,%xmm3
ucomisd %xmm0,%xmm3
movapd %xmm0,%xmm1
cmpnlesd %xmm3,%xmm1
movapd %xmm1,%xmm5
andnpd %xmm3,%xmm5
andpd  %xmm0,%xmm1
orpd   %xmm5,%xmm1
mov    %eax,%edx
cmovae %ecx,%edx
mulsd  %xmm2,%xmm2
mulsd  %xmm4,%xmm4
addsd  %xmm2,%xmm4
lea    0x1(%rcx),%eax
ucomisd %xmm1,%xmm4
movapd %xmm1,%xmm0
cmpnlesd %xmm4,%xmm0
movapd %xmm0,%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm4,%xmm0
orpd   %xmm2,%xmm0
cmovb  %edx,%eax
add    $0x2,%rcx
cmp    $0x3e8,%rcx
jne    1290 <calculate_output+0x180>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@DBL_MIN = global double 0.000000e+00
define i32 @calculate_output(double* %0, double* %1, [1000 x double]* %2, [1000 x double]* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca [1000 x double]*
%10 = alloca [1000 x double]*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store double* %0, double** %7
store double* %1, double** %8
store [1000 x double]* %2, [1000 x double]** %9
store [1000 x double]* %3, [1000 x double]** %10
store double* %4, double** %11
store double* %5, double** %12
store i32 0, i32* %24
store i32 999, i32* %25
%30 = load i32, i32* %24
store i32 %30, i32* %19
br label %31
31: ; preds = %40, %6
%32 = load i32, i32* %19
%33 = load i32, i32* %25
%34 = icmp sle i32 %32, %33
br i1 %34, label %35, label %43
35: ; preds = %31
%36 = load double*, double** %7
%37 = load i32, i32* %19
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
store double 0.000000e+00, double* %39
br label %40
40: ; preds = %35
%41 = load i32, i32* %19
%42 = add nsw i32 %41, 1
store i32 %42, i32* %19
br label %31
43: ; preds = %31
store i32 0, i32* %24
store i32 999, i32* %25
%44 = load i32, i32* %24
store i32 %44, i32* %19
br label %45
45: ; preds = %93, %43
%46 = load i32, i32* %19
%47 = load i32, i32* %25
%48 = icmp sle i32 %46, %47
br i1 %48, label %49, label %96
49: ; preds = %45
store i32 0, i32* %20
br label %50
50: ; preds = %89, %49
%51 = load i32, i32* %20
%52 = icmp sle i32 %51, 999
br i1 %52, label %53, label %92
53: ; preds = %50
%54 = load double*, double** %11
%55 = load i32, i32* %20
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
%58 = load double, double* %57
%59 = load [1000 x double]*, [1000 x double]** %9
%60 = load i32, i32* %19
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [1000 x double], [1000 x double]* %59, i64 %61
%63 = load i32, i32* %20
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [1000 x double], [1000 x double]* %62, i64 0, i64 %64
%66 = load double, double* %65
%67 = load double*, double** %12
%68 = load i32, i32* %20
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = load [1000 x double]*, [1000 x double]** %10
%73 = load i32, i32* %19
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [1000 x double], [1000 x double]* %72, i64 %74
%76 = load i32, i32* %20
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [1000 x double], [1000 x double]* %75, i64 0, i64 %77
%79 = load double, double* %78
%80 = fmul double %71, %79
%81 = fneg double %80
%82 = call double @llvm.fmuladd.f64(double %58, double %66, double %81)
%83 = load double*, double** %7
%84 = load i32, i32* %19
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
%87 = load double, double* %86
%88 = fadd double %87, %82
store double %88, double* %86
br label %89
89: ; preds = %53
%90 = load i32, i32* %20
%91 = add nsw i32 %90, 1
store i32 %91, i32* %20
br label %50
92: ; preds = %50
br label %93
93: ; preds = %92
%94 = load i32, i32* %19
%95 = add nsw i32 %94, 1
store i32 %95, i32* %19
br label %45
96: ; preds = %45
store i32 0, i32* %24
store i32 999, i32* %25
%97 = load i32, i32* %24
store i32 %97, i32* %19
br label %98
98: ; preds = %107, %96
%99 = load i32, i32* %19
%100 = load i32, i32* %25
%101 = icmp sle i32 %99, %100
br i1 %101, label %102, label %110
102: ; preds = %98
%103 = load double*, double** %8
%104 = load i32, i32* %19
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
store double 0.000000e+00, double* %106
br label %107
107: ; preds = %102
%108 = load i32, i32* %19
%109 = add nsw i32 %108, 1
store i32 %109, i32* %19
br label %98
110: ; preds = %98
store i32 0, i32* %24
store i32 999, i32* %25
%111 = load i32, i32* %24
store i32 %111, i32* %19
br label %112
112: ; preds = %159, %110
%113 = load i32, i32* %19
%114 = load i32, i32* %25
%115 = icmp sle i32 %113, %114
br i1 %115, label %116, label %162
116: ; preds = %112
store i32 0, i32* %20
br label %117
117: ; preds = %155, %116
%118 = load i32, i32* %20
%119 = icmp sle i32 %118, 999
br i1 %119, label %120, label %158
120: ; preds = %117
%121 = load double*, double** %12
%122 = load i32, i32* %20
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = load [1000 x double]*, [1000 x double]** %9
%127 = load i32, i32* %19
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [1000 x double], [1000 x double]* %126, i64 %128
%130 = load i32, i32* %20
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [1000 x double], [1000 x double]* %129, i64 0, i64 %131
%133 = load double, double* %132
%134 = load double*, double** %11
%135 = load i32, i32* %20
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %134, i64 %136
%138 = load double, double* %137
%139 = load [1000 x double]*, [1000 x double]** %10
%140 = load i32, i32* %19
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [1000 x double], [1000 x double]* %139, i64 %141
%143 = load i32, i32* %20
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [1000 x double], [1000 x double]* %142, i64 0, i64 %144
%146 = load double, double* %145
%147 = fmul double %138, %146
%148 = call double @llvm.fmuladd.f64(double %125, double %133, double %147)
%149 = load double*, double** %8
%150 = load i32, i32* %19
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %149, i64 %151
%153 = load double, double* %152
%154 = fadd double %153, %148
store double %154, double* %152
br label %155
155: ; preds = %120
%156 = load i32, i32* %20
%157 = add nsw i32 %156, 1
store i32 %157, i32* %20
br label %117
158: ; preds = %117
br label %159
159: ; preds = %158
%160 = load i32, i32* %19
%161 = add nsw i32 %160, 1
store i32 %161, i32* %19
br label %112
162: ; preds = %112
%163 = load double, double* @DBL_MIN
store double %163, double* %17
store i32 0, i32* %15
store i32 0, i32* %19
br label %164
164: ; preds = %200, %162
%165 = load i32, i32* %19
%166 = icmp sle i32 %165, 999
br i1 %166, label %167, label %203
167: ; preds = %164
%168 = load double*, double** %7
%169 = load i32, i32* %19
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %168, i64 %170
%172 = load double, double* %171
%173 = load double*, double** %7
%174 = load i32, i32* %19
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %173, i64 %175
%177 = load double, double* %176
%178 = load double*, double** %8
%179 = load i32, i32* %19
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
%182 = load double, double* %181
%183 = load double*, double** %8
%184 = load i32, i32* %19
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
%187 = load double, double* %186
%188 = fmul double %182, %187
%189 = call double @llvm.fmuladd.f64(double %172, double %177, double %188)
store double %189, double* %16
%190 = load double, double* %16
%191 = load double, double* %17
%192 = fcmp oge double %190, %191
br i1 %192, label %193, label %196
193: ; preds = %167
%194 = load double, double* %16
store double %194, double* %17
%195 = load i32, i32* %19
br label %198
196: ; preds = %167
%197 = load i32, i32* %15
br label %198
198: ; preds = %196, %193
%199 = phi i32 [ %195, %193 ], [ %197, %196 ]
store i32 %199, i32* %15
br label %200
200: ; preds = %198
%201 = load i32, i32* %19
%202 = add nsw i32 %201, 1
store i32 %202, i32* %19
br label %164
203: ; preds = %164
%204 = load i32, i32* %15
ret i32 %204
}

LLVM IR (-O2):
@DBL_MIN = global double 0.000000e+00
define i32 @calculate_output(double* nocapture %0, double* nocapture %1, [1000 x double]* nocapture %2, [1000 x double]* nocapture %3, double* nocapture %4, double* nocapture %5) {
%7 = bitcast double* %0 to i8*
%8 = bitcast double* %1 to i8*
br label %9
9: ; preds = %33, %6
%10 = phi double [ 0.000000e+00, %6 ], [ %35, %33 ]
%11 = phi i64 [ 0, %6 ], [ %31, %33 ]
%12 = getelementptr inbounds double, double* %0, i64 %11
br label %13
13: ; preds = %9, %13
%14 = phi double [ %10, %9 ], [ %27, %13 ]
%15 = phi i64 [ 0, %9 ], [ %28, %13 ]
%16 = getelementptr inbounds double, double* %4, i64 %15
%17 = load double, double* %16
%18 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 %11, i64 %15
%19 = load double, double* %18
%20 = getelementptr inbounds double, double* %5, i64 %15
%21 = load double, double* %20
%22 = getelementptr inbounds [1000 x double], [1000 x double]* %3, i64 %11, i64 %15
%23 = load double, double* %22
%24 = fneg double %21
%25 = fmul double %23, %24
%26 = tail call double @llvm.fmuladd.f64(double %17, double %19, double %25)
%27 = fadd double %14, %26
store double %27, double* %12
%28 = add nuw nsw i64 %15, 1
%29 = icmp eq i64 %28, 1000
br i1 %29, label %30, label %13
30: ; preds = %13
%31 = add nuw nsw i64 %11, 1
%32 = icmp eq i64 %31, 1000
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = getelementptr inbounds double, double* %0, i64 %31
%35 = load double, double* %34
br label %9
36: ; preds = %30
br label %37
37: ; preds = %72, %36
%38 = phi double [ 0.000000e+00, %36 ], [ %74, %72 ]
%39 = phi i64 [ 0, %36 ], [ %70, %72 ]
%40 = getelementptr inbounds double, double* %1, i64 %39
br label %41
41: ; preds = %41, %37
%42 = phi double [ %38, %37 ], [ %66, %41 ]
%43 = phi i64 [ 0, %37 ], [ %67, %41 ]
%44 = getelementptr inbounds double, double* %5, i64 %43
%45 = load double, double* %44
%46 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 %39, i64 %43
%47 = load double, double* %46
%48 = getelementptr inbounds double, double* %4, i64 %43
%49 = load double, double* %48
%50 = getelementptr inbounds [1000 x double], [1000 x double]* %3, i64 %39, i64 %43
%51 = load double, double* %50
%52 = fmul double %49, %51
%53 = tail call double @llvm.fmuladd.f64(double %45, double %47, double %52)
%54 = fadd double %42, %53
store double %54, double* %40
%55 = or i64 %43, 1
%56 = getelementptr inbounds double, double* %5, i64 %55
%57 = load double, double* %56
%58 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 %39, i64 %55
%59 = load double, double* %58
%60 = getelementptr inbounds double, double* %4, i64 %55
%61 = load double, double* %60
%62 = getelementptr inbounds [1000 x double], [1000 x double]* %3, i64 %39, i64 %55
%63 = load double, double* %62
%64 = fmul double %61, %63
%65 = tail call double @llvm.fmuladd.f64(double %57, double %59, double %64)
%66 = fadd double %54, %65
store double %66, double* %40
%67 = add nuw nsw i64 %43, 2
%68 = icmp eq i64 %67, 1000
br i1 %68, label %69, label %41
69: ; preds = %41
%70 = add nuw nsw i64 %39, 1
%71 = icmp eq i64 %70, 1000
br i1 %71, label %75, label %72
72: ; preds = %69
%73 = getelementptr inbounds double, double* %1, i64 %70
%74 = load double, double* %73
br label %37
75: ; preds = %69
%76 = load double, double* @DBL_MIN
br label %77
77: ; preds = %77, %75
%78 = phi i64 [ 0, %75 ], [ %102, %77 ]
%79 = phi i32 [ 0, %75 ], [ %101, %77 ]
%80 = phi double [ %76, %75 ], [ %99, %77 ]
%81 = getelementptr inbounds double, double* %0, i64 %78
%82 = load double, double* %81
%83 = getelementptr inbounds double, double* %1, i64 %78
%84 = load double, double* %83
%85 = fmul double %84, %84
%86 = tail call double @llvm.fmuladd.f64(double %82, double %82, double %85)
%87 = fcmp ult double %86, %80
%88 = select i1 %87, double %80, double %86
%89 = trunc i64 %78 to i32
%90 = select i1 %87, i32 %79, i32 %89
%91 = or i64 %78, 1
%92 = getelementptr inbounds double, double* %0, i64 %91
%93 = load double, double* %92
%94 = getelementptr inbounds double, double* %1, i64 %91
%95 = load double, double* %94
%96 = fmul double %95, %95
%97 = tail call double @llvm.fmuladd.f64(double %93, double %93, double %96)
%98 = fcmp ult double %97, %88
%99 = select i1 %98, double %88, double %97
%100 = trunc i64 %91 to i32
%101 = select i1 %98, i32 %90, i32 %100
%102 = add nuw nsw i64 %78, 2
%103 = icmp eq i64 %102, 1000
br i1 %103, label %104, label %77
104: ; preds = %77
ret i32 %101
}