#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 HDsSymMax(const double *lin, const double *u, const double *H, double *p,
               int len) {
  int i;
  double Hinv[9], H1[9];
  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 < len; 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):
<HDsSymMax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x9,-0x28(%rbp)
jge    11e2 <HDsSymMax+0xd2>
movslq -0x28(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x28(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11b3 <HDsSymMax+0xa3>
lea    -0xc0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <minv@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1499 <HDsSymMax+0x389>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x38(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x98(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
subsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
subsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm1
ff
mulsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x60(%rbp),%xmm0
divsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
divsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm1
ff
mulsd  -0x100(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1453 <HDsSymMax+0x343>
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
jmp    1463 <HDsSymMax+0x353>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11fa <HDsSymMax+0xea>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HDsSymMax>:
push   %r15
push   %r14
push   %rbx
sub    $0x220,%rsp
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %rsi,%rbx
movsd  (%rdx),%xmm0
movapd %xmm0,0xf0(%rsp)
movsd  0x8(%rdx),%xmm8
movsd  0x18(%rdx),%xmm6
movsd  0x30(%rdx),%xmm7
movsd  0x20(%rdx),%xmm2
movsd  0x38(%rdx),%xmm1
movsd  0x10(%rdx),%xmm3
movsd  0x28(%rdx),%xmm5
movsd  0x40(%rdx),%xmm4
movsd  %xmm0,(%rsp)
movapd %xmm6,0x50(%rsp)
movsd  %xmm6,0x8(%rsp)
movapd %xmm7,0x80(%rsp)
movsd  %xmm7,0x10(%rsp)
movapd %xmm8,0xe0(%rsp)
movsd  %xmm8,0x18(%rsp)
movapd %xmm2,0xc0(%rsp)
movsd  %xmm2,0x20(%rsp)
movapd %xmm1,0xd0(%rsp)
movsd  %xmm1,0x28(%rsp)
movapd %xmm3,0xb0(%rsp)
movsd  %xmm3,0x30(%rsp)
movapd %xmm5,0x90(%rsp)
movsd  %xmm5,0x38(%rsp)
movapd %xmm4,0xa0(%rsp)
movsd  %xmm4,0x40(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <minv@plt>
movapd 0xf0(%rsp),%xmm9
test   %r14d,%r14d
jle    172c <HDsSymMax+0x61c>
movapd 0x80(%rsp),%xmm8
movsd  0x30(%rsp),%xmm3
movsd  0x38(%rsp),%xmm5
movsd  0x40(%rsp),%xmm4
movsd  (%rsp),%xmm14
movsd  0x8(%rsp),%xmm11
movsd  0x10(%rsp),%xmm15
movsd  0x18(%rsp),%xmm12
movsd  0x20(%rsp),%xmm10
movsd  0x28(%rsp),%xmm7
lea    -0x1(%r14),%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
movapd %xmm11,0x210(%rsp)
movapd %xmm10,0x170(%rsp)
jae    126a <HDsSymMax+0x15a>
movapd 0x50(%rsp),%xmm0
movapd %xmm9,%xmm10
jmp    15cd <HDsSymMax+0x4bd>
lea    (%rcx,%rcx,2),%rdx
shl    $0x4,%rdx
add    %rbx,%rdx
add    $0x28,%rdx
cmp    %r15,%rdx
movapd 0x50(%rsp),%xmm0
jbe    129b <HDsSymMax+0x18b>
lea    (%r15,%rcx,8),%rdx
add    $0x8,%rdx
cmp    %rbx,%rdx
jbe    129b <HDsSymMax+0x18b>
movapd %xmm9,%xmm10
jmp    15cd <HDsSymMax+0x4bd>
add    $0x1,%rcx
mov    %ecx,%eax
and    $0x1,%eax
test   %rax,%rax
mov    $0x2,%edx
cmovne %rax,%rdx
mov    %rcx,%rax
sub    %rdx,%rax
lea    (%rax,%rax,2),%rcx
shl    $0x4,%rcx
add    %rbx,%rcx
lea    (%r15,%rax,8),%rdx
movapd %xmm5,0x130(%rsp)
unpcklpd %xmm5,%xmm5
movapd %xmm5,0x70(%rsp)
movapd %xmm8,%xmm5
movapd %xmm3,0x150(%rsp)
unpcklpd %xmm3,%xmm3
movapd %xmm3,0x60(%rsp)
movapd %xmm4,0x140(%rsp)
unpcklpd %xmm4,%xmm4
movapd %xmm4,0x200(%rsp)
movaps 0x90(%rsp),%xmm3
movlhps %xmm3,%xmm3
movaps %xmm3,0x1f0(%rsp)
movaps 0xb0(%rsp),%xmm3
movlhps %xmm3,%xmm3
movaps %xmm3,0x1e0(%rsp)
movaps 0xa0(%rsp),%xmm3
movlhps %xmm3,%xmm3
movaps %xmm3,0x1d0(%rsp)
unpcklpd %xmm11,%xmm11
movapd %xmm11,0x1c0(%rsp)
movapd %xmm14,0x110(%rsp)
unpcklpd %xmm14,%xmm14
movapd %xmm14,0x1b0(%rsp)
movapd %xmm15,0x100(%rsp)
unpcklpd %xmm15,%xmm15
movapd %xmm15,0x1a0(%rsp)
unpcklpd %xmm10,%xmm10
movapd %xmm10,0x190(%rsp)
movapd %xmm12,0x160(%rsp)
unpcklpd %xmm12,%xmm12
movapd %xmm12,0x180(%rsp)
movapd %xmm7,0x120(%rsp)
movapd %xmm7,%xmm13
unpcklpd %xmm7,%xmm13
movapd %xmm0,%xmm8
unpcklpd %xmm0,%xmm8
movapd %xmm9,%xmm14
unpcklpd %xmm9,%xmm14
movapd %xmm5,%xmm15
unpcklpd %xmm5,%xmm15
movapd 0xc0(%rsp),%xmm12
unpcklpd %xmm12,%xmm12
movapd 0xe0(%rsp),%xmm6
unpcklpd %xmm6,%xmm6
movapd 0xd0(%rsp),%xmm3
unpcklpd %xmm3,%xmm3
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd 0x40(%rbx),%xmm10
movupd (%rbx),%xmm11
movupd 0x20(%rbx),%xmm1
movlpd 0x18(%rbx),%xmm10
movupd 0x30(%rbx),%xmm4
movapd %xmm11,%xmm9
movhpd 0x50(%rbx),%xmm1
unpcklpd %xmm4,%xmm9
unpckhpd %xmm4,%xmm11
movapd 0x70(%rsp),%xmm4
mulpd  %xmm11,%xmm4
movapd 0x60(%rsp),%xmm5
mulpd  %xmm9,%xmm5
movapd 0x1f0(%rsp),%xmm0
addpd  %xmm4,%xmm5
mulpd  %xmm1,%xmm0
movapd 0x1e0(%rsp),%xmm4
mulpd  %xmm10,%xmm4
addpd  %xmm0,%xmm4
movapd %xmm11,%xmm0
addpd  0x200(%rsp),%xmm5
mulpd  0x1c0(%rsp),%xmm0
movapd 0x1b0(%rsp),%xmm2
mulpd  %xmm9,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm11,%xmm0
addpd  0x1a0(%rsp),%xmm2
mulpd  0x190(%rsp),%xmm0
movapd 0x180(%rsp),%xmm7
mulpd  %xmm9,%xmm7
addpd  %xmm0,%xmm7
divpd  %xmm5,%xmm2
addpd  %xmm13,%xmm7
divpd  %xmm5,%xmm7
movapd %xmm10,%xmm5
subpd  %xmm2,%xmm5
movapd %xmm1,%xmm0
movapd %xmm8,%xmm2
subpd  %xmm7,%xmm0
mulpd  %xmm1,%xmm2
movapd %xmm14,%xmm7
mulpd  %xmm10,%xmm7
addpd  %xmm2,%xmm7
mulpd  %xmm12,%xmm1
mulpd  %xmm6,%xmm10
addpd  %xmm1,%xmm10
addpd  0x1d0(%rsp),%xmm4
addpd  %xmm15,%xmm7
divpd  %xmm4,%xmm7
addpd  %xmm3,%xmm10
divpd  %xmm4,%xmm10
subpd  %xmm7,%xmm9
subpd  %xmm10,%xmm11
mulpd  %xmm0,%xmm0
mulpd  %xmm5,%xmm5
addpd  %xmm0,%xmm5
mulpd  %xmm11,%xmm11
mulpd  %xmm9,%xmm9
addpd  %xmm11,%xmm9
maxpd  %xmm5,%xmm9
movupd %xmm9,(%r15,%rsi,8)
add    $0x2,%rsi
add    $0x60,%rbx
cmp    %rsi,%rax
jne    1410 <HDsSymMax+0x300>
mov    %rcx,%rbx
mov    %rdx,%r15
movapd 0xf0(%rsp),%xmm10
movapd 0x50(%rsp),%xmm0
movapd 0x160(%rsp),%xmm12
movapd 0x120(%rsp),%xmm7
movapd 0x150(%rsp),%xmm3
movapd 0x140(%rsp),%xmm4
movapd 0x130(%rsp),%xmm5
movapd 0x110(%rsp),%xmm14
movapd 0x100(%rsp),%xmm15
movapd 0x80(%rsp),%xmm8
unpcklpd %xmm5,%xmm5
movapd %xmm5,0x70(%rsp)
unpcklpd %xmm3,%xmm14
unpcklpd %xmm4,%xmm15
unpcklpd 0x90(%rsp),%xmm0
unpcklpd 0xb0(%rsp),%xmm10
unpcklpd 0xa0(%rsp),%xmm8
unpcklpd 0xc0(%rsp),%xmm3
movapd %xmm3,0x60(%rsp)
unpcklpd 0xe0(%rsp),%xmm12
unpcklpd 0xd0(%rsp),%xmm7
sub    %eax,%r14d
xor    %eax,%eax
movapd %xmm0,%xmm13
movapd 0x170(%rsp),%xmm11
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm7,%xmm9
movsd  (%rbx),%xmm7
movsd  0x8(%rbx),%xmm0
movsd  0x18(%rbx),%xmm5
movsd  0x20(%rbx),%xmm4
movapd 0x70(%rsp),%xmm6
movapd 0x210(%rsp),%xmm3
movsd  %xmm0,%xmm6
unpcklpd %xmm0,%xmm3
movapd %xmm5,%xmm1
movapd %xmm7,%xmm2
unpcklpd %xmm5,%xmm2
unpcklpd %xmm7,%xmm5
mulpd  %xmm6,%xmm3
unpcklpd %xmm7,%xmm7
mulpd  %xmm14,%xmm7
movapd %xmm4,%xmm6
unpcklpd %xmm4,%xmm6
addpd  %xmm3,%xmm7
mulpd  %xmm13,%xmm6
unpcklpd %xmm1,%xmm1
mulpd  %xmm10,%xmm1
addpd  %xmm15,%xmm7
addpd  %xmm6,%xmm1
addpd  %xmm8,%xmm1
movapd %xmm7,%xmm3
unpcklpd %xmm1,%xmm3
movapd 0x60(%rsp),%xmm6
movhlps %xmm7,%xmm1
movsd  %xmm0,%xmm6
movapd %xmm11,%xmm7
unpcklpd %xmm4,%xmm7
mulpd  %xmm6,%xmm7
mulpd  %xmm12,%xmm2
addpd  %xmm7,%xmm2
movapd %xmm9,%xmm7
divpd  %xmm1,%xmm3
addpd  %xmm9,%xmm2
divpd  %xmm1,%xmm2
subpd  %xmm3,%xmm5
unpcklpd %xmm0,%xmm4
subpd  %xmm2,%xmm4
mulpd  %xmm4,%xmm4
mulpd  %xmm5,%xmm5
addpd  %xmm4,%xmm5
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
maxsd  %xmm5,%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
add    $0x30,%rbx
cmp    %eax,%r14d
jne    1640 <HDsSymMax+0x530>
add    $0x220,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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