#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*/ minv(double *, int);
void HDsiSymMax(const double *lin, const double *u6, const double *H, double *p,
                int len, int *pts, int ni) {
  int i;
  double Hinv[9], H1[9];
  const double *u;
  double a, b, xa, ya, d1, d2, xdiff, ydiff;
  Hinv[0] = H[0];
  Hinv[1] = H[3];
  Hinv[2] = H[6];
  Hinv[3] = H[1];
  Hinv[4] = H[4];
  Hinv[5] = H[7];
  Hinv[6] = H[2];
  Hinv[7] = H[5];
  Hinv[8] = H[8];
  for (i = 0; i < 9; i++)
    H1[i] = Hinv[i];
  minv(H1, 3);
  for (i = 0; i < ni; i++) {
    u = u6 + 6 * pts[i];
    a = H1[6] * u[0] + H1[7] * u[1] + H1[8];
    b = Hinv[6] * u[3] + Hinv[7] * u[4] + Hinv[8];
    xa = (H1[0] * u[0] + H1[1] * u[1] + H1[2]) / a;
    ya = (H1[3] * u[0] + H1[4] * u[1] + H1[5]) / a;
    xdiff = u[3] - xa;
    ydiff = u[4] - ya;
    d1 = xdiff * xdiff + ydiff * ydiff;
    xa = (Hinv[0] * u[3] + Hinv[1] * u[4] + Hinv[2]) / b;
    ya = (Hinv[3] * u[3] + Hinv[4] * u[4] + Hinv[5]) / b;
    xdiff = u[0] - xa;
    ydiff = u[1] - ya;
    d2 = xdiff * xdiff + ydiff * ydiff;
    *p = ((d1) < (d2) ? (d2) : (d1));
    p++;
    u += 6;
  }
}


x86 assembly (clang, -O0):
<HDsiSymMax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x9,-0x34(%rbp)
jge    11e9 <HDsiSymMax+0xd9>
movslq -0x34(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movslq -0x34(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11ba <HDsiSymMax+0xaa>
lea    -0xd0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <minv@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    14fa <HDsiSymMax+0x3ea>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
movslq -0x34(%rbp),%rdx
imul   $0x6,(%rcx,%rdx,4),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd8(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0xd8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mov    -0xd8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mov    -0xd8(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x48(%rbp),%xmm1
mov    -0xd8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
mov    -0xd8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xc8(%rbp),%xmm1
ff
mov    -0xd8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
divsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0xd8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0xd8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
divsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0xd8(%rbp),%rax
movsd  0x18(%rax),%xmm0
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0xd8(%rbp),%rax
movsd  0x20(%rax),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm2
ff
movsd  -0x118(%rbp),%xmm1
ff
mulsd  -0x118(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mov    -0xd8(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x78(%rbp),%xmm1
mov    -0xd8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x70(%rbp),%xmm0
divsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mov    -0xd8(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x60(%rbp),%xmm1
mov    -0xd8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x58(%rbp),%xmm0
divsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0xd8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0xd8(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm2
ff
movsd  -0x118(%rbp),%xmm1
ff
mulsd  -0x118(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x100(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    14ae <HDsiSymMax+0x39e>
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
jmp    14be <HDsiSymMax+0x3ae>
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0xd8(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0xd8(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1201 <HDsiSymMax+0xf1>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HDsiSymMax>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xe8,%rsp
mov    %r9,%r14
mov    %rcx,%r15
mov    %rsi,%rbx
mov    0x110(%rsp),%ebp
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm8
movsd  0x18(%rdx),%xmm1
movsd  0x30(%rdx),%xmm2
movsd  0x20(%rdx),%xmm4
movsd  0x38(%rdx),%xmm5
movsd  0x10(%rdx),%xmm7
movsd  0x28(%rdx),%xmm6
movsd  0x40(%rdx),%xmm3
movapd %xmm0,0x70(%rsp)
movsd  %xmm0,(%rsp)
movapd %xmm1,0x60(%rsp)
movsd  %xmm1,0x8(%rsp)
movapd %xmm2,0x50(%rsp)
movsd  %xmm2,0x10(%rsp)
movapd %xmm8,0xd0(%rsp)
movsd  %xmm8,0x18(%rsp)
movapd %xmm4,0xc0(%rsp)
movsd  %xmm4,0x20(%rsp)
movapd %xmm5,0xb0(%rsp)
movsd  %xmm5,0x28(%rsp)
movaps %xmm7,0x90(%rsp)
movsd  %xmm7,0x30(%rsp)
movapd %xmm6,0xa0(%rsp)
movsd  %xmm6,0x38(%rsp)
movapd %xmm3,0x80(%rsp)
movsd  %xmm3,0x40(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <minv@plt>
test   %ebp,%ebp
jle    1375 <HDsiSymMax+0x265>
movapd (%rsp),%xmm9
movupd 0x8(%rsp),%xmm10
movapd 0x10(%rsp),%xmm11
movupd 0x18(%rsp),%xmm12
movapd 0x20(%rsp),%xmm8
movupd 0x28(%rsp),%xmm13
movhpd 0x40(%rsp),%xmm11
movhpd 0x30(%rsp),%xmm9
movhpd 0x38(%rsp),%xmm10
mov    %ebp,%eax
movaps 0x50(%rsp),%xmm0
unpcklpd 0x80(%rsp),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x70(%rsp),%xmm0
unpcklpd 0x90(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movapd 0x60(%rsp),%xmm0
unpcklpd 0xa0(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
unpcklpd 0xb0(%rsp),%xmm13
unpcklpd 0xd0(%rsp),%xmm12
unpcklpd 0xc0(%rsp),%xmm14
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movslq (%r14,%rcx,4),%rdx
lea    (%rdx,%rdx,2),%rdx
shl    $0x4,%rdx
movsd  (%rbx,%rdx,1),%xmm15
movsd  0x8(%rbx,%rdx,1),%xmm1
movsd  0x18(%rbx,%rdx,1),%xmm3
movsd  0x20(%rbx,%rdx,1),%xmm4
movapd %xmm4,%xmm2
movapd %xmm14,%xmm6
movsd  %xmm1,%xmm6
movapd %xmm8,%xmm5
unpcklpd %xmm4,%xmm5
unpcklpd %xmm1,%xmm4
unpcklpd %xmm1,%xmm1
mulpd  %xmm10,%xmm1
movapd %xmm3,%xmm7
movapd %xmm15,%xmm0
unpcklpd %xmm3,%xmm0
unpcklpd %xmm15,%xmm3
unpcklpd %xmm15,%xmm15
mulpd  %xmm9,%xmm15
addpd  %xmm1,%xmm15
addpd  %xmm11,%xmm15
unpcklpd %xmm2,%xmm2
mulpd  0x60(%rsp),%xmm2
unpcklpd %xmm7,%xmm7
mulpd  0x70(%rsp),%xmm7
addpd  %xmm2,%xmm7
addpd  0x50(%rsp),%xmm7
movapd %xmm15,%xmm1
unpcklpd %xmm7,%xmm1
movhlps %xmm15,%xmm7
mulpd  %xmm6,%xmm5
mulpd  %xmm12,%xmm0
addpd  %xmm5,%xmm0
divpd  %xmm7,%xmm1
addpd  %xmm13,%xmm0
divpd  %xmm7,%xmm0
subpd  %xmm1,%xmm3
subpd  %xmm0,%xmm4
mulpd  %xmm4,%xmm4
mulpd  %xmm3,%xmm3
addpd  %xmm4,%xmm3
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
maxsd  %xmm3,%xmm0
movsd  %xmm0,(%r15,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1290 <HDsiSymMax+0x180>
add    $0xe8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @HDsiSymMax(double* nocapture readnone %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3, i32 %4, i32* nocapture %5, i32 %6) {
%8 = alloca [9 x double]
%9 = bitcast [9 x double]* %8 to i8*
%10 = load double, double* %2
%11 = getelementptr inbounds double, double* %2, i64 3
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %2, i64 6
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 1
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %2, i64 4
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %2, i64 7
%20 = load double, double* %19
%21 = getelementptr inbounds double, double* %2, i64 2
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %2, i64 5
%24 = load double, double* %23
%25 = getelementptr inbounds double, double* %2, i64 8
%26 = load double, double* %25
%27 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 0
store double %10, double* %27
%28 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 1
store double %12, double* %28
%29 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 2
store double %14, double* %29
%30 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 3
store double %16, double* %30
%31 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 4
store double %18, double* %31
%32 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 5
store double %20, double* %32
%33 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 6
store double %22, double* %33
%34 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 7
store double %24, double* %34
%35 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 8
store double %26, double* %35
%36 = call i32 @minv(double* %27, i32 3)
%37 = icmp sgt i32 %6, 0
br i1 %37, label %38, label %119
38: ; preds = %7
%39 = load double, double* %33
%40 = load double, double* %34
%41 = load double, double* %35
%42 = bitcast [9 x double]* %8 to <2 x double>*
%43 = load <2 x double>, <2 x double>* %42
%44 = bitcast double* %28 to <2 x double>*
%45 = load <2 x double>, <2 x double>* %44
%46 = bitcast double* %29 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = bitcast double* %30 to <2 x double>*
%49 = load <2 x double>, <2 x double>* %48
%50 = bitcast double* %31 to <2 x double>*
%51 = load <2 x double>, <2 x double>* %50
%52 = bitcast double* %32 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = zext i32 %6 to i64
%55 = insertelement <2 x double> %47, double %41, i64 1
%56 = insertelement <2 x double> %43, double %39, i64 1
%57 = insertelement <2 x double> %45, double %40, i64 1
%58 = insertelement <2 x double> poison, double %14, i64 0
%59 = insertelement <2 x double> %58, double %26, i64 1
%60 = insertelement <2 x double> poison, double %10, i64 0
%61 = insertelement <2 x double> %60, double %22, i64 1
%62 = insertelement <2 x double> poison, double %12, i64 0
%63 = insertelement <2 x double> %62, double %24, i64 1
%64 = insertelement <2 x double> %53, double %20, i64 1
%65 = insertelement <2 x double> %49, double %16, i64 1
%66 = insertelement <2 x double> poison, double %18, i64 1
br label %67
67: ; preds = %38, %67
%68 = phi i64 [ 0, %38 ], [ %117, %67 ]
%69 = phi double* [ %3, %38 ], [ %116, %67 ]
%70 = getelementptr inbounds i32, i32* %5, i64 %68
%71 = load i32, i32* %70
%72 = mul nsw i32 %71, 6
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %1, i64 %73
%75 = load double, double* %74
%76 = getelementptr inbounds double, double* %74, i64 1
%77 = load double, double* %76
%78 = getelementptr inbounds double, double* %74, i64 3
%79 = load double, double* %78
%80 = getelementptr inbounds double, double* %74, i64 4
%81 = load double, double* %80
%82 = insertelement <2 x double> poison, double %77, i64 0
%83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> zeroinitializer
%84 = fmul <2 x double> %57, %83
%85 = insertelement <2 x double> poison, double %75, i64 0
%86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
%87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %56, <2 x double> %86, <2 x double> %84)
%88 = fadd <2 x double> %55, %87
%89 = insertelement <2 x double> poison, double %81, i64 0
%90 = shufflevector <2 x double> %89, <2 x double> poison, <2 x i32> zeroinitializer
%91 = fmul <2 x double> %63, %90
%92 = insertelement <2 x double> poison, double %79, i64 0
%93 = shufflevector <2 x double> %92, <2 x double> poison, <2 x i32> zeroinitializer
%94 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %93, <2 x double> %91)
%95 = fadd <2 x double> %59, %94
%96 = shufflevector <2 x double> %88, <2 x double> %95, <2 x i32> <i32 0, i32 2>
%97 = shufflevector <2 x double> %88, <2 x double> %95, <2 x i32> <i32 1, i32 3>
%98 = fdiv <2 x double> %96, %97
%99 = insertelement <2 x double> %66, double %77, i64 0
%100 = insertelement <2 x double> %51, double %81, i64 1
%101 = fmul <2 x double> %99, %100
%102 = insertelement <2 x double> %85, double %79, i64 1
%103 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> %102, <2 x double> %101)
%104 = fadd <2 x double> %64, %103
%105 = fdiv <2 x double> %104, %97
%106 = insertelement <2 x double> %92, double %75, i64 1
%107 = fsub <2 x double> %106, %98
%108 = insertelement <2 x double> %89, double %77, i64 1
%109 = fsub <2 x double> %108, %105
%110 = fmul <2 x double> %109, %109
%111 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %107, <2 x double> %107, <2 x double> %110)
%112 = extractelement <2 x double> %111, i64 0
%113 = extractelement <2 x double> %111, i64 1
%114 = fcmp olt double %112, %113
%115 = select i1 %114, double %113, double %112
store double %115, double* %69
%116 = getelementptr inbounds double, double* %69, i64 1
%117 = add nuw nsw i64 %68, 1
%118 = icmp eq i64 %117, %54
br i1 %118, label %119, label %67
119: ; preds = %67, %7
ret void
}