#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_2(double *x, int N, double *v) {
  double sgn, beta, sc;
  double *sigma, *e;
  int i;
  sigma = (double *)malloc(sizeof(double) * 1);
  e = (double *)malloc(sizeof(double) * N);
  beta = 2.0;
  sgn = 1.0;
  mmult(x, x, sigma, 1, N, 1);
  sigma[0] = sqrt(sigma[0]);
  e[0] = 1.;
  for (i = 1; i < N; ++i) {
    e[i] = 0.;
  }
  if (x[0] > 0.) {
    sgn = 1.0;
  } else if (x[0] < 0.) {
    sgn = -1.0;
  } else if (x[0] == 0.) {
    sgn = 0.;
  }
  sc = sigma[0] * sgn;
  e[0] *= sc;
  for (i = 0; i < N; ++i) {
    v[i] = e[i] + x[i];
  }
  mmult(v, v, sigma, 1, N, 1);
  sigma[0] = sqrt(sigma[0]);
  for (i = 0; i < N; ++i) {
    v[i] = v[i] / sigma[0];
  }
  free(sigma);
  free(e);
  return beta;
}


x86 assembly (clang, -O0):
<house_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x40(%rbp)
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe77(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1040 <mmult@plt>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <sqrt@plt>
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
movsd  0xe33(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1202 <house_2+0xc2>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11d8 <house_2+0x98>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1229 <house_2+0xe9>
movsd  0xde1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1279 <house_2+0x139>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    124c <house_2+0x10c>
movsd  0xdce(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1274 <house_2+0x134>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    126f <house_2+0x12f>
jp     126f <house_2+0x12f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1274 <house_2+0x134>
jmp    1279 <house_2+0x139>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x40(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12e4 <house_2+0x1a4>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12a3 <house_2+0x163>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1040 <mmult@plt>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <sqrt@plt>
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    135a <house_2+0x21a>
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    131e <house_2+0x1de>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<house_2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r12d
mov    %rdi,%r13
mov    $0x8,%edi
call   1060 <malloc@plt>
mov    %rax,%r14
lea    0x0(,%r12,8),%edi
call   1060 <malloc@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
mov    %r12d,%r8d
mov    $0x1,%r9d
call   1040 <mmult@plt>
movsd  (%r14),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b2 <house_2+0x62>
sqrtsd %xmm0,%xmm0
jmp    11b7 <house_2+0x67>
call   1070 <sqrt@plt>
movsd  %xmm0,(%r14)
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r15)
cmp    $0x2,%r12d
jl     11e3 <house_2+0x93>
lea    0x8(%r15),%rdi
lea    -0x1(%r12),%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1050 <memset@plt>
movsd  0x0(%r13),%xmm1
movsd  0xe0f(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
ja     121b <house_2+0xcb>
ucomisd %xmm1,%xmm2
jbe    120b <house_2+0xbb>
movsd  0xdff(%rip),%xmm0
jmp    121b <house_2+0xcb>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    121b <house_2+0xcb>
jp     121b <house_2+0xcb>
xorpd  %xmm0,%xmm0
mulsd  (%r14),%xmm0
movsd  %xmm0,(%r15)
mov    %r12d,%ebp
test   %r12d,%r12d
jle    142f <house_2+0x2df>
addsd  0x0(%r13),%xmm0
movsd  %xmm0,(%rbx)
cmp    $0x1,%r12d
je     142f <house_2+0x2df>
lea    -0x1(%rbp),%r8
mov    $0x1,%eax
cmp    $0x4,%r8
jae    12fc <house_2+0x1ac>
mov    %ebp,%edx
sub    %eax,%edx
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
and    $0x3,%rdx
je     128c <house_2+0x13c>
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rax,8),%xmm0
addsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1270 <house_2+0x120>
cmp    $0x3,%rcx
jb     142f <house_2+0x2df>
cs nopw 0x0(%rax,%rax,1)
movsd  (%r15,%rax,8),%xmm0
addsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%r15,%rax,8),%xmm0
addsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%r15,%rax,8),%xmm0
addsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%r15,%rax,8),%xmm0
addsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    12a0 <house_2+0x150>
jmp    142f <house_2+0x2df>
lea    0x8(%rbx),%rcx
lea    (%rbx,%rbp,8),%rsi
lea    (%r15,%rbp,8),%rdx
mov    %r15,%rdi
add    $0x8,%rdi
lea    0x8(%r13),%r9
lea    0x0(,%rbp,8),%r10
add    %r13,%r10
cmp    %rdx,%rcx
setb   %r11b
cmp    %rsi,%rdi
setb   %dil
cmp    %r10,%rcx
setb   %dl
cmp    %rsi,%r9
setb   %cl
test   %dil,%r11b
jne    1258 <house_2+0x108>
and    %cl,%dl
jne    1258 <house_2+0x108>
mov    %r8,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rcx,%rcx
je     15dc <house_2+0x48c>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd 0x8(%r15,%rdx,8),%xmm0
movupd 0x18(%r15,%rdx,8),%xmm1
movupd 0x8(%r13,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x18(%r13,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x8(%rbx,%rdx,8)
movupd %xmm0,0x18(%rbx,%rdx,8)
movupd 0x28(%r15,%rdx,8),%xmm0
movupd 0x38(%r15,%rdx,8),%xmm1
movupd 0x28(%r13,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x38(%r13,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x28(%rbx,%rdx,8)
movupd %xmm0,0x38(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1380 <house_2+0x230>
test   $0x1,%sil
je     1426 <house_2+0x2d6>
shl    $0x3,%rdx
or     $0x8,%rdx
movupd (%r15,%rdx,1),%xmm0
movupd 0x10(%r15,%rdx,1),%xmm1
movupd 0x0(%r13,%rdx,1),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r13,%rdx,1),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rdx,1)
movupd %xmm0,0x10(%rbx,%rdx,1)
cmp    %rax,%r8
jne    15c0 <house_2+0x470>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
mov    %r12d,%r8d
mov    $0x1,%r9d
call   1040 <mmult@plt>
movsd  (%r14),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1460 <house_2+0x310>
sqrtsd %xmm0,%xmm0
jmp    1465 <house_2+0x315>
call   1070 <sqrt@plt>
movsd  %xmm0,(%r14)
test   %r12d,%r12d
jle    1599 <house_2+0x449>
movsd  (%rbx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
cmp    $0x1,%r12d
je     1599 <house_2+0x449>
lea    -0x1(%rbp),%rax
mov    $0x1,%ecx
cmp    $0x2,%rax
jb     1540 <house_2+0x3f0>
cmp    %rbx,%r14
jbe    14ae <house_2+0x35e>
lea    (%rbx,%rbp,8),%rdx
cmp    %rdx,%r14
jb     1540 <house_2+0x3f0>
mov    %rax,%rcx
and    $0xfffffffffffffffe,%rcx
lea    -0x2(%rcx),%rsi
mov    %rsi,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     15c9 <house_2+0x479>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
movsd  (%r14),%xmm0
unpcklpd %xmm0,%xmm0
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%rbx,%rsi,8),%xmm1
movupd 0x10(%rbx,%rsi,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rsi,8)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rbx,%rsi,8)
add    $0x4,%rsi
add    $0xfffffffffffffffe,%rdi
jne    14f0 <house_2+0x3a0>
test   $0x1,%dl
je     1534 <house_2+0x3e4>
movsd  (%r14),%xmm0
unpcklpd %xmm0,%xmm0
movupd (%rbx,%rsi,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rsi,8)
cmp    %rcx,%rax
je     1599 <house_2+0x449>
or     $0x1,%rax
mov    %rax,%rcx
mov    %rcx,%rax
not    %rax
test   $0x1,%bpl
jne    155f <house_2+0x40f>
movsd  (%rbx,%rcx,8),%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    %rbp,%rax
je     1599 <house_2+0x449>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rcx,8),%xmm0
divsd  (%r14),%xmm0
movsd  0x8(%rbx,%rcx,8),%xmm1
movsd  %xmm0,(%rbx,%rcx,8)
divsd  (%r14),%xmm1
movsd  %xmm1,0x8(%rbx,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rbp
jne    1570 <house_2+0x420>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
movsd  0xa5f(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
or     $0x1,%rax
jmp    1258 <house_2+0x108>
mov    $0x1,%esi
test   $0x1,%dl
jne    151d <house_2+0x3cd>
jmp    1534 <house_2+0x3e4>
xor    %edx,%edx
test   $0x1,%sil
jne    13f0 <house_2+0x2a0>
jmp    1426 <house_2+0x2d6>

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

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