#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float ax[20], ay[20], diff[19][19], p, x0, y = 0;
  int i, j, n;
  printf("\t\tNEWTON'S FORWARD INTERPOLATION\t\t\n\n");
  printf("Enter the number of pairs you would like to feed:\t\a");
  scanf("%d", &n);
  printf("\n\nEnter the values of x and y in the format shown below:\n\n\t x   "
         "      y\n\n\a");
  for (i = 0; i < n; i++)
    scanf("%f%f", &ax[i], &ay[i]);
  printf("\n\nThe difference table is as follows:\n");
  for (i = 0; i < n - 1; i++) {
    printf("\n\nDifferences of order %f are as follows:\n", i + 1);
    for (j = 0; j < n - i - 1; j++) {
      diff[i][j] = ay[j + 1] - ay[j];
      printf("\n\t%c(%f,%d) = %f", 30, i + 1, j, diff[i][j]);
    }
    for (j = 0; j < n - 1 - i; j++)
      ay[j] = diff[i][j];
  }
  j = 0;
  printf("\nEnter the value at which interpolation is desired:\t");
  scanf("%f", &x0);
  p = (x0 - ax[0]) / (ax[1] - ax[0]);
  y = y + ay[0];
  if (i > n) {
    for (j = 0; j < n - 1; j++)
      diff[j][0] = 0;
  }
  y = p * diff[0][0] + (p * (p - 1) * diff[1][0]) / 2 +
      (p * (p - 1) * (p - 2) * diff[2][0]) / 6 +
      (p * (p - 1) * (p - 2) * (p - 3) * diff[3][0]) / 24;
  printf("\n\nThe value after interpolation is %f", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x680,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x66c(%rbp)
ff
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
lea    -0x678(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x670(%rbp)
mov    -0x670(%rbp),%eax
cmp    -0x678(%rbp),%eax
jge    11e1 <main+0xc1>
movslq -0x670(%rbp),%rax
lea    -0x60(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x670(%rbp),%rax
lea    -0xb0(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x670(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x670(%rbp)
jmp    1186 <main+0x66>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x670(%rbp)
mov    -0x670(%rbp),%eax
mov    -0x678(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1373 <main+0x253>
mov    -0x670(%rbp),%esi
add    $0x1,%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x674(%rbp)
mov    -0x674(%rbp),%eax
mov    -0x678(%rbp),%ecx
sub    -0x670(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12ee <main+0x1ce>
mov    -0x674(%rbp),%eax
add    $0x1,%eax
cltq
movss  -0xb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x674(%rbp),%rax
subss  -0xb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x670(%rbp),%rcx
lea    -0x660(%rbp),%rax
imul   $0x4c,%rcx,%rcx
add    %rcx,%rax
movslq -0x674(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x670(%rbp),%edx
add    $0x1,%edx
mov    -0x674(%rbp),%ecx
movslq -0x670(%rbp),%rsi
lea    -0x660(%rbp),%rax
imul   $0x4c,%rsi,%rsi
add    %rsi,%rax
movslq -0x674(%rbp),%rsi
movss  (%rax,%rsi,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe44(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    1231 <main+0x111>
movl   $0x0,-0x674(%rbp)
mov    -0x674(%rbp),%eax
mov    -0x678(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x670(%rbp),%ecx
cmp    %ecx,%eax
jge    135a <main+0x23a>
movslq -0x670(%rbp),%rcx
lea    -0x660(%rbp),%rax
imul   $0x4c,%rcx,%rcx
add    %rcx,%rax
movslq -0x674(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0x674(%rbp),%rax
movss  %xmm0,-0xb0(%rbp,%rax,4)
ff ff
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    12f8 <main+0x1d8>
jmp    135f <main+0x23f>
mov    -0x670(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x670(%rbp)
jmp    11f9 <main+0xd9>
movl   $0x0,-0x674(%rbp)
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd8e(%rip),%rdi
lea    -0x668(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x668(%rbp),%xmm0
ff
subss  -0x60(%rbp),%xmm0
movss  -0x5c(%rbp),%xmm1
subss  -0x60(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x664(%rbp)
ff
movss  -0x66c(%rbp),%xmm0
ff
addss  -0xb0(%rbp),%xmm0
ff
movss  %xmm0,-0x66c(%rbp)
ff
mov    -0x670(%rbp),%eax
cmp    -0x678(%rbp),%eax
jle    1443 <main+0x323>
movl   $0x0,-0x674(%rbp)
mov    -0x674(%rbp),%eax
mov    -0x678(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    143e <main+0x31e>
movslq -0x674(%rbp),%rcx
lea    -0x660(%rbp),%rax
imul   $0x4c,%rcx,%rcx
add    %rcx,%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    13f7 <main+0x2d7>
jmp    1443 <main+0x323>
movss  -0x664(%rbp),%xmm0
ff
movss  -0x660(%rbp),%xmm2
ff
movss  -0x664(%rbp),%xmm1
ff
movss  -0x664(%rbp),%xmm3
ff
movss  0xba1(%rip),%xmm4
subss  %xmm4,%xmm3
mulss  %xmm3,%xmm1
mulss  -0x614(%rbp),%xmm1
ff
movss  0xb85(%rip),%xmm3
divss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x664(%rbp),%xmm1
ff
movss  -0x664(%rbp),%xmm2
ff
movss  0xb65(%rip),%xmm3
subss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  -0x664(%rbp),%xmm2
ff
movss  0xb49(%rip),%xmm3
subss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
mulss  -0x5c8(%rbp),%xmm1
ff
movss  0xb39(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  -0x664(%rbp),%xmm1
ff
movss  -0x664(%rbp),%xmm2
ff
movss  0xb15(%rip),%xmm3
subss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  -0x664(%rbp),%xmm2
ff
movss  0xaf9(%rip),%xmm3
subss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  -0x664(%rbp),%xmm2
ff
movss  0xadd(%rip),%xmm3
subss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
mulss  -0x57c(%rbp),%xmm1
ff
movss  0xac1(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x66c(%rbp)
ff
movss  -0x66c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbf6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x680,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x658,%rsp
lea    0xfe6(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
xor    %r12d,%r12d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,(%rsp)
jle    11d5 <main+0x95>
lea    0x10(%rsp),%r15
lea    0x60(%rsp),%rbp
lea    0xefe(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
add    $0x4,%r15
add    $0x4,%rbp
cmp    %rax,%rbx
jl     11b0 <main+0x70>
lea    0xf86(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x2,(%rsp)
jl     12c1 <main+0x181>
lea    0xb0(%rsp),%rbp
lea    0xed8(%rip),%r15
xor    %r12d,%r12d
jmp    1214 <main+0xd4>
nop
add    $0xffffffff,%r14d
movslq %r14d,%rax
add    $0x4c,%rbp
cmp    %rax,%r12
jge    12c1 <main+0x181>
mov    %r12,%r13
add    $0x1,%r12
lea    0xe85(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13d,%ebx
not    %ebx
mov    (%rsp),%r14d
lea    (%r14,%rbx,1),%eax
test   %eax,%eax
jle    1200 <main+0xc0>
imul   $0x4c,%r13,%rax
add    %rsp,%rax
add    $0xb0,%rax
mov    %rax,0x8(%rsp)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rcx),%r13
movss  0x14(%rsp,%rcx,4),%xmm0
subss  0x10(%rsp,%rcx,4),%xmm0
movss  %xmm0,0x0(%rbp,%rcx,4)
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1e,%esi
mov    %r12d,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rsp),%r14d
lea    (%r14,%rbx,1),%eax
movslq %eax,%rdx
mov    %r13,%rcx
cmp    %rdx,%r13
jl     1260 <main+0x120>
test   %eax,%eax
jle    1200 <main+0xc0>
mov    %eax,%edx
shl    $0x2,%rdx
lea    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1050 <memcpy@plt>
jmp    1200 <main+0xc0>
lea    0xe1b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe0a(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0x60(%rsp),%xmm1
movss  0x64(%rsp),%xmm2
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
mov    (%rsp),%eax
cmp    %eax,%r12d
jle    13a0 <main+0x260>
cmp    $0x2,%eax
jl     13a0 <main+0x260>
add    $0xffffffff,%eax
lea    -0x1(%rax),%rdx
mov    %eax,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    132b <main+0x1eb>
xor    %edx,%edx
jmp    1371 <main+0x231>
and    $0xfffffffc,%eax
lea    0xb0(%rsp),%rsi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%rsi)
movl   $0x0,0x4c(%rsi)
movl   $0x0,0x98(%rsi)
movl   $0x0,0xe4(%rsi)
add    $0x4,%rdx
add    $0x130,%rsi
cmp    %rdx,%rax
jne    1340 <main+0x200>
test   %rcx,%rcx
je     13a0 <main+0x260>
imul   $0x4c,%rdx,%rax
add    %rsp,%rax
add    $0xb0,%rax
imul   $0x4c,%rcx,%rcx
xor    %edx,%edx
nopl   0x0(%rax)
movl   $0x0,(%rax,%rdx,1)
add    $0x4c,%rdx
cmp    %rdx,%rcx
jne    1390 <main+0x250>
movss  0xc58(%rip),%xmm1
addss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xfc(%rsp),%xmm2
mulss  %xmm1,%xmm2
mulss  0xc3f(%rip),%xmm2
movss  0xb0(%rsp),%xmm3
mulss  %xmm0,%xmm3
addss  %xmm2,%xmm3
movss  0xc2a(%rip),%xmm2
addss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
movups 0x148(%rsp),%xmm1
addss  0xc16(%rip),%xmm0
mulss  %xmm2,%xmm0
unpcklps %xmm0,%xmm2
movss  0x194(%rsp),%xmm0
movlhps %xmm1,%xmm0
shufps $0xe2,%xmm1,%xmm0
mulps  %xmm2,%xmm0
divps  0xbf9(%rip),%xmm0
addss  %xmm0,%xmm3
shufps $0x55,%xmm0,%xmm0
addss  %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcea(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x658,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"\09\09NEWTON'S FORWARD INTERPOLATION\09\09\0A\0A\00"
@.str.1 = [52 x i8] c"Enter the number of pairs you would like to feed:\09\07\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [75 x i8] c"\0A\0AEnter the values of x and y in the format shown below:\0A\0A\09 x y\0A\0A\07\00"
@.str.4 = [5 x i8] c"%f%f\00"
@.str.5 = [39 x i8] c"\0A\0AThe difference table is as follows:\0A\00"
@.str.6 = [43 x i8] c"\0A\0ADifferences of order %f are as follows:\0A\00"
@.str.7 = [17 x i8] c"\0A\09%c(%f,%d) = %f\00"
@.str.8 = [53 x i8] c"\0AEnter the value at which interpolation is desired:\09\00"
@.str.9 = [3 x i8] c"%f\00"
@.str.10 = [38 x i8] c"\0A\0AThe value after interpolation is %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x float]
%3 = alloca [20 x float]
%4 = alloca [19 x [19 x float]]
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %8
br label %15
15: ; preds = %27, %0
%16 = load i32, i32* %8
%17 = load i32, i32* %10
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %30
19: ; preds = %15
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 %21
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %24
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), float* %22, float* %25)
br label %27
27: ; preds = %19
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %15
30: ; preds = %15
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %8
br label %32
32: ; preds = %103, %30
%33 = load i32, i32* %8
%34 = load i32, i32* %10
%35 = sub nsw i32 %34, 1
%36 = icmp slt i32 %33, %35
br i1 %36, label %37, label %106
37: ; preds = %32
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 %39)
store i32 0, i32* %9
br label %41
41: ; preds = %77, %37
%42 = load i32, i32* %9
%43 = load i32, i32* %10
%44 = load i32, i32* %8
%45 = sub nsw i32 %43, %44
%46 = sub nsw i32 %45, 1
%47 = icmp slt i32 %42, %46
br i1 %47, label %48, label %80
48: ; preds = %41
%49 = load i32, i32* %9
%50 = add nsw i32 %49, 1
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %51
%53 = load float, float* %52
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %55
%57 = load float, float* %56
%58 = fsub float %53, %57
%59 = load i32, i32* %8
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %60
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [19 x float], [19 x float]* %61, i64 0, i64 %63
store float %58, float* %64
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
%67 = load i32, i32* %9
%68 = load i32, i32* %8
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %69
%71 = load i32, i32* %9
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [19 x float], [19 x float]* %70, i64 0, i64 %72
%74 = load float, float* %73
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 30, i32 %66, i32 %67, double %75)
br label %77
77: ; preds = %48
%78 = load i32, i32* %9
%79 = add nsw i32 %78, 1
store i32 %79, i32* %9
br label %41
80: ; preds = %41
store i32 0, i32* %9
br label %81
81: ; preds = %99, %80
%82 = load i32, i32* %9
%83 = load i32, i32* %10
%84 = sub nsw i32 %83, 1
%85 = load i32, i32* %8
%86 = sub nsw i32 %84, %85
%87 = icmp slt i32 %82, %86
br i1 %87, label %88, label %102
88: ; preds = %81
%89 = load i32, i32* %8
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %90
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [19 x float], [19 x float]* %91, i64 0, i64 %93
%95 = load float, float* %94
%96 = load i32, i32* %9
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 %97
store float %95, float* %98
br label %99
99: ; preds = %88
%100 = load i32, i32* %9
%101 = add nsw i32 %100, 1
store i32 %101, i32* %9
br label %81
102: ; preds = %81
br label %103
103: ; preds = %102
%104 = load i32, i32* %8
%105 = add nsw i32 %104, 1
store i32 %105, i32* %8
br label %32
106: ; preds = %32
store i32 0, i32* %9
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.8, i64 0, i64 0))
%108 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), float* %6)
%109 = load float, float* %6
%110 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 0
%111 = load float, float* %110
%112 = fsub float %109, %111
%113 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 1
%114 = load float, float* %113
%115 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 0
%116 = load float, float* %115
%117 = fsub float %114, %116
%118 = fdiv float %112, %117
store float %118, float* %5
%119 = load float, float* %7
%120 = getelementptr inbounds [20 x float], [20 x float]* %3, i64 0, i64 0
%121 = load float, float* %120
%122 = fadd float %119, %121
store float %122, float* %7
%123 = load i32, i32* %8
%124 = load i32, i32* %10
%125 = icmp sgt i32 %123, %124
br i1 %125, label %126, label %141
126: ; preds = %106
store i32 0, i32* %9
br label %127
127: ; preds = %137, %126
%128 = load i32, i32* %9
%129 = load i32, i32* %10
%130 = sub nsw i32 %129, 1
%131 = icmp slt i32 %128, %130
br i1 %131, label %132, label %140
132: ; preds = %127
%133 = load i32, i32* %9
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %134
%136 = getelementptr inbounds [19 x float], [19 x float]* %135, i64 0, i64 0
store float 0.000000e+00, float* %136
br label %137
137: ; preds = %132
%138 = load i32, i32* %9
%139 = add nsw i32 %138, 1
store i32 %139, i32* %9
br label %127
140: ; preds = %127
br label %141
141: ; preds = %140, %106
%142 = load float, float* %5
%143 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 0
%144 = getelementptr inbounds [19 x float], [19 x float]* %143, i64 0, i64 0
%145 = load float, float* %144
%146 = load float, float* %5
%147 = load float, float* %5
%148 = fsub float %147, 1.000000e+00
%149 = fmul float %146, %148
%150 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 1
%151 = getelementptr inbounds [19 x float], [19 x float]* %150, i64 0, i64 0
%152 = load float, float* %151
%153 = fmul float %149, %152
%154 = fdiv float %153, 2.000000e+00
%155 = call float @llvm.fmuladd.f32(float %142, float %145, float %154)
%156 = load float, float* %5
%157 = load float, float* %5
%158 = fsub float %157, 1.000000e+00
%159 = fmul float %156, %158
%160 = load float, float* %5
%161 = fsub float %160, 2.000000e+00
%162 = fmul float %159, %161
%163 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 2
%164 = getelementptr inbounds [19 x float], [19 x float]* %163, i64 0, i64 0
%165 = load float, float* %164
%166 = fmul float %162, %165
%167 = fdiv float %166, 6.000000e+00
%168 = fadd float %155, %167
%169 = load float, float* %5
%170 = load float, float* %5
%171 = fsub float %170, 1.000000e+00
%172 = fmul float %169, %171
%173 = load float, float* %5
%174 = fsub float %173, 2.000000e+00
%175 = fmul float %172, %174
%176 = load float, float* %5
%177 = fsub float %176, 3.000000e+00
%178 = fmul float %175, %177
%179 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 3
%180 = getelementptr inbounds [19 x float], [19 x float]* %179, i64 0, i64 0
%181 = load float, float* %180
%182 = fmul float %178, %181
%183 = fdiv float %182, 2.400000e+01
%184 = fadd float %168, %183
store float %184, float* %7
%185 = load float, float* %7
%186 = fpext float %185 to double
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), double %186)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [52 x i8] c"Enter the number of pairs you would like to feed:\09\07\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [75 x i8] c"\0A\0AEnter the values of x and y in the format shown below:\0A\0A\09 x y\0A\0A\07\00"
@.str.4 = [5 x i8] c"%f%f\00"
@.str.6 = [43 x i8] c"\0A\0ADifferences of order %f are as follows:\0A\00"
@.str.7 = [17 x i8] c"\0A\09%c(%f,%d) = %f\00"
@.str.8 = [53 x i8] c"\0AEnter the value at which interpolation is desired:\09\00"
@.str.9 = [3 x i8] c"%f\00"
@.str.10 = [38 x i8] c"\0A\0AThe value after interpolation is %f\00"
@str = [36 x i8] c"\09\09NEWTON'S FORWARD INTERPOLATION\09\09\0A\00"
@str.11 = [38 x i8] c"\0A\0AThe difference table is as follows:\00"
define i32 @main() {
%1 = alloca [20 x float]
%2 = alloca [20 x float]
%3 = bitcast [20 x float]* %2 to i8*
%4 = alloca [19 x [19 x float]]
%5 = alloca float
%6 = alloca i32
%7 = bitcast [20 x float]* %1 to i8*
%8 = bitcast [19 x [19 x float]]* %4 to i8*
%9 = bitcast float* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %26
17: ; preds = %0, %17
%18 = phi i64 [ %22, %17 ], [ 0, %0 ]
%19 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 %18
%20 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 %18
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), float* %19, float* %20)
%22 = add nuw nsw i64 %18, 1
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %22, %24
br i1 %25, label %17, label %26
26: ; preds = %17, %0
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.11, i64 0, i64 0))
%28 = load i32, i32* %6
%29 = icmp sgt i32 %28, 1
br i1 %29, label %35, label %70
30: ; preds = %35, %49, %47
%31 = phi i32 [ %64, %49 ], [ %64, %47 ], [ %44, %35 ]
%32 = add nsw i32 %31, -1
%33 = sext i32 %32 to i64
%34 = icmp slt i64 %40, %33
br i1 %34, label %35, label %68
35: ; preds = %26, %30
%36 = phi i64 [ %40, %30 ], [ 0, %26 ]
%37 = trunc i64 %36 to i32
%38 = getelementptr [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %36, i64 0
%39 = bitcast float* %38 to i8*
%40 = add nuw nsw i64 %36, 1
%41 = trunc i64 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 %41)
%43 = xor i32 %37, -1
%44 = load i32, i32* %6
%45 = add i32 %44, %43
%46 = icmp sgt i32 %45, 0
br i1 %46, label %52, label %30
47: ; preds = %52
%48 = icmp sgt i32 %65, 0
br i1 %48, label %49, label %30
49: ; preds = %47
%50 = zext i32 %65 to i64
%51 = shl nuw nsw i64 %50, 2
br label %30
52: ; preds = %35, %52
%53 = phi i64 [ %54, %52 ], [ 0, %35 ]
%54 = add nuw nsw i64 %53, 1
%55 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 %54
%56 = load float, float* %55
%57 = getelementptr inbounds [20 x float], [20 x float]* %2, i64 0, i64 %53
%58 = load float, float* %57
%59 = fsub float %56, %58
%60 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %36, i64 %53
store float %59, float* %60
%61 = fpext float %59 to double
%62 = trunc i64 %53 to i32
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 30, i32 %41, i32 %62, double %61)
%64 = load i32, i32* %6
%65 = add i32 %64, %43
%66 = sext i32 %65 to i64
%67 = icmp slt i64 %54, %66
br i1 %67, label %52, label %47
68: ; preds = %30
%69 = trunc i64 %40 to i32
br label %70
70: ; preds = %68, %26
%71 = phi i32 [ 0, %26 ], [ %69, %68 ]
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.8, i64 0, i64 0))
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), float* %5)
%74 = load float, float* %5
%75 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 0
%76 = load float, float* %75
%77 = fsub float %74, %76
%78 = getelementptr inbounds [20 x float], [20 x float]* %1, i64 0, i64 1
%79 = load float, float* %78
%80 = fsub float %79, %76
%81 = fdiv float %77, %80
%82 = load i32, i32* %6
%83 = icmp sgt i32 %71, %82
%84 = icmp sgt i32 %82, 1
%85 = and i1 %83, %84
br i1 %85, label %86, label %117
86: ; preds = %70
%87 = add nsw i32 %82, -1
%88 = zext i32 %87 to i64
%89 = add nsw i64 %88, -1
%90 = and i64 %88, 3
%91 = icmp ult i64 %89, 3
br i1 %91, label %107, label %92
92: ; preds = %86
%93 = and i64 %88, 4294967292
br label %94
94: ; preds = %94, %92
%95 = phi i64 [ 0, %92 ], [ %104, %94 ]
%96 = phi i64 [ 0, %92 ], [ %105, %94 ]
%97 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %95, i64 0
store float 0.000000e+00, float* %97
%98 = or i64 %95, 1
%99 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %98, i64 0
store float 0.000000e+00, float* %99
%100 = or i64 %95, 2
%101 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %100, i64 0
store float 0.000000e+00, float* %101
%102 = or i64 %95, 3
%103 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %102, i64 0
store float 0.000000e+00, float* %103
%104 = add nuw nsw i64 %95, 4
%105 = add i64 %96, 4
%106 = icmp eq i64 %105, %93
br i1 %106, label %107, label %94
107: ; preds = %94, %86
%108 = phi i64 [ 0, %86 ], [ %104, %94 ]
%109 = icmp eq i64 %90, 0
br i1 %109, label %117, label %110
110: ; preds = %107, %110
%111 = phi i64 [ %114, %110 ], [ %108, %107 ]
%112 = phi i64 [ %115, %110 ], [ 0, %107 ]
%113 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 %111, i64 0
store float 0.000000e+00, float* %113
%114 = add nuw nsw i64 %111, 1
%115 = add i64 %112, 1
%116 = icmp eq i64 %115, %90
br i1 %116, label %117, label %110
117: ; preds = %107, %110, %70
%118 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 0, i64 0
%119 = load float, float* %118
%120 = fadd float %81, -1.000000e+00
%121 = fmul float %81, %120
%122 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 1, i64 0
%123 = load float, float* %122
%124 = fmul float %121, %123
%125 = fmul float %124, 5.000000e-01
%126 = call float @llvm.fmuladd.f32(float %81, float %119, float %125)
%127 = fadd float %81, -2.000000e+00
%128 = fmul float %127, %121
%129 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 2, i64 0
%130 = bitcast float* %129 to <4 x float>*
%131 = load <4 x float>, <4 x float>* %130
%132 = shufflevector <4 x float> %131, <4 x float> poison, <2 x i32> <i32 0, i32 undef>
%133 = fadd float %81, -3.000000e+00
%134 = fmul float %133, %128
%135 = getelementptr inbounds [19 x [19 x float]], [19 x [19 x float]]* %4, i64 0, i64 3, i64 0
%136 = load float, float* %135
%137 = insertelement <2 x float> poison, float %128, i64 0
%138 = insertelement <2 x float> %137, float %134, i64 1
%139 = insertelement <2 x float> %132, float %136, i64 1
%140 = fmul <2 x float> %138, %139
%141 = fdiv <2 x float> %140, <float 6.000000e+00, float 2.400000e+01>
%142 = extractelement <2 x float> %141, i64 0
%143 = fadd float %126, %142
%144 = extractelement <2 x float> %141, i64 1
%145 = fadd float %143, %144
%146 = fpext float %145 to double
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), double %146)
ret i32 0
}