#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 HDsSymidxMax(const double *lin, const double *mu, const double *H,
                  double *p, int len, int *idx, int siz) {
  int i, mi;
  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 (mi = 0; mi < siz; mi++) {
    i = idx[mi];
    u = mu + 6 * 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));
  }
}


x86 assembly (clang, -O0):
<HDsSymidxMax>:
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 <HDsSymidxMax+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 <HDsSymidxMax+0xaa>
lea    -0xd0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <minv@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    14e2 <HDsSymidxMax+0x3d2>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x6,-0x34(%rbp),%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    14b4 <HDsSymidxMax+0x3a4>
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
jmp    14c4 <HDsSymidxMax+0x3b4>
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1201 <HDsSymidxMax+0xf1>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HDsSymidxMax>:
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    1374 <HDsSymidxMax+0x264>
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
movapd %xmm3,%xmm7
movapd %xmm15,%xmm0
unpcklpd %xmm3,%xmm0
unpcklpd %xmm15,%xmm3
mulpd  %xmm10,%xmm1
unpcklpd %xmm15,%xmm15
mulpd  %xmm9,%xmm15
addpd  %xmm1,%xmm15
unpcklpd %xmm2,%xmm2
mulpd  0x60(%rsp),%xmm2
unpcklpd %xmm7,%xmm7
mulpd  0x70(%rsp),%xmm7
addpd  %xmm11,%xmm15
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)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1290 <HDsSymidxMax+0x180>
add    $0xe8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @HDsSymidxMax(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 %117
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 ], [ %115, %67 ]
%69 = getelementptr inbounds i32, i32* %5, i64 %68
%70 = load i32, i32* %69
%71 = mul nsw i32 %70, 6
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %1, i64 %72
%74 = load double, double* %73
%75 = getelementptr inbounds double, double* %73, i64 1
%76 = load double, double* %75
%77 = getelementptr inbounds double, double* %73, i64 3
%78 = load double, double* %77
%79 = getelementptr inbounds double, double* %73, i64 4
%80 = load double, double* %79
%81 = insertelement <2 x double> poison, double %76, i64 0
%82 = shufflevector <2 x double> %81, <2 x double> poison, <2 x i32> zeroinitializer
%83 = fmul <2 x double> %57, %82
%84 = insertelement <2 x double> poison, double %74, i64 0
%85 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> zeroinitializer
%86 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %56, <2 x double> %85, <2 x double> %83)
%87 = fadd <2 x double> %55, %86
%88 = insertelement <2 x double> poison, double %80, i64 0
%89 = shufflevector <2 x double> %88, <2 x double> poison, <2 x i32> zeroinitializer
%90 = fmul <2 x double> %63, %89
%91 = insertelement <2 x double> poison, double %78, i64 0
%92 = shufflevector <2 x double> %91, <2 x double> poison, <2 x i32> zeroinitializer
%93 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %92, <2 x double> %90)
%94 = fadd <2 x double> %59, %93
%95 = shufflevector <2 x double> %87, <2 x double> %94, <2 x i32> <i32 0, i32 2>
%96 = shufflevector <2 x double> %87, <2 x double> %94, <2 x i32> <i32 1, i32 3>
%97 = fdiv <2 x double> %95, %96
%98 = insertelement <2 x double> %66, double %76, i64 0
%99 = insertelement <2 x double> %51, double %80, i64 1
%100 = fmul <2 x double> %98, %99
%101 = insertelement <2 x double> %84, double %78, i64 1
%102 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> %101, <2 x double> %100)
%103 = fadd <2 x double> %64, %102
%104 = fdiv <2 x double> %103, %96
%105 = insertelement <2 x double> %91, double %74, i64 1
%106 = fsub <2 x double> %105, %97
%107 = insertelement <2 x double> %88, double %76, i64 1
%108 = fsub <2 x double> %107, %104
%109 = fmul <2 x double> %108, %108
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %106, <2 x double> %109)
%111 = extractelement <2 x double> %110, i64 0
%112 = extractelement <2 x double> %110, i64 1
%113 = fcmp olt double %111, %112
%114 = select i1 %113, double %112, double %111
store double %114, double* %3
%115 = add nuw nsw i64 %68, 1
%116 = icmp eq i64 %115, %54
br i1 %116, label %117, label %67
117: ; preds = %67, %7
ret void
}