#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*/ ddpoly(float *, int, float, float *, int);
float factrl(int);
int /*<<< orphan*/ free_matrix(float **, int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ free_vector(float *, int /*<<< orphan*/, int);
int /*<<< orphan*/ getchar();
float **matrix(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ printf(char *, ...);
float *vector(int /*<<< orphan*/, int);
int main(void) {
  int i, j, k;
  float x, pwr, *pd, **d;
  static float c[5 + 1] = {-1.0, 5.0, -10.0, 10.0, -5.0, 1.0};
  static char *a[5 - 1 + 1] = {"polynomial:", "first deriv:", "second deriv:",
                               "third deriv:", "fourth deriv:"};
  pd = vector(0, 5 - 1);
  d = matrix(0, 5 - 1, 1, 20);
  for (i = 1; i <= 20; i++) {
    x = 0.1 * i;
    ddpoly(c, 5, x, pd, 5 - 1);
    for (j = 0; j <= 5 - 1; j++)
      d[j][i] = pd[j];
  }
  for (i = 0; i <= 5 - 1; i++) {
    printf("%6s %s \n", " ", a[i]);
    printf("%12s %17s %15s\n", "x", "DDPOLY", "actual");
    for (j = 1; j <= 20; j++) {
      x = 0.1 * j;
      pwr = 1.0;
      for (k = 1; k <= 5 - i; k++)
        pwr *= x - 1.0;
      printf("%15.6f %15.6f %15.6f\n", x, d[i][j],
             (factrl(5) / factrl(5 - i)) * pwr);
    }
    printf("press ENTER to continue...\n");
    (void)getchar();
  }
  free_matrix(d, 0, 5 - 1, 1, 20);
  free_vector(pd, 0, 5 - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x4,%esi
call   1080 <vector@plt>
mov    %rax,-0x20(%rbp)
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   1070 <matrix@plt>
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     1257 <main+0xd7>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe31(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mov    -0x20(%rbp),%rdx
lea    0x2e7c(%rip),%rdi
mov    $0x5,%esi
mov    $0x4,%ecx
call   10a0 <ddpoly@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jg     1244 <main+0xc4>
mov    -0x20(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    120a <main+0x8a>
jmp    1249 <main+0xc9>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c0 <main+0x40>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     13e0 <main+0x260>
movslq -0x8(%rbp),%rcx
lea    0x2e1d(%rip),%rax
mov    (%rax,%rcx,8),%rdx
lea    0xddc(%rip),%rdi
lea    0xdde(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdd2(%rip),%rdi
lea    0xddb(%rip),%rsi
lea    0xdd6(%rip),%rdx
lea    0xdd6(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jg     13bd <main+0x23d>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xd3b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xd1e(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x5,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     133a <main+0x1ba>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcfe(%rip),%xmm0
subsd  %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12ee <main+0x16e>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    $0x5,%edi
call   1090 <factrl@plt>
movss  %xmm0,-0x3c(%rbp)
mov    $0x5,%edi
sub    -0x8(%rbp),%edi
call   1090 <factrl@plt>
movss  -0x3c(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x30(%rbp),%xmm0
divss  %xmm3,%xmm2
mulss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xcdd(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b6 <main+0x136>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    125e <main+0xde>
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
mov    $0x14,%r8d
call   1030 <free_matrix@plt>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %ebp,%ebp
xor    %edi,%edi
mov    $0x4,%esi
call   1090 <vector@plt>
mov    %rax,%r12
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   1080 <matrix@plt>
mov    %rax,%rbx
lea    0x2ea1(%rip),%r14
nop
lea    0x1(%rbp),%r15
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0xe1c(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0x4,%ecx
call   10b0 <ddpoly@plt>
movss  (%r12),%xmm0
mov    (%rbx),%rax
movss  %xmm0,0x4(%rax,%rbp,4)
movss  0x4(%r12),%xmm0
mov    0x8(%rbx),%rax
movss  %xmm0,0x4(%rax,%rbp,4)
movss  0x8(%r12),%xmm0
mov    0x10(%rbx),%rax
movss  %xmm0,0x4(%rax,%rbp,4)
movss  0xc(%r12),%xmm0
mov    0x18(%rbx),%rax
movss  %xmm0,0x4(%rax,%rbp,4)
movss  0x10(%r12),%xmm0
mov    0x20(%rbx),%rax
movss  %xmm0,0x4(%rax,%rbp,4)
mov    %r15,%rbp
cmp    $0x14,%r15
jne    11d0 <main+0x40>
mov    %r12,0x10(%rsp)
mov    $0x5,%eax
xor    %ebp,%ebp
jmp    1297 <main+0x107>
nopl   0x0(%rax,%rax,1)
lea    0xe34(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
add    $0x1,%rbp
mov    (%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x5,%rbp
je     1436 <main+0x2a6>
mov    %eax,%r12d
and    $0x3,%r12d
mov    %eax,(%rsp)
and    $0xfffffffc,%eax
mov    %eax,0x4(%rsp)
mov    $0x5,%r15d
sub    %ebp,%r15d
lea    0xd5c(%rip),%rax
movslq (%rax,%rbp,4),%rdx
add    %rax,%rdx
lea    0xda4(%rip),%rdi
lea    0xda6(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd9a(%rip),%rdi
lea    0xda3(%rip),%rsi
lea    0xd9e(%rip),%rdx
lea    0xd9e(%rip),%rcx
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x2(%rbp),%r13d
mov    $0x1,%r14d
jmp    1381 <main+0x1f1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  %xmm1,0xc(%rsp)
mov    (%rbx,%rbp,8),%rax
movss  (%rax,%r14,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    $0x5,%edi
call   10a0 <factrl@plt>
movss  %xmm0,0x8(%rsp)
mov    %r15d,%edi
call   10a0 <factrl@plt>
movss  0x8(%rsp),%xmm1
divss  %xmm0,%xmm1
mulss  0xc(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
lea    0xd35(%rip),%rdi
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    $0x3,%al
call   1050 <printf@plt>
add    $0x1,%r14
cmp    $0x15,%r14
je     1270 <main+0xe0>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xc6f(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
addsd  0xc61(%rip),%xmm0
movss  0xc61(%rip),%xmm1
cmp    $0x3,%r13d
jb     1405 <main+0x275>
mov    0x4(%rsp),%eax
movss  0xc4f(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
add    $0xfffffffc,%eax
jne    13d0 <main+0x240>
test   $0x3,%r15b
je     1310 <main+0x180>
mov    %r12d,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
add    $0xffffffff,%eax
jne    1420 <main+0x290>
jmp    1310 <main+0x180>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
mov    $0x14,%r8d
call   1040 <free_matrix@plt>
mov    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1060 <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):
@main.c = internal global [6 x float] [float -1.000000e+00, float 5.000000e+00, float -1.000000e+01, float 1.000000e+01, float -5.000000e+00, float 1.000000e+00]
@main.a = internal global [5 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i32 0, i32 0)]
@.str = [12 x i8] c"polynomial:\00"
@.str.1 = [13 x i8] c"first deriv:\00"
@.str.2 = [14 x i8] c"second deriv:\00"
@.str.3 = [13 x i8] c"third deriv:\00"
@.str.4 = [14 x i8] c"fourth deriv:\00"
@.str.5 = [9 x i8] c"%6s %s \0A\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [16 x i8] c"%12s %17s %15s\0A\00"
@.str.8 = [2 x i8] c"x\00"
@.str.9 = [7 x i8] c"DDPOLY\00"
@.str.10 = [7 x i8] c"actual\00"
@.str.11 = [22 x i8] c"%15.6f %15.6f %15.6f\0A\00"
@.str.12 = [28 x i8] c"press ENTER to continue...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float*
%8 = alloca float**
store i32 0, i32* %1
%9 = call float* @vector(i32 0, i32 4)
store float* %9, float** %7
%10 = call float** @matrix(i32 0, i32 4, i32 1, i32 20)
store float** %10, float*** %8
store i32 1, i32* %2
br label %11
11: ; preds = %43, %0
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 20
br i1 %13, label %14, label %46
14: ; preds = %11
%15 = load i32, i32* %2
%16 = sitofp i32 %15 to double
%17 = fmul double 1.000000e-01, %16
%18 = fptrunc double %17 to float
store float %18, float* %5
%19 = load float, float* %5
%20 = load float*, float** %7
%21 = call i32 @ddpoly(float* getelementptr inbounds ([6 x float], [6 x float]* @main.c, i64 0, i64 0), i32 5, float %19, float* %20, i32 4)
store i32 0, i32* %3
br label %22
22: ; preds = %39, %14
%23 = load i32, i32* %3
%24 = icmp sle i32 %23, 4
br i1 %24, label %25, label %42
25: ; preds = %22
%26 = load float*, float** %7
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds float, float* %26, i64 %28
%30 = load float, float* %29
%31 = load float**, float*** %8
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds float*, float** %31, i64 %33
%35 = load float*, float** %34
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds float, float* %35, i64 %37
store float %30, float* %38
br label %39
39: ; preds = %25
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %22
42: ; preds = %22
br label %43
43: ; preds = %42
%44 = load i32, i32* %2
%45 = add nsw i32 %44, 1
store i32 %45, i32* %2
br label %11
46: ; preds = %11
store i32 0, i32* %2
br label %47
47: ; preds = %109, %46
%48 = load i32, i32* %2
%49 = icmp sle i32 %48, 4
br i1 %49, label %50, label %112
50: ; preds = %47
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [5 x i8*], [5 x i8*]* @main.a, i64 0, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %3
br label %57
57: ; preds = %103, %50
%58 = load i32, i32* %3
%59 = icmp sle i32 %58, 20
br i1 %59, label %60, label %106
60: ; preds = %57
%61 = load i32, i32* %3
%62 = sitofp i32 %61 to double
%63 = fmul double 1.000000e-01, %62
%64 = fptrunc double %63 to float
store float %64, float* %5
store float 1.000000e+00, float* %6
store i32 1, i32* %4
br label %65
65: ; preds = %78, %60
%66 = load i32, i32* %4
%67 = load i32, i32* %2
%68 = sub nsw i32 5, %67
%69 = icmp sle i32 %66, %68
br i1 %69, label %70, label %81
70: ; preds = %65
%71 = load float, float* %5
%72 = fpext float %71 to double
%73 = fsub double %72, 1.000000e+00
%74 = load float, float* %6
%75 = fpext float %74 to double
%76 = fmul double %75, %73
%77 = fptrunc double %76 to float
store float %77, float* %6
br label %78
78: ; preds = %70
%79 = load i32, i32* %4
%80 = add nsw i32 %79, 1
store i32 %80, i32* %4
br label %65
81: ; preds = %65
%82 = load float, float* %5
%83 = fpext float %82 to double
%84 = load float**, float*** %8
%85 = load i32, i32* %2
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds float*, float** %84, i64 %86
%88 = load float*, float** %87
%89 = load i32, i32* %3
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds float, float* %88, i64 %90
%92 = load float, float* %91
%93 = fpext float %92 to double
%94 = call float @factrl(i32 5)
%95 = load i32, i32* %2
%96 = sub nsw i32 5, %95
%97 = call float @factrl(i32 %96)
%98 = fdiv float %94, %97
%99 = load float, float* %6
%100 = fmul float %98, %99
%101 = fpext float %100 to double
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), double %83, double %93, double %101)
br label %103
103: ; preds = %81
%104 = load i32, i32* %3
%105 = add nsw i32 %104, 1
store i32 %105, i32* %3
br label %57
106: ; preds = %57
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
%108 = call i32 (...) @getchar()
br label %109
109: ; preds = %106
%110 = load i32, i32* %2
%111 = add nsw i32 %110, 1
store i32 %111, i32* %2
br label %47
112: ; preds = %47
%113 = load float**, float*** %8
%114 = call i32 @free_matrix(float** %113, i32 0, i32 4, i32 1, i32 20)
%115 = load float*, float** %7
%116 = call i32 @free_vector(float* %115, i32 0, i32 4)
ret i32 0
}

LLVM IR (-O2):
@main.c = internal global [6 x float] [float -1.000000e+00, float 5.000000e+00, float -1.000000e+01, float 1.000000e+01, float -5.000000e+00, float 1.000000e+00]
@reltable.main = internal unnamed_addr constant [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.1 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.2 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.4 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32)]
@.str = [12 x i8] c"polynomial:\00"
@.str.1 = [13 x i8] c"first deriv:\00"
@.str.2 = [14 x i8] c"second deriv:\00"
@.str.3 = [13 x i8] c"third deriv:\00"
@.str.4 = [14 x i8] c"fourth deriv:\00"
@.str.5 = [9 x i8] c"%6s %s \0A\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [16 x i8] c"%12s %17s %15s\0A\00"
@.str.8 = [2 x i8] c"x\00"
@.str.9 = [7 x i8] c"DDPOLY\00"
@.str.10 = [7 x i8] c"actual\00"
@.str.11 = [22 x i8] c"%15.6f %15.6f %15.6f\0A\00"
@str = [27 x i8] c"press ENTER to continue...\00"
define i32 @main() {
%1 = tail call float* @vector(i32 0, i32 4)
%2 = tail call float** @matrix(i32 0, i32 4, i32 1, i32 20)
%3 = getelementptr inbounds float, float* %1, i64 1
%4 = getelementptr inbounds float*, float** %2, i64 1
%5 = getelementptr inbounds float, float* %1, i64 2
%6 = getelementptr inbounds float*, float** %2, i64 2
%7 = getelementptr inbounds float, float* %1, i64 3
%8 = getelementptr inbounds float*, float** %2, i64 3
%9 = getelementptr inbounds float, float* %1, i64 4
%10 = getelementptr inbounds float*, float** %2, i64 4
br label %11
11: ; preds = %0, %11
%12 = phi i64 [ 1, %0 ], [ %33, %11 ]
%13 = trunc i64 %12 to i32
%14 = sitofp i32 %13 to double
%15 = fmul double %14, 1.000000e-01
%16 = fptrunc double %15 to float
%17 = tail call i32 @ddpoly(float* getelementptr inbounds ([6 x float], [6 x float]* @main.c, i64 0, i64 0), i32 5, float %16, float* %1, i32 4)
%18 = load float, float* %1
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 %12
store float %18, float* %20
%21 = load float, float* %3
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 %12
store float %21, float* %23
%24 = load float, float* %5
%25 = load float*, float** %6
%26 = getelementptr inbounds float, float* %25, i64 %12
store float %24, float* %26
%27 = load float, float* %7
%28 = load float*, float** %8
%29 = getelementptr inbounds float, float* %28, i64 %12
store float %27, float* %29
%30 = load float, float* %9
%31 = load float*, float** %10
%32 = getelementptr inbounds float, float* %31, i64 %12
store float %30, float* %32
%33 = add nuw nsw i64 %12, 1
%34 = icmp eq i64 %33, 21
br i1 %34, label %35, label %11
35: ; preds = %11, %102
%36 = phi i64 [ %105, %102 ], [ 0, %11 ]
%37 = trunc i64 %36 to i32
%38 = sub i32 5, %37
%39 = trunc i64 %36 to i32
%40 = shl i64 %36, 2
%41 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.main to i8*), i64 %40)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* %41)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%44 = getelementptr inbounds float*, float** %2, i64 %36
%45 = trunc i64 %36 to i32
%46 = sub i32 5, %45
%47 = and i32 %38, 3
%48 = add i32 %39, -2
%49 = icmp ult i32 %48, 3
%50 = and i32 %38, -4
%51 = icmp eq i32 %47, 0
br label %52
52: ; preds = %88, %35
%53 = phi i64 [ 1, %35 ], [ %100, %88 ]
%54 = trunc i64 %53 to i32
%55 = sitofp i32 %54 to double
%56 = fmul double %55, 1.000000e-01
%57 = fptrunc double %56 to float
%58 = fpext float %57 to double
%59 = fadd double %58, -1.000000e+00
br i1 %49, label %77, label %60
60: ; preds = %52, %60
%61 = phi float [ %74, %60 ], [ 1.000000e+00, %52 ]
%62 = phi i32 [ %75, %60 ], [ 0, %52 ]
%63 = fpext float %61 to double
%64 = fmul double %59, %63
%65 = fptrunc double %64 to float
%66 = fpext float %65 to double
%67 = fmul double %59, %66
%68 = fptrunc double %67 to float
%69 = fpext float %68 to double
%70 = fmul double %59, %69
%71 = fptrunc double %70 to float
%72 = fpext float %71 to double
%73 = fmul double %59, %72
%74 = fptrunc double %73 to float
%75 = add i32 %62, 4
%76 = icmp eq i32 %75, %50
br i1 %76, label %77, label %60
77: ; preds = %60, %52
%78 = phi float [ undef, %52 ], [ %74, %60 ]
%79 = phi float [ 1.000000e+00, %52 ], [ %74, %60 ]
br i1 %51, label %88, label %80
80: ; preds = %77, %80
%81 = phi float [ %85, %80 ], [ %79, %77 ]
%82 = phi i32 [ %86, %80 ], [ 0, %77 ]
%83 = fpext float %81 to double
%84 = fmul double %59, %83
%85 = fptrunc double %84 to float
%86 = add i32 %82, 1
%87 = icmp eq i32 %86, %47
br i1 %87, label %88, label %80
88: ; preds = %80, %77
%89 = phi float [ %78, %77 ], [ %85, %80 ]
%90 = load float*, float** %44
%91 = getelementptr inbounds float, float* %90, i64 %53
%92 = load float, float* %91
%93 = fpext float %92 to double
%94 = tail call float @factrl(i32 5)
%95 = tail call float @factrl(i32 %46)
%96 = fdiv float %94, %95
%97 = fmul float %96, %89
%98 = fpext float %97 to double
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), double %58, double %93, double %98)
%100 = add nuw nsw i64 %53, 1
%101 = icmp eq i64 %100, 21
br i1 %101, label %102, label %52
102: ; preds = %88
%103 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%104 = tail call i32 (...) @getchar()
%105 = add nuw nsw i64 %36, 1
%106 = icmp eq i64 %105, 5
br i1 %106, label %107, label %35
107: ; preds = %102
%108 = tail call i32 @free_matrix(float** %2, i32 0, i32 4, i32 1, i32 20)
%109 = tail call i32 @free_vector(float* %1, i32 0, i32 4)
ret i32 0
}