#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ stderr;
void subspl(double x[], double y[], int n, double h[], double sp[]) {
  int i;
  double *dc, *du, g, hip1;
  dc = (double *)calloc(n + 1, sizeof(double));
  du = (double *)calloc(n + 1, sizeof(double));
  if (dc == NULL || du == NULL) {
    fprintf(stderr, "Error : out of memory in subspl().\n");
    return;
  }
  for (i = 1; i <= n; i++)
    h[i] = x[i] - x[i - 1];
  for (i = 1; i < n; i++) {
    hip1 = x[i + 1] - x[i];
    sp[i] = 6. *
            ((y[i + 1] - y[i]) / h[i] / hip1 - (y[i] - y[i - 1]) / h[i] / h[i]);
    du[i] = h[i + 1] / h[i];
    dc[i] = 2. * (1. + du[i]);
  }
  dc[n] += 1.;
  dc[n - 1] += (h[n] / h[n - 1]);
  du[1] /= dc[1];
  sp[1] /= dc[1];
  for (i = 2; i <= n; i++) {
    g = 1. / (dc[i] - du[i - 1]);
    du[i] *= g;
    sp[i] = (sp[i] - sp[i - 1]) * g;
  }
  for (i = n - 1; i >= 1; i--)
    sp[i] -= sp[i + 1] * du[i];
  sp[0] = sp[1];
  sp[n] = sp[n - 1];
  free(du);
  free(dc);
}


x86 assembly (clang, -O0):
<subspl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1189 <subspl+0x59>
cmpq   $0x0,-0x40(%rbp)
jne    11a3 <subspl+0x73>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
call   1050 <fprintf@plt>
jmp    14e8 <subspl+0x3b8>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11f0 <subspl+0xc0>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11aa <subspl+0x7a>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1316 <subspl+0x1e6>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
divsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd73(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xd16(%rip),%xmm1
addsd  (%rax,%rcx,8),%xmm1
movsd  0xd11(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f7 <subspl+0xc7>
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xcda(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x40(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movl   $0x2,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1435 <subspl+0x305>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0xc2a(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13a3 <subspl+0x273>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jl     14a6 <subspl+0x376>
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    143e <subspl+0x30e>
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subspl>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%rbx
mov    %rcx,%r12
mov    %rsi,%r13
mov    %rdi,%rbp
mov    %rdx,(%rsp)
lea    0x1(%rdx),%r15d
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%r14
mov    %r15d,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
test   %r14,%r14
je     13a8 <subspl+0x278>
test   %rax,%rax
je     13a8 <subspl+0x278>
mov    %r15d,%ecx
mov    (%rsp),%r10
test   %r10d,%r10d
jle    13cb <subspl+0x29b>
lea    -0x1(%rcx),%r9
mov    $0x1,%edx
cmp    $0x4,%r9
jb     129e <subspl+0x16e>
lea    0x8(%r12),%rsi
lea    0x0(,%rcx,8),%rdi
add    %rbp,%rdi
cmp    %rdi,%rsi
jae    11c3 <subspl+0x93>
lea    (%r12,%rcx,8),%rsi
cmp    %rbp,%rsi
ja     129e <subspl+0x16e>
mov    %r9,%rdx
and    $0xfffffffffffffffc,%rdx
lea    -0x4(%rdx),%rsi
mov    %rsi,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rsi,%rsi
je     1556 <subspl+0x426>
mov    %r8,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd 0x0(%rbp,%rdi,8),%xmm0
movupd 0x8(%rbp,%rdi,8),%xmm1
subpd  %xmm0,%xmm1
movupd 0x10(%rbp,%rdi,8),%xmm0
movupd 0x18(%rbp,%rdi,8),%xmm2
subpd  %xmm0,%xmm2
movupd %xmm1,0x8(%r12,%rdi,8)
movupd %xmm2,0x18(%r12,%rdi,8)
movupd 0x20(%rbp,%rdi,8),%xmm0
movupd 0x28(%rbp,%rdi,8),%xmm1
subpd  %xmm0,%xmm1
movupd 0x30(%rbp,%rdi,8),%xmm0
movupd 0x38(%rbp,%rdi,8),%xmm2
subpd  %xmm0,%xmm2
movupd %xmm1,0x28(%r12,%rdi,8)
movupd %xmm2,0x38(%r12,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rsi
jne    11f0 <subspl+0xc0>
test   $0x1,%r8b
je     1295 <subspl+0x165>
lea    0x0(,%rdi,8),%rsi
or     $0x8,%rsi
movupd 0x0(%rbp,%rsi,1),%xmm0
movupd 0x10(%rbp,%rsi,1),%xmm1
movupd 0x0(%rbp,%rdi,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x10(%rbp,%rdi,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,(%r12,%rsi,1)
movupd %xmm1,0x10(%r12,%rsi,1)
cmp    %rdx,%r9
je     12fe <subspl+0x1ce>
or     $0x1,%rdx
mov    %rdx,%rsi
not    %rsi
test   $0x1,%cl
jne    12bf <subspl+0x18f>
movsd  0x0(%rbp,%rdx,8),%xmm0
subsd  -0x8(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%r12,%rdx,8)
add    $0x1,%rdx
add    %rcx,%rsi
je     12fe <subspl+0x1ce>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%rbp,%rdx,8),%xmm0
subsd  -0x8(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%r12,%rdx,8)
movsd  0x8(%rbp,%rdx,8),%xmm0
subsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x8(%r12,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rcx
jne    12d0 <subspl+0x1a0>
cmp    $0x2,%r10d
setge  %dl
jl     13cb <subspl+0x29b>
mov    %r10d,%esi
lea    -0x8(,%rsi,8),%rsi
ff
xor    %edi,%edi
movsd  0xce0(%rip),%xmm0
movsd  0xce0(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rbp,%rdi,1),%xmm2
subsd  0x8(%rbp,%rdi,1),%xmm2
movsd  0x8(%r13,%rdi,1),%xmm3
movsd  0x10(%r13,%rdi,1),%xmm4
subsd  %xmm3,%xmm4
movsd  0x8(%r12,%rdi,1),%xmm5
divsd  %xmm5,%xmm4
divsd  %xmm2,%xmm4
subsd  0x0(%r13,%rdi,1),%xmm3
divsd  %xmm5,%xmm3
divsd  %xmm5,%xmm3
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movsd  %xmm4,0x8(%rbx,%rdi,1)
movsd  0x10(%r12,%rdi,1),%xmm2
divsd  0x8(%r12,%rdi,1),%xmm2
movsd  %xmm2,0x8(%rax,%rdi,1)
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm2
movsd  %xmm2,0x8(%r14,%rdi,1)
add    $0x8,%rdi
cmp    %rdi,%rsi
jne    1330 <subspl+0x200>
jmp    13cd <subspl+0x29d>
mov    0x2c31(%rip),%rax
mov    (%rax),%edi
lea    0xc58(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fprintf@plt>
xor    %edx,%edx
movslq %r10d,%rsi
movsd  (%r14,%rsi,8),%xmm0
addsd  0xc2a(%rip),%xmm0
movsd  %xmm0,(%r14,%rsi,8)
movsd  (%r12,%rsi,8),%xmm0
divsd  -0x8(%r12,%rsi,8),%xmm0
addsd  -0x8(%r14,%rsi,8),%xmm0
movsd  %xmm0,-0x8(%r14,%rsi,8)
movsd  0x8(%rax),%xmm0
divsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0x8(%rbx),%xmm0
divsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%rbx)
cmp    $0x2,%r10d
jl     14ef <subspl+0x3bf>
lea    0x8(%rax),%rdi
lea    (%rbx,%rcx,8),%rbp
cmp    %rbp,%rdi
jae    1491 <subspl+0x361>
lea    (%rax,%rcx,8),%rdi
lea    0x8(%rbx),%rbp
cmp    %rdi,%rbp
jae    1491 <subspl+0x361>
mov    $0x2,%edi
movsd  0xbb8(%rip),%xmm0
movsd  (%r14,%rdi,8),%xmm1
subsd  -0x8(%rax,%rdi,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
movsd  (%rax,%rdi,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rax,%rdi,8)
movsd  (%rbx,%rdi,8),%xmm1
subsd  -0x8(%rbx,%rdi,8),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rbx,%rdi,8)
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    1450 <subspl+0x320>
jmp    14ef <subspl+0x3bf>
movsd  0x8(%rax),%xmm1
movsd  0x8(%rbx),%xmm2
mov    $0x2,%edi
movsd  0xb60(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rdi,8),%xmm3
subsd  %xmm1,%xmm3
movapd %xmm0,%xmm4
divsd  %xmm3,%xmm4
movsd  (%rax,%rdi,8),%xmm1
mulsd  %xmm4,%xmm1
movsd  %xmm1,(%rax,%rdi,8)
movsd  (%rbx,%rdi,8),%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm4,%xmm3
movsd  %xmm3,(%rbx,%rdi,8)
add    $0x1,%rdi
movapd %xmm3,%xmm2
cmp    %rdi,%rcx
jne    14b0 <subspl+0x380>
lea    -0x1(%rsi),%rcx
test   %dl,%dl
je     1525 <subspl+0x3f5>
mov    %ecx,%edx
add    $0x1,%rdx
nopl   (%rax)
movsd  -0x8(%rbx,%rdx,8),%xmm0
movsd  (%rbx,%rdx,8),%xmm1
mulsd  -0x8(%rax,%rdx,8),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbx,%rdx,8)
add    $0xffffffffffffffff,%rdx
cmp    $0x1,%rdx
ja     1500 <subspl+0x3d0>
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
mov    %rax,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %edi,%edi
test   $0x1,%r8b
jne    125c <subspl+0x12c>
jmp    1295 <subspl+0x165>

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

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