#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 *dvector(int, int);
int /*<<< orphan*/ free_dvector(double *, int, int);
double stub1(double *);
double amotry(double **p, double y[], double psum[], int ndim,
              double (*funk)(double[]), int ihi, double fac) {
  int j;
  double fac1, fac2, ytry, *ptry;
  ptry = dvector(1, ndim);
  fac1 = (1.0 - fac) / ndim;
  fac2 = fac1 - fac;
  for (j = 1; j <= ndim; j++)
    ptry[j] = psum[j] * fac1 - p[ihi][j] * fac2;
  ytry = (*funk)(ptry);
  if (ytry < y[ihi]) {
    y[ihi] = ytry;
    for (j = 1; j <= ndim; j++) {
      psum[j] += ptry[j] - p[ihi][j];
      p[ihi][j] = ptry[j];
    }
  }
  free_dvector(ptry, 1, ndim);
  return ytry;
}


x86 assembly (clang, -O0):
<amotry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0x1,%edi
call   1030 <dvector@plt>
mov    %rax,-0x60(%rbp)
movsd  0xea3(%rip),%xmm0
subsd  -0x38(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11f8 <amotry+0xd8>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x48(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1186 <amotry+0x66>
mov    -0x28(%rbp),%rax
mov    -0x60(%rbp),%rdi
call   *%rax
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    12b1 <amotry+0x191>
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     12ac <amotry+0x18c>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    123c <amotry+0x11c>
jmp    12b1 <amotry+0x191>
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x1,%esi
call   1040 <free_dvector@plt>
movsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<amotry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %r9d,%r15d
mov    %r8,0x10(%rsp)
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%r12
mov    %rdi,%r13
mov    $0x1,%edi
mov    %ecx,%esi
call   1030 <dvector@plt>
mov    %rax,%rbp
movslq %r15d,%r15
test   %r14d,%r14d
jle    12fe <amotry+0x1de>
movsd  0xe95(%rip),%xmm0
cvtsi2sd %r14d,%xmm1
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
mov    0x0(%r13,%r15,8),%rax
mov    %r14d,%r8d
lea    0x1(%r8),%rcx
mov    $0x1,%edx
cmp    $0x4,%r14d
jae    1228 <amotry+0x108>
mov    %rdx,%rsi
not    %rsi
test   $0x1,%cl
jne    11cc <amotry+0xac>
movsd  (%rax,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  (%rbx,%rdx,8),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,0x0(%rbp,%rdx,8)
add    $0x1,%rdx
add    %rcx,%rsi
je     12fe <amotry+0x1de>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rax,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  (%rbx,%rdx,8),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,0x0(%rbp,%rdx,8)
movsd  0x8(%rax,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x8(%rbx,%rdx,8),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,0x8(%rbp,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rcx
jne    11e0 <amotry+0xc0>
jmp    12fe <amotry+0x1de>
mov    %r12,0x8(%rsp)
mov    %r13,%r12
lea    0x8(%rbp),%rsi
lea    0x0(,%rcx,8),%rdi
add    %rbp,%rdi
lea    0x8(%rbx),%r9
lea    (%rbx,%rcx,8),%r10
lea    0x8(%rax),%r11
lea    (%rax,%rcx,8),%r13
cmp    %r10,%rsi
setb   %r10b
cmp    %rdi,%r9
setb   %r9b
cmp    %r13,%rsi
setb   %sil
cmp    %rdi,%r11
setb   %dil
test   %r9b,%r10b
jne    1529 <amotry+0x409>
and    %dil,%sil
mov    %r12,%r13
mov    0x8(%rsp),%r12
jne    11a1 <amotry+0x81>
mov    %r8d,%edi
and    $0xfffffffc,%edi
lea    0x1(%rdi),%rdx
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd 0x8(%rbx,%rsi,8),%xmm4
movupd 0x18(%rbx,%rsi,8),%xmm5
movupd 0x8(%rax,%rsi,8),%xmm6
movupd 0x18(%rax,%rsi,8),%xmm7
mulpd  %xmm2,%xmm6
mulpd  %xmm2,%xmm7
mulpd  %xmm3,%xmm4
subpd  %xmm6,%xmm4
mulpd  %xmm3,%xmm5
subpd  %xmm7,%xmm5
movupd %xmm4,0x8(%rbp,%rsi,8)
movupd %xmm5,0x18(%rbp,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdi
jne    12b0 <amotry+0x190>
cmp    %rdi,%r8
jne    11a1 <amotry+0x81>
mov    %rbp,%rdi
call   *0x10(%rsp)
movapd %xmm0,%xmm2
movsd  (%r12,%r15,8),%xmm0
ucomisd %xmm2,%xmm0
jbe    14fe <amotry+0x3de>
movsd  %xmm2,(%r12,%r15,8)
test   %r14d,%r14d
jle    14fe <amotry+0x3de>
mov    0x0(%r13,%r15,8),%rax
mov    %r14d,%r9d
lea    0x1(%r9),%rcx
mov    $0x1,%esi
cmp    $0x2,%r14d
jae    13d2 <amotry+0x2b2>
mov    %rsi,%rdx
not    %rdx
test   $0x1,%cl
jne    1372 <amotry+0x252>
movsd  0x0(%rbp,%rsi,8),%xmm0
subsd  (%rax,%rsi,8),%xmm0
addsd  (%rbx,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
movsd  0x0(%rbp,%rsi,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
add    %rcx,%rdx
je     14fe <amotry+0x3de>
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rsi,8),%xmm0
subsd  (%rax,%rsi,8),%xmm0
addsd  (%rbx,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
movsd  0x0(%rbp,%rsi,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
movsd  0x8(%rbp,%rsi,8),%xmm0
subsd  0x8(%rax,%rsi,8),%xmm0
addsd  0x8(%rbx,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rsi,8)
movsd  0x8(%rbp,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rax,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rcx
jne    1380 <amotry+0x260>
jmp    14fe <amotry+0x3de>
lea    0x8(%rbx),%r15
lea    (%rbx,%rcx,8),%r8
lea    0x8(%rax),%r10
lea    (%rax,%rcx,8),%r11
lea    0x0(,%rcx,8),%rdi
add    %rbp,%rdi
mov    %rbp,%rdx
add    $0x8,%rdx
cmp    %r11,%r15
setb   %r12b
cmp    %r8,%r10
setb   %r13b
cmp    %rdi,%r15
setb   %r15b
cmp    %r8,%rdx
setb   %r8b
cmp    %rdi,%r10
setb   %dil
cmp    %r11,%rdx
setb   %r10b
test   %r13b,%r12b
jne    1343 <amotry+0x223>
and    %r8b,%r15b
jne    1343 <amotry+0x223>
and    %r10b,%dil
jne    1343 <amotry+0x223>
mov    %r9d,%r8d
and    $0xfffffffe,%r8d
lea    -0x2(%r8),%rsi
mov    %rsi,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     1542 <amotry+0x422>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
mov    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd 0x0(%rbp,%rdi,8),%xmm0
movupd (%rax,%rdi,8),%xmm1
subpd  %xmm1,%xmm0
movupd (%rbx,%rdi,8),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdi,8)
movups 0x0(%rbp,%rdi,8),%xmm0
movups %xmm0,(%rax,%rdi,8)
movupd 0x10(%rbp,%rdi,8),%xmm0
movupd 0x10(%rax,%rdi,8),%xmm1
subpd  %xmm1,%xmm0
movupd 0x10(%rbx,%rdi,8),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x10(%rbx,%rdi,8)
movupd 0x10(%rbp,%rdi,8),%xmm0
movupd %xmm0,0x10(%rax,%rdi,8)
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1470 <amotry+0x350>
test   $0x1,%dl
je     14f9 <amotry+0x3d9>
movupd 0x0(%rbp,%rdi,8),%xmm0
movupd (%rax,%rdi,8),%xmm1
subpd  %xmm1,%xmm0
movupd (%rbx,%rdi,8),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdi,8)
movupd 0x0(%rbp,%rdi,8),%xmm0
movupd %xmm0,(%rax,%rdi,8)
cmp    %r8,%r9
jne    1536 <amotry+0x416>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
movsd  %xmm2,0x10(%rsp)
call   1040 <free_dvector@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,%r13
mov    0x8(%rsp),%r12
jmp    11a1 <amotry+0x81>
or     $0x1,%r9
mov    %r9,%rsi
jmp    1343 <amotry+0x223>
mov    $0x1,%edi
test   $0x1,%dl
jne    14d1 <amotry+0x3b1>
jmp    14f9 <amotry+0x3d9>

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

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