#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*/ free_matrix(float **, int, int, int, int);
int /*<<< orphan*/ free_vector(float *, int, int);
float **matrix(int, int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ splie2(float *, float *, float **, int, int, float **);
float *vector(int, int);
int main(void) {
  int i, j;
  float x1x2, *x1, *x2, **y, **y2;
  x1 = vector(1, 10);
  x2 = vector(1, 10);
  y = matrix(1, 10, 1, 10);
  y2 = matrix(1, 10, 1, 10);
  for (i = 1; i <= 10; i++)
    x1[i] = 0.2 * i;
  for (i = 1; i <= 10; i++)
    x2[i] = 0.2 * i;
  for (i = 1; i <= 10; i++)
    for (j = 1; j <= 10; j++) {
      x1x2 = x1[i] * x2[j];
      y[i][j] = x1x2 * x1x2;
    }
  splie2(x1, x2, y, 10, 10, y2);
  printf("\nsecond derivatives from SPLIE2\n");
  printf("natural spline assumed\n");
  for (i = 1; i <= 5; i++) {
    for (j = 1; j <= 5; j++)
      printf("%12.6f", y2[i][j]);
    printf("\n");
  }
  printf("\nactual second derivatives\n");
  for (i = 1; i <= 5; i++) {
    for (j = 1; j <= 5; j++)
      printf("%12.6f", 2.0 * x1[i] * x1[i]);
    printf("\n");
  }
  free_matrix(y2, 1, 10, 1, 10);
  free_matrix(y, 1, 10, 1, 10);
  free_vector(x2, 1, 10);
  free_vector(x1, 1, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1080 <vector@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1080 <vector@plt>
mov    %rax,-0x20(%rbp)
mov    $0x1,%edx
mov    $0xa,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1070 <matrix@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1,%edx
mov    $0xa,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1070 <matrix@plt>
mov    %rax,-0x30(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1204 <main+0xa4>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe27(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ca <main+0x6a>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1245 <main+0xe5>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xde6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    120b <main+0xab>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     12c6 <main+0x166>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     12b3 <main+0x153>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0xc(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    125d <main+0xfd>
jmp    12b8 <main+0x158>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    124c <main+0xec>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%r9
mov    $0xa,%r8d
mov    %r8d,%ecx
call   1060 <splie2@plt>
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1373 <main+0x213>
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jg     1357 <main+0x1f7>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd07(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1318 <main+0x1b8>
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1307 <main+0x1a7>
lea    0xcd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     140d <main+0x2ad>
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jg     13f1 <main+0x291>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc44(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
lea    0xc6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1399 <main+0x239>
lea    0xc37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1388 <main+0x228>
mov    -0x30(%rbp),%rdi
mov    $0x1,%ecx
mov    $0xa,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%ecx
mov    $0xa,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1050 <free_vector@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%edi
mov    $0xa,%esi
call   10a0 <vector@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0xa,%esi
call   10a0 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1090 <matrix@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1090 <matrix@plt>
mov    %rax,%r12
movaps 0xe12(%rip),%xmm0
movups %xmm0,0x4(%rbx)
movaps 0xe17(%rip),%xmm1
movups %xmm1,0x14(%rbx)
movabs $0x400000003fe66666,%rax
mov    %rax,0x24(%rbx)
movups %xmm0,0x4(%r14)
movups %xmm1,0x14(%r14)
mov    %rax,0x24(%r14)
mov    $0x1,%eax
movss  0xdfa(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
mulss  (%rbx,%rax,4),%xmm0
mov    (%r15,%rax,8),%rcx
mulss  %xmm0,%xmm0
movss  %xmm0,0x4(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x8(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x8(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0xc(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0xc(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x10(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x10(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x14(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x14(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x18(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x18(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x1c(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x1c(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x20(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x20(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x24(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x24(%rcx)
movss  (%rbx,%rax,4),%xmm0
mulss  0x28(%r14),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x28(%rcx)
cmp    $0xa,%rax
je     130b <main+0x18b>
movss  0x4(%r14),%xmm0
add    $0x1,%rax
jmp    1230 <main+0xb0>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0xa,%ecx
mov    $0xa,%r8d
mov    %r12,%r9
call   1080 <splie2@plt>
lea    0xcfd(%rip),%rdi
call   1040 <puts@plt>
lea    0xd11(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%r12),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd0(%rip),%r13
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x8(%r12),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x8(%r12),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x8(%r12),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x8(%r12),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%r12),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x10(%r12),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x10(%r12),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x10(%r12),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x10(%r12),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%r12),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x18(%r12),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x18(%r12),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x18(%r12),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x18(%r12),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x20(%r12),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x20(%r12),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x20(%r12),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x20(%r12),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x20(%r12),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x28(%r12),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x28(%r12),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x28(%r12),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x28(%r12),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x28(%r12),%rax
movss  0x14(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xa8b(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  (%rbx,%rbp,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  (%rbx,%rbp,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  (%rbx,%rbp,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  (%rbx,%rbp,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  (%rbx,%rbp,4),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x6,%rbp
jne    15f0 <main+0x470>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
call   1050 <free_matrix@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
call   1050 <free_matrix@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1070 <free_vector@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1070 <free_vector@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0Asecond derivatives from SPLIE2\0A\00"
@.str.1 = [24 x i8] c"natural spline assumed\0A\00"
@.str.2 = [7 x i8] c"%12.6f\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [28 x i8] c"\0Aactual second derivatives\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
%7 = alloca float**
%8 = alloca float**
store i32 0, i32* %1
%9 = call float* @vector(i32 1, i32 10)
store float* %9, float** %5
%10 = call float* @vector(i32 1, i32 10)
store float* %10, float** %6
%11 = call float** @matrix(i32 1, i32 10, i32 1, i32 10)
store float** %11, float*** %7
%12 = call float** @matrix(i32 1, i32 10, i32 1, i32 10)
store float** %12, float*** %8
store i32 1, i32* %2
br label %13
13: ; preds = %25, %0
%14 = load i32, i32* %2
%15 = icmp sle i32 %14, 10
br i1 %15, label %16, label %28
16: ; preds = %13
%17 = load i32, i32* %2
%18 = sitofp i32 %17 to double
%19 = fmul double 2.000000e-01, %18
%20 = fptrunc double %19 to float
%21 = load float*, float** %5
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
store float %20, float* %24
br label %25
25: ; preds = %16
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %13
28: ; preds = %13
store i32 1, i32* %2
br label %29
29: ; preds = %41, %28
%30 = load i32, i32* %2
%31 = icmp sle i32 %30, 10
br i1 %31, label %32, label %44
32: ; preds = %29
%33 = load i32, i32* %2
%34 = sitofp i32 %33 to double
%35 = fmul double 2.000000e-01, %34
%36 = fptrunc double %35 to float
%37 = load float*, float** %6
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
store float %36, float* %40
br label %41
41: ; preds = %32
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %29
44: ; preds = %29
store i32 1, i32* %2
br label %45
45: ; preds = %79, %44
%46 = load i32, i32* %2
%47 = icmp sle i32 %46, 10
br i1 %47, label %48, label %82
48: ; preds = %45
store i32 1, i32* %3
br label %49
49: ; preds = %75, %48
%50 = load i32, i32* %3
%51 = icmp sle i32 %50, 10
br i1 %51, label %52, label %78
52: ; preds = %49
%53 = load float*, float** %5
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %53, i64 %55
%57 = load float, float* %56
%58 = load float*, float** %6
%59 = load i32, i32* %3
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds float, float* %58, i64 %60
%62 = load float, float* %61
%63 = fmul float %57, %62
store float %63, float* %4
%64 = load float, float* %4
%65 = load float, float* %4
%66 = fmul float %64, %65
%67 = load float**, float*** %7
%68 = load i32, i32* %2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds float*, float** %67, i64 %69
%71 = load float*, float** %70
%72 = load i32, i32* %3
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds float, float* %71, i64 %73
store float %66, float* %74
br label %75
75: ; preds = %52
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
store i32 %77, i32* %3
br label %49
78: ; preds = %49
br label %79
79: ; preds = %78
%80 = load i32, i32* %2
%81 = add nsw i32 %80, 1
store i32 %81, i32* %2
br label %45
82: ; preds = %45
%83 = load float*, float** %5
%84 = load float*, float** %6
%85 = load float**, float*** %7
%86 = load float**, float*** %8
%87 = call i32 @splie2(float* %83, float* %84, float** %85, i32 10, i32 10, float** %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %2
br label %90
90: ; preds = %114, %82
%91 = load i32, i32* %2
%92 = icmp sle i32 %91, 5
br i1 %92, label %93, label %117
93: ; preds = %90
store i32 1, i32* %3
br label %94
94: ; preds = %109, %93
%95 = load i32, i32* %3
%96 = icmp sle i32 %95, 5
br i1 %96, label %97, label %112
97: ; preds = %94
%98 = load float**, float*** %8
%99 = load i32, i32* %2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds float*, float** %98, i64 %100
%102 = load float*, float** %101
%103 = load i32, i32* %3
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds float, float* %102, i64 %104
%106 = load float, float* %105
%107 = fpext float %106 to double
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %107)
br label %109
109: ; preds = %97
%110 = load i32, i32* %3
%111 = add nsw i32 %110, 1
store i32 %111, i32* %3
br label %94
112: ; preds = %94
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %114
114: ; preds = %112
%115 = load i32, i32* %2
%116 = add nsw i32 %115, 1
store i32 %116, i32* %2
br label %90
117: ; preds = %90
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %2
br label %119
119: ; preds = %147, %117
%120 = load i32, i32* %2
%121 = icmp sle i32 %120, 5
br i1 %121, label %122, label %150
122: ; preds = %119
store i32 1, i32* %3
br label %123
123: ; preds = %142, %122
%124 = load i32, i32* %3
%125 = icmp sle i32 %124, 5
br i1 %125, label %126, label %145
126: ; preds = %123
%127 = load float*, float** %5
%128 = load i32, i32* %2
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds float, float* %127, i64 %129
%131 = load float, float* %130
%132 = fpext float %131 to double
%133 = fmul double 2.000000e+00, %132
%134 = load float*, float** %5
%135 = load i32, i32* %2
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds float, float* %134, i64 %136
%138 = load float, float* %137
%139 = fpext float %138 to double
%140 = fmul double %133, %139
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %140)
br label %142
142: ; preds = %126
%143 = load i32, i32* %3
%144 = add nsw i32 %143, 1
store i32 %144, i32* %3
br label %123
145: ; preds = %123
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %147
147: ; preds = %145
%148 = load i32, i32* %2
%149 = add nsw i32 %148, 1
store i32 %149, i32* %2
br label %119
150: ; preds = %119
%151 = load float**, float*** %8
%152 = call i32 @free_matrix(float** %151, i32 1, i32 10, i32 1, i32 10)
%153 = load float**, float*** %7
%154 = call i32 @free_matrix(float** %153, i32 1, i32 10, i32 1, i32 10)
%155 = load float*, float** %6
%156 = call i32 @free_vector(float* %155, i32 1, i32 10)
%157 = load float*, float** %5
%158 = call i32 @free_vector(float* %157, i32 1, i32 10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"%12.6f\00"
@str = [32 x i8] c"\0Asecond derivatives from SPLIE2\00"
@str.5 = [23 x i8] c"natural spline assumed\00"
@str.6 = [27 x i8] c"\0Aactual second derivatives\00"
define i32 @main() {
%1 = tail call float* @vector(i32 1, i32 10)
%2 = tail call float* @vector(i32 1, i32 10)
%3 = tail call float** @matrix(i32 1, i32 10, i32 1, i32 10)
%4 = tail call float** @matrix(i32 1, i32 10, i32 1, i32 10)
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = bitcast float* %5 to <4 x float>*
store <4 x float> <float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x3FE3333340000000, float 0x3FE99999A0000000>, <4 x float>* %6
%7 = getelementptr inbounds float, float* %1, i64 5
%8 = bitcast float* %7 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000>, <4 x float>* %8
%9 = getelementptr inbounds float, float* %1, i64 9
store float 0x3FFCCCCCC0000000, float* %9
%10 = getelementptr inbounds float, float* %1, i64 10
store float 2.000000e+00, float* %10
%11 = getelementptr inbounds float, float* %2, i64 1
%12 = getelementptr inbounds float, float* %2, i64 2
%13 = getelementptr inbounds float, float* %2, i64 3
%14 = getelementptr inbounds float, float* %2, i64 4
%15 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x3FE3333340000000, float 0x3FE99999A0000000>, <4 x float>* %15
%16 = getelementptr inbounds float, float* %2, i64 5
%17 = getelementptr inbounds float, float* %2, i64 6
%18 = getelementptr inbounds float, float* %2, i64 7
%19 = getelementptr inbounds float, float* %2, i64 8
%20 = bitcast float* %16 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000>, <4 x float>* %20
%21 = getelementptr inbounds float, float* %2, i64 9
store float 0x3FFCCCCCC0000000, float* %21
%22 = getelementptr inbounds float, float* %2, i64 10
store float 2.000000e+00, float* %22
br label %23
23: ; preds = %80, %0
%24 = phi float [ 0x3FC99999A0000000, %0 ], [ %81, %80 ]
%25 = phi i64 [ 1, %0 ], [ %78, %80 ]
%26 = getelementptr inbounds float, float* %1, i64 %25
%27 = getelementptr inbounds float*, float** %3, i64 %25
%28 = load float*, float** %27
%29 = load float, float* %26
%30 = fmul float %29, %24
%31 = fmul float %30, %30
%32 = getelementptr inbounds float, float* %28, i64 1
store float %31, float* %32
%33 = load float, float* %26
%34 = load float, float* %12
%35 = fmul float %33, %34
%36 = fmul float %35, %35
%37 = getelementptr inbounds float, float* %28, i64 2
store float %36, float* %37
%38 = load float, float* %26
%39 = load float, float* %13
%40 = fmul float %38, %39
%41 = fmul float %40, %40
%42 = getelementptr inbounds float, float* %28, i64 3
store float %41, float* %42
%43 = load float, float* %26
%44 = load float, float* %14
%45 = fmul float %43, %44
%46 = fmul float %45, %45
%47 = getelementptr inbounds float, float* %28, i64 4
store float %46, float* %47
%48 = load float, float* %26
%49 = load float, float* %16
%50 = fmul float %48, %49
%51 = fmul float %50, %50
%52 = getelementptr inbounds float, float* %28, i64 5
store float %51, float* %52
%53 = load float, float* %26
%54 = load float, float* %17
%55 = fmul float %53, %54
%56 = fmul float %55, %55
%57 = getelementptr inbounds float, float* %28, i64 6
store float %56, float* %57
%58 = load float, float* %26
%59 = load float, float* %18
%60 = fmul float %58, %59
%61 = fmul float %60, %60
%62 = getelementptr inbounds float, float* %28, i64 7
store float %61, float* %62
%63 = load float, float* %26
%64 = load float, float* %19
%65 = fmul float %63, %64
%66 = fmul float %65, %65
%67 = getelementptr inbounds float, float* %28, i64 8
store float %66, float* %67
%68 = load float, float* %26
%69 = load float, float* %21
%70 = fmul float %68, %69
%71 = fmul float %70, %70
%72 = getelementptr inbounds float, float* %28, i64 9
store float %71, float* %72
%73 = load float, float* %26
%74 = load float, float* %22
%75 = fmul float %73, %74
%76 = fmul float %75, %75
%77 = getelementptr inbounds float, float* %28, i64 10
store float %76, float* %77
%78 = add nuw nsw i64 %25, 1
%79 = icmp eq i64 %78, 11
br i1 %79, label %82, label %80
80: ; preds = %23
%81 = load float, float* %11
br label %23
82: ; preds = %23
%83 = tail call i32 @splie2(float* %1, float* %2, float** %3, i32 10, i32 10, float** %4)
%84 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0))
%86 = getelementptr inbounds float*, float** %4, i64 1
%87 = load float*, float** %86
%88 = getelementptr inbounds float, float* %87, i64 1
%89 = load float, float* %88
%90 = fpext float %89 to double
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %90)
%92 = load float*, float** %86
%93 = getelementptr inbounds float, float* %92, i64 2
%94 = load float, float* %93
%95 = fpext float %94 to double
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %95)
%97 = load float*, float** %86
%98 = getelementptr inbounds float, float* %97, i64 3
%99 = load float, float* %98
%100 = fpext float %99 to double
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %100)
%102 = load float*, float** %86
%103 = getelementptr inbounds float, float* %102, i64 4
%104 = load float, float* %103
%105 = fpext float %104 to double
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %105)
%107 = load float*, float** %86
%108 = getelementptr inbounds float, float* %107, i64 5
%109 = load float, float* %108
%110 = fpext float %109 to double
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %110)
%112 = tail call i32 @putchar(i32 10)
%113 = getelementptr inbounds float*, float** %4, i64 2
%114 = load float*, float** %113
%115 = getelementptr inbounds float, float* %114, i64 1
%116 = load float, float* %115
%117 = fpext float %116 to double
%118 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %117)
%119 = load float*, float** %113
%120 = getelementptr inbounds float, float* %119, i64 2
%121 = load float, float* %120
%122 = fpext float %121 to double
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %122)
%124 = load float*, float** %113
%125 = getelementptr inbounds float, float* %124, i64 3
%126 = load float, float* %125
%127 = fpext float %126 to double
%128 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %127)
%129 = load float*, float** %113
%130 = getelementptr inbounds float, float* %129, i64 4
%131 = load float, float* %130
%132 = fpext float %131 to double
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %132)
%134 = load float*, float** %113
%135 = getelementptr inbounds float, float* %134, i64 5
%136 = load float, float* %135
%137 = fpext float %136 to double
%138 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %137)
%139 = tail call i32 @putchar(i32 10)
%140 = getelementptr inbounds float*, float** %4, i64 3
%141 = load float*, float** %140
%142 = getelementptr inbounds float, float* %141, i64 1
%143 = load float, float* %142
%144 = fpext float %143 to double
%145 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %144)
%146 = load float*, float** %140
%147 = getelementptr inbounds float, float* %146, i64 2
%148 = load float, float* %147
%149 = fpext float %148 to double
%150 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %149)
%151 = load float*, float** %140
%152 = getelementptr inbounds float, float* %151, i64 3
%153 = load float, float* %152
%154 = fpext float %153 to double
%155 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %154)
%156 = load float*, float** %140
%157 = getelementptr inbounds float, float* %156, i64 4
%158 = load float, float* %157
%159 = fpext float %158 to double
%160 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %159)
%161 = load float*, float** %140
%162 = getelementptr inbounds float, float* %161, i64 5
%163 = load float, float* %162
%164 = fpext float %163 to double
%165 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %164)
%166 = tail call i32 @putchar(i32 10)
%167 = getelementptr inbounds float*, float** %4, i64 4
%168 = load float*, float** %167
%169 = getelementptr inbounds float, float* %168, i64 1
%170 = load float, float* %169
%171 = fpext float %170 to double
%172 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %171)
%173 = load float*, float** %167
%174 = getelementptr inbounds float, float* %173, i64 2
%175 = load float, float* %174
%176 = fpext float %175 to double
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %176)
%178 = load float*, float** %167
%179 = getelementptr inbounds float, float* %178, i64 3
%180 = load float, float* %179
%181 = fpext float %180 to double
%182 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %181)
%183 = load float*, float** %167
%184 = getelementptr inbounds float, float* %183, i64 4
%185 = load float, float* %184
%186 = fpext float %185 to double
%187 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %186)
%188 = load float*, float** %167
%189 = getelementptr inbounds float, float* %188, i64 5
%190 = load float, float* %189
%191 = fpext float %190 to double
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %191)
%193 = tail call i32 @putchar(i32 10)
%194 = getelementptr inbounds float*, float** %4, i64 5
%195 = load float*, float** %194
%196 = getelementptr inbounds float, float* %195, i64 1
%197 = load float, float* %196
%198 = fpext float %197 to double
%199 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %198)
%200 = load float*, float** %194
%201 = getelementptr inbounds float, float* %200, i64 2
%202 = load float, float* %201
%203 = fpext float %202 to double
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %203)
%205 = load float*, float** %194
%206 = getelementptr inbounds float, float* %205, i64 3
%207 = load float, float* %206
%208 = fpext float %207 to double
%209 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %208)
%210 = load float*, float** %194
%211 = getelementptr inbounds float, float* %210, i64 4
%212 = load float, float* %211
%213 = fpext float %212 to double
%214 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %213)
%215 = load float*, float** %194
%216 = getelementptr inbounds float, float* %215, i64 5
%217 = load float, float* %216
%218 = fpext float %217 to double
%219 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %218)
%220 = tail call i32 @putchar(i32 10)
%221 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.6, i64 0, i64 0))
br label %222
222: ; preds = %82, %222
%223 = phi i64 [ 1, %82 ], [ %251, %222 ]
%224 = getelementptr inbounds float, float* %1, i64 %223
%225 = load float, float* %224
%226 = fpext float %225 to double
%227 = fmul double %226, 2.000000e+00
%228 = fmul double %227, %226
%229 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %228)
%230 = load float, float* %224
%231 = fpext float %230 to double
%232 = fmul double %231, 2.000000e+00
%233 = fmul double %232, %231
%234 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %233)
%235 = load float, float* %224
%236 = fpext float %235 to double
%237 = fmul double %236, 2.000000e+00
%238 = fmul double %237, %236
%239 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %238)
%240 = load float, float* %224
%241 = fpext float %240 to double
%242 = fmul double %241, 2.000000e+00
%243 = fmul double %242, %241
%244 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %243)
%245 = load float, float* %224
%246 = fpext float %245 to double
%247 = fmul double %246, 2.000000e+00
%248 = fmul double %247, %246
%249 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %248)
%250 = tail call i32 @putchar(i32 10)
%251 = add nuw nsw i64 %223, 1
%252 = icmp eq i64 %251, 6
br i1 %252, label %253, label %222
253: ; preds = %222
%254 = tail call i32 @free_matrix(float** %4, i32 1, i32 10, i32 1, i32 10)
%255 = tail call i32 @free_matrix(float** %3, i32 1, i32 10, i32 1, i32 10)
%256 = tail call i32 @free_vector(float* %2, i32 1, i32 10)
%257 = tail call i32 @free_vector(float* %1, i32 1, i32 10)
ret i32 0
}