#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*/ polin2(float *, float *, float **, int, int, float, float,
                          float *, float *);
int /*<<< orphan*/ printf(char *, ...);
float sin(float);
float *vector(int, int);
int main(void) {
  int i, j;
  float dy, f, x1, x2, y, *x1a, *x2a, **ya;
  x1a = vector(1, 5);
  x2a = vector(1, 5);
  ya = matrix(1, 5, 1, 5);
  for (i = 1; i <= 5; i++) {
    x1a[i] = i * 3.1415926 / 5;
    for (j = 1; j <= 5; j++) {
      x2a[j] = 1.0 * j / 5;
      ya[i][j] = sin(x1a[i]) * exp(x2a[j]);
    }
  }
  printf("\nTwo dimensional interpolation of sin(x1)exp(x2)\n");
  printf("%9s %12s %13s %16s %11s\n", "x1", "x2", "f(x)", "interpolated",
         "error");
  for (i = 1; i <= 4; i++) {
    x1 = (-0.1 + i / 5.0) * 3.1415926;
    for (j = 1; j <= 4; j++) {
      x2 = -0.1 + j / 5.0;
      f = sin(x1) * exp(x2);
      polin2(x1a, x2a, ya, 5, 5, x1, x2, &y, &dy);
      printf("%12.6f %12.6f %12.6f %12.6f %15.6f\n", x1, x2, f, y, dy);
    }
    printf("***********************************\n");
  }
  free_matrix(ya, 1, 5, 1, 5);
  free_vector(x2a, 1, 5);
  free_vector(x1a, 1, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x5,%esi
call   1090 <vector@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1,%edi
mov    $0x5,%esi
call   1090 <vector@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1,%edx
mov    $0x5,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1080 <matrix@plt>
mov    %rax,-0x38(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     12b5 <main+0x135>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe16(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe1a(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jg     12a2 <main+0x122>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xdef(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xddb(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1070 <sin@plt>
movss  %xmm0,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   10a0 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x3c(%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    1212 <main+0x92>
jmp    12a7 <main+0x127>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d3 <main+0x53>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd88(%rip),%rdi
lea    0xd9a(%rip),%rsi
lea    0xd96(%rip),%rdx
lea    0xd92(%rip),%rcx
lea    0xd90(%rip),%r8
lea    0xd96(%rip),%r9
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     142d <main+0x2ad>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xcfe(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xcea(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xcd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jg     1411 <main+0x291>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xcbb(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xca7(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
call   1070 <sin@plt>
movss  %xmm0,-0x40(%rbp)
movss  -0x1c(%rbp),%xmm0
call   10a0 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x40(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
movss  -0x18(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
mov    $0x5,%r8d
lea    -0x20(%rbp),%r9
lea    -0x10(%rbp),%rax
mov    %r8d,%ecx
mov    %rax,(%rsp)
call   1030 <polin2@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x20(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x10(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0xc8d(%rip),%rdi
mov    $0x5,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    133e <main+0x1be>
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12fb <main+0x17b>
mov    -0x38(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x5,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1040 <free_matrix@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1060 <free_vector@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%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    $0x28,%rsp
mov    $0x1,%edi
mov    $0x5,%esi
call   10a0 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x5,%esi
call   10a0 <vector@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x5,%ecx
call   1090 <matrix@plt>
mov    %rax,%r15
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xe01(%rip),%xmm0
divsd  0xe01(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14,%rbp,4)
movl   $0x3e4ccccd,0x4(%rbx)
movss  (%r14,%rbp,4),%xmm0
call   1080 <sin@plt>
movss  %xmm0,0x8(%rsp)
movss  0x4(%rbx),%xmm0
call   10b0 <exp@plt>
mulss  0x8(%rsp),%xmm0
mov    (%r15,%rbp,8),%rax
movss  %xmm0,0x4(%rax)
movl   $0x3ecccccd,0x8(%rbx)
movss  (%r14,%rbp,4),%xmm0
call   1080 <sin@plt>
movss  %xmm0,0x8(%rsp)
movss  0x8(%rbx),%xmm0
call   10b0 <exp@plt>
mulss  0x8(%rsp),%xmm0
mov    (%r15,%rbp,8),%rax
movss  %xmm0,0x8(%rax)
movl   $0x3f19999a,0xc(%rbx)
movss  (%r14,%rbp,4),%xmm0
call   1080 <sin@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rbx),%xmm0
call   10b0 <exp@plt>
mulss  0x8(%rsp),%xmm0
mov    (%r15,%rbp,8),%rax
movss  %xmm0,0xc(%rax)
movl   $0x3f4ccccd,0x10(%rbx)
movss  (%r14,%rbp,4),%xmm0
call   1080 <sin@plt>
movss  %xmm0,0x8(%rsp)
movss  0x10(%rbx),%xmm0
call   10b0 <exp@plt>
mulss  0x8(%rsp),%xmm0
mov    (%r15,%rbp,8),%rax
movss  %xmm0,0x10(%rax)
movl   $0x3f800000,0x14(%rbx)
movss  (%r14,%rbp,4),%xmm0
call   1080 <sin@plt>
movss  %xmm0,0x8(%rsp)
movss  0x14(%rbx),%xmm0
call   10b0 <exp@plt>
mulss  0x8(%rsp),%xmm0
mov    (%r15,%rbp,8),%rax
movss  %xmm0,0x14(%rax)
add    $0x1,%rbp
cmp    $0x6,%rbp
jne    11f0 <main+0x60>
lea    0xda0(%rip),%rdi
call   1040 <puts@plt>
lea    0xd39(%rip),%rdi
lea    0xd4b(%rip),%rsi
lea    0xd47(%rip),%rdx
lea    0xd43(%rip),%rcx
lea    0xd41(%rip),%r8
lea    0xd47(%rip),%r9
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xcb7(%rip),%xmm0
mov    $0x4,%ebp
xchg   %ax,%ax
movsd  %xmm0,0x20(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0xc94(%rip),%xmm0
addsd  0xc9c(%rip),%xmm0
mulsd  0xc7c(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
movaps %xmm1,%xmm0
call   1080 <sin@plt>
mulss  0xc92(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x14(%rsp),%r12
mov    %r12,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
movss  0x8(%rsp),%xmm0
movss  0xc65(%rip),%xmm1
lea    0x10(%rsp),%r9
call   1030 <polin2@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movss  0x10(%rsp),%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
movss  0x14(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
lea    0xc80(%rip),%r12
mov    %r12,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0xbf8(%rip),%xmm1
mov    $0x5,%al
call   1060 <printf@plt>
movss  0x8(%rsp),%xmm0
call   1080 <sin@plt>
mulss  0xc06(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x14(%rsp),%r13
mov    %r13,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
movss  0x8(%rsp),%xmm0
movss  0xbd9(%rip),%xmm1
lea    0x10(%rsp),%r9
call   1030 <polin2@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movss  0x10(%rsp),%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
movss  0x14(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
mov    %r12,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0xb73(%rip),%xmm1
mov    $0x5,%al
call   1060 <printf@plt>
movss  0x8(%rsp),%xmm0
call   1080 <sin@plt>
mulss  0xb81(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r13,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
movss  0x8(%rsp),%xmm0
movss  0xb59(%rip),%xmm1
lea    0x10(%rsp),%r9
call   1030 <polin2@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movss  0x10(%rsp),%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
movss  0x14(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
mov    %r12,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0xaf3(%rip),%xmm1
mov    $0x5,%al
call   1060 <printf@plt>
movss  0x8(%rsp),%xmm0
call   1080 <sin@plt>
mulss  0xb01(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r13,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x5,%ecx
mov    $0x5,%r8d
movss  0x8(%rsp),%xmm0
movss  0xad9(%rip),%xmm1
lea    0x10(%rsp),%r9
call   1030 <polin2@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movss  0x10(%rsp),%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
movss  0x14(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
mov    %r12,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0xa73(%rip),%xmm1
mov    $0x5,%al
call   1060 <printf@plt>
lea    0xb19(%rip),%rdi
call   1040 <puts@plt>
movsd  0x20(%rsp),%xmm0
addsd  0xa2a(%rip),%xmm0
add    $0xffffffff,%ebp
jne    1360 <main+0x1d0>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1050 <free_matrix@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <free_vector@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [25 x i8] c"%9s %12s %13s %16s %11s\0A\00"
@.str.2 = [3 x i8] c"x1\00"
@.str.3 = [3 x i8] c"x2\00"
@.str.4 = [5 x i8] c"f(x)\00"
@.str.5 = [13 x i8] c"interpolated\00"
@.str.6 = [6 x i8] c"error\00"
@.str.7 = [36 x i8] c"%12.6f %12.6f %12.6f %12.6f %15.6f\0A\00"
@str = [49 x i8] c"\0ATwo dimensional interpolation of sin(x1)exp(x2)\00"
@str.9 = [36 x i8] c"***********************************\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call float* @vector(i32 1, i32 5)
%6 = tail call float* @vector(i32 1, i32 5)
%7 = tail call float** @matrix(i32 1, i32 5, i32 1, i32 5)
%8 = getelementptr inbounds float, float* %6, i64 1
%9 = getelementptr inbounds float, float* %6, i64 2
%10 = getelementptr inbounds float, float* %6, i64 3
%11 = getelementptr inbounds float, float* %6, i64 4
%12 = getelementptr inbounds float, float* %6, i64 5
br label %13
13: ; preds = %0, %13
%14 = phi i64 [ 1, %0 ], [ %57, %13 ]
%15 = trunc i64 %14 to i32
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 0x400921FB4D12D84A
%18 = fdiv double %17, 5.000000e+00
%19 = fptrunc double %18 to float
%20 = getelementptr inbounds float, float* %5, i64 %14
store float %19, float* %20
%21 = getelementptr inbounds float*, float** %7, i64 %14
store float 0x3FC99999A0000000, float* %8
%22 = load float, float* %20
%23 = tail call float @sin(float %22)
%24 = load float, float* %8
%25 = tail call float @exp(float %24)
%26 = fmul float %23, %25
%27 = load float*, float** %21
%28 = getelementptr inbounds float, float* %27, i64 1
store float %26, float* %28
store float 0x3FD99999A0000000, float* %9
%29 = load float, float* %20
%30 = tail call float @sin(float %29)
%31 = load float, float* %9
%32 = tail call float @exp(float %31)
%33 = fmul float %30, %32
%34 = load float*, float** %21
%35 = getelementptr inbounds float, float* %34, i64 2
store float %33, float* %35
store float 0x3FE3333340000000, float* %10
%36 = load float, float* %20
%37 = tail call float @sin(float %36)
%38 = load float, float* %10
%39 = tail call float @exp(float %38)
%40 = fmul float %37, %39
%41 = load float*, float** %21
%42 = getelementptr inbounds float, float* %41, i64 3
store float %40, float* %42
store float 0x3FE99999A0000000, float* %11
%43 = load float, float* %20
%44 = tail call float @sin(float %43)
%45 = load float, float* %11
%46 = tail call float @exp(float %45)
%47 = fmul float %44, %46
%48 = load float*, float** %21
%49 = getelementptr inbounds float, float* %48, i64 4
store float %47, float* %49
store float 1.000000e+00, float* %12
%50 = load float, float* %20
%51 = tail call float @sin(float %50)
%52 = load float, float* %12
%53 = tail call float @exp(float %52)
%54 = fmul float %51, %53
%55 = load float*, float** %21
%56 = getelementptr inbounds float, float* %55, i64 5
store float %54, float* %56
%57 = add nuw nsw i64 %14, 1
%58 = icmp eq i64 %57, 6
br i1 %58, label %59, label %13
59: ; preds = %13
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 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 ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %62
62: ; preds = %59, %62
%63 = phi i32 [ 1, %59 ], [ %107, %62 ]
%64 = sitofp i32 %63 to double
%65 = fdiv double %64, 5.000000e+00
%66 = fadd double %65, -1.000000e-01
%67 = fmul double %66, 0x400921FB4D12D84A
%68 = fptrunc double %67 to float
%69 = fpext float %68 to double
%70 = call float @sin(float %68)
%71 = fmul float %70, 0x3FF1AEC7C0000000
%72 = call i32 @polin2(float* %5, float* %6, float** %7, i32 5, i32 5, float %68, float 0x3FB99999A0000000, float* %2, float* %1)
%73 = fpext float %71 to double
%74 = load float, float* %2
%75 = fpext float %74 to double
%76 = load float, float* %1
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), double %69, double 0x3FB99999A0000000, double %73, double %75, double %77)
%79 = call float @sin(float %68)
%80 = fmul float %79, 0x3FF59905A0000000
%81 = call i32 @polin2(float* %5, float* %6, float** %7, i32 5, i32 5, float %68, float 0x3FD3333340000000, float* %2, float* %1)
%82 = fpext float %80 to double
%83 = load float, float* %2
%84 = fpext float %83 to double
%85 = load float, float* %1
%86 = fpext float %85 to double
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), double %69, double 0x3FD3333340000000, double %82, double %84, double %86)
%88 = call float @sin(float %68)
%89 = fmul float %88, 0x3FFA612980000000
%90 = call i32 @polin2(float* %5, float* %6, float** %7, i32 5, i32 5, float %68, float 5.000000e-01, float* %2, float* %1)
%91 = fpext float %89 to double
%92 = load float, float* %2
%93 = fpext float %92 to double
%94 = load float, float* %1
%95 = fpext float %94 to double
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), double %69, double 5.000000e-01, double %91, double %93, double %95)
%97 = call float @sin(float %68)
%98 = fmul float %97, 0x40001C2A60000000
%99 = call i32 @polin2(float* %5, float* %6, float** %7, i32 5, i32 5, float %68, float 0x3FE6666660000000, float* %2, float* %1)
%100 = fpext float %98 to double
%101 = load float, float* %2
%102 = fpext float %101 to double
%103 = load float, float* %1
%104 = fpext float %103 to double
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), double %69, double 0x3FE6666660000000, double %100, double %102, double %104)
%106 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.9, i64 0, i64 0))
%107 = add nuw nsw i32 %63, 1
%108 = icmp eq i32 %107, 5
br i1 %108, label %109, label %62
109: ; preds = %62
%110 = call i32 @free_matrix(float** %7, i32 1, i32 5, i32 1, i32 5)
%111 = call i32 @free_vector(float* %6, i32 1, i32 5)
%112 = call i32 @free_vector(float* %5, i32 1, i32 5)
ret i32 0
}