#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 */
scalar_t__ hougenu(double *, int, int, int, int, double *, double *);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
void housholder(double *A, int lda, int m, int n, int lsav) {
  int i, j, col;
  double u[m], beta, sum;
  for (col = 0; col < n; col++) {
    memset(u, 0, sizeof(double) * m);
    if (hougenu(A, lda, col, m, col, u, &beta)) {
      if (lsav) {
        for (i = col; i < m; i++) {
          A[lda * col + i + 1] = u[i - col];
        }
        A[lda * col + m + 1] = beta;
      }
      for (i = col + 1; i < n; i++) {
        sum = 0.0;
        for (j = col; j < m; j++)
          sum += u[j - col] * A[j + lda * i];
        for (j = col; j < m; j++)
          A[j + lda * i] += beta * sum * u[j - col];
      }
    }
  }
}


x86 assembly (clang, -O0):
<housholder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1334 <housholder+0x214>
mov    -0x50(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x50(%rbp),%r9
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    -0x40(%rbp),%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <hougenu@plt>
add    $0x10,%rsp
cmp    $0x0,%rax
je     1321 <housholder+0x201>
cmpl   $0x0,-0x18(%rbp)
je     122f <housholder+0x10f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1211 <housholder+0xf1>
mov    -0x50(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cc <housholder+0xac>
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    131c <housholder+0x1fc>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12a8 <housholder+0x188>
mov    -0x50(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1252 <housholder+0x132>
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1309 <housholder+0x1e9>
mov    -0x50(%rbp),%rax
movsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12ae <housholder+0x18e>
jmp    130e <housholder+0x1ee>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1238 <housholder+0x118>
jmp    1321 <housholder+0x201>
jmp    1326 <housholder+0x206>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1167 <housholder+0x47>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<housholder>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8d,-0x5c(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %rdx,-0x68(%rbp)
mov    %edx,%r15d
mov    %rsp,%rbx
lea    0xf(,%r15,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
test   %ecx,%ecx
jle    1715 <housholder+0x5f5>
mov    %rdi,%r13
mov    -0x68(%rbp),%rax
lea    0x0(,%rax,8),%edx
mov    %edx,-0x60(%rbp)
lea    0x1(%rax),%edx
mov    %edx,-0x58(%rbp)
movslq -0x2c(%rbp),%rdx
mov    %ecx,%ecx
mov    %rcx,-0x48(%rbp)
mov    %rdx,%rcx
cltq
mov    %rax,-0x50(%rbp)
lea    0x1(%rdx),%eax
mov    %eax,-0x54(%rbp)
mov    %r15,%r11
neg    %r11
lea    (%rdi,%rdx,8),%rax
add    $0x8,%rax
mov    %rax,-0x88(%rbp)
lea    0x0(,%rdx,8),%r12
lea    0x8(%rbx),%rax
mov    %rax,-0xa8(%rbp)
lea    0x10(%rdi),%rax
mov    %rax,-0xa0(%rbp)
lea    (%rdi,%rdx,8),%rax
mov    %rax,-0x80(%rbp)
mov    $0x1,%eax
mov    %rax,-0x78(%rbp)
xor    %r14d,%r14d
mov    %rdx,-0x70(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %r11,-0x90(%rbp)
mov    %r12,-0xe8(%rbp)
jmp    121c <housholder+0xfc>
xchg   %ax,%ax
add    $0x1,%r14
mov    %r14,%rax
mov    -0x38(%rbp),%rcx
addq   $0x1,-0x78(%rbp)
add    %r12,-0x88(%rbp)
add    %rcx,-0x70(%rbp)
add    %r12,-0x80(%rbp)
mov    %rax,%r14
cmp    -0x48(%rbp),%rax
je     1715 <housholder+0x5f5>
mov    %rbx,%rdi
xor    %esi,%esi
mov    -0x60(%rbp),%edx
call   1030 <memset@plt>
sub    $0x8,%rsp
mov    %r13,%rdi
mov    -0x2c(%rbp),%esi
mov    %r14d,%edx
mov    -0x68(%rbp),%rcx
mov    %r14d,%r8d
mov    %rbx,%r9
lea    -0x98(%rbp),%rax
push   %rax
call   1040 <hougenu@plt>
add    $0x10,%rsp
test   %rax,%rax
je     11f0 <housholder+0xd0>
cmpl   $0x0,-0x5c(%rbp)
mov    -0x90(%rbp),%r11
xorpd  %xmm8,%xmm8
je     1424 <housholder+0x304>
mov    %r14d,%eax
imul   -0x2c(%rbp),%eax
cmp    -0x50(%rbp),%r14
jge    1410 <housholder+0x2f0>
mov    %r15,%r9
sub    %r14,%r9
mov    %r14,%r10
cmp    $0x4,%r9
jae    131c <housholder+0x1fc>
mov    %r15d,%ecx
sub    %r10d,%ecx
mov    %r10,%rdx
test   $0x1,%cl
je     12ba <housholder+0x19a>
mov    %r10,%rcx
sub    %r14,%rcx
movsd  (%rbx,%rcx,8),%xmm0
lea    0x1(%r10),%rdx
lea    (%rax,%rdx,1),%ecx
movslq %ecx,%rcx
movsd  %xmm0,0x0(%r13,%rcx,8)
not    %r10
cmp    %r11,%r10
je     1410 <housholder+0x2f0>
lea    0x1(%rdx),%rcx
add    %eax,%edx
add    $0x2,%edx
lea    0x0(,%r14,8),%rdi
mov    %rbx,%rsi
sub    %rdi,%rsi
nopl   (%rax)
movsd  -0x8(%rsi,%rcx,8),%xmm0
lea    -0x1(%rdx),%edi
movslq %edi,%rdi
movsd  %xmm0,0x0(%r13,%rdi,8)
movsd  (%rsi,%rcx,8),%xmm0
movslq %edx,%rdx
movsd  %xmm0,0x0(%r13,%rdx,8)
lea    (%r11,%rcx,1),%rdi
add    $0x2,%rdi
add    $0x2,%rcx
add    $0x2,%edx
cmp    $0x1,%rdi
jne    12e0 <housholder+0x1c0>
jmp    1410 <housholder+0x2f0>
mov    %r14,%rdx
not    %rdx
add    %r15,%rdx
mov    -0x54(%rbp),%ecx
mov    %ecx,%esi
imul   %r14d,%esi
lea    0x1(%rsi),%r8d
lea    (%rsi,%rdx,1),%edi
add    $0x1,%edi
mov    %r14,%r10
cmp    %r8d,%edi
jl     1290 <housholder+0x170>
shr    $0x20,%rdx
mov    %r14,%r10
jne    1290 <housholder+0x170>
mov    %r9,%r10
and    $0xfffffffffffffffc,%r10
lea    -0x4(%r10),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1704 <housholder+0x5e4>
mov    %r8,%rdx
movabs $0x7ffffffffffffffe,%rcx
ff ff 7f
and    %rcx,%rdx
add    $0x5,%esi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movaps (%rbx,%rdi,8),%xmm0
movaps 0x10(%rbx,%rdi,8),%xmm1
lea    -0x4(%rsi),%ecx
movslq %ecx,%rcx
movups %xmm0,0x0(%r13,%rcx,8)
movups %xmm1,0x10(%r13,%rcx,8)
movapd 0x20(%rbx,%rdi,8),%xmm0
movapd 0x30(%rbx,%rdi,8),%xmm1
movslq %esi,%rsi
movupd %xmm0,0x0(%r13,%rsi,8)
movupd %xmm1,0x10(%r13,%rsi,8)
add    $0x8,%rdi
add    $0x8,%esi
add    $0xfffffffffffffffe,%rdx
jne    1390 <housholder+0x270>
test   $0x1,%r8b
je     1400 <housholder+0x2e0>
lea    (%r14,%rdi,1),%ecx
movapd (%rbx,%rdi,8),%xmm0
movapd 0x10(%rbx,%rdi,8),%xmm1
add    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movupd %xmm0,0x0(%r13,%rcx,8)
movupd %xmm1,0x10(%r13,%rcx,8)
cmp    %r10,%r9
jne    16fc <housholder+0x5dc>
nopl   0x0(%rax)
movsd  -0x98(%rbp),%xmm0
ff
add    -0x58(%rbp),%eax
cltq
movsd  %xmm0,0x0(%r13,%rax,8)
lea    0x1(%r14),%rax
cmp    -0x48(%rbp),%rax
jge    11f7 <housholder+0xd7>
mov    %rax,-0xb0(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
mov    %r15,%rax
sub    %r14,%rax
mov    %r14,%rdx
not    %rdx
lea    -0x4(%rax),%rcx
mov    %rcx,-0xd8(%rbp)
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
lea    0x1(%r14),%rcx
mov    %rcx,-0xe0(%rbp)
mov    %rax,%rcx
mov    %rax,-0x40(%rbp)
and    $0xfffffffffffffffc,%rax
mov    %rax,-0xc8(%rbp)
add    %r14,%rax
mov    %rax,-0xc0(%rbp)
mov    %rsi,%rax
mov    %rsi,-0xd0(%rbp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
and    %rax,%rsi
mov    %rsi,-0xb8(%rbp)
mov    -0xa8(%rbp),%rax
lea    (%rax,%rdx,8),%r10
add    $0x8,%r10
mov    -0x70(%rbp),%rax
add    %r14,%rax
mov    -0xa0(%rbp),%rcx
lea    (%rcx,%rax,8),%r11
mov    %rdx,-0xf0(%rbp)
lea    0x8(%rbx,%rdx,8),%r8
mov    -0x80(%rbp),%r9
mov    -0x88(%rbp),%rsi
mov    -0x78(%rbp),%rdi
mov    -0x38(%rbp),%rcx
jmp    1507 <housholder+0x3e7>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
add    %r12,%rsi
add    %r12,%r11
add    %r12,%r9
cmp    -0x48(%rbp),%rdi
je     16f0 <housholder+0x5d0>
cmp    -0x50(%rbp),%r14
jge    14f0 <housholder+0x3d0>
mov    %r14,%rdx
mov    %rdi,%rax
mov    %rcx,%r12
imul   %rcx,%rax
xorpd  %xmm2,%xmm2
testb  $0x1,-0x40(%rbp)
je     1543 <housholder+0x423>
movsd  (%rbx),%xmm1
lea    (%r14,%rax,1),%rdx
mulsd  0x0(%r13,%rdx,8),%xmm1
addsd  %xmm8,%xmm1
mov    -0xe0(%rbp),%rdx
movapd %xmm1,%xmm2
mov    %r13,%rcx
mov    -0xf0(%rbp),%r13
cmp    -0x90(%rbp),%r13
je     158d <housholder+0x46d>
cs nopw 0x0(%rax,%rax,1)
movsd  -0x8(%r10,%rdx,8),%xmm3
movsd  (%r10,%rdx,8),%xmm1
mulsd  -0x8(%rsi,%rdx,8),%xmm3
mulsd  (%rsi,%rdx,8),%xmm1
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm1
add    $0x2,%rdx
movapd %xmm1,%xmm2
cmp    %rdx,%r15
jne    1560 <housholder+0x440>
cmp    -0x50(%rbp),%r14
mov    %rcx,%r13
mov    %r12,%rcx
mov    -0xe8(%rbp),%r12
jge    14f0 <housholder+0x3d0>
mulsd  %xmm0,%xmm1
mov    %r14,%rdx
cmpq   $0x4,-0x40(%rbp)
jb     16c0 <housholder+0x5a0>
mov    %r13,%rcx
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x4,-0xd8(%rbp)
04
jae    15d2 <housholder+0x4b2>
xor    %edx,%edx
jmp    1657 <housholder+0x537>
mov    -0xb8(%rbp),%r13
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movapd (%rbx,%rdx,8),%xmm3
mulpd  %xmm2,%xmm3
movupd -0x10(%r11,%rdx,8),%xmm4
addpd  %xmm3,%xmm4
movupd (%r11,%rdx,8),%xmm3
movupd 0x10(%r11,%rdx,8),%xmm5
movupd 0x20(%r11,%rdx,8),%xmm6
movapd 0x10(%rbx,%rdx,8),%xmm7
mulpd  %xmm2,%xmm7
addpd  %xmm3,%xmm7
movupd %xmm4,-0x10(%r11,%rdx,8)
movupd %xmm7,(%r11,%rdx,8)
movapd 0x20(%rbx,%rdx,8),%xmm3
mulpd  %xmm2,%xmm3
addpd  %xmm5,%xmm3
movapd 0x30(%rbx,%rdx,8),%xmm4
mulpd  %xmm2,%xmm4
addpd  %xmm6,%xmm4
movupd %xmm3,0x10(%r11,%rdx,8)
movupd %xmm4,0x20(%r11,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%r13
jne    15e0 <housholder+0x4c0>
testb  $0x1,-0xd0(%rbp)
mov    %rcx,%r13
je     169c <housholder+0x57c>
add    %r14,%rax
add    %rdx,%rax
movupd 0x0(%r13,%rax,8),%xmm3
movupd 0x10(%r13,%rax,8),%xmm4
movapd (%rbx,%rdx,8),%xmm5
mulpd  %xmm2,%xmm5
mulpd  0x10(%rbx,%rdx,8),%xmm2
addpd  %xmm3,%xmm5
addpd  %xmm4,%xmm2
movupd %xmm5,0x0(%r13,%rax,8)
movupd %xmm2,0x10(%r13,%rax,8)
mov    -0xc0(%rbp),%rdx
mov    -0xc8(%rbp),%rax
cmp    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rcx
je     14f0 <housholder+0x3d0>
nopl   0x0(%rax,%rax,1)
movsd  (%r8,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r9,%rdx,8),%xmm2
movsd  %xmm2,(%r9,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r15
jne    16c0 <housholder+0x5a0>
jmp    14f0 <housholder+0x3d0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0xb0(%rbp),%rax
jmp    11fb <housholder+0xdb>
add    %r14,%r10
jmp    1290 <housholder+0x170>
xor    %edi,%edi
test   $0x1,%r8b
jne    13db <housholder+0x2bb>
jmp    1400 <housholder+0x2e0>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @housholder(double* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double
%7 = zext i32 %2 to i64
%8 = alloca double, i64 %7
%9 = bitcast double* %6 to i8*
%10 = icmp sgt i32 %3, 0
br i1 %10, label %11, label %311
11: ; preds = %5
%12 = shl i32 %2, 3
%13 = icmp eq i32 %4, 0
%14 = add i32 %2, 1
%15 = sext i32 %1 to i64
%16 = zext i32 %3 to i64
%17 = sext i32 %2 to i64
%18 = zext i32 %3 to i64
%19 = add i32 %1, 1
%20 = sub nsw i64 0, %7
%21 = sub nsw i64 0, %7
br label %22
22: ; preds = %11, %307
%23 = phi i64 [ 1, %11 ], [ %309, %307 ]
%24 = phi i64 [ 0, %11 ], [ %308, %307 ]
%25 = call i32 @memset(double* %8, i32 0, i32 %12)
%26 = trunc i64 %24 to i32
%27 = call i64 @hougenu(double* %0, i32 %1, i32 %26, i32 %2, i32 %26, double* %8, double* %6)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %22
%30 = add nuw nsw i64 %24, 1
br label %307
31: ; preds = %22
br i1 %13, label %159, label %32
32: ; preds = %31
%33 = icmp slt i64 %24, %17
%34 = trunc i64 %24 to i32
%35 = mul i32 %34, %1
br i1 %33, label %36, label %154
36: ; preds = %32
%37 = sub i64 %7, %24
%38 = icmp ult i64 %37, 4
br i1 %38, label %117, label %39
39: ; preds = %36
%40 = xor i64 %24, -1
%41 = add i64 %40, %7
%42 = mul i32 %19, %34
%43 = add i32 %42, 1
%44 = trunc i64 %41 to i32
%45 = add i32 %43, %44
%46 = icmp slt i32 %45, %43
%47 = icmp ugt i64 %41, 4294967295
%48 = or i1 %46, %47
br i1 %48, label %117, label %49
49: ; preds = %39
%50 = and i64 %37, -4
%51 = add i64 %24, %50
%52 = add i64 %50, -4
%53 = lshr exact i64 %52, 2
%54 = add nuw nsw i64 %53, 1
%55 = and i64 %54, 1
%56 = icmp eq i64 %52, 0
br i1 %56, label %96, label %57
57: ; preds = %49
%58 = and i64 %54, 9223372036854775806
br label %59
59: ; preds = %59, %57
%60 = phi i64 [ 0, %57 ], [ %93, %59 ]
%61 = phi i64 [ 0, %57 ], [ %94, %59 ]
%62 = add i64 %24, %60
%63 = getelementptr inbounds double, double* %8, i64 %60
%64 = bitcast double* %63 to <2 x double>*
%65 = load <2 x double>, <2 x double>* %64
%66 = getelementptr inbounds double, double* %63, i64 2
%67 = bitcast double* %66 to <2 x double>*
%68 = load <2 x double>, <2 x double>* %67
%69 = trunc i64 %62 to i32
%70 = add i32 %69, 1
%71 = add i32 %35, %70
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %0, i64 %72
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %65, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %68, <2 x double>* %76
%77 = or i64 %60, 4
%78 = add i64 %24, %77
%79 = getelementptr inbounds double, double* %8, i64 %77
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = getelementptr inbounds double, double* %79, i64 2
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = trunc i64 %78 to i32
%86 = add i32 %85, 1
%87 = add i32 %35, %86
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %0, i64 %88
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> %81, <2 x double>* %90
%91 = getelementptr inbounds double, double* %89, i64 2
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> %84, <2 x double>* %92
%93 = add nuw i64 %60, 8
%94 = add i64 %61, 2
%95 = icmp eq i64 %94, %58
br i1 %95, label %96, label %59
96: ; preds = %59, %49
%97 = phi i64 [ 0, %49 ], [ %93, %59 ]
%98 = icmp eq i64 %55, 0
br i1 %98, label %115, label %99
99: ; preds = %96
%100 = add i64 %24, %97
%101 = getelementptr inbounds double, double* %8, i64 %97
%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 = trunc i64 %100 to i32
%108 = add i32 %107, 1
%109 = add i32 %35, %108
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %0, i64 %110
%112 = bitcast double* %111 to <2 x double>*
store <2 x double> %103, <2 x double>* %112
%113 = getelementptr inbounds double, double* %111, i64 2
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> %106, <2 x double>* %114
br label %115
115: ; preds = %96, %99
%116 = icmp eq i64 %37, %50
br i1 %116, label %154, label %117
117: ; preds = %39, %36, %115
%118 = phi i64 [ %24, %39 ], [ %24, %36 ], [ %51, %115 ]
%119 = sub i64 %7, %118
%120 = xor i64 %118, -1
%121 = and i64 %119, 1
%122 = icmp eq i64 %121, 0
br i1 %122, label %132, label %123
123: ; preds = %117
%124 = sub nuw nsw i64 %118, %24
%125 = getelementptr inbounds double, double* %8, i64 %124
%126 = load double, double* %125
%127 = add nuw nsw i64 %118, 1
%128 = trunc i64 %127 to i32
%129 = add i32 %35, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %0, i64 %130
store double %126, double* %131
br label %132
132: ; preds = %123, %117
%133 = phi i64 [ %118, %117 ], [ %127, %123 ]
%134 = icmp eq i64 %120, %20
br i1 %134, label %154, label %135
135: ; preds = %132, %135
%136 = phi i64 [ %148, %135 ], [ %133, %132 ]
%137 = sub nuw nsw i64 %136, %24
%138 = getelementptr inbounds double, double* %8, i64 %137
%139 = load double, double* %138
%140 = add nuw nsw i64 %136, 1
%141 = trunc i64 %140 to i32
%142 = add i32 %35, %141
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %0, i64 %143
store double %139, double* %144
%145 = sub nuw nsw i64 %140, %24
%146 = getelementptr inbounds double, double* %8, i64 %145
%147 = load double, double* %146
%148 = add nuw nsw i64 %136, 2
%149 = trunc i64 %148 to i32
%150 = add i32 %35, %149
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %0, i64 %151
store double %147, double* %152
%153 = icmp eq i64 %148, %7
br i1 %153, label %154, label %135
154: ; preds = %132, %135, %115, %32
%155 = load double, double* %6
%156 = add i32 %14, %35
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %0, i64 %157
store double %155, double* %158
br label %159
159: ; preds = %154, %31
%160 = add nuw nsw i64 %24, 1
%161 = icmp slt i64 %160, %16
br i1 %161, label %162, label %307
162: ; preds = %159
%163 = icmp slt i64 %24, %17
%164 = load double, double* %6
%165 = sub i64 %7, %24
%166 = xor i64 %24, -1
%167 = add i64 %165, -4
%168 = lshr i64 %167, 2
%169 = add nuw nsw i64 %168, 1
%170 = and i64 %165, 1
%171 = icmp eq i64 %170, 0
%172 = add nuw nsw i64 %24, 1
%173 = icmp eq i64 %166, %21
%174 = icmp ult i64 %165, 4
%175 = and i64 %165, -4
%176 = add i64 %24, %175
%177 = and i64 %169, 1
%178 = icmp ult i64 %167, 4
%179 = and i64 %169, 9223372036854775806
%180 = icmp eq i64 %177, 0
%181 = icmp eq i64 %165, %175
br label %185
182: ; preds = %296, %273, %185, %199
%183 = add nuw nsw i64 %186, 1
%184 = icmp eq i64 %183, %18
br i1 %184, label %307, label %185
185: ; preds = %162, %182
%186 = phi i64 [ %23, %162 ], [ %183, %182 ]
br i1 %163, label %187, label %182
187: ; preds = %185
%188 = mul nsw i64 %186, %15
br i1 %171, label %195, label %189
189: ; preds = %187
%190 = load double, double* %8
%191 = add nsw i64 %24, %188
%192 = getelementptr inbounds double, double* %0, i64 %191
%193 = load double, double* %192
%194 = call double @llvm.fmuladd.f64(double %190, double %193, double 0.000000e+00)
br label %195
195: ; preds = %189, %187
%196 = phi double [ undef, %187 ], [ %194, %189 ]
%197 = phi i64 [ %24, %187 ], [ %172, %189 ]
%198 = phi double [ 0.000000e+00, %187 ], [ %194, %189 ]
br i1 %173, label %199, label %276
199: ; preds = %276, %195
%200 = phi double [ %196, %195 ], [ %293, %276 ]
br i1 %163, label %201, label %182
201: ; preds = %199
%202 = fmul double %200, %164
%203 = mul nsw i64 %186, %15
br i1 %174, label %274, label %204
204: ; preds = %201
%205 = insertelement <2 x double> poison, double %202, i64 0
%206 = shufflevector <2 x double> %205, <2 x double> poison, <2 x i32> zeroinitializer
%207 = insertelement <2 x double> poison, double %202, i64 0
%208 = shufflevector <2 x double> %207, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %178, label %252, label %209
209: ; preds = %204, %209
%210 = phi i64 [ %249, %209 ], [ 0, %204 ]
%211 = phi i64 [ %250, %209 ], [ 0, %204 ]
%212 = add i64 %24, %210
%213 = getelementptr inbounds double, double* %8, i64 %210
%214 = bitcast double* %213 to <2 x double>*
%215 = load <2 x double>, <2 x double>* %214
%216 = getelementptr inbounds double, double* %213, i64 2
%217 = bitcast double* %216 to <2 x double>*
%218 = load <2 x double>, <2 x double>* %217
%219 = add nsw i64 %212, %203
%220 = getelementptr inbounds double, double* %0, i64 %219
%221 = bitcast double* %220 to <2 x double>*
%222 = load <2 x double>, <2 x double>* %221
%223 = getelementptr inbounds double, double* %220, i64 2
%224 = bitcast double* %223 to <2 x double>*
%225 = load <2 x double>, <2 x double>* %224
%226 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %206, <2 x double> %215, <2 x double> %222)
%227 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %208, <2 x double> %218, <2 x double> %225)
%228 = bitcast double* %220 to <2 x double>*
store <2 x double> %226, <2 x double>* %228
%229 = bitcast double* %223 to <2 x double>*
store <2 x double> %227, <2 x double>* %229
%230 = or i64 %210, 4
%231 = add i64 %24, %230
%232 = getelementptr inbounds double, double* %8, i64 %230
%233 = bitcast double* %232 to <2 x double>*
%234 = load <2 x double>, <2 x double>* %233
%235 = getelementptr inbounds double, double* %232, i64 2
%236 = bitcast double* %235 to <2 x double>*
%237 = load <2 x double>, <2 x double>* %236
%238 = add nsw i64 %231, %203
%239 = getelementptr inbounds double, double* %0, i64 %238
%240 = bitcast double* %239 to <2 x double>*
%241 = load <2 x double>, <2 x double>* %240
%242 = getelementptr inbounds double, double* %239, i64 2
%243 = bitcast double* %242 to <2 x double>*
%244 = load <2 x double>, <2 x double>* %243
%245 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %206, <2 x double> %234, <2 x double> %241)
%246 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %208, <2 x double> %237, <2 x double> %244)
%247 = bitcast double* %239 to <2 x double>*
store <2 x double> %245, <2 x double>* %247
%248 = bitcast double* %242 to <2 x double>*
store <2 x double> %246, <2 x double>* %248
%249 = add nuw i64 %210, 8
%250 = add i64 %211, 2
%251 = icmp eq i64 %250, %179
br i1 %251, label %252, label %209
252: ; preds = %209, %204
%253 = phi i64 [ 0, %204 ], [ %249, %209 ]
br i1 %180, label %273, label %254
254: ; preds = %252
%255 = add i64 %24, %253
%256 = getelementptr inbounds double, double* %8, i64 %253
%257 = bitcast double* %256 to <2 x double>*
%258 = load <2 x double>, <2 x double>* %257
%259 = getelementptr inbounds double, double* %256, i64 2
%260 = bitcast double* %259 to <2 x double>*
%261 = load <2 x double>, <2 x double>* %260
%262 = add nsw i64 %255, %203
%263 = getelementptr inbounds double, double* %0, i64 %262
%264 = bitcast double* %263 to <2 x double>*
%265 = load <2 x double>, <2 x double>* %264
%266 = getelementptr inbounds double, double* %263, i64 2
%267 = bitcast double* %266 to <2 x double>*
%268 = load <2 x double>, <2 x double>* %267
%269 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %206, <2 x double> %258, <2 x double> %265)
%270 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %208, <2 x double> %261, <2 x double> %268)
%271 = bitcast double* %263 to <2 x double>*
store <2 x double> %269, <2 x double>* %271
%272 = bitcast double* %266 to <2 x double>*
store <2 x double> %270, <2 x double>* %272
br label %273
273: ; preds = %252, %254
br i1 %181, label %182, label %274
274: ; preds = %201, %273
%275 = phi i64 [ %24, %201 ], [ %176, %273 ]
br label %296
276: ; preds = %195, %276
%277 = phi i64 [ %294, %276 ], [ %197, %195 ]
%278 = phi double [ %293, %276 ], [ %198, %195 ]
%279 = sub nuw nsw i64 %277, %24
%280 = getelementptr inbounds double, double* %8, i64 %279
%281 = load double, double* %280
%282 = add nsw i64 %277, %188
%283 = getelementptr inbounds double, double* %0, i64 %282
%284 = load double, double* %283
%285 = call double @llvm.fmuladd.f64(double %281, double %284, double %278)
%286 = add nuw nsw i64 %277, 1
%287 = sub nuw nsw i64 %286, %24
%288 = getelementptr inbounds double, double* %8, i64 %287
%289 = load double, double* %288
%290 = add nsw i64 %286, %188
%291 = getelementptr inbounds double, double* %0, i64 %290
%292 = load double, double* %291
%293 = call double @llvm.fmuladd.f64(double %289, double %292, double %285)
%294 = add nuw nsw i64 %277, 2
%295 = icmp eq i64 %294, %7
br i1 %295, label %199, label %276
296: ; preds = %274, %296
%297 = phi i64 [ %305, %296 ], [ %275, %274 ]
%298 = sub nuw nsw i64 %297, %24
%299 = getelementptr inbounds double, double* %8, i64 %298
%300 = load double, double* %299
%301 = add nsw i64 %297, %203
%302 = getelementptr inbounds double, double* %0, i64 %301
%303 = load double, double* %302
%304 = call double @llvm.fmuladd.f64(double %202, double %300, double %303)
store double %304, double* %302
%305 = add nuw nsw i64 %297, 1
%306 = icmp eq i64 %305, %7
br i1 %306, label %182, label %296
307: ; preds = %182, %29, %159
%308 = phi i64 [ %30, %29 ], [ %160, %159 ], [ %160, %182 ]
%309 = add nuw nsw i64 %23, 1
%310 = icmp eq i64 %308, %18
br i1 %310, label %311, label %22
311: ; preds = %307, %5
ret void
}