#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 abs(int);
double *dvector(int, int);
int /*<<< orphan*/ free_dvector(double *, int);
void bacdic(float data[], int ndata, double d[], int ipoles, float future[],
            int nfut) {
  int npoles, j, k, ii, i1, i2, j1, j2;
  double sum, *reg;
  npoles = abs(ipoles);
  reg = dvector(1, npoles);
  if (ipoles < 0) {
    i1 = 1;
    i2 = 1;
    j1 = nfut;
    j2 = -1;
  } else {
    i1 = ndata;
    i2 = -1;
    j1 = 1;
    j2 = 1;
  }
  ii = i1;
  for (j = 1; j <= npoles; j++) {
    reg[j] = (double)data[ii];
    ii += i2;
  }
  ii = j1;
  for (j = 1; j <= nfut; j++) {
    sum = 0.0;
    for (k = 1; k <= npoles; k++)
      sum += d[k] * reg[k];
    for (k = npoles; k >= 2; k--)
      reg[k] = reg[k - 1];
    reg[1] = sum;
    future[ii] = (float)sum;
    ii += j2;
  }
  free_dvector(reg, 1);
}


x86 assembly (clang, -O0):
<bacdic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%esi
mov    $0x1,%edi
call   1040 <dvector@plt>
mov    %rax,-0x60(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1194 <bacdic+0x64>
movl   $0x1,-0x40(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0xffffffff,-0x4c(%rbp)
jmp    11af <bacdic+0x7f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0xffffffff,-0x44(%rbp)
movl   $0x1,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     11fd <bacdic+0xcd>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11bc <bacdic+0x8c>
mov    -0x48(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     12e3 <bacdic+0x1b3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     126b <bacdic+0x13b>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1225 <bacdic+0xf5>
mov    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x2,-0x38(%rbp)
jl     12a8 <bacdic+0x178>
mov    -0x60(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    1271 <bacdic+0x141>
movsd  -0x58(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x58(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    120a <bacdic+0xda>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1050 <free_dvector@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bacdic>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,%r12d
mov    %r8,0x60(%rsp)
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%r13
mov    %ecx,%esi
neg    %esi
cmovs  %ecx,%esi
mov    $0x1,%r15d
mov    $0x1,%edi
mov    %rsi,0x18(%rsp)
call   1030 <dvector@plt>
mov    %ebp,0x8(%rsp)
test   %ebp,%ebp
setns  0x10(%rsp)
mov    $0x1,%ecx
mov    %r12d,0xc(%rsp)
cmovs  %r12d,%ecx
mov    %ecx,0x4(%rsp)
je     1349 <bacdic+0x229>
mov    0x8(%rsp),%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
mov    0x18(%rsp),%rsi
cmp    $0x2,%esi
mov    $0x1,%r9d
cmovae %esi,%r9d
lea    (%rcx,%rcx,1),%r10
add    $0xffffffffffffffff,%r10
mov    $0x1,%esi
test   %edx,%edx
cmovs  %r15d,%r14d
movslq %r14d,%rdi
jns    128b <bacdic+0x16b>
cmp    $0x4,%r9d
jb     128b <bacdic+0x16b>
mov    %r9d,%esi
and    $0xfffffffc,%esi
lea    -0x4(%rsi),%rcx
mov    %rcx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rcx,%rcx
je     1683 <bacdic+0x563>
mov    %r8,%rdx
and    $0xfffffffffffffffe,%rdx
mov    %r10,%r11
shl    $0x4,%r11
lea    0x8(,%rdi,4),%rbp
add    %r13,%rbp
mov    %r10,%r14
shl    $0x5,%r14
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvtps2pd -0x8(%rbp),%xmm0
cvtps2pd 0x0(%rbp),%xmm1
movups %xmm0,0x8(%rax,%rcx,8)
movups %xmm1,0x18(%rax,%rcx,8)
cvtps2pd -0x8(%rbp,%r11,1),%xmm0
cvtps2pd 0x0(%rbp,%r11,1),%xmm1
movups %xmm0,0x28(%rax,%rcx,8)
movupd %xmm1,0x38(%rax,%rcx,8)
add    $0x8,%rcx
add    %r14,%rbp
add    $0xfffffffffffffffe,%rdx
jne    1210 <bacdic+0xf0>
test   $0x1,%r8b
je     1274 <bacdic+0x154>
mov    %rcx,%rdx
imul   %r10,%rdx
add    %rdi,%rdx
cvtps2pd 0x0(%r13,%rdx,4),%xmm0
cvtps2pd 0x8(%r13,%rdx,4),%xmm1
shl    $0x3,%rcx
or     $0x8,%rcx
movups %xmm0,(%rax,%rcx,1)
movupd %xmm1,0x10(%rax,%rcx,1)
cmp    %rsi,%r9
je     1349 <bacdic+0x229>
mov    %rsi,%rcx
imul   %r10,%rcx
add    %rcx,%rdi
or     $0x1,%rsi
add    $0x1,%r9
mov    %r9d,%edx
sub    %esi,%edx
mov    %rsi,%rcx
not    %rcx
add    %r9,%rcx
and    $0x3,%rdx
je     12cd <bacdic+0x1ad>
shl    $0x2,%rdx
nopw   0x0(%rax,%rax,1)
movss  0x0(%r13,%rdi,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    %r10,%rdi
add    $0x1,%rsi
add    $0xfffffffffffffffc,%rdx
jne    12b0 <bacdic+0x190>
cmp    $0x3,%rcx
jb     1349 <bacdic+0x229>
lea    0x0(,%rdi,4),%rcx
add    %r13,%rcx
mov    %r10,%rdx
shl    $0x4,%rdx
lea    0x0(,%r10,4),%rbp
lea    0x0(%rbp,%rbp,2),%rbp
add    %r10,%rdi
lea    0x0(,%rdi,4),%rdi
add    %r13,%rdi
movss  (%rcx),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rax,%rsi,8)
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rax,%rsi,8)
movss  (%rcx,%r10,8),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rax,%rsi,8)
movss  (%rcx,%rbp,1),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rax,%rsi,8)
add    $0x4,%rsi
add    %rdx,%rcx
add    %rdx,%rdi
cmp    %rsi,%r9
jne    1300 <bacdic+0x1e0>
cmpl   $0x0,0xc(%rsp)
jle    1668 <bacdic+0x548>
mov    0x18(%rsp),%rdx
cmp    $0x2,%edx
mov    $0x1,%r14d
cmovae %edx,%r14d
mov    %edx,%r8d
mov    $0x2,%ecx
cmovl  %edx,%ecx
mov    %edx,%edi
sub    %ecx,%edi
lea    -0x1(%rdx),%esi
lea    (%rax,%rsi,8),%rcx
mov    %r8,%rdx
sub    %rdi,%rdx
lea    (%rax,%rsi,8),%r13
add    $0x8,%r13
sub    %rdi,%rsi
lea    0x1(%rdi),%r12
mov    %r12,0x48(%rsp)
and    $0xfffffffffffffffc,%r12
lea    -0x4(%r12),%r11
mov    %r11,0x38(%rsp)
shr    $0x2,%r11
add    $0x1,%r11
mov    %r14d,%r9d
and    $0x3,%r9d
lea    -0x1(%r14),%rbp
mov    %rbp,0x58(%rsp)
and    $0xfffffffc,%r14d
lea    (%rax,%r8,8),%r10
mov    %rdi,0x50(%rsp)
lea    0x0(,%rdi,8),%rdi
mov    %r10,%rbp
sub    %rdi,%rbp
cmp    %r10,%rbp
seta   %r15b
mov    %rcx,%rbp
sub    %rdi,%rbp
cmp    %rcx,%rbp
seta   %cl
or     %r15b,%cl
mov    %cl,0x3(%rsp)
lea    (%rax,%rdx,8),%rdi
cmp    %r13,%rdi
mov    $0x0,%edx
mov    0x10(%rsp),%cl
mov    %cl,%dl
lea    -0x1(%rdx,%rdx,1),%rcx
movslq 0x4(%rsp),%r13
lea    0x8(%rax,%r8,8),%rdi
lea    (%rax,%rsi,8),%rsi
setb   %bpl
cmp    %rdi,%rsi
setb   %dl
and    %bpl,%dl
mov    %dl,0x4(%rsp)
mov    %r8,%rdx
mov    %r12,0x40(%rsp)
sub    %r12,%rdx
mov    %rdx,0x28(%rsp)
mov    %r11,%rdx
mov    %r11,0x30(%rsp)
and    $0xfffffffffffffffe,%r11
mov    %r11,0x20(%rsp)
mov    $0xffffffff,%edx
mov    $0x1,%r12d
lea    (%r8,%rdx,1),%r15
add    $0xfffffffffffffffc,%r15
mov    %r8,0x10(%rsp)
lea    (%r8,%rdx,1),%r11
jmp    149a <bacdic+0x37a>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rax)
cvtsd2ss %xmm0,%xmm0
mov    0x60(%rsp),%rdx
movss  %xmm0,(%rdx,%r13,4)
add    %rcx,%r13
lea    0x1(%r12),%edx
cmp    0xc(%rsp),%r12d
mov    %edx,%r12d
je     1668 <bacdic+0x548>
cmpl   $0x0,0x8(%rsp)
je     14c0 <bacdic+0x3a0>
cmpq   $0x3,0x58(%rsp)
jae    14d0 <bacdic+0x3b0>
xorps  %xmm0,%xmm0
mov    $0x1,%esi
test   %r9,%r9
jne    1532 <bacdic+0x412>
jmp    1558 <bacdic+0x438>
nop
xorps  %xmm0,%xmm0
jmp    1558 <bacdic+0x438>
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x8(%rbx,%rsi,8),%xmm1
movsd  0x10(%rbx,%rsi,8),%xmm2
mulsd  0x8(%rax,%rsi,8),%xmm1
mulsd  0x10(%rax,%rsi,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x18(%rbx,%rsi,8),%xmm3
mulsd  0x18(%rax,%rsi,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x20(%rbx,%rsi,8),%xmm0
mulsd  0x20(%rax,%rsi,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rsi
cmp    %rsi,%r14
jne    14e0 <bacdic+0x3c0>
add    $0x1,%rsi
test   %r9,%r9
je     1558 <bacdic+0x438>
lea    (%rax,%rsi,8),%rbp
lea    (%rbx,%rsi,8),%rsi
xor    %edi,%edi
nopl   0x0(%rax)
movsd  (%rsi,%rdi,8),%xmm1
mulsd  0x0(%rbp,%rdi,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rdi
cmp    %rdi,%r9
jne    1540 <bacdic+0x420>
cmpl   $0x2,0x18(%rsp)
jb     1470 <bacdic+0x350>
cmpl   $0x3,0x50(%rsp)
setb   %dl
or     0x3(%rsp),%dl
or     0x4(%rsp),%dl
mov    0x10(%rsp),%rdi
jne    1628 <bacdic+0x508>
cmpq   $0x0,0x38(%rsp)
je     165d <bacdic+0x53d>
mov    0x20(%rsp),%rbp
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%r11,%rsi,1),%edx
movups -0x18(%rax,%rdx,8),%xmm1
movups -0x8(%rax,%rdx,8),%xmm2
movups %xmm2,-0x8(%r10,%rsi,8)
movups %xmm1,-0x18(%r10,%rsi,8)
lea    (%r15,%rsi,1),%edx
movupd -0x18(%rax,%rdx,8),%xmm1
movupd -0x8(%rax,%rdx,8),%xmm2
movupd %xmm2,-0x28(%r10,%rsi,8)
movupd %xmm1,-0x38(%r10,%rsi,8)
add    $0xfffffffffffffff8,%rsi
add    $0xfffffffffffffffe,%rbp
jne    15a0 <bacdic+0x480>
neg    %rsi
testb  $0x1,0x30(%rsp)
je     1613 <bacdic+0x4f3>
mov    0x10(%rsp),%rdx
sub    %rsi,%rdx
mov    $0xffffffff,%esi
add    %edx,%esi
movupd -0x18(%rax,%rsi,8),%xmm1
movupd -0x8(%rax,%rsi,8),%xmm2
movupd %xmm2,-0x8(%rax,%rdx,8)
movupd %xmm1,-0x18(%rax,%rdx,8)
mov    0x28(%rsp),%rdi
mov    0x40(%rsp),%rdx
cmp    %rdx,0x48(%rsp)
je     1470 <bacdic+0x350>
lea    0x1(%rdi),%esi
lea    (%rax,%rdi,8),%rbp
lea    -0x1(%rdi),%edx
lea    (%rax,%rdx,8),%r8
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movsd  (%r8,%rdi,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rdi,8)
add    $0xffffffffffffffff,%rdi
lea    (%rdi,%rsi,1),%edx
cmp    $0x2,%edx
jg     1640 <bacdic+0x520>
jmp    1470 <bacdic+0x350>
xor    %esi,%esi
testb  $0x1,0x30(%rsp)
jne    15ec <bacdic+0x4cc>
jmp    1613 <bacdic+0x4f3>
mov    %rax,%rdi
mov    $0x1,%esi
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <free_dvector@plt>
xor    %ecx,%ecx
test   $0x1,%r8b
jne    124c <bacdic+0x12c>
jmp    1274 <bacdic+0x154>

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

LLVM IR (-O2):
define void @bacdic(float* nocapture %0, i32 %1, double* nocapture %2, i32 %3, float* nocapture writeonly %4, i32 %5) {
%7 = tail call i32 @llvm.abs.i32(i32 %3, i1 true)
%8 = tail call double* @dvector(i32 1, i32 %7)
%9 = icmp slt i32 %3, 0
%10 = select i1 %9, i32 %5, i32 1
%11 = select i1 %9, i64 -1, i64 1
%12 = icmp eq i32 %3, 0
br i1 %12, label %117, label %13
13: ; preds = %6
%14 = select i1 %9, i64 1, i64 -1
%15 = select i1 %9, i32 1, i32 %1
%16 = sext i32 %15 to i64
%17 = call i32 @llvm.umax.i32(i32 %7, i32 1)
%18 = add nuw i32 %17, 1
%19 = zext i32 %18 to i64
%20 = add nsw i64 %19, -1
%21 = icmp ugt i64 %20, 3
%22 = and i1 %9, %21
br i1 %22, label %23, label %93
23: ; preds = %13
%24 = and i64 %20, -4
%25 = mul nsw i64 %24, %14
%26 = add nsw i64 %25, %16
%27 = or i64 %24, 1
%28 = add nsw i64 %24, -4
%29 = lshr exact i64 %28, 2
%30 = add nuw nsw i64 %29, 1
%31 = and i64 %30, 1
%32 = icmp eq i64 %28, 0
br i1 %32, label %72, label %33
33: ; preds = %23
%34 = and i64 %30, 9223372036854775806
br label %35
35: ; preds = %35, %33
%36 = phi i64 [ 0, %33 ], [ %69, %35 ]
%37 = phi i64 [ 0, %33 ], [ %70, %35 ]
%38 = mul i64 %36, %14
%39 = add i64 %38, %16
%40 = or i64 %36, 1
%41 = getelementptr inbounds float, float* %0, i64 %39
%42 = bitcast float* %41 to <2 x float>*
%43 = load <2 x float>, <2 x float>* %42
%44 = getelementptr inbounds float, float* %41, i64 2
%45 = bitcast float* %44 to <2 x float>*
%46 = load <2 x float>, <2 x float>* %45
%47 = fpext <2 x float> %43 to <2 x double>
%48 = fpext <2 x float> %46 to <2 x double>
%49 = getelementptr inbounds double, double* %8, i64 %40
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> %47, <2 x double>* %50
%51 = getelementptr inbounds double, double* %49, i64 2
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %48, <2 x double>* %52
%53 = or i64 %36, 4
%54 = mul i64 %53, %14
%55 = add i64 %54, %16
%56 = or i64 %36, 5
%57 = getelementptr inbounds float, float* %0, i64 %55
%58 = bitcast float* %57 to <2 x float>*
%59 = load <2 x float>, <2 x float>* %58
%60 = getelementptr inbounds float, float* %57, i64 2
%61 = bitcast float* %60 to <2 x float>*
%62 = load <2 x float>, <2 x float>* %61
%63 = fpext <2 x float> %59 to <2 x double>
%64 = fpext <2 x float> %62 to <2 x double>
%65 = getelementptr inbounds double, double* %8, i64 %56
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> %63, <2 x double>* %66
%67 = getelementptr inbounds double, double* %65, i64 2
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %64, <2 x double>* %68
%69 = add nuw i64 %36, 8
%70 = add i64 %37, 2
%71 = icmp eq i64 %70, %34
br i1 %71, label %72, label %35
72: ; preds = %35, %23
%73 = phi i64 [ 0, %23 ], [ %69, %35 ]
%74 = icmp eq i64 %31, 0
br i1 %74, label %91, label %75
75: ; preds = %72
%76 = mul i64 %73, %14
%77 = add i64 %76, %16
%78 = or i64 %73, 1
%79 = getelementptr inbounds float, float* %0, i64 %77
%80 = bitcast float* %79 to <2 x float>*
%81 = load <2 x float>, <2 x float>* %80
%82 = getelementptr inbounds float, float* %79, i64 2
%83 = bitcast float* %82 to <2 x float>*
%84 = load <2 x float>, <2 x float>* %83
%85 = fpext <2 x float> %81 to <2 x double>
%86 = fpext <2 x float> %84 to <2 x double>
%87 = getelementptr inbounds double, double* %8, i64 %78
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> %85, <2 x double>* %88
%89 = getelementptr inbounds double, double* %87, i64 2
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> %86, <2 x double>* %90
br label %91
91: ; preds = %72, %75
%92 = icmp eq i64 %20, %24
br i1 %92, label %117, label %93
93: ; preds = %13, %91
%94 = phi i64 [ %16, %13 ], [ %26, %91 ]
%95 = phi i64 [ 1, %13 ], [ %27, %91 ]
%96 = sub nsw i64 %19, %95
%97 = xor i64 %95, -1
%98 = add nsw i64 %97, %19
%99 = and i64 %96, 3
%100 = icmp eq i64 %99, 0
br i1 %100, label %113, label %101
101: ; preds = %93, %101
%102 = phi i64 [ %109, %101 ], [ %94, %93 ]
%103 = phi i64 [ %110, %101 ], [ %95, %93 ]
%104 = phi i64 [ %111, %101 ], [ 0, %93 ]
%105 = getelementptr inbounds float, float* %0, i64 %102
%106 = load float, float* %105
%107 = fpext float %106 to double
%108 = getelementptr inbounds double, double* %8, i64 %103
store double %107, double* %108
%109 = add i64 %102, %14
%110 = add nuw nsw i64 %103, 1
%111 = add i64 %104, 1
%112 = icmp eq i64 %111, %99
br i1 %112, label %113, label %101
113: ; preds = %101, %93
%114 = phi i64 [ %94, %93 ], [ %109, %101 ]
%115 = phi i64 [ %95, %93 ], [ %110, %101 ]
%116 = icmp ult i64 %98, 3
br i1 %116, label %117, label %180
117: ; preds = %113, %180, %91, %6
%118 = icmp slt i32 %5, 1
br i1 %118, label %343, label %119
119: ; preds = %117
%120 = icmp ugt i32 %7, 1
%121 = getelementptr inbounds double, double* %8, i64 1
%122 = call i32 @llvm.umax.i32(i32 %7, i32 1)
%123 = add nuw i32 %122, 1
%124 = zext i32 %7 to i64
%125 = sext i32 %10 to i64
%126 = zext i32 %123 to i64
%127 = call i32 @llvm.smin.i32(i32 %7, i32 2)
%128 = sub nsw i32 %7, %127
%129 = getelementptr double, double* %8, i64 %124
%130 = add nsw i32 %7, -1
%131 = zext i32 %130 to i64
%132 = getelementptr double, double* %8, i64 %131
%133 = call i32 @llvm.smin.i32(i32 %7, i32 2)
%134 = sub nsw i32 %7, %133
%135 = zext i32 %134 to i64
%136 = sub nsw i64 %124, %135
%137 = getelementptr double, double* %8, i64 %136
%138 = add nuw nsw i64 %124, 1
%139 = getelementptr double, double* %8, i64 %138
%140 = add nsw i32 %7, -1
%141 = zext i32 %140 to i64
%142 = sub nsw i64 %141, %135
%143 = getelementptr double, double* %8, i64 %142
%144 = add nuw nsw i64 %141, 1
%145 = getelementptr double, double* %8, i64 %144
%146 = call i32 @llvm.smin.i32(i32 %7, i32 2)
%147 = sub nsw i32 %7, %146
%148 = zext i32 %147 to i64
%149 = add nuw nsw i64 %148, 1
%150 = add nsw i64 %126, -1
%151 = add nsw i64 %126, -2
%152 = and i64 %149, 8589934588
%153 = add nsw i64 %152, -4
%154 = lshr exact i64 %153, 2
%155 = add nuw nsw i64 %154, 1
%156 = and i64 %150, 3
%157 = icmp ult i64 %151, 3
%158 = and i64 %150, -4
%159 = icmp eq i64 %156, 0
%160 = icmp ult i32 %147, 3
%161 = zext i32 %128 to i64
%162 = sub nsw i64 0, %161
%163 = getelementptr double, double* %129, i64 %162
%164 = icmp ugt double* %163, %129
%165 = zext i32 %128 to i64
%166 = sub nsw i64 0, %165
%167 = getelementptr double, double* %132, i64 %166
%168 = icmp ugt double* %167, %132
%169 = or i1 %164, %168
%170 = icmp ult double* %137, %145
%171 = icmp ult double* %143, %139
%172 = and i1 %170, %171
%173 = and i64 %149, 8589934588
%174 = sub nsw i64 %124, %173
%175 = and i64 %155, 1
%176 = icmp eq i64 %153, 0
%177 = and i64 %155, 9223372036854775806
%178 = icmp eq i64 %175, 0
%179 = icmp eq i64 %149, %173
br label %208
180: ; preds = %113, %180
%181 = phi i64 [ %205, %180 ], [ %114, %113 ]
%182 = phi i64 [ %206, %180 ], [ %115, %113 ]
%183 = getelementptr inbounds float, float* %0, i64 %181
%184 = load float, float* %183
%185 = fpext float %184 to double
%186 = getelementptr inbounds double, double* %8, i64 %182
store double %185, double* %186
%187 = add i64 %181, %14
%188 = add nuw nsw i64 %182, 1
%189 = getelementptr inbounds float, float* %0, i64 %187
%190 = load float, float* %189
%191 = fpext float %190 to double
%192 = getelementptr inbounds double, double* %8, i64 %188
store double %191, double* %192
%193 = add i64 %187, %14
%194 = add nuw nsw i64 %182, 2
%195 = getelementptr inbounds float, float* %0, i64 %193
%196 = load float, float* %195
%197 = fpext float %196 to double
%198 = getelementptr inbounds double, double* %8, i64 %194
store double %197, double* %198
%199 = add i64 %193, %14
%200 = add nuw nsw i64 %182, 3
%201 = getelementptr inbounds float, float* %0, i64 %199
%202 = load float, float* %201
%203 = fpext float %202 to double
%204 = getelementptr inbounds double, double* %8, i64 %200
store double %203, double* %204
%205 = add i64 %199, %14
%206 = add nuw nsw i64 %182, 4
%207 = icmp eq i64 %206, %19
br i1 %207, label %117, label %180
208: ; preds = %119, %337
%209 = phi i64 [ %125, %119 ], [ %340, %337 ]
%210 = phi i32 [ 1, %119 ], [ %341, %337 ]
br i1 %12, label %228, label %211
211: ; preds = %208
br i1 %157, label %212, label %298
212: ; preds = %298, %211
%213 = phi double [ undef, %211 ], [ %324, %298 ]
%214 = phi i64 [ 1, %211 ], [ %325, %298 ]
%215 = phi double [ 0.000000e+00, %211 ], [ %324, %298 ]
br i1 %159, label %228, label %216
216: ; preds = %212, %216
%217 = phi i64 [ %225, %216 ], [ %214, %212 ]
%218 = phi double [ %224, %216 ], [ %215, %212 ]
%219 = phi i64 [ %226, %216 ], [ 0, %212 ]
%220 = getelementptr inbounds double, double* %2, i64 %217
%221 = load double, double* %220
%222 = getelementptr inbounds double, double* %8, i64 %217
%223 = load double, double* %222
%224 = tail call double @llvm.fmuladd.f64(double %221, double %223, double %218)
%225 = add nuw nsw i64 %217, 1
%226 = add i64 %219, 1
%227 = icmp eq i64 %226, %156
br i1 %227, label %228, label %216
228: ; preds = %212, %216, %208
%229 = phi double [ 0.000000e+00, %208 ], [ %213, %212 ], [ %224, %216 ]
br i1 %120, label %230, label %337
230: ; preds = %228
%231 = select i1 %160, i1 true, i1 %169
%232 = select i1 %231, i1 true, i1 %172
br i1 %232, label %296, label %233
233: ; preds = %230
br i1 %176, label %275, label %234
234: ; preds = %233, %234
%235 = phi i64 [ %272, %234 ], [ 0, %233 ]
%236 = phi i64 [ %273, %234 ], [ 0, %233 ]
%237 = sub i64 %124, %235
%238 = add i64 %237, 4294967295
%239 = and i64 %238, 4294967295
%240 = getelementptr inbounds double, double* %8, i64 %239
%241 = getelementptr inbounds double, double* %240, i64 -1
%242 = bitcast double* %241 to <2 x double>*
%243 = load <2 x double>, <2 x double>* %242
%244 = getelementptr inbounds double, double* %240, i64 -2
%245 = getelementptr inbounds double, double* %244, i64 -1
%246 = bitcast double* %245 to <2 x double>*
%247 = load <2 x double>, <2 x double>* %246
%248 = getelementptr inbounds double, double* %8, i64 %237
%249 = getelementptr inbounds double, double* %248, i64 -1
%250 = bitcast double* %249 to <2 x double>*
store <2 x double> %243, <2 x double>* %250
%251 = getelementptr inbounds double, double* %248, i64 -2
%252 = getelementptr inbounds double, double* %251, i64 -1
%253 = bitcast double* %252 to <2 x double>*
store <2 x double> %247, <2 x double>* %253
%254 = or i64 %235, 4
%255 = sub i64 %124, %254
%256 = add i64 %255, 4294967295
%257 = and i64 %256, 4294967295
%258 = getelementptr inbounds double, double* %8, i64 %257
%259 = getelementptr inbounds double, double* %258, i64 -1
%260 = bitcast double* %259 to <2 x double>*
%261 = load <2 x double>, <2 x double>* %260
%262 = getelementptr inbounds double, double* %258, i64 -2
%263 = getelementptr inbounds double, double* %262, i64 -1
%264 = bitcast double* %263 to <2 x double>*
%265 = load <2 x double>, <2 x double>* %264
%266 = getelementptr inbounds double, double* %8, i64 %255
%267 = getelementptr inbounds double, double* %266, i64 -1
%268 = bitcast double* %267 to <2 x double>*
store <2 x double> %261, <2 x double>* %268
%269 = getelementptr inbounds double, double* %266, i64 -2
%270 = getelementptr inbounds double, double* %269, i64 -1
%271 = bitcast double* %270 to <2 x double>*
store <2 x double> %265, <2 x double>* %271
%272 = add nuw i64 %235, 8
%273 = add i64 %236, 2
%274 = icmp eq i64 %273, %177
br i1 %274, label %275, label %234
275: ; preds = %234, %233
%276 = phi i64 [ 0, %233 ], [ %272, %234 ]
br i1 %178, label %295, label %277
277: ; preds = %275
%278 = sub i64 %124, %276
%279 = add i64 %278, 4294967295
%280 = and i64 %279, 4294967295
%281 = getelementptr inbounds double, double* %8, i64 %280
%282 = getelementptr inbounds double, double* %281, i64 -1
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = getelementptr inbounds double, double* %281, i64 -2
%286 = getelementptr inbounds double, double* %285, i64 -1
%287 = bitcast double* %286 to <2 x double>*
%288 = load <2 x double>, <2 x double>* %287
%289 = getelementptr inbounds double, double* %8, i64 %278
%290 = getelementptr inbounds double, double* %289, i64 -1
%291 = bitcast double* %290 to <2 x double>*
store <2 x double> %284, <2 x double>* %291
%292 = getelementptr inbounds double, double* %289, i64 -2
%293 = getelementptr inbounds double, double* %292, i64 -1
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> %288, <2 x double>* %294
br label %295
295: ; preds = %275, %277
br i1 %179, label %337, label %296
296: ; preds = %230, %295
%297 = phi i64 [ %124, %230 ], [ %174, %295 ]
br label %328
298: ; preds = %211, %298
%299 = phi i64 [ %325, %298 ], [ 1, %211 ]
%300 = phi double [ %324, %298 ], [ 0.000000e+00, %211 ]
%301 = phi i64 [ %326, %298 ], [ 0, %211 ]
%302 = getelementptr inbounds double, double* %2, i64 %299
%303 = load double, double* %302
%304 = getelementptr inbounds double, double* %8, i64 %299
%305 = load double, double* %304
%306 = tail call double @llvm.fmuladd.f64(double %303, double %305, double %300)
%307 = add nuw nsw i64 %299, 1
%308 = getelementptr inbounds double, double* %2, i64 %307
%309 = load double, double* %308
%310 = getelementptr inbounds double, double* %8, i64 %307
%311 = load double, double* %310
%312 = tail call double @llvm.fmuladd.f64(double %309, double %311, double %306)
%313 = add nuw nsw i64 %299, 2
%314 = getelementptr inbounds double, double* %2, i64 %313
%315 = load double, double* %314
%316 = getelementptr inbounds double, double* %8, i64 %313
%317 = load double, double* %316
%318 = tail call double @llvm.fmuladd.f64(double %315, double %317, double %312)
%319 = add nuw nsw i64 %299, 3
%320 = getelementptr inbounds double, double* %2, i64 %319
%321 = load double, double* %320
%322 = getelementptr inbounds double, double* %8, i64 %319
%323 = load double, double* %322
%324 = tail call double @llvm.fmuladd.f64(double %321, double %323, double %318)
%325 = add nuw nsw i64 %299, 4
%326 = add i64 %301, 4
%327 = icmp eq i64 %326, %158
br i1 %327, label %212, label %298
328: ; preds = %296, %328
%329 = phi i64 [ %330, %328 ], [ %297, %296 ]
%330 = add nsw i64 %329, -1
%331 = and i64 %330, 4294967295
%332 = getelementptr inbounds double, double* %8, i64 %331
%333 = load double, double* %332
%334 = getelementptr inbounds double, double* %8, i64 %329
store double %333, double* %334
%335 = trunc i64 %329 to i32
%336 = icmp sgt i32 %335, 2
br i1 %336, label %328, label %337
337: ; preds = %328, %295, %228
store double %229, double* %121
%338 = fptrunc double %229 to float
%339 = getelementptr inbounds float, float* %4, i64 %209
store float %338, float* %339
%340 = add i64 %209, %11
%341 = add nuw i32 %210, 1
%342 = icmp eq i32 %210, %5
br i1 %342, label %343, label %208
343: ; preds = %337, %117
%344 = tail call i32 @free_dvector(double* %8, i32 1)
ret void
}