#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ mmult(double *, double *, double *, int, int, int);
double sqrt(double);
double house_1(double *x, int N, double *v) {
  double beta, mu, temp;
  double *sigma;
  int i;
  sigma = (double *)malloc(sizeof(double) * 1);
  if (N > 1) {
    mmult(x + 1, x + 1, sigma, 1, N - 1, 1);
  } else {
    sigma[0] = 0.0;
  }
  v[0] = 1.;
  for (i = 1; i < N; ++i) {
    v[i] = x[i];
  }
  if (sigma[0] == 0. && x[0] >= 0.) {
    beta = 0.;
  } else if (sigma[0] == 0. && x[0] < 0.) {
    beta = -2.;
  } else {
    mu = sqrt(sigma[0] + x[0] * x[0]);
    if (x[0] <= 0.) {
      v[0] = x[0] - mu;
    } else {
      v[0] = -sigma[0] / (x[0] + mu);
    }
    temp = v[0];
    beta = (2.0 * v[0] * v[0]) / (sigma[0] + v[0] * v[0]);
    for (i = 0; i < N; ++i) {
      v[i] /= temp;
    }
  }
  free(sigma);
  return beta;
}


x86 assembly (clang, -O0):
<house_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    119a <house_1+0x5a>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
mov    -0x38(%rbp),%rdx
mov    -0xc(%rbp),%r8d
sub    $0x1,%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1040 <mmult@plt>
jmp    11a5 <house_1+0x65>
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe4f(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f0 <house_1+0xb0>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11bc <house_1+0x7c>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    122d <house_1+0xed>
jp     122d <house_1+0xed>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     122d <house_1+0xed>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    138c <house_1+0x24c>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    126b <house_1+0x12b>
jp     126b <house_1+0x12b>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    126b <house_1+0x12b>
movsd  0xdaf(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1387 <house_1+0x247>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jb     12c0 <house_1+0x180>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    12f8 <house_1+0x1b8>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xcf7(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1382 <house_1+0x242>
movsd  -0x30(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    134d <house_1+0x20d>
jmp    1387 <house_1+0x247>
jmp    138c <house_1+0x24c>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<house_1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r12
mov    %esi,%r15d
mov    %rdi,%rbx
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
movabs $0x3ff0000000000000,%rbp
cmp    $0x1,%r15d
jle    11f2 <house_1+0xb2>
lea    0x8(%rbx),%r13
lea    -0x1(%r15),%r8d
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1040 <mmult@plt>
mov    %rbp,(%r12)
mov    %r15d,%eax
lea    -0x1(%rax),%r8
mov    $0x1,%ecx
cmp    $0x4,%r8
jb     12b3 <house_1+0x173>
lea    0x8(%r12),%rdx
lea    (%rbx,%rax,8),%rsi
cmp    %rsi,%rdx
jae    11ca <house_1+0x8a>
lea    (%r12,%rax,8),%rdx
cmp    %rdx,%r13
jb     12b3 <house_1+0x173>
mov    %r8,%rcx
and    $0xfffffffffffffffc,%rcx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rdi
jae    1202 <house_1+0xc2>
xor    %edi,%edi
jmp    1272 <house_1+0x132>
movq   $0x0,(%r14)
mov    %rbp,(%r12)
jmp    132b <house_1+0x1eb>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movups 0x8(%rbx,%rdi,8),%xmm0
movups 0x18(%rbx,%rdi,8),%xmm1
movups %xmm0,0x8(%r12,%rdi,8)
movups %xmm1,0x18(%r12,%rdi,8)
movups 0x28(%rbx,%rdi,8),%xmm0
movups 0x38(%rbx,%rdi,8),%xmm1
movups %xmm0,0x28(%r12,%rdi,8)
movups %xmm1,0x38(%r12,%rdi,8)
movups 0x48(%rbx,%rdi,8),%xmm0
movups 0x58(%rbx,%rdi,8),%xmm1
movups %xmm0,0x48(%r12,%rdi,8)
movups %xmm1,0x58(%r12,%rdi,8)
movups 0x68(%rbx,%rdi,8),%xmm0
movups 0x78(%rbx,%rdi,8),%xmm1
movups %xmm0,0x68(%r12,%rdi,8)
movups %xmm1,0x78(%r12,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1210 <house_1+0xd0>
test   %rdx,%rdx
je     12aa <house_1+0x16a>
nopw   0x0(%rax,%rax,1)
lea    0x0(,%rdi,8),%rsi
or     $0x8,%rsi
movups (%rbx,%rsi,1),%xmm0
movups 0x10(%rbx,%rsi,1),%xmm1
movups %xmm0,(%r12,%rsi,1)
movups %xmm1,0x10(%r12,%rsi,1)
add    $0x4,%rdi
add    $0xffffffffffffffff,%rdx
jne    1280 <house_1+0x140>
cmp    %rcx,%r8
je     132b <house_1+0x1eb>
or     $0x1,%rcx
mov    %eax,%esi
sub    %ecx,%esi
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
and    $0x3,%rsi
je     12e5 <house_1+0x1a5>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    12d0 <house_1+0x190>
cmp    $0x3,%rdx
jb     132b <house_1+0x1eb>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
movsd  0x8(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r12,%rcx,8)
movsd  0x10(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r12,%rcx,8)
movsd  0x18(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r12,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    12f0 <house_1+0x1b0>
movsd  (%r14),%xmm1
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm1
movsd  (%rbx),%xmm0
jne    1362 <house_1+0x222>
jp     1362 <house_1+0x222>
ucomisd %xmm3,%xmm0
jae    1376 <house_1+0x236>
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jbe    1362 <house_1+0x222>
movsd  0xca8(%rip),%xmm0
movapd %xmm0,(%rsp)
jmp    14b9 <house_1+0x379>
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     1384 <house_1+0x244>
sqrtsd %xmm0,%xmm0
jmp    1389 <house_1+0x249>
xorpd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
jmp    14b9 <house_1+0x379>
call   1060 <sqrt@plt>
movsd  (%rbx),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jae    13ae <house_1+0x26e>
addsd  %xmm1,%xmm0
movsd  (%r14),%xmm1
xorpd  0xc68(%rip),%xmm1
divsd  %xmm0,%xmm1
jmp    13b2 <house_1+0x272>
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
movapd %xmm1,%xmm4
addsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  (%r14),%xmm0
divsd  %xmm0,%xmm4
test   %r15d,%r15d
movapd %xmm4,(%rsp)
jle    14b9 <house_1+0x379>
movapd %xmm1,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r12)
cmp    $0x1,%r15d
je     14b9 <house_1+0x379>
mov    %r15d,%eax
lea    -0x1(%rax),%rcx
mov    $0x1,%edx
cmp    $0x2,%rcx
jb     14a0 <house_1+0x360>
mov    %rcx,%rdx
and    $0xfffffffffffffffe,%rdx
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
lea    -0x2(%rdx),%rsi
mov    %rsi,%rbx
shr    %rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     14d4 <house_1+0x394>
mov    %rbx,%rsi
and    $0xfffffffffffffffe,%rsi
mov    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd (%r12,%rdi,8),%xmm2
movupd 0x10(%r12,%rdi,8),%xmm3
divpd  %xmm0,%xmm2
movupd %xmm2,(%r12,%rdi,8)
divpd  %xmm0,%xmm3
movupd %xmm3,0x10(%r12,%rdi,8)
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1450 <house_1+0x310>
test   $0x1,%bl
je     1491 <house_1+0x351>
movupd (%r12,%rdi,8),%xmm2
divpd  %xmm0,%xmm2
movupd %xmm2,(%r12,%rdi,8)
cmp    %rdx,%rcx
je     14b9 <house_1+0x379>
or     $0x1,%rcx
mov    %rcx,%rdx
nopl   (%rax)
movsd  (%r12,%rdx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r12,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    14a0 <house_1+0x360>
mov    %r14,%rdi
call   1030 <free@plt>
movaps (%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%edi
test   $0x1,%bl
jne    1481 <house_1+0x341>
jmp    1491 <house_1+0x351>

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

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