#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 */
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
void squared_distance_matrix(const double *X, const double *Y, const double *g,
                             int m, int n, int d, double *dist) {
  int i, c, r, p, k;
  double *temp, *dist_ij;
  temp = (double *)malloc(d * sizeof(double));
  dist_ij = (double *)malloc(d * sizeof(double));
  for (i = 0, r = 0; r < m; ++r) {
    for (c = 0; c < n; ++c, ++i) {
      for (p = 0; p < d; ++p) {
        temp[p] = 0;
      }
      for (p = 0; p < d; ++p) {
        dist_ij[p] = Y[c * d + p] - X[r * d + p];
        for (k = 0; k < d; ++k) {
          temp[k] += dist_ij[p] * g[p * d + k];
        }
      }
      for (p = 0; p < d; ++p) {
        dist[i] += temp[p] * dist_ij[p];
      }
    }
  }
  free(dist_ij);
  free(temp);
}


x86 assembly (clang, -O0):
<squared_distance_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1308 <squared_distance_matrix+0x1e8>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12f5 <squared_distance_matrix+0x1d5>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11c7 <squared_distance_matrix+0xa7>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    119d <squared_distance_matrix+0x7d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1284 <squared_distance_matrix+0x164>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1271 <squared_distance_matrix+0x151>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    121a <squared_distance_matrix+0xfa>
jmp    1276 <squared_distance_matrix+0x156>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11ce <squared_distance_matrix+0xae>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12d9 <squared_distance_matrix+0x1b9>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    128b <squared_distance_matrix+0x16b>
jmp    12de <squared_distance_matrix+0x1be>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    118a <squared_distance_matrix+0x6a>
jmp    12fa <squared_distance_matrix+0x1da>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1177 <squared_distance_matrix+0x57>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<squared_distance_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9d,%ebp
mov    %r8d,0xc(%rsp)
mov    %ecx,%r12d
mov    %rdx,%r15
mov    %rsi,0x28(%rsp)
mov    %rdi,0x20(%rsp)
mov    0x100(%rsp),%rax
mov    %rax,0x70(%rsp)
lea    0x0(,%rbp,8),%r14d
mov    %r14d,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %r14d,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
test   %r12d,%r12d
jle    1566 <squared_distance_matrix+0x436>
mov    %r15,%r11
mov    %rbp,%r8
mov    %r8d,%r15d
lea    0x0(,%r15,8),%rax
mov    %rax,0x68(%rsp)
movslq %r8d,%rax
mov    %r12d,%ecx
mov    %rcx,0x48(%rsp)
mov    0xc(%rsp),%ecx
mov    %rcx,0x78(%rsp)
lea    (%rbx,%r15,8),%rcx
mov    %rcx,0xa8(%rsp)
mov    %rbx,%rcx
add    $0x8,%rcx
mov    %rcx,0xa0(%rsp)
lea    -0x1(%r15),%r12
mov    %r12,%rdx
and    $0xfffffffffffffffc,%rdx
lea    0x1(%rdx),%rcx
mov    %rcx,0x90(%rsp)
mov    %r15,%rcx
neg    %rcx
mov    %rcx,0xb0(%rsp)
mov    %r15d,%ecx
and    $0xfffffffe,%ecx
lea    0x18(%r11),%rsi
mov    %rsi,0x60(%rsp)
mov    %rax,0x30(%rsp)
lea    0x0(,%rax,8),%r13
xor    %eax,%eax
xor    %edi,%edi
mov    %rbp,0x18(%rsp)
mov    %r11,0x10(%rsp)
mov    %r12,0x40(%rsp)
mov    %rdx,0x98(%rsp)
mov    %rcx,0x58(%rsp)
mov    %r13,0x38(%rsp)
jmp    1254 <squared_distance_matrix+0x124>
nopw   0x0(%rax,%rax,1)
mov    0x50(%rsp),%rax
add    $0x1,%rax
cmp    0x48(%rsp),%rax
je     1566 <squared_distance_matrix+0x436>
cmpl   $0x0,0xc(%rsp)
jle    1245 <squared_distance_matrix+0x115>
mov    %rax,0x50(%rsp)
imul   0x30(%rsp),%rax
mov    %rax,0xb8(%rsp)
movslq %edi,%rdi
xor    %ebp,%ebp
jmp    128f <squared_distance_matrix+0x15f>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
add    $0x1,%rdi
cmp    0x78(%rsp),%rbp
je     1240 <squared_distance_matrix+0x110>
test   %r8d,%r8d
jle    1280 <squared_distance_matrix+0x150>
mov    %rdi,0x88(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    0x68(%rsp),%rdx
call   1040 <memset@plt>
mov    0x10(%rsp),%r11
mov    0x18(%rsp),%r8
mov    %rbp,0x80(%rsp)
imul   0x30(%rsp),%rbp
mov    %rbp,0xc0(%rsp)
mov    %r11,%rcx
mov    0x60(%rsp),%rdx
xor    %esi,%esi
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%r10
jmp    1303 <squared_distance_matrix+0x1d3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    %r13,%rdx
add    %r13,%rcx
cmp    %r15,%rsi
je     14e0 <squared_distance_matrix+0x3b0>
mov    %rsi,%rdi
mov    0xc0(%rsp),%rax
add    %rsi,%rax
mov    0xb8(%rsp),%rbp
add    %rsi,%rbp
movsd  (%r9,%rax,8),%xmm0
subsd  (%r10,%rbp,8),%xmm0
imul   0x30(%rsp),%rdi
movsd  %xmm0,(%r14,%rsi,8)
mulsd  (%r11,%rdi,8),%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%rbx)
cmp    $0x1,%r8d
je     12f0 <squared_distance_matrix+0x1c0>
mov    $0x1,%eax
cmp    $0x4,%r12
jb     1460 <squared_distance_matrix+0x330>
lea    (%rdi,%r15,1),%r10
lea    (%r14,%rsi,8),%r9
lea    (%r14,%rsi,8),%r8
add    $0x8,%r8
mov    %r11,%rbp
lea    (%r11,%rdi,8),%r11
add    $0x8,%r11
lea    0x0(,%r10,8),%r10
add    %rbp,%r10
mov    0xa0(%rsp),%r13
cmp    %r8,%r13
setb   %bpl
mov    0xa8(%rsp),%r12
cmp    %r12,%r9
setb   %r8b
cmp    %r10,%r13
setb   %r9b
cmp    %r12,%r11
setb   %r10b
test   %r8b,%bpl
jne    143f <squared_distance_matrix+0x30f>
and    %r10b,%r9b
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%r11
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%r10
mov    0x40(%rsp),%r12
mov    0x38(%rsp),%r13
jne    1460 <squared_distance_matrix+0x330>
movsd  (%r14,%rsi,8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %eax,%eax
mov    0x98(%rsp),%rbp
nopl   (%rax)
movupd -0x10(%rdx,%rax,8),%xmm1
movupd (%rdx,%rax,8),%xmm2
movupd 0x8(%rbx,%rax,8),%xmm3
movupd 0x18(%rbx,%rax,8),%xmm4
mulpd  %xmm0,%xmm1
addpd  %xmm3,%xmm1
mulpd  %xmm0,%xmm2
addpd  %xmm4,%xmm2
movupd %xmm1,0x8(%rbx,%rax,8)
movupd %xmm2,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    13f0 <squared_distance_matrix+0x2c0>
mov    0x90(%rsp),%rax
cmp    %rbp,%r12
je     12f0 <squared_distance_matrix+0x1c0>
jmp    1460 <squared_distance_matrix+0x330>
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%r11
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%r10
mov    0x40(%rsp),%r12
mov    0x38(%rsp),%r13
nopl   (%rax)
mov    %rax,%rbp
test   $0x1,%r15b
jne    1486 <squared_distance_matrix+0x356>
movsd  (%r14,%rsi,8),%xmm0
add    %rax,%rdi
mulsd  (%r11,%rdi,8),%xmm0
addsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
lea    0x1(%rax),%rbp
not    %rax
cmp    0xb0(%rsp),%rax
je     12f0 <squared_distance_matrix+0x1c0>
nopw   0x0(%rax,%rax,1)
movsd  (%r14,%rsi,8),%xmm0
mulsd  (%rcx,%rbp,8),%xmm0
addsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movsd  (%r14,%rsi,8),%xmm0
mulsd  0x8(%rcx,%rbp,8),%xmm0
addsd  0x8(%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%r15
jne    14a0 <squared_distance_matrix+0x370>
jmp    12f0 <squared_distance_matrix+0x1c0>
nopl   0x0(%rax,%rax,1)
test   %r8d,%r8d
mov    0x70(%rsp),%rcx
mov    0x88(%rsp),%rdi
mov    0x80(%rsp),%rbp
jle    1280 <squared_distance_matrix+0x150>
movsd  (%rcx,%rdi,8),%xmm0
xor    %eax,%eax
test   %r12,%r12
je     1543 <squared_distance_matrix+0x413>
mov    0x58(%rsp),%rsi
nop
movsd  (%rbx,%rax,8),%xmm1
mulsd  (%r14,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rdi,8)
movsd  0x8(%rbx,%rax,8),%xmm0
mulsd  0x8(%r14,%rax,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rdi,8)
add    $0x2,%rax
cmp    %rax,%rsi
jne    1510 <squared_distance_matrix+0x3e0>
test   $0x1,%r15b
je     1280 <squared_distance_matrix+0x150>
movsd  (%rbx,%rax,8),%xmm1
mulsd  (%r14,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rdi,8)
jmp    1280 <squared_distance_matrix+0x150>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @squared_distance_matrix(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5, double* %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store double* %6, double** %14
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 8
%25 = trunc i64 %24 to i32
%26 = call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to double*
store double* %27, double** %20
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = mul i64 %29, 8
%31 = trunc i64 %30 to i32
%32 = call i64 @malloc(i32 %31)
%33 = inttoptr i64 %32 to double*
store double* %33, double** %21
store i32 0, i32* %15
store i32 0, i32* %17
br label %34
34: ; preds = %149, %7
%35 = load i32, i32* %17
%36 = load i32, i32* %11
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %152
38: ; preds = %34
store i32 0, i32* %16
br label %39
39: ; preds = %143, %38
%40 = load i32, i32* %16
%41 = load i32, i32* %12
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %148
43: ; preds = %39
store i32 0, i32* %18
br label %44
44: ; preds = %53, %43
%45 = load i32, i32* %18
%46 = load i32, i32* %13
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %56
48: ; preds = %44
%49 = load double*, double** %20
%50 = load i32, i32* %18
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
store double 0.000000e+00, double* %52
br label %53
53: ; preds = %48
%54 = load i32, i32* %18
%55 = add nsw i32 %54, 1
store i32 %55, i32* %18
br label %44
56: ; preds = %44
store i32 0, i32* %18
br label %57
57: ; preds = %114, %56
%58 = load i32, i32* %18
%59 = load i32, i32* %13
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %117
61: ; preds = %57
%62 = load double*, double** %9
%63 = load i32, i32* %16
%64 = load i32, i32* %13
%65 = mul nsw i32 %63, %64
%66 = load i32, i32* %18
%67 = add nsw i32 %65, %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %62, i64 %68
%70 = load double, double* %69
%71 = load double*, double** %8
%72 = load i32, i32* %17
%73 = load i32, i32* %13
%74 = mul nsw i32 %72, %73
%75 = load i32, i32* %18
%76 = add nsw i32 %74, %75
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %71, i64 %77
%79 = load double, double* %78
%80 = fsub double %70, %79
%81 = load double*, double** %21
%82 = load i32, i32* %18
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
store double %80, double* %84
store i32 0, i32* %19
br label %85
85: ; preds = %110, %61
%86 = load i32, i32* %19
%87 = load i32, i32* %13
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %113
89: ; preds = %85
%90 = load double*, double** %21
%91 = load i32, i32* %18
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
%94 = load double, double* %93
%95 = load double*, double** %10
%96 = load i32, i32* %18
%97 = load i32, i32* %13
%98 = mul nsw i32 %96, %97
%99 = load i32, i32* %19
%100 = add nsw i32 %98, %99
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %95, i64 %101
%103 = load double, double* %102
%104 = load double*, double** %20
%105 = load i32, i32* %19
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %104, i64 %106
%108 = load double, double* %107
%109 = call double @llvm.fmuladd.f64(double %94, double %103, double %108)
store double %109, double* %107
br label %110
110: ; preds = %89
%111 = load i32, i32* %19
%112 = add nsw i32 %111, 1
store i32 %112, i32* %19
br label %85
113: ; preds = %85
br label %114
114: ; preds = %113
%115 = load i32, i32* %18
%116 = add nsw i32 %115, 1
store i32 %116, i32* %18
br label %57
117: ; preds = %57
store i32 0, i32* %18
br label %118
118: ; preds = %139, %117
%119 = load i32, i32* %18
%120 = load i32, i32* %13
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %142
122: ; preds = %118
%123 = load double*, double** %20
%124 = load i32, i32* %18
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
%127 = load double, double* %126
%128 = load double*, double** %21
%129 = load i32, i32* %18
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %128, i64 %130
%132 = load double, double* %131
%133 = load double*, double** %14
%134 = load i32, i32* %15
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
%137 = load double, double* %136
%138 = call double @llvm.fmuladd.f64(double %127, double %132, double %137)
store double %138, double* %136
br label %139
139: ; preds = %122
%140 = load i32, i32* %18
%141 = add nsw i32 %140, 1
store i32 %141, i32* %18
br label %118
142: ; preds = %118
br label %143
143: ; preds = %142
%144 = load i32, i32* %16
%145 = add nsw i32 %144, 1
store i32 %145, i32* %16
%146 = load i32, i32* %15
%147 = add nsw i32 %146, 1
store i32 %147, i32* %15
br label %39
148: ; preds = %39
br label %149
149: ; preds = %148
%150 = load i32, i32* %17
%151 = add nsw i32 %150, 1
store i32 %151, i32* %17
br label %34
152: ; preds = %34
%153 = load double*, double** %21
%154 = call i32 @free(double* %153)
%155 = load double*, double** %20
%156 = call i32 @free(double* %155)
ret void
}

LLVM IR (-O2):
define void @squared_distance_matrix(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3, i32 %4, i32 %5, double* nocapture %6) {
%8 = shl i32 %5, 3
%9 = tail call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to double*
%11 = inttoptr i64 %9 to i8*
%12 = tail call i64 @malloc(i32 %8)
%13 = inttoptr i64 %12 to double*
%14 = icmp sgt i32 %3, 0
br i1 %14, label %15, label %188
15: ; preds = %7
%16 = icmp sgt i32 %4, 0
%17 = icmp sgt i32 %5, 0
%18 = zext i32 %5 to i64
%19 = shl nuw nsw i64 %18, 3
%20 = sext i32 %5 to i64
%21 = zext i32 %3 to i64
%22 = zext i32 %4 to i64
%23 = getelementptr double, double* %10, i64 1
%24 = getelementptr double, double* %10, i64 %18
%25 = add nsw i64 %18, -1
%26 = icmp eq i32 %5, 1
%27 = icmp ult i64 %25, 4
%28 = and i64 %25, -4
%29 = or i64 %28, 1
%30 = icmp eq i64 %25, %28
%31 = and i64 %18, 1
%32 = icmp eq i64 %31, 0
%33 = sub nsw i64 0, %18
%34 = and i64 %18, 1
%35 = icmp eq i64 %25, 0
%36 = and i64 %18, 4294967294
%37 = icmp eq i64 %34, 0
br label %38
38: ; preds = %15, %184
%39 = phi i64 [ 0, %15 ], [ %186, %184 ]
%40 = phi i32 [ 0, %15 ], [ %185, %184 ]
br i1 %16, label %41, label %184
41: ; preds = %38
%42 = mul nsw i64 %39, %20
%43 = sext i32 %40 to i64
br label %44
44: ; preds = %41, %178
%45 = phi i64 [ 0, %41 ], [ %179, %178 ]
%46 = phi i64 [ %43, %41 ], [ %180, %178 ]
br i1 %17, label %47, label %178
47: ; preds = %44
%48 = mul nsw i64 %45, %20
br label %53
49: ; preds = %148
br i1 %17, label %50, label %178
50: ; preds = %49
%51 = getelementptr inbounds double, double* %6, i64 %46
%52 = load double, double* %51
br i1 %35, label %169, label %151
53: ; preds = %148, %47
%54 = phi i64 [ 0, %47 ], [ %149, %148 ]
%55 = getelementptr double, double* %13, i64 %54
%56 = add nuw i64 %54, 1
%57 = getelementptr double, double* %13, i64 %56
%58 = mul i64 %54, %20
%59 = add i64 %58, 1
%60 = getelementptr double, double* %2, i64 %59
%61 = add i64 %58, %18
%62 = getelementptr double, double* %2, i64 %61
%63 = add nsw i64 %54, %48
%64 = getelementptr inbounds double, double* %1, i64 %63
%65 = load double, double* %64
%66 = add nsw i64 %54, %42
%67 = getelementptr inbounds double, double* %0, i64 %66
%68 = load double, double* %67
%69 = fsub double %65, %68
%70 = getelementptr inbounds double, double* %13, i64 %54
store double %69, double* %70
%71 = mul nsw i64 %54, %20
%72 = getelementptr inbounds double, double* %2, i64 %71
%73 = load double, double* %72
%74 = load double, double* %10
%75 = tail call double @llvm.fmuladd.f64(double %69, double %73, double %74)
store double %75, double* %10
br i1 %26, label %148, label %76
76: ; preds = %53
br i1 %27, label %114, label %77
77: ; preds = %76
%78 = icmp ult double* %23, %57
%79 = icmp ult double* %55, %24
%80 = and i1 %78, %79
%81 = icmp ult double* %23, %62
%82 = icmp ult double* %60, %24
%83 = and i1 %81, %82
%84 = or i1 %80, %83
br i1 %84, label %114, label %85
85: ; preds = %77
%86 = load double, double* %70
%87 = insertelement <2 x double> poison, double %86, i64 0
%88 = shufflevector <2 x double> %87, <2 x double> poison, <2 x i32> zeroinitializer
%89 = insertelement <2 x double> poison, double %86, i64 0
%90 = shufflevector <2 x double> %89, <2 x double> poison, <2 x i32> zeroinitializer
br label %91
91: ; preds = %91, %85
%92 = phi i64 [ 0, %85 ], [ %111, %91 ]
%93 = or i64 %92, 1
%94 = add nsw i64 %93, %71
%95 = getelementptr inbounds double, double* %2, i64 %94
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = getelementptr inbounds double, double* %95, i64 2
%99 = bitcast double* %98 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = getelementptr inbounds double, double* %10, i64 %93
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = getelementptr inbounds double, double* %101, i64 2
%105 = bitcast double* %104 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %88, <2 x double> %97, <2 x double> %103)
%108 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %90, <2 x double> %100, <2 x double> %106)
%109 = bitcast double* %101 to <2 x double>*
store <2 x double> %107, <2 x double>* %109
%110 = bitcast double* %104 to <2 x double>*
store <2 x double> %108, <2 x double>* %110
%111 = add nuw i64 %92, 4
%112 = icmp eq i64 %111, %28
br i1 %112, label %113, label %91
113: ; preds = %91
br i1 %30, label %148, label %114
114: ; preds = %77, %76, %113
%115 = phi i64 [ 1, %77 ], [ 1, %76 ], [ %29, %113 ]
%116 = xor i64 %115, -1
br i1 %32, label %117, label %126
117: ; preds = %114
%118 = load double, double* %70
%119 = add nsw i64 %115, %71
%120 = getelementptr inbounds double, double* %2, i64 %119
%121 = load double, double* %120
%122 = getelementptr inbounds double, double* %10, i64 %115
%123 = load double, double* %122
%124 = tail call double @llvm.fmuladd.f64(double %118, double %121, double %123)
store double %124, double* %122
%125 = add nuw nsw i64 %115, 1
br label %126
126: ; preds = %117, %114
%127 = phi i64 [ %115, %114 ], [ %125, %117 ]
%128 = icmp eq i64 %116, %33
br i1 %128, label %148, label %129
129: ; preds = %126, %129
%130 = phi i64 [ %146, %129 ], [ %127, %126 ]
%131 = load double, double* %70
%132 = add nsw i64 %130, %71
%133 = getelementptr inbounds double, double* %2, i64 %132
%134 = load double, double* %133
%135 = getelementptr inbounds double, double* %10, i64 %130
%136 = load double, double* %135
%137 = tail call double @llvm.fmuladd.f64(double %131, double %134, double %136)
store double %137, double* %135
%138 = add nuw nsw i64 %130, 1
%139 = load double, double* %70
%140 = add nsw i64 %138, %71
%141 = getelementptr inbounds double, double* %2, i64 %140
%142 = load double, double* %141
%143 = getelementptr inbounds double, double* %10, i64 %138
%144 = load double, double* %143
%145 = tail call double @llvm.fmuladd.f64(double %139, double %142, double %144)
store double %145, double* %143
%146 = add nuw nsw i64 %130, 2
%147 = icmp eq i64 %146, %18
br i1 %147, label %148, label %129
148: ; preds = %126, %129, %113, %53
%149 = add nuw nsw i64 %54, 1
%150 = icmp eq i64 %149, %18
br i1 %150, label %49, label %53
151: ; preds = %50, %151
%152 = phi double [ %165, %151 ], [ %52, %50 ]
%153 = phi i64 [ %166, %151 ], [ 0, %50 ]
%154 = phi i64 [ %167, %151 ], [ 0, %50 ]
%155 = getelementptr inbounds double, double* %10, i64 %153
%156 = load double, double* %155
%157 = getelementptr inbounds double, double* %13, i64 %153
%158 = load double, double* %157
%159 = tail call double @llvm.fmuladd.f64(double %156, double %158, double %152)
store double %159, double* %51
%160 = or i64 %153, 1
%161 = getelementptr inbounds double, double* %10, i64 %160
%162 = load double, double* %161
%163 = getelementptr inbounds double, double* %13, i64 %160
%164 = load double, double* %163
%165 = tail call double @llvm.fmuladd.f64(double %162, double %164, double %159)
store double %165, double* %51
%166 = add nuw nsw i64 %153, 2
%167 = add i64 %154, 2
%168 = icmp eq i64 %167, %36
br i1 %168, label %169, label %151
169: ; preds = %151, %50
%170 = phi double [ %52, %50 ], [ %165, %151 ]
%171 = phi i64 [ 0, %50 ], [ %166, %151 ]
br i1 %37, label %178, label %172
172: ; preds = %169
%173 = getelementptr inbounds double, double* %10, i64 %171
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %13, i64 %171
%176 = load double, double* %175
%177 = tail call double @llvm.fmuladd.f64(double %174, double %176, double %170)
store double %177, double* %51
br label %178
178: ; preds = %172, %169, %44, %49
%179 = add nuw nsw i64 %45, 1
%180 = add nsw i64 %46, 1
%181 = icmp eq i64 %179, %22
br i1 %181, label %182, label %44
182: ; preds = %178
%183 = trunc i64 %180 to i32
br label %184
184: ; preds = %182, %38
%185 = phi i32 [ %40, %38 ], [ %183, %182 ]
%186 = add nuw nsw i64 %39, 1
%187 = icmp eq i64 %186, %21
br i1 %187, label %188, label %38
188: ; preds = %184, %7
%189 = tail call i32 @free(double* %13)
%190 = tail call i32 @free(double* %10)
ret void
}