#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 */
double array_max_abs(double *, int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ linsolve_lower(double *, int, double *, double *);
int /*<<< orphan*/ madd(double *, double *, double *, int, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ modelhess2(double *, int, double *);
int /*<<< orphan*/ msub(double *, double *, double *, int, int);
int /*<<< orphan*/ printf(char *, double, double, int);
int /*<<< orphan*/ scale(double *, int, int, double);
void newton_func(double (*funcpt)(double *, int, double *, double *),
                 double *xi, int N, double *x) {
  int it, i;
  double *jac, *hess, *L, *xf;
  double stop, result;
  jac = (double *)malloc(sizeof(double) * N);
  xf = (double *)malloc(sizeof(double) * N);
  hess = (double *)malloc(sizeof(double) * N * N);
  L = (double *)malloc(sizeof(double) * N * N);
  it = 0;
  stop = 1.0;
  while (stop > 1e-05 && it < 100) {
    result = funcpt(xi, N, jac, hess);
    modelhess2(hess, N, L);
    scale(jac, 1, N, -1.0);
    linsolve_lower(L, N, jac, x);
    madd(x, xi, x, 1, N);
    msub(x, xi, xf, 1, N);
    stop = array_max_abs(xf, N);
    for (i = 0; i < N; ++i) {
      xi[i] = x[i];
    }
    it++;
    printf("Values obtained %lf , %lf after %d Iterations \n", x[0], x[1], it);
  }
  free(jac);
  free(hess);
  free(xf);
  free(L);
}


x86 assembly (clang, -O0):
<newton_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
movslq -0x14(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
movslq -0x14(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
movsd  0xdee(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
movsd  0xde2(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x59(%rbp)
jbe    123d <newton_func+0xad>
cmpl   $0x64,-0x24(%rbp)
setl   %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    124d <newton_func+0xbd>
jmp    1352 <newton_func+0x1c2>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   *%rax
movsd  %xmm0,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x40(%rbp),%rdx
call   1070 <modelhess2@plt>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
movsd  0xd85(%rip),%xmm0
call   1090 <scale@plt>
mov    -0x40(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1060 <linsolve_lower@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%r8d
mov    $0x1,%ecx
call   10a0 <madd@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x14(%rbp),%r8d
mov    $0x1,%ecx
call   1040 <msub@plt>
mov    -0x48(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   10b0 <array_max_abs@plt>
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1324 <newton_func+0x194>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12f0 <newton_func+0x160>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x24(%rbp),%esi
lea    0xcd0(%rip),%rdi
call   1050 <printf@plt>
jmp    1217 <newton_func+0x87>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newton_func>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %rsi,%r15
mov    %rdi,0x78(%rsp)
lea    0x0(,%rbp,8),%r12d
mov    %r12d,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r12d,%edi
call   1080 <malloc@plt>
mov    %rax,0x28(%rsp)
imul   %ebp,%r12d
mov    %r12d,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %r12d,%edi
call   1080 <malloc@plt>
mov    %rbp,0x30(%rsp)
mov    %ebp,%ebp
lea    (%rbx,%rbp,8),%rcx
mov    %ebp,%edx
and    $0xfffffffc,%edx
mov    %rdx,0x60(%rsp)
add    $0xfffffffffffffffc,%rdx
mov    %rdx,0x58(%rsp)
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
cmp    %r15,%rcx
seta   %cl
lea    (%r15,%rbp,8),%rdx
cmp    %rbx,%rdx
seta   %dl
mov    %rax,0x10(%rsp)
and    %cl,%dl
mov    %dl,0x7(%rsp)
mov    %esi,%eax
and    $0x3,%eax
and    $0xfffffffffffffffc,%rsi
mov    %rsi,0x38(%rsp)
mov    %ebp,%ecx
and    $0x3,%ecx
mov    %rcx,0x68(%rsp)
lea    0x10(%r15),%rcx
mov    %rcx,0x48(%rsp)
lea    0x10(%rbx),%rcx
mov    %rcx,0x40(%rsp)
mov    %rax,0x50(%rsp)
shl    $0x5,%rax
mov    %rax,0x8(%rsp)
xor    %r14d,%r14d
mov    %rbp,0x70(%rsp)
mov    0x30(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r13d,%esi
mov    0x20(%rsp),%r12
mov    %r12,%rdx
mov    0x18(%rsp),%rbp
mov    %rbp,%rcx
call   *0x78(%rsp)
mov    %rbp,%rdi
mov    %r13d,%esi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdx
call   1070 <modelhess2@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    %r13d,%edx
movsd  0xd40(%rip),%xmm0
call   1090 <scale@plt>
mov    %rbp,%rdi
mov    %r13d,%esi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1060 <linsolve_lower@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    %r13d,%r8d
call   10a0 <madd@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdx
mov    $0x1,%ecx
mov    %r13d,%r8d
call   1040 <msub@plt>
mov    %rbp,%rdi
mov    %r13d,%esi
call   10b0 <array_max_abs@plt>
movsd  %xmm0,0x80(%rsp)
test   %r13d,%r13d
mov    0x70(%rsp),%rbp
jle    147b <newton_func+0x2eb>
cmpl   $0x4,0x30(%rsp)
setb   %al
or     0x7(%rsp),%al
je     1340 <newton_func+0x1b0>
xor    %eax,%eax
jmp    140a <newton_func+0x27a>
xchg   %ax,%ax
cmpq   $0xc,0x58(%rsp)
jae    1351 <newton_func+0x1c1>
xor    %eax,%eax
mov    0x8(%rsp),%rsi
jmp    13c2 <newton_func+0x232>
mov    0x38(%rsp),%rcx
xor    %eax,%eax
mov    0x8(%rsp),%rsi
nopl   (%rax)
movups (%rbx,%rax,8),%xmm0
movups 0x10(%rbx,%rax,8),%xmm1
movups %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
movups 0x20(%rbx,%rax,8),%xmm0
movups 0x30(%rbx,%rax,8),%xmm1
movups %xmm0,0x20(%r15,%rax,8)
movups %xmm1,0x30(%r15,%rax,8)
movups 0x40(%rbx,%rax,8),%xmm0
movups 0x50(%rbx,%rax,8),%xmm1
movups %xmm0,0x40(%r15,%rax,8)
movups %xmm1,0x50(%r15,%rax,8)
movupd 0x60(%rbx,%rax,8),%xmm0
movups 0x70(%rbx,%rax,8),%xmm1
movupd %xmm0,0x60(%r15,%rax,8)
movups %xmm1,0x70(%r15,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1360 <newton_func+0x1d0>
cmpq   $0x0,0x50(%rsp)
je     13fd <newton_func+0x26d>
mov    0x48(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0x40(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
xchg   %ax,%ax
movupd -0x10(%rax,%rdx,1),%xmm0
movups (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movups %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    13e0 <newton_func+0x250>
mov    0x60(%rsp),%rcx
mov    %rcx,%rax
cmp    %rbp,%rcx
je     147b <newton_func+0x2eb>
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    0x68(%rsp),%rdx
test   %rdx,%rdx
je     1435 <newton_func+0x2a5>
nopl   (%rax)
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1420 <newton_func+0x290>
cmp    $0x3,%rcx
jb     147b <newton_func+0x2eb>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r15,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r15,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r15,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1440 <newton_func+0x2b0>
lea    0x1(%r14),%r12d
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
lea    0xb81(%rip),%rdi
mov    %r12d,%esi
call   1050 <printf@plt>
movsd  0x80(%rsp),%xmm0
ucomisd 0xb60(%rip),%xmm0
jbe    14b7 <newton_func+0x327>
cmp    $0x63,%r14d
mov    %r12d,%r14d
jb     1280 <newton_func+0xf0>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Values obtained %lf , %lf after %d Iterations \0A\00"
define void @newton_func(double (double*, i32, double*, double*)* %0, double* %1, i32 %2, double* %3) {
%5 = alloca double (double*, i32, double*, double*)*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
store double (double*, i32, double*, double*)* %0, double (double*, i32, double*, double*)** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = mul i64 8, %18
%20 = trunc i64 %19 to i32
%21 = call i64 @malloc(i32 %20)
%22 = inttoptr i64 %21 to double*
store double* %22, double** %11
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = mul i64 8, %24
%26 = trunc i64 %25 to i32
%27 = call i64 @malloc(i32 %26)
%28 = inttoptr i64 %27 to double*
store double* %28, double** %14
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = mul i64 8, %30
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = mul i64 %31, %33
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to double*
store double* %37, double** %12
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = mul i64 8, %39
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = mul i64 %40, %42
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** %13
store i32 0, i32* %9
store double 1.000000e+00, double* %15
br label %47
47: ; preds = %104, %4
%48 = load double, double* %15
%49 = fcmp ogt double %48, 1.000000e-05
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = load i32, i32* %9
%52 = icmp slt i32 %51, 100
br label %53
53: ; preds = %50, %47
%54 = phi i1 [ false, %47 ], [ %52, %50 ]
br i1 %54, label %55, label %115
55: ; preds = %53
%56 = load double (double*, i32, double*, double*)*, double (double*, i32, double*, double*)** %5
%57 = load double*, double** %6
%58 = load i32, i32* %7
%59 = load double*, double** %11
%60 = load double*, double** %12
%61 = call double %56(double* %57, i32 %58, double* %59, double* %60)
store double %61, double* %16
%62 = load double*, double** %12
%63 = load i32, i32* %7
%64 = load double*, double** %13
%65 = call i32 @modelhess2(double* %62, i32 %63, double* %64)
%66 = load double*, double** %11
%67 = load i32, i32* %7
%68 = call i32 @scale(double* %66, i32 1, i32 %67, double -1.000000e+00)
%69 = load double*, double** %13
%70 = load i32, i32* %7
%71 = load double*, double** %11
%72 = load double*, double** %8
%73 = call i32 @linsolve_lower(double* %69, i32 %70, double* %71, double* %72)
%74 = load double*, double** %8
%75 = load double*, double** %6
%76 = load double*, double** %8
%77 = load i32, i32* %7
%78 = call i32 @madd(double* %74, double* %75, double* %76, i32 1, i32 %77)
%79 = load double*, double** %8
%80 = load double*, double** %6
%81 = load double*, double** %14
%82 = load i32, i32* %7
%83 = call i32 @msub(double* %79, double* %80, double* %81, i32 1, i32 %82)
%84 = load double*, double** %14
%85 = load i32, i32* %7
%86 = call double @array_max_abs(double* %84, i32 %85)
store double %86, double* %15
store i32 0, i32* %10
br label %87
87: ; preds = %101, %55
%88 = load i32, i32* %10
%89 = load i32, i32* %7
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %104
91: ; preds = %87
%92 = load double*, double** %8
%93 = load i32, i32* %10
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %92, i64 %94
%96 = load double, double* %95
%97 = load double*, double** %6
%98 = load i32, i32* %10
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %97, i64 %99
store double %96, double* %100
br label %101
101: ; preds = %91
%102 = load i32, i32* %10
%103 = add nsw i32 %102, 1
store i32 %103, i32* %10
br label %87
104: ; preds = %87
%105 = load i32, i32* %9
%106 = add nsw i32 %105, 1
store i32 %106, i32* %9
%107 = load double*, double** %8
%108 = getelementptr inbounds double, double* %107, i64 0
%109 = load double, double* %108
%110 = load double*, double** %8
%111 = getelementptr inbounds double, double* %110, i64 1
%112 = load double, double* %111
%113 = load i32, i32* %9
%114 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %109, double %112, i32 %113)
br label %47
115: ; preds = %53
%116 = load double*, double** %11
%117 = call i32 @free(double* %116)
%118 = load double*, double** %12
%119 = call i32 @free(double* %118)
%120 = load double*, double** %14
%121 = call i32 @free(double* %120)
%122 = load double*, double** %13
%123 = call i32 @free(double* %122)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Values obtained %lf , %lf after %d Iterations \0A\00"
define void @newton_func(double (double*, i32, double*, double*)* nocapture %0, double* %1, i32 %2, double* %3) {
%5 = shl i32 %2, 3
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to double*
%8 = tail call i64 @malloc(i32 %5)
%9 = inttoptr i64 %8 to double*
%10 = mul i32 %5, %2
%11 = tail call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to double*
%13 = tail call i64 @malloc(i32 %10)
%14 = inttoptr i64 %13 to double*
%15 = icmp sgt i32 %2, 0
%16 = getelementptr inbounds double, double* %3, i64 1
%17 = zext i32 %2 to i64
%18 = getelementptr double, double* %1, i64 %17
%19 = getelementptr double, double* %3, i64 %17
%20 = and i64 %17, 4294967292
%21 = add nsw i64 %20, -4
%22 = lshr exact i64 %21, 2
%23 = add nuw nsw i64 %22, 1
%24 = icmp ult i32 %2, 4
%25 = icmp ugt double* %19, %1
%26 = icmp ugt double* %18, %3
%27 = and i1 %25, %26
%28 = and i64 %17, 4294967292
%29 = and i64 %23, 3
%30 = icmp ult i64 %21, 12
%31 = and i64 %23, 9223372036854775804
%32 = icmp eq i64 %29, 0
%33 = icmp eq i64 %28, %17
%34 = and i64 %17, 3
%35 = icmp eq i64 %34, 0
br label %36
36: ; preds = %4, %151
%37 = phi i32 [ 0, %4 ], [ %152, %151 ]
%38 = tail call double %0(double* %1, i32 %2, double* %7, double* %12)
%39 = tail call i32 @modelhess2(double* %12, i32 %2, double* %14)
%40 = tail call i32 @scale(double* %7, i32 1, i32 %2, double -1.000000e+00)
%41 = tail call i32 @linsolve_lower(double* %14, i32 %2, double* %7, double* %3)
%42 = tail call i32 @madd(double* %3, double* %1, double* %3, i32 1, i32 %2)
%43 = tail call i32 @msub(double* %3, double* %1, double* %9, i32 1, i32 %2)
%44 = tail call double @array_max_abs(double* %9, i32 %2)
br i1 %15, label %45, label %151
45: ; preds = %36
%46 = or i1 %24, %27
br i1 %46, label %116, label %47
47: ; preds = %45
br i1 %30, label %97, label %48
48: ; preds = %47, %48
%49 = phi i64 [ %94, %48 ], [ 0, %47 ]
%50 = phi i64 [ %95, %48 ], [ 0, %47 ]
%51 = getelementptr inbounds double, double* %3, i64 %49
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = getelementptr inbounds double, double* %51, i64 2
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = getelementptr inbounds double, double* %1, i64 %49
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %53, <2 x double>* %58
%59 = getelementptr inbounds double, double* %57, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %56, <2 x double>* %60
%61 = or i64 %49, 4
%62 = getelementptr inbounds double, double* %3, i64 %61
%63 = bitcast double* %62 to <2 x double>*
%64 = load <2 x double>, <2 x double>* %63
%65 = getelementptr inbounds double, double* %62, i64 2
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = getelementptr inbounds double, double* %1, i64 %61
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %64, <2 x double>* %69
%70 = getelementptr inbounds double, double* %68, i64 2
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> %67, <2 x double>* %71
%72 = or i64 %49, 8
%73 = getelementptr inbounds double, double* %3, i64 %72
%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 = getelementptr inbounds double, double* %1, i64 %72
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %75, <2 x double>* %80
%81 = getelementptr inbounds double, double* %79, i64 2
%82 = bitcast double* %81 to <2 x double>*
store <2 x double> %78, <2 x double>* %82
%83 = or i64 %49, 12
%84 = getelementptr inbounds double, double* %3, i64 %83
%85 = bitcast double* %84 to <2 x double>*
%86 = load <2 x double>, <2 x double>* %85
%87 = getelementptr inbounds double, double* %84, i64 2
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %1, i64 %83
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> %86, <2 x double>* %91
%92 = getelementptr inbounds double, double* %90, i64 2
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %89, <2 x double>* %93
%94 = add nuw i64 %49, 16
%95 = add nuw i64 %50, 4
%96 = icmp eq i64 %95, %31
br i1 %96, label %97, label %48
97: ; preds = %48, %47
%98 = phi i64 [ 0, %47 ], [ %94, %48 ]
br i1 %32, label %115, label %99
99: ; preds = %97, %99
%100 = phi i64 [ %112, %99 ], [ %98, %97 ]
%101 = phi i64 [ %113, %99 ], [ 0, %97 ]
%102 = getelementptr inbounds double, double* %3, i64 %100
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = getelementptr inbounds double, double* %102, i64 2
%106 = bitcast double* %105 to <2 x double>*
%107 = load <2 x double>, <2 x double>* %106
%108 = getelementptr inbounds double, double* %1, i64 %100
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> %104, <2 x double>* %109
%110 = getelementptr inbounds double, double* %108, i64 2
%111 = bitcast double* %110 to <2 x double>*
store <2 x double> %107, <2 x double>* %111
%112 = add nuw i64 %100, 4
%113 = add i64 %101, 1
%114 = icmp eq i64 %113, %29
br i1 %114, label %115, label %99
115: ; preds = %99, %97
br i1 %33, label %151, label %116
116: ; preds = %45, %115
%117 = phi i64 [ 0, %45 ], [ %28, %115 ]
%118 = xor i64 %117, -1
%119 = add nsw i64 %118, %17
br i1 %35, label %129, label %120
120: ; preds = %116, %120
%121 = phi i64 [ %126, %120 ], [ %117, %116 ]
%122 = phi i64 [ %127, %120 ], [ 0, %116 ]
%123 = getelementptr inbounds double, double* %3, i64 %121
%124 = load double, double* %123
%125 = getelementptr inbounds double, double* %1, i64 %121
store double %124, double* %125
%126 = add nuw nsw i64 %121, 1
%127 = add i64 %122, 1
%128 = icmp eq i64 %127, %34
br i1 %128, label %129, label %120
129: ; preds = %120, %116
%130 = phi i64 [ %117, %116 ], [ %126, %120 ]
%131 = icmp ult i64 %119, 3
br i1 %131, label %151, label %132
132: ; preds = %129, %132
%133 = phi i64 [ %149, %132 ], [ %130, %129 ]
%134 = getelementptr inbounds double, double* %3, i64 %133
%135 = load double, double* %134
%136 = getelementptr inbounds double, double* %1, i64 %133
store double %135, double* %136
%137 = add nuw nsw i64 %133, 1
%138 = getelementptr inbounds double, double* %3, i64 %137
%139 = load double, double* %138
%140 = getelementptr inbounds double, double* %1, i64 %137
store double %139, double* %140
%141 = add nuw nsw i64 %133, 2
%142 = getelementptr inbounds double, double* %3, i64 %141
%143 = load double, double* %142
%144 = getelementptr inbounds double, double* %1, i64 %141
store double %143, double* %144
%145 = add nuw nsw i64 %133, 3
%146 = getelementptr inbounds double, double* %3, i64 %145
%147 = load double, double* %146
%148 = getelementptr inbounds double, double* %1, i64 %145
store double %147, double* %148
%149 = add nuw nsw i64 %133, 4
%150 = icmp eq i64 %149, %17
br i1 %150, label %151, label %132
151: ; preds = %129, %132, %115, %36
%152 = add nuw nsw i32 %37, 1
%153 = load double, double* %3
%154 = load double, double* %16
%155 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %153, double %154, i32 %152)
%156 = fcmp ogt double %44, 1.000000e-05
%157 = icmp ult i32 %37, 99
%158 = and i1 %156, %157
br i1 %158, label %36, label %159
159: ; preds = %151
%160 = tail call i32 @free(double* %7)
%161 = tail call i32 @free(double* %12)
%162 = tail call i32 @free(double* %9)
%163 = tail call i32 @free(double* %14)
ret void
}