#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;
  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)
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  0xe40(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f5 <house_2+0xb5>
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    11cb <house_2+0x8b>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    121c <house_2+0xdc>
movsd  0xdee(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    126c <house_2+0x12c>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    123f <house_2+0xff>
movsd  0xddb(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1267 <house_2+0x127>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1262 <house_2+0x122>
jp     1262 <house_2+0x122>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1267 <house_2+0x127>
jmp    126c <house_2+0x12c>
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    12d7 <house_2+0x197>
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    1296 <house_2+0x156>
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    134d <house_2+0x20d>
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    1311 <house_2+0x1d1>
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),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11fd <house_2+0xad>
movsd  0xe05(%rip),%xmm0
jmp    1211 <house_2+0xc1>
ucomisd %xmm0,%xmm1
jbe    120d <house_2+0xbd>
movsd  0xdfd(%rip),%xmm0
jmp    1211 <house_2+0xc1>
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>
cs nopw 0x0(%rax,%rax,1)
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    124e <house_2+0xfe>
and    %cl,%dl
jne    124e <house_2+0xfe>
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    124e <house_2+0xfe>
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
%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 %26, label %23
23: ; preds = %20
%24 = fcmp olt double %21, 0.000000e+00
br i1 %24, label %26, label %25
25: ; preds = %23
br label %26
26: ; preds = %25, %23, %20
%27 = phi double [ 1.000000e+00, %20 ], [ -1.000000e+00, %23 ], [ 0.000000e+00, %25 ]
%28 = load double, double* %5
%29 = fmul double %27, %28
store double %29, double* %9
%30 = icmp sgt i32 %1, 0
br i1 %30, label %31, label %185
31: ; preds = %26
%32 = zext i32 %1 to i64
%33 = load double, double* %0
%34 = fadd double %29, %33
store double %34, double* %2
%35 = icmp eq i32 %1, 1
br i1 %35, label %185, label %36
36: ; preds = %31
%37 = add nsw i64 %32, -1
%38 = icmp ult i64 %37, 4
br i1 %38, label %132, label %39
39: ; preds = %36
%40 = getelementptr double, double* %2, i64 1
%41 = getelementptr double, double* %2, i64 %32
%42 = getelementptr double, double* %9, i64 1
%43 = getelementptr double, double* %9, i64 %32
%44 = getelementptr double, double* %0, i64 1
%45 = getelementptr double, double* %0, i64 %32
%46 = icmp ult double* %40, %43
%47 = icmp ult double* %42, %41
%48 = and i1 %46, %47
%49 = icmp ult double* %40, %45
%50 = icmp ult double* %44, %41
%51 = and i1 %49, %50
%52 = or i1 %48, %51
br i1 %52, label %132, label %53
53: ; preds = %39
%54 = and i64 %37, -4
%55 = or i64 %54, 1
%56 = add nsw i64 %54, -4
%57 = lshr exact i64 %56, 2
%58 = add nuw nsw i64 %57, 1
%59 = and i64 %58, 1
%60 = icmp eq i64 %56, 0
br i1 %60, label %107, label %61
61: ; preds = %53
%62 = and i64 %58, 9223372036854775806
br label %63
63: ; preds = %63, %61
%64 = phi i64 [ 0, %61 ], [ %104, %63 ]
%65 = phi i64 [ 0, %61 ], [ %105, %63 ]
%66 = or i64 %64, 1
%67 = getelementptr inbounds double, double* %9, i64 %66
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds double, double* %67, i64 2
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = getelementptr inbounds double, double* %0, i64 %66
%74 = bitcast double* %73 to <2 x double>*
%75 = load <2 x double>, <2 x double>* %74
%76 = getelementptr inbounds double, double* %73, i64 2
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = fadd <2 x double> %69, %75
%80 = fadd <2 x double> %72, %78
%81 = getelementptr inbounds double, double* %2, i64 %66
%82 = bitcast double* %81 to <2 x double>*
store <2 x double> %79, <2 x double>* %82
%83 = getelementptr inbounds double, double* %81, i64 2
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> %80, <2 x double>* %84
%85 = or i64 %64, 5
%86 = getelementptr inbounds double, double* %9, i64 %85
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %86, i64 2
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %0, i64 %85
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds double, double* %92, i64 2
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fadd <2 x double> %88, %94
%99 = fadd <2 x double> %91, %97
%100 = getelementptr inbounds double, double* %2, i64 %85
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %98, <2 x double>* %101
%102 = getelementptr inbounds double, double* %100, i64 2
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %99, <2 x double>* %103
%104 = add nuw i64 %64, 8
%105 = add i64 %65, 2
%106 = icmp eq i64 %105, %62
br i1 %106, label %107, label %63
107: ; preds = %63, %53
%108 = phi i64 [ 0, %53 ], [ %104, %63 ]
%109 = icmp eq i64 %59, 0
br i1 %109, label %130, label %110
110: ; preds = %107
%111 = or i64 %108, 1
%112 = getelementptr inbounds double, double* %9, i64 %111
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = getelementptr inbounds double, double* %112, i64 2
%116 = bitcast double* %115 to <2 x double>*
%117 = load <2 x double>, <2 x double>* %116
%118 = getelementptr inbounds double, double* %0, i64 %111
%119 = bitcast double* %118 to <2 x double>*
%120 = load <2 x double>, <2 x double>* %119
%121 = getelementptr inbounds double, double* %118, i64 2
%122 = bitcast double* %121 to <2 x double>*
%123 = load <2 x double>, <2 x double>* %122
%124 = fadd <2 x double> %114, %120
%125 = fadd <2 x double> %117, %123
%126 = getelementptr inbounds double, double* %2, i64 %111
%127 = bitcast double* %126 to <2 x double>*
store <2 x double> %124, <2 x double>* %127
%128 = getelementptr inbounds double, double* %126, i64 2
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %125, <2 x double>* %129
br label %130
130: ; preds = %107, %110
%131 = icmp eq i64 %37, %54
br i1 %131, label %185, label %132
132: ; preds = %39, %36, %130
%133 = phi i64 [ 1, %39 ], [ 1, %36 ], [ %55, %130 ]
%134 = sub nsw i64 %32, %133
%135 = xor i64 %133, -1
%136 = add nsw i64 %135, %32
%137 = and i64 %134, 3
%138 = icmp eq i64 %137, 0
br i1 %138, label %151, label %139
139: ; preds = %132, %139
%140 = phi i64 [ %148, %139 ], [ %133, %132 ]
%141 = phi i64 [ %149, %139 ], [ 0, %132 ]
%142 = getelementptr inbounds double, double* %9, i64 %140
%143 = load double, double* %142
%144 = getelementptr inbounds double, double* %0, i64 %140
%145 = load double, double* %144
%146 = fadd double %143, %145
%147 = getelementptr inbounds double, double* %2, i64 %140
store double %146, double* %147
%148 = add nuw nsw i64 %140, 1
%149 = add i64 %141, 1
%150 = icmp eq i64 %149, %137
br i1 %150, label %151, label %139
151: ; preds = %139, %132
%152 = phi i64 [ %133, %132 ], [ %148, %139 ]
%153 = icmp ult i64 %136, 3
br i1 %153, label %185, label %154
154: ; preds = %151, %154
%155 = phi i64 [ %183, %154 ], [ %152, %151 ]
%156 = getelementptr inbounds double, double* %9, i64 %155
%157 = load double, double* %156
%158 = getelementptr inbounds double, double* %0, i64 %155
%159 = load double, double* %158
%160 = fadd double %157, %159
%161 = getelementptr inbounds double, double* %2, i64 %155
store double %160, double* %161
%162 = add nuw nsw i64 %155, 1
%163 = getelementptr inbounds double, double* %9, i64 %162
%164 = load double, double* %163
%165 = getelementptr inbounds double, double* %0, i64 %162
%166 = load double, double* %165
%167 = fadd double %164, %166
%168 = getelementptr inbounds double, double* %2, i64 %162
store double %167, double* %168
%169 = add nuw nsw i64 %155, 2
%170 = getelementptr inbounds double, double* %9, i64 %169
%171 = load double, double* %170
%172 = getelementptr inbounds double, double* %0, i64 %169
%173 = load double, double* %172
%174 = fadd double %171, %173
%175 = getelementptr inbounds double, double* %2, i64 %169
store double %174, double* %175
%176 = add nuw nsw i64 %155, 3
%177 = getelementptr inbounds double, double* %9, i64 %176
%178 = load double, double* %177
%179 = getelementptr inbounds double, double* %0, i64 %176
%180 = load double, double* %179
%181 = fadd double %178, %180
%182 = getelementptr inbounds double, double* %2, i64 %176
store double %181, double* %182
%183 = add nuw nsw i64 %155, 4
%184 = icmp eq i64 %183, %32
br i1 %184, label %185, label %154
185: ; preds = %151, %154, %31, %130, %26
%186 = tail call i32 @mmult(double* %2, double* %2, double* %5, i32 1, i32 %1, i32 1)
%187 = load double, double* %5
%188 = tail call double @sqrt(double %187)
store double %188, double* %5
br i1 %30, label %189, label %281
189: ; preds = %185
%190 = zext i32 %1 to i64
%191 = load double, double* %2
%192 = fdiv double %191, %188
store double %192, double* %2
%193 = icmp eq i32 %1, 1
br i1 %193, label %281, label %194
194: ; preds = %189
%195 = add nsw i64 %190, -1
%196 = icmp ult i64 %195, 2
br i1 %196, label %253, label %197
197: ; preds = %194
%198 = getelementptr double, double* %2, i64 %190
%199 = bitcast double* %198 to i8*
%200 = icmp ugt double* %5, %2
%201 = icmp ult i8* %6, %199
%202 = and i1 %200, %201
br i1 %202, label %253, label %203
203: ; preds = %197
%204 = and i64 %195, -2
%205 = or i64 %195, 1
%206 = add nsw i64 %204, -2
%207 = lshr exact i64 %206, 1
%208 = add nuw i64 %207, 1
%209 = and i64 %208, 1
%210 = icmp eq i64 %206, 0
br i1 %210, label %239, label %211
211: ; preds = %203
%212 = and i64 %208, -2
%213 = load double, double* %5
%214 = insertelement <2 x double> poison, double %213, i64 0
%215 = shufflevector <2 x double> %214, <2 x double> poison, <2 x i32> zeroinitializer
%216 = load double, double* %5
%217 = insertelement <2 x double> poison, double %216, i64 0
%218 = shufflevector <2 x double> %217, <2 x double> poison, <2 x i32> zeroinitializer
br label %219
219: ; preds = %219, %211
%220 = phi i64 [ 0, %211 ], [ %234, %219 ]
%221 = phi i64 [ 0, %211 ], [ %235, %219 ]
%222 = or i64 %220, 1
%223 = getelementptr inbounds double, double* %2, i64 %222
%224 = bitcast double* %223 to <2 x double>*
%225 = load <2 x double>, <2 x double>* %224
%226 = fdiv <2 x double> %225, %215
%227 = bitcast double* %223 to <2 x double>*
store <2 x double> %226, <2 x double>* %227
%228 = or i64 %220, 3
%229 = getelementptr inbounds double, double* %2, i64 %228
%230 = bitcast double* %229 to <2 x double>*
%231 = load <2 x double>, <2 x double>* %230
%232 = fdiv <2 x double> %231, %218
%233 = bitcast double* %229 to <2 x double>*
store <2 x double> %232, <2 x double>* %233
%234 = add nuw i64 %220, 4
%235 = add nuw i64 %221, 2
%236 = icmp eq i64 %235, %212
br i1 %236, label %237, label %219
237: ; preds = %219
%238 = or i64 %234, 1
br label %239
239: ; preds = %237, %203
%240 = phi i64 [ 1, %203 ], [ %238, %237 ]
%241 = icmp eq i64 %209, 0
br i1 %241, label %251, label %242
242: ; preds = %239
%243 = load double, double* %5
%244 = insertelement <2 x double> poison, double %243, i64 0
%245 = shufflevector <2 x double> %244, <2 x double> poison, <2 x i32> zeroinitializer
%246 = getelementptr inbounds double, double* %2, i64 %240
%247 = bitcast double* %246 to <2 x double>*
%248 = load <2 x double>, <2 x double>* %247
%249 = fdiv <2 x double> %248, %245
%250 = bitcast double* %246 to <2 x double>*
store <2 x double> %249, <2 x double>* %250
br label %251
251: ; preds = %239, %242
%252 = icmp eq i64 %195, %204
br i1 %252, label %281, label %253
253: ; preds = %197, %194, %251
%254 = phi i64 [ 1, %197 ], [ 1, %194 ], [ %205, %251 ]
%255 = xor i64 %254, -1
%256 = and i64 %190, 1
%257 = icmp eq i64 %256, 0
br i1 %257, label %258, label %264
258: ; preds = %253
%259 = load double, double* %5
%260 = getelementptr inbounds double, double* %2, i64 %254
%261 = load double, double* %260
%262 = fdiv double %261, %259
store double %262, double* %260
%263 = add nuw nsw i64 %254, 1
br label %264
264: ; preds = %258, %253
%265 = phi i64 [ %254, %253 ], [ %263, %258 ]
%266 = sub nsw i64 0, %190
%267 = icmp eq i64 %255, %266
br i1 %267, label %281, label %268
268: ; preds = %264, %268
%269 = phi i64 [ %279, %268 ], [ %265, %264 ]
%270 = load double, double* %5
%271 = getelementptr inbounds double, double* %2, i64 %269
%272 = load double, double* %271
%273 = fdiv double %272, %270
store double %273, double* %271
%274 = add nuw nsw i64 %269, 1
%275 = load double, double* %5
%276 = getelementptr inbounds double, double* %2, i64 %274
%277 = load double, double* %276
%278 = fdiv double %277, %275
store double %278, double* %276
%279 = add nuw nsw i64 %269, 2
%280 = icmp eq i64 %279, %190
br i1 %280, label %281, label %268
281: ; preds = %264, %268, %189, %251, %185
%282 = tail call i32 @free(double* %5)
%283 = tail call i32 @free(double* %9)
ret double 2.000000e+00
}