#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ g2_free(double *const);
scalar_t__ g2_malloc(int);
int /*<<< orphan*/ g2_split(int, double const *, double *const, double *const);
int /*<<< orphan*/ stderr;
void g2_c_raspln(int n, const double *points, double tn, double *sxy) {
  int i, j;
  double bias, tnFactor, tangentL1, tangentL2;
  double D1x, D1y, D2x, D2y, t1x, t1y, t2x, t2y;
  double h1[40 + 1];
  double h2[40 + 1];
  double h3[40 + 1];
  double h4[40 + 1];
  double *const x = (double *)g2_malloc(n * 2 * sizeof(double));
  double *const y = x + n;
  g2_split(n, points, x, y);
  for (i = 0; i < 40 + 1; i++) {
    double t, tt, ttt;
    t = (double)i / 40;
    tt = t * t;
    ttt = t * tt;
    h1[i] = 2. * ttt - 3. * tt + 1.;
    h2[i] = -2. * ttt + 3. * tt;
    h3[i] = ttt - 2. * tt + t;
    h4[i] = ttt - tt;
  }
  if (tn <= 0.) {
    tnFactor = 2.;
    fputs("g2_c_raspln: Using Tension Factor 0.0: very rounded", stderr);
  } else if (tn >= 2.) {
    tnFactor = 0.;
    fputs("g2_c_raspln: Using Tension Factor 2.0: not rounded at all", stderr);
  } else
    tnFactor = 2. - tn;
  D1x = D1y = 0.;
  for (j = 0; j < n - 2; j++) {
    t1x = x[j + 1] - x[j];
    t1y = y[j + 1] - y[j];
    t2x = x[j + 2] - x[j + 1];
    t2y = y[j + 2] - y[j + 1];
    tangentL1 = t1x * t1x + t1y * t1y;
    tangentL2 = t2x * t2x + t2y * t2y;
    if (tangentL1 + tangentL2 == 0)
      bias = .5;
    else
      bias = tangentL2 / (tangentL1 + tangentL2);
    D2x = tnFactor * (bias * t1x + (1 - bias) * t2x);
    D2y = tnFactor * (bias * t1y + (1 - bias) * t2y);
    for (i = 0; i < 40; i++) {
      sxy[2 * 40 * j + i + i] =
          h1[i] * x[j] + h2[i] * x[j + 1] + h3[i] * D1x + h4[i] * D2x;
      sxy[2 * 40 * j + i + i + 1] =
          h1[i] * y[j] + h2[i] * y[j + 1] + h3[i] * D1y + h4[i] * D2y;
    }
    D1x = D2x;
    D1y = D2y;
  }
  for (i = 0; i < 40 + 1; i++) {
    sxy[2 * 40 * (n - 2) + i + i] =
        h1[i] * x[n - 2] + h2[i] * x[n - 1] + h3[i] * D1x;
    sxy[2 * 40 * (n - 2) + i + i + 1] =
        h1[i] * y[n - 2] + h2[i] * y[n - 1] + h3[i] * D1y;
  }
  g2_free(x);
}


x86 assembly (clang, -O0):
<g2_c_raspln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5f0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <g2_malloc@plt>
mov    %rax,-0x5c8(%rbp)
mov    -0x5c8(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x5d0(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x5c8(%rbp),%rdx
mov    -0x5d0(%rbp),%rcx
call   1060 <g2_split@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x29,-0x24(%rbp)
jge    12d7 <g2_c_raspln+0x197>
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x5d8(%rbp)
ff
movsd  -0x5d8(%rbp),%xmm0
ff
mulsd  -0x5d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x5e0(%rbp)
ff
movsd  -0x5d8(%rbp),%xmm0
ff
mulsd  -0x5e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x5e8(%rbp)
ff
movsd  -0x5e8(%rbp),%xmm0
ff
movsd  0xe06(%rip),%xmm1
mulsd  -0x5e0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdcf(%rip),%xmm1
addsd  %xmm1,%xmm0
movslq -0x24(%rbp),%rax
movsd  %xmm0,-0x1d0(%rbp,%rax,8)
ff ff
movsd  -0x5e8(%rbp),%xmm1
ff
movsd  0xdb6(%rip),%xmm0
mulsd  -0x5e0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movslq -0x24(%rbp),%rax
movsd  %xmm0,-0x320(%rbp,%rax,8)
ff ff
movsd  -0x5e8(%rbp),%xmm0
ff
movsd  -0x5e0(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x5d8(%rbp),%xmm0
ff
movslq -0x24(%rbp),%rax
movsd  %xmm0,-0x470(%rbp,%rax,8)
ff ff
movsd  -0x5e8(%rbp),%xmm0
ff
subsd  -0x5e0(%rbp),%xmm0
ff
movslq -0x24(%rbp),%rax
movsd  %xmm0,-0x5c0(%rbp,%rax,8)
ff ff
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11af <g2_c_raspln+0x6f>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     130c <g2_c_raspln+0x1cc>
movsd  0xd13(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x2ce7(%rip),%rax
mov    (%rax),%esi
lea    0xd26(%rip),%rdi
call   1040 <fputs@plt>
jmp    135c <g2_c_raspln+0x21c>
movsd  -0x18(%rbp),%xmm0
movsd  0xce7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1345 <g2_c_raspln+0x205>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x2cae(%rip),%rax
mov    (%rax),%esi
lea    0xd21(%rip),%rdi
call   1040 <fputs@plt>
jmp    1357 <g2_c_raspln+0x217>
movsd  0xcb3(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    135c <g2_c_raspln+0x21c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    1695 <g2_c_raspln+0x555>
mov    -0x5c8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x5c8(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x5d0(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x5d0(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x5c8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x5c8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x5d0(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x5d0(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14b0 <g2_c_raspln+0x370>
jp     14b0 <g2_c_raspln+0x370>
movsd  0xb62(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    14c8 <g2_c_raspln+0x388>
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm3
movsd  0xb31(%rip),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  -0x80(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
movsd  0xaff(%rip),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  -0x88(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x28,-0x24(%rbp)
jge    1673 <g2_c_raspln+0x533>
movslq -0x24(%rbp),%rax
movsd  -0x1d0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x5c8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x24(%rbp),%rax
movsd  -0x320(%rbp,%rax,8),%xmm1
ff ff
mov    -0x5c8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x24(%rbp),%rax
movsd  -0x470(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movslq -0x24(%rbp),%rax
movsd  -0x5c0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
imul   $0x50,-0x28(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x24(%rbp),%rax
movsd  -0x1d0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x5d0(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x24(%rbp),%rax
movsd  -0x320(%rbp,%rax,8),%xmm1
ff ff
mov    -0x5d0(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x24(%rbp),%rax
movsd  -0x470(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movslq -0x24(%rbp),%rax
movsd  -0x5c0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
imul   $0x50,-0x28(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1536 <g2_c_raspln+0x3f6>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1373 <g2_c_raspln+0x233>
movl   $0x0,-0x24(%rbp)
cmpl   $0x29,-0x24(%rbp)
jge    17b9 <g2_c_raspln+0x679>
movslq -0x24(%rbp),%rax
movsd  -0x1d0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x5c8(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x24(%rbp),%rax
movsd  -0x320(%rbp,%rax,8),%xmm0
ff ff
mov    -0x5c8(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movslq -0x24(%rbp),%rax
movsd  -0x470(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
imul   $0x50,%ecx,%ecx
add    -0x24(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x24(%rbp),%rax
movsd  -0x1d0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x5d0(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x24(%rbp),%rax
movsd  -0x320(%rbp,%rax,8),%xmm0
ff ff
mov    -0x5d0(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movslq -0x24(%rbp),%rax
movsd  -0x470(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
imul   $0x50,%ecx,%ecx
add    -0x24(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    169c <g2_c_raspln+0x55c>
mov    -0x5c8(%rbp),%rdi
call   1050 <g2_free@plt>
add    $0x5f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_c_raspln>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x548,%rsp
mov    %rdx,%r12
movsd  %xmm0,0x8(%rsp)
mov    %rsi,%rbp
mov    %edi,%r13d
shl    $0x4,%edi
call   1030 <g2_malloc@plt>
mov    %rax,%r14
movslq %r13d,%r15
lea    (%rax,%r15,8),%rbx
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1060 <g2_split@plt>
movdqa 0xe75(%rip),%xmm0
xor    %eax,%eax
movapd 0xe7a(%rip),%xmm8
movapd 0xe81(%rip),%xmm9
movapd 0xe88(%rip),%xmm10
movdqa 0xe8f(%rip),%xmm11
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvtdq2pd %xmm0,%xmm3
divpd  %xmm8,%xmm3
movapd %xmm3,%xmm6
mulpd  %xmm3,%xmm6
movapd %xmm3,%xmm5
mulpd  %xmm6,%xmm5
movapd %xmm6,%xmm1
movapd %xmm5,%xmm4
movapd %xmm5,%xmm7
subpd  %xmm6,%xmm5
mulpd  %xmm9,%xmm6
addpd  %xmm4,%xmm4
movapd %xmm4,%xmm2
subpd  %xmm6,%xmm2
subpd  %xmm4,%xmm6
addpd  %xmm10,%xmm2
addpd  %xmm1,%xmm1
movapd %xmm6,0x160(%rsp,%rax,8)
subpd  %xmm1,%xmm7
addpd  %xmm3,%xmm7
movapd %xmm7,0x10(%rsp,%rax,8)
movapd %xmm2,0x2b0(%rsp,%rax,8)
movapd %xmm5,0x400(%rsp,%rax,8)
add    $0x2,%rax
paddd  %xmm11,%xmm0
cmp    $0x28,%rax
jne    11c0 <g2_c_raspln+0x80>
movq   $0x0,0x3f0(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x2a0(%rsp)
movq   $0x0,0x150(%rsp)
movq   $0x0,0x540(%rsp)
pxor   %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jae    12a3 <g2_c_raspln+0x163>
movapd %xmm1,%xmm0
ucomisd 0xdbf(%rip),%xmm1
jae    12c3 <g2_c_raspln+0x183>
movsd  0xdb4(%rip),%xmm11
subsd  %xmm0,%xmm11
jmp    12dd <g2_c_raspln+0x19d>
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
lea    0xdb5(%rip),%rdi
call   1040 <fputs@plt>
movq   0xd8f(%rip),%xmm11
jmp    12dd <g2_c_raspln+0x19d>
mov    0x2d16(%rip),%rax
mov    (%rax),%esi
lea    0xdc9(%rip),%rdi
call   1040 <fputs@plt>
pxor   %xmm11,%xmm11
lea    -0x2(%r13),%r8d
xorpd  %xmm12,%xmm12
cmp    $0x3,%r13d
jl     14a0 <g2_c_raspln+0x360>
mov    %r8d,%r9d
punpcklqdq %xmm11,%xmm11
xorpd  %xmm8,%xmm8
xor    %r10d,%r10d
movsd  0xd4f(%rip),%xmm9
movsd  0xd4e(%rip),%xmm10
movabs $0x200000000,%rdx
xor    %esi,%esi
xorpd  %xmm13,%xmm13
xorpd  %xmm6,%xmm6
jmp    134a <g2_c_raspln+0x20a>
nopl   0x0(%rax)
add    $0x5,%r10d
mov    %rbp,%rsi
movapd %xmm5,%xmm13
movapd %xmm12,%xmm6
cmp    %r9,%rbp
je     14a0 <g2_c_raspln+0x360>
movupd (%r14,%rsi,8),%xmm7
movapd %xmm7,%xmm4
movlpd 0x8(%rbx,%rsi,8),%xmm4
movsd  (%rbx,%rsi,8),%xmm0
movsd  0x10(%rbx,%rsi,8),%xmm3
movhpd 0x10(%r14,%rsi,8),%xmm3
unpcklpd %xmm7,%xmm0
subpd  %xmm4,%xmm3
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
unpcklpd %xmm3,%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm4,%xmm5
unpckhpd %xmm3,%xmm5
mulpd  %xmm5,%xmm5
addpd  %xmm0,%xmm5
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
addsd  %xmm0,%xmm5
ucomisd %xmm8,%xmm5
movapd %xmm9,%xmm12
jne    13ae <g2_c_raspln+0x26e>
jnp    13b7 <g2_c_raspln+0x277>
divsd  %xmm5,%xmm0
movapd %xmm0,%xmm12
mov    %r10,%rdi
shl    $0x24,%rdi
lea    0x1(%rsi),%rbp
movapd %xmm10,%xmm0
subsd  %xmm12,%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm3
unpcklpd %xmm12,%xmm12
mulpd  %xmm4,%xmm12
addpd  %xmm3,%xmm12
mulpd  %xmm11,%xmm12
movapd %xmm12,%xmm5
unpckhpd %xmm12,%xmm5
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x2b0(%rsp,%rax,8),%xmm0
movsd  0x160(%rsp,%rax,8),%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm7,%xmm4
unpckhpd %xmm7,%xmm7
mulsd  %xmm3,%xmm7
addsd  %xmm4,%xmm7
movsd  0x10(%rsp,%rax,8),%xmm1
movapd %xmm1,%xmm4
mulsd  %xmm13,%xmm4
addsd  %xmm7,%xmm4
movsd  0x400(%rsp,%rax,8),%xmm2
movapd %xmm2,%xmm7
mulsd  %xmm5,%xmm7
addsd  %xmm4,%xmm7
mov    %rdi,%rcx
sar    $0x1d,%rcx
movsd  %xmm7,(%r12,%rcx,1)
mulsd  (%rbx,%rbp,8),%xmm3
mulsd  (%rbx,%rsi,8),%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm6,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm12,%xmm2
addsd  %xmm1,%xmm2
or     $0x8,%rcx
movsd  %xmm2,(%r12,%rcx,1)
cmp    $0x27,%rax
je     1330 <g2_c_raspln+0x1f0>
movupd (%r14,%rsi,8),%xmm7
add    %rdx,%rdi
add    $0x1,%rax
jmp    1400 <g2_c_raspln+0x2c0>
movslq %r8d,%rax
lea    (%r14,%rax,8),%r9
lea    (%r14,%r15,8),%r10
add    $0xfffffffffffffff8,%r10
shl    $0x4,%r8d
lea    (%r8,%r8,4),%ebp
lea    (%rbx,%rax,8),%r11
lea    (%rbx,%r15,8),%r13
add    $0xfffffffffffffff8,%r13
xor    %ebx,%ebx
movapd %xmm12,%xmm0
unpckhpd %xmm12,%xmm0
cmp    $0x7fffffaf,%ebp
jg     166b <g2_c_raspln+0x52b>
mov    %ebp,%ecx
or     $0x1,%ecx
lea    (%r8,%r8,4),%edx
add    $0x51,%edx
cmp    %ecx,%edx
jl     166b <g2_c_raspln+0x52b>
movslq %ebp,%rdx
lea    (%r12,%rdx,8),%rcx
lea    (%r12,%rdx,8),%rsi
add    $0x280,%rsi
cmp    %rcx,%rsi
jb     166b <g2_c_raspln+0x52b>
lea    (%r12,%rdx,8),%rsi
add    $0x8,%rsi
lea    (%r12,%rdx,8),%rdi
add    $0x288,%rdi
cmp    %rsi,%rdi
jb     166b <g2_c_raspln+0x52b>
lea    -0x1(%r15),%rsi
lea    (%r15,%rsi,1),%rdi
lea    (%r14,%rdi,8),%rdi
add    $0x8,%rdi
lea    (%r12,%rdx,8),%rbx
add    $0x290,%rbx
add    %rax,%r15
lea    (%r14,%r15,8),%rdx
add    $0x8,%rdx
lea    (%r14,%rsi,8),%rsi
add    $0x8,%rsi
lea    (%r14,%rax,8),%r15
add    $0x8,%r15
cmp    %rbx,%r13
setb   0x8(%rsp)
cmp    %rdi,%rcx
setb   %dil
cmp    %rbx,%r11
setb   %al
cmp    %rdx,%rcx
setb   %r8b
cmp    %rbx,%r10
setb   %dl
cmp    %rsi,%rcx
setb   0x7(%rsp)
cmp    %rbx,%r9
setb   %sil
cmp    %r15,%rcx
setb   %cl
xor    %ebx,%ebx
test   %dil,0x8(%rsp)
jne    166b <g2_c_raspln+0x52b>
and    %r8b,%al
jne    166b <g2_c_raspln+0x52b>
and    0x7(%rsp),%dl
jne    166b <g2_c_raspln+0x52b>
and    %cl,%sil
jne    166b <g2_c_raspln+0x52b>
movapd %xmm12,%xmm8
unpcklpd %xmm12,%xmm8
mov    %ebp,%edi
add    $0x1,%rdi
xor    %eax,%eax
xchg   %ax,%ax
movapd 0x2b0(%rsp,%rax,4),%xmm3
movsd  (%r9),%xmm4
unpcklpd %xmm4,%xmm4
movapd 0x160(%rsp,%rax,4),%xmm5
movsd  (%r10),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm5,%xmm6
mulpd  %xmm3,%xmm4
addpd  %xmm6,%xmm4
movapd 0x10(%rsp,%rax,4),%xmm6
movapd %xmm6,%xmm7
mulpd  %xmm0,%xmm7
addpd  %xmm4,%xmm7
movsd  (%r11),%xmm4
unpcklpd %xmm4,%xmm4
movsd  0x0(%r13),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm5,%xmm2
mulpd  %xmm3,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm8,%xmm6
addpd  %xmm4,%xmm6
lea    (%rdi,%rax,1),%ecx
movslq %ecx,%rcx
movapd %xmm7,%xmm2
unpcklpd %xmm6,%xmm2
movhlps %xmm7,%xmm6
movups %xmm6,0x8(%r12,%rcx,8)
movupd %xmm2,-0x8(%r12,%rcx,8)
add    $0x4,%rax
cmp    $0x50,%rax
jne    15d0 <g2_c_raspln+0x490>
mov    $0x28,%ebx
lea    0x0(%rbp,%rbx,2),%edi
lea    0x1(%rdi),%r8
lea    (%rsp,%rbx,8),%rax
add    $0x10,%rax
lea    (%rsp,%rbx,8),%rcx
add    $0x160,%rcx
lea    (%rsp,%rbx,8),%rdx
add    $0x2b0,%rdx
add    $0xffffffffffffffd7,%rbx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,4),%xmm1
movsd  (%rcx,%rsi,4),%xmm2
movsd  (%r10),%xmm3
mulsd  %xmm2,%xmm3
movsd  (%r9),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  (%rax,%rsi,4),%xmm3
movapd %xmm3,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm4,%xmm5
lea    (%rdi,%rsi,1),%ebp
movslq %ebp,%rbp
movsd  %xmm5,(%r12,%rbp,8)
mulsd  0x0(%r13),%xmm2
mulsd  (%r11),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm12,%xmm3
addsd  %xmm1,%xmm3
lea    (%r8,%rsi,1),%ebp
movslq %ebp,%rbp
movsd  %xmm3,(%r12,%rbp,8)
add    $0x2,%rsi
inc    %rbx
jne    16a0 <g2_c_raspln+0x560>
mov    %r14,%rdi
add    $0x548,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <g2_free@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"g2_c_raspln: Using Tension Factor 0.0: very rounded\00"
@stderr = global i32 0
@.str.1 = [58 x i8] c"g2_c_raspln: Using Tension Factor 2.0: not rounded at all\00"
define void @g2_c_raspln(i32 %0, double* %1, double %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double
%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
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca [41 x double]
%24 = alloca [41 x double]
%25 = alloca [41 x double]
%26 = alloca [41 x double]
%27 = alloca double*
%28 = alloca double*
%29 = alloca double
%30 = alloca double
%31 = alloca double
store i32 %0, i32* %5
store double* %1, double** %6
store double %2, double* %7
store double* %3, double** %8
%32 = load i32, i32* %5
%33 = mul nsw i32 %32, 2
%34 = sext i32 %33 to i64
%35 = mul i64 %34, 8
%36 = trunc i64 %35 to i32
%37 = call i64 @g2_malloc(i32 %36)
%38 = inttoptr i64 %37 to double*
store double* %38, double** %27
%39 = load double*, double** %27
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
store double* %42, double** %28
%43 = load i32, i32* %5
%44 = load double*, double** %6
%45 = load double*, double** %27
%46 = load double*, double** %28
%47 = call i32 @g2_split(i32 %43, double* %44, double* %45, double* %46)
store i32 0, i32* %9
br label %48
48: ; preds = %91, %4
%49 = load i32, i32* %9
%50 = icmp slt i32 %49, 41
br i1 %50, label %51, label %94
51: ; preds = %48
%52 = load i32, i32* %9
%53 = sitofp i32 %52 to double
%54 = fdiv double %53, 4.000000e+01
store double %54, double* %29
%55 = load double, double* %29
%56 = load double, double* %29
%57 = fmul double %55, %56
store double %57, double* %30
%58 = load double, double* %29
%59 = load double, double* %30
%60 = fmul double %58, %59
store double %60, double* %31
%61 = load double, double* %31
%62 = load double, double* %30
%63 = fmul double 3.000000e+00, %62
%64 = fneg double %63
%65 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %61, double %64)
%66 = fadd double %65, 1.000000e+00
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [41 x double], [41 x double]* %23, i64 0, i64 %68
store double %66, double* %69
%70 = load double, double* %31
%71 = load double, double* %30
%72 = fmul double 3.000000e+00, %71
%73 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %70, double %72)
%74 = load i32, i32* %9
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [41 x double], [41 x double]* %24, i64 0, i64 %75
store double %73, double* %76
%77 = load double, double* %31
%78 = load double, double* %30
%79 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %78, double %77)
%80 = load double, double* %29
%81 = fadd double %79, %80
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [41 x double], [41 x double]* %25, i64 0, i64 %83
store double %81, double* %84
%85 = load double, double* %31
%86 = load double, double* %30
%87 = fsub double %85, %86
%88 = load i32, i32* %9
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [41 x double], [41 x double]* %26, i64 0, i64 %89
store double %87, double* %90
br label %91
91: ; preds = %51
%92 = load i32, i32* %9
%93 = add nsw i32 %92, 1
store i32 %93, i32* %9
br label %48
94: ; preds = %48
%95 = load double, double* %7
%96 = fcmp ole double %95, 0.000000e+00
br i1 %96, label %97, label %100
97: ; preds = %94
store double 2.000000e+00, double* %12
%98 = load i32, i32* @stderr
%99 = call i32 @fputs(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %98)
br label %110
100: ; preds = %94
%101 = load double, double* %7
%102 = fcmp oge double %101, 2.000000e+00
br i1 %102, label %103, label %106
103: ; preds = %100
store double 0.000000e+00, double* %12
%104 = load i32, i32* @stderr
%105 = call i32 @fputs(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %104)
br label %109
106: ; preds = %100
%107 = load double, double* %7
%108 = fsub double 2.000000e+00, %107
store double %108, double* %12
br label %109
109: ; preds = %106, %103
br label %110
110: ; preds = %109, %97
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %15
store i32 0, i32* %10
br label %111
111: ; preds = %304, %110
%112 = load i32, i32* %10
%113 = load i32, i32* %5
%114 = sub nsw i32 %113, 2
%115 = icmp slt i32 %112, %114
br i1 %115, label %116, label %307
116: ; preds = %111
%117 = load double*, double** %27
%118 = load i32, i32* %10
%119 = add nsw i32 %118, 1
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %117, i64 %120
%122 = load double, double* %121
%123 = load double*, double** %27
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
%127 = load double, double* %126
%128 = fsub double %122, %127
store double %128, double* %19
%129 = load double*, double** %28
%130 = load i32, i32* %10
%131 = add nsw i32 %130, 1
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %129, i64 %132
%134 = load double, double* %133
%135 = load double*, double** %28
%136 = load i32, i32* %10
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %135, i64 %137
%139 = load double, double* %138
%140 = fsub double %134, %139
store double %140, double* %20
%141 = load double*, double** %27
%142 = load i32, i32* %10
%143 = add nsw i32 %142, 2
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %141, i64 %144
%146 = load double, double* %145
%147 = load double*, double** %27
%148 = load i32, i32* %10
%149 = add nsw i32 %148, 1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %147, i64 %150
%152 = load double, double* %151
%153 = fsub double %146, %152
store double %153, double* %21
%154 = load double*, double** %28
%155 = load i32, i32* %10
%156 = add nsw i32 %155, 2
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %154, i64 %157
%159 = load double, double* %158
%160 = load double*, double** %28
%161 = load i32, i32* %10
%162 = add nsw i32 %161, 1
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %160, i64 %163
%165 = load double, double* %164
%166 = fsub double %159, %165
store double %166, double* %22
%167 = load double, double* %19
%168 = load double, double* %19
%169 = load double, double* %20
%170 = load double, double* %20
%171 = fmul double %169, %170
%172 = call double @llvm.fmuladd.f64(double %167, double %168, double %171)
store double %172, double* %13
%173 = load double, double* %21
%174 = load double, double* %21
%175 = load double, double* %22
%176 = load double, double* %22
%177 = fmul double %175, %176
%178 = call double @llvm.fmuladd.f64(double %173, double %174, double %177)
store double %178, double* %14
%179 = load double, double* %13
%180 = load double, double* %14
%181 = fadd double %179, %180
%182 = fcmp oeq double %181, 0.000000e+00
br i1 %182, label %183, label %184
183: ; preds = %116
store double 5.000000e-01, double* %11
br label %190
184: ; preds = %116
%185 = load double, double* %14
%186 = load double, double* %13
%187 = load double, double* %14
%188 = fadd double %186, %187
%189 = fdiv double %185, %188
store double %189, double* %11
br label %190
190: ; preds = %184, %183
%191 = load double, double* %12
%192 = load double, double* %11
%193 = load double, double* %19
%194 = load double, double* %11
%195 = fsub double 1.000000e+00, %194
%196 = load double, double* %21
%197 = fmul double %195, %196
%198 = call double @llvm.fmuladd.f64(double %192, double %193, double %197)
%199 = fmul double %191, %198
store double %199, double* %17
%200 = load double, double* %12
%201 = load double, double* %11
%202 = load double, double* %20
%203 = load double, double* %11
%204 = fsub double 1.000000e+00, %203
%205 = load double, double* %22
%206 = fmul double %204, %205
%207 = call double @llvm.fmuladd.f64(double %201, double %202, double %206)
%208 = fmul double %200, %207
store double %208, double* %18
store i32 0, i32* %9
br label %209
209: ; preds = %298, %190
%210 = load i32, i32* %9
%211 = icmp slt i32 %210, 40
br i1 %211, label %212, label %301
212: ; preds = %209
%213 = load i32, i32* %9
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds [41 x double], [41 x double]* %23, i64 0, i64 %214
%216 = load double, double* %215
%217 = load double*, double** %27
%218 = load i32, i32* %10
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds double, double* %217, i64 %219
%221 = load double, double* %220
%222 = load i32, i32* %9
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [41 x double], [41 x double]* %24, i64 0, i64 %223
%225 = load double, double* %224
%226 = load double*, double** %27
%227 = load i32, i32* %10
%228 = add nsw i32 %227, 1
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %226, i64 %229
%231 = load double, double* %230
%232 = fmul double %225, %231
%233 = call double @llvm.fmuladd.f64(double %216, double %221, double %232)
%234 = load i32, i32* %9
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds [41 x double], [41 x double]* %25, i64 0, i64 %235
%237 = load double, double* %236
%238 = load double, double* %15
%239 = call double @llvm.fmuladd.f64(double %237, double %238, double %233)
%240 = load i32, i32* %9
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [41 x double], [41 x double]* %26, i64 0, i64 %241
%243 = load double, double* %242
%244 = load double, double* %17
%245 = call double @llvm.fmuladd.f64(double %243, double %244, double %239)
%246 = load double*, double** %8
%247 = load i32, i32* %10
%248 = mul nsw i32 80, %247
%249 = load i32, i32* %9
%250 = add nsw i32 %248, %249
%251 = load i32, i32* %9
%252 = add nsw i32 %250, %251
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %246, i64 %253
store double %245, double* %254
%255 = load i32, i32* %9
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [41 x double], [41 x double]* %23, i64 0, i64 %256
%258 = load double, double* %257
%259 = load double*, double** %28
%260 = load i32, i32* %10
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
%263 = load double, double* %262
%264 = load i32, i32* %9
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [41 x double], [41 x double]* %24, i64 0, i64 %265
%267 = load double, double* %266
%268 = load double*, double** %28
%269 = load i32, i32* %10
%270 = add nsw i32 %269, 1
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %268, i64 %271
%273 = load double, double* %272
%274 = fmul double %267, %273
%275 = call double @llvm.fmuladd.f64(double %258, double %263, double %274)
%276 = load i32, i32* %9
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds [41 x double], [41 x double]* %25, i64 0, i64 %277
%279 = load double, double* %278
%280 = load double, double* %16
%281 = call double @llvm.fmuladd.f64(double %279, double %280, double %275)
%282 = load i32, i32* %9
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds [41 x double], [41 x double]* %26, i64 0, i64 %283
%285 = load double, double* %284
%286 = load double, double* %18
%287 = call double @llvm.fmuladd.f64(double %285, double %286, double %281)
%288 = load double*, double** %8
%289 = load i32, i32* %10
%290 = mul nsw i32 80, %289
%291 = load i32, i32* %9
%292 = add nsw i32 %290, %291
%293 = load i32, i32* %9
%294 = add nsw i32 %292, %293
%295 = add nsw i32 %294, 1
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds double, double* %288, i64 %296
store double %287, double* %297
br label %298
298: ; preds = %212
%299 = load i32, i32* %9
%300 = add nsw i32 %299, 1
store i32 %300, i32* %9
br label %209
301: ; preds = %209
%302 = load double, double* %17
store double %302, double* %15
%303 = load double, double* %18
store double %303, double* %16
br label %304
304: ; preds = %301
%305 = load i32, i32* %10
%306 = add nsw i32 %305, 1
store i32 %306, i32* %10
br label %111
307: ; preds = %111
store i32 0, i32* %9
br label %308
308: ; preds = %389, %307
%309 = load i32, i32* %9
%310 = icmp slt i32 %309, 41
br i1 %310, label %311, label %392
311: ; preds = %308
%312 = load i32, i32* %9
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds [41 x double], [41 x double]* %23, i64 0, i64 %313
%315 = load double, double* %314
%316 = load double*, double** %27
%317 = load i32, i32* %5
%318 = sub nsw i32 %317, 2
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds double, double* %316, i64 %319
%321 = load double, double* %320
%322 = load i32, i32* %9
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds [41 x double], [41 x double]* %24, i64 0, i64 %323
%325 = load double, double* %324
%326 = load double*, double** %27
%327 = load i32, i32* %5
%328 = sub nsw i32 %327, 1
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds double, double* %326, i64 %329
%331 = load double, double* %330
%332 = fmul double %325, %331
%333 = call double @llvm.fmuladd.f64(double %315, double %321, double %332)
%334 = load i32, i32* %9
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds [41 x double], [41 x double]* %25, i64 0, i64 %335
%337 = load double, double* %336
%338 = load double, double* %15
%339 = call double @llvm.fmuladd.f64(double %337, double %338, double %333)
%340 = load double*, double** %8
%341 = load i32, i32* %5
%342 = sub nsw i32 %341, 2
%343 = mul nsw i32 80, %342
%344 = load i32, i32* %9
%345 = add nsw i32 %343, %344
%346 = load i32, i32* %9
%347 = add nsw i32 %345, %346
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds double, double* %340, i64 %348
store double %339, double* %349
%350 = load i32, i32* %9
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds [41 x double], [41 x double]* %23, i64 0, i64 %351
%353 = load double, double* %352
%354 = load double*, double** %28
%355 = load i32, i32* %5
%356 = sub nsw i32 %355, 2
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds double, double* %354, i64 %357
%359 = load double, double* %358
%360 = load i32, i32* %9
%361 = sext i32 %360 to i64
%362 = getelementptr inbounds [41 x double], [41 x double]* %24, i64 0, i64 %361
%363 = load double, double* %362
%364 = load double*, double** %28
%365 = load i32, i32* %5
%366 = sub nsw i32 %365, 1
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds double, double* %364, i64 %367
%369 = load double, double* %368
%370 = fmul double %363, %369
%371 = call double @llvm.fmuladd.f64(double %353, double %359, double %370)
%372 = load i32, i32* %9
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds [41 x double], [41 x double]* %25, i64 0, i64 %373
%375 = load double, double* %374
%376 = load double, double* %16
%377 = call double @llvm.fmuladd.f64(double %375, double %376, double %371)
%378 = load double*, double** %8
%379 = load i32, i32* %5
%380 = sub nsw i32 %379, 2
%381 = mul nsw i32 80, %380
%382 = load i32, i32* %9
%383 = add nsw i32 %381, %382
%384 = load i32, i32* %9
%385 = add nsw i32 %383, %384
%386 = add nsw i32 %385, 1
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds double, double* %378, i64 %387
store double %377, double* %388
br label %389
389: ; preds = %311
%390 = load i32, i32* %9
%391 = add nsw i32 %390, 1
store i32 %391, i32* %9
br label %308
392: ; preds = %308
%393 = load double*, double** %27
%394 = call i32 @g2_free(double* %393)
ret void
}

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