#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 */
float exp(float);
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 **);
int /*<<< orphan*/ splin2(float *, float *, float **, float **, int, int, float,
                          float, float *);
float *vector(int, int);
int main(void) {
  int i, j;
  float f, ff, x1x2, xx1, xx2, *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 * exp(-x1x2);
    }
  }
  splie2(x1, x2, y, 10, 10, y2);
  printf("%9s %12s %14s %12s\n", "x1", "x2", "splin2", "actual");
  for (i = 1; i <= 10; i++) {
    xx1 = 0.1 * i;
    xx2 = xx1 * xx1;
    splin2(x1, x2, y, y2, 10, 10, xx1, xx2, &f);
    x1x2 = xx1 * xx2;
    ff = x1x2 * exp(-x1x2);
    printf("%12.6f %12.6f %12.6f %12.6f\n", xx1, xx2, f, ff);
  }
  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    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1090 <vector@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1090 <vector@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1,%edx
mov    $0xa,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1080 <matrix@plt>
mov    %rax,-0x38(%rbp)
mov    $0x1,%edx
mov    $0xa,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1080 <matrix@plt>
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1224 <main+0xa4>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe07(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ea <main+0x6a>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1265 <main+0xe5>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xdc6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    122b <main+0xab>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1309 <main+0x189>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     12f6 <main+0x176>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   10a0 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
mulss  %xmm1,%xmm0
mov    -0x38(%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    127d <main+0xfd>
jmp    12fb <main+0x17b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    126c <main+0xec>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%r9
mov    $0xa,%r8d
mov    %r8d,%ecx
call   1070 <splie2@plt>
lea    0xce2(%rip),%rdi
lea    0xcef(%rip),%rsi
lea    0xceb(%rip),%rdx
lea    0xce7(%rip),%rcx
lea    0xce7(%rip),%r8
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     143c <main+0x2bc>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xc91(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
mov    $0xa,%r9d
lea    -0x10(%rbp),%rax
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1040 <splin2@plt>
movss  -0x1c(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   10a0 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x48(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x14(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xc11(%rip),%rdi
mov    $0x4,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1358 <main+0x1d8>
mov    -0x40(%rbp),%rdi
mov    $0x1,%ecx
mov    $0xa,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x38(%rbp),%rdi
mov    $0x1,%ecx
mov    $0xa,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1060 <free_vector@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1060 <free_vector@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    $0x1,%edi
mov    $0xa,%esi
call   1090 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0xa,%esi
call   1090 <vector@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1080 <matrix@plt>
mov    %rax,%rbp
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1080 <matrix@plt>
mov    %rax,%r12
movaps 0xe0f(%rip),%xmm0
movups %xmm0,0x4(%r14)
movaps 0xe13(%rip),%xmm1
movups %xmm1,0x14(%r14)
movabs $0x400000003fe66666,%rax
mov    %rax,0x24(%r14)
movups %xmm0,0x4(%r15)
movups %xmm1,0x14(%r15)
mov    %rax,0x24(%r15)
mov    $0x1,%ebx
movss  0xe05(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movaps 0xde9(%rip),%xmm1
mulss  (%r14,%rbx,4),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x4(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x8(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xdae(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x8(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0xc(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xd81(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0xc(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x10(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xd54(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x10(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x14(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xd27(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x14(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x18(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xcfa(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x18(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x1c(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xccd(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x1c(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x20(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xca0(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x20(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x24(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xc73(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x24(%rax)
movss  (%r14,%rbx,4),%xmm0
mulss  0x28(%r15),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0xc46(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x10(%rsp),%xmm0
mov    0x0(%rbp,%rbx,8),%rax
movss  %xmm0,0x28(%rax)
cmp    $0xa,%rbx
je     1404 <main+0x284>
movss  0x4(%r15),%xmm0
add    $0x1,%rbx
jmp    1230 <main+0xb0>
mov    $0xa,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    $0xa,%ecx
mov    $0xa,%r8d
mov    %r12,%r9
call   1070 <splie2@plt>
lea    0xc1c(%rip),%rdi
lea    0xc29(%rip),%rsi
lea    0xc25(%rip),%rdx
lea    0xc21(%rip),%rcx
lea    0xc21(%rip),%r8
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0xbe1(%rip),%xmm1
lea    0xc12(%rip),%r13
xchg   %ax,%ax
movsd  %xmm1,0x28(%rsp)
movapd %xmm1,%xmm0
mulsd  0xbce(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movaps %xmm0,%xmm1
movss  %xmm0,0x10(%rsp)
mulss  %xmm0,%xmm1
movss  %xmm1,0x20(%rsp)
lea    0x24(%rsp),%rax
mov    %rax,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
mov    $0xa,%r8d
mov    $0xa,%r9d
call   1040 <splin2@plt>
movss  0x20(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
xorps  0xb59(%rip),%xmm0
call   10a0 <exp@plt>
mulss  0x30(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
xorps  %xmm4,%xmm4
cvtss2sd %xmm1,%xmm4
movss  0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x24(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
mov    %r13,%rdi
movaps %xmm4,%xmm0
mov    $0x4,%al
call   1050 <printf@plt>
movsd  0x28(%rsp),%xmm1
addsd  0xb23(%rip),%xmm1
add    $0xffffffff,%ebx
jne    1460 <main+0x2e0>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
call   1030 <free_matrix@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
call   1030 <free_matrix@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1060 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1060 <free_vector@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"%9s %12s %14s %12s\0A\00"
@.str.1 = [3 x i8] c"x1\00"
@.str.2 = [3 x i8] c"x2\00"
@.str.3 = [7 x i8] c"splin2\00"
@.str.4 = [7 x i8] c"actual\00"
@.str.5 = [29 x i8] c"%12.6f %12.6f %12.6f %12.6f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call float* @vector(i32 1, i32 10)
%4 = tail call float* @vector(i32 1, i32 10)
%5 = tail call float** @matrix(i32 1, i32 10, i32 1, i32 10)
%6 = tail call float** @matrix(i32 1, i32 10, i32 1, i32 10)
%7 = getelementptr inbounds float, float* %3, i64 1
%8 = bitcast float* %7 to <4 x float>*
store <4 x float> <float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x3FE3333340000000, float 0x3FE99999A0000000>, <4 x float>* %8
%9 = getelementptr inbounds float, float* %3, i64 5
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000>, <4 x float>* %10
%11 = getelementptr inbounds float, float* %3, i64 9
store float 0x3FFCCCCCC0000000, float* %11
%12 = getelementptr inbounds float, float* %3, i64 10
store float 2.000000e+00, float* %12
%13 = getelementptr inbounds float, float* %4, i64 1
%14 = getelementptr inbounds float, float* %4, i64 2
%15 = getelementptr inbounds float, float* %4, i64 3
%16 = getelementptr inbounds float, float* %4, i64 4
%17 = bitcast float* %13 to <4 x float>*
store <4 x float> <float 0x3FC99999A0000000, float 0x3FD99999A0000000, float 0x3FE3333340000000, float 0x3FE99999A0000000>, <4 x float>* %17
%18 = getelementptr inbounds float, float* %4, i64 5
%19 = getelementptr inbounds float, float* %4, i64 6
%20 = getelementptr inbounds float, float* %4, i64 7
%21 = getelementptr inbounds float, float* %4, i64 8
%22 = bitcast float* %18 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0x3FF3333340000000, float 0x3FF6666660000000, float 0x3FF99999A0000000>, <4 x float>* %22
%23 = getelementptr inbounds float, float* %4, i64 9
store float 0x3FFCCCCCC0000000, float* %23
%24 = getelementptr inbounds float, float* %4, i64 10
store float 2.000000e+00, float* %24
br label %25
25: ; preds = %111, %0
%26 = phi float [ 0x3FC99999A0000000, %0 ], [ %112, %111 ]
%27 = phi i64 [ 1, %0 ], [ %109, %111 ]
%28 = getelementptr inbounds float, float* %3, i64 %27
%29 = getelementptr inbounds float*, float** %5, i64 %27
%30 = load float, float* %28
%31 = fmul float %30, %26
%32 = fneg float %31
%33 = tail call float @exp(float %32)
%34 = fmul float %31, %33
%35 = load float*, float** %29
%36 = getelementptr inbounds float, float* %35, i64 1
store float %34, float* %36
%37 = load float, float* %28
%38 = load float, float* %14
%39 = fmul float %37, %38
%40 = fneg float %39
%41 = tail call float @exp(float %40)
%42 = fmul float %39, %41
%43 = load float*, float** %29
%44 = getelementptr inbounds float, float* %43, i64 2
store float %42, float* %44
%45 = load float, float* %28
%46 = load float, float* %15
%47 = fmul float %45, %46
%48 = fneg float %47
%49 = tail call float @exp(float %48)
%50 = fmul float %47, %49
%51 = load float*, float** %29
%52 = getelementptr inbounds float, float* %51, i64 3
store float %50, float* %52
%53 = load float, float* %28
%54 = load float, float* %16
%55 = fmul float %53, %54
%56 = fneg float %55
%57 = tail call float @exp(float %56)
%58 = fmul float %55, %57
%59 = load float*, float** %29
%60 = getelementptr inbounds float, float* %59, i64 4
store float %58, float* %60
%61 = load float, float* %28
%62 = load float, float* %18
%63 = fmul float %61, %62
%64 = fneg float %63
%65 = tail call float @exp(float %64)
%66 = fmul float %63, %65
%67 = load float*, float** %29
%68 = getelementptr inbounds float, float* %67, i64 5
store float %66, float* %68
%69 = load float, float* %28
%70 = load float, float* %19
%71 = fmul float %69, %70
%72 = fneg float %71
%73 = tail call float @exp(float %72)
%74 = fmul float %71, %73
%75 = load float*, float** %29
%76 = getelementptr inbounds float, float* %75, i64 6
store float %74, float* %76
%77 = load float, float* %28
%78 = load float, float* %20
%79 = fmul float %77, %78
%80 = fneg float %79
%81 = tail call float @exp(float %80)
%82 = fmul float %79, %81
%83 = load float*, float** %29
%84 = getelementptr inbounds float, float* %83, i64 7
store float %82, float* %84
%85 = load float, float* %28
%86 = load float, float* %21
%87 = fmul float %85, %86
%88 = fneg float %87
%89 = tail call float @exp(float %88)
%90 = fmul float %87, %89
%91 = load float*, float** %29
%92 = getelementptr inbounds float, float* %91, i64 8
store float %90, float* %92
%93 = load float, float* %28
%94 = load float, float* %23
%95 = fmul float %93, %94
%96 = fneg float %95
%97 = tail call float @exp(float %96)
%98 = fmul float %95, %97
%99 = load float*, float** %29
%100 = getelementptr inbounds float, float* %99, i64 9
store float %98, float* %100
%101 = load float, float* %28
%102 = load float, float* %24
%103 = fmul float %101, %102
%104 = fneg float %103
%105 = tail call float @exp(float %104)
%106 = fmul float %103, %105
%107 = load float*, float** %29
%108 = getelementptr inbounds float, float* %107, i64 10
store float %106, float* %108
%109 = add nuw nsw i64 %27, 1
%110 = icmp eq i64 %109, 11
br i1 %110, label %113, label %111
111: ; preds = %25
%112 = load float, float* %13
br label %25
113: ; preds = %25
%114 = tail call i32 @splie2(float* %3, float* %4, float** %5, i32 10, i32 10, float** %6)
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %116
116: ; preds = %113, %116
%117 = phi i32 [ 1, %113 ], [ %133, %116 ]
%118 = sitofp i32 %117 to double
%119 = fmul double %118, 1.000000e-01
%120 = fptrunc double %119 to float
%121 = fmul float %120, %120
%122 = call i32 @splin2(float* %3, float* %4, float** %5, float** %6, i32 10, i32 10, float %120, float %121, float* %1)
%123 = fmul float %121, %120
%124 = fneg float %123
%125 = call float @exp(float %124)
%126 = fmul float %123, %125
%127 = fpext float %120 to double
%128 = fpext float %121 to double
%129 = load float, float* %1
%130 = fpext float %129 to double
%131 = fpext float %126 to double
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), double %127, double %128, double %130, double %131)
%133 = add nuw nsw i32 %117, 1
%134 = icmp eq i32 %133, 11
br i1 %134, label %135, label %116
135: ; preds = %116
%136 = call i32 @free_matrix(float** %6, i32 1, i32 10, i32 1, i32 10)
%137 = call i32 @free_matrix(float** %5, i32 1, i32 10, i32 1, i32 10)
%138 = call i32 @free_vector(float* %4, i32 1, i32 10)
%139 = call i32 @free_vector(float* %3, i32 1, i32 10)
ret i32 0
}