user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  lea    D55(%rip),%rdi
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  lea    D84(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L164
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  lea    D94(%rip),%r15
  lea    0x50(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    D128(%rip),%r12
L46:
  add    $0x1,%ebx
  mov    %ebx,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    (%r14,%rbp,1),%rdx
  lea    0x0(%r13,%rbp,1),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  add    $0x4,%rbp
  cmp    %eax,%ebx
  jl     L46
L164:
  lea    -0x1(%rax),%r10d
  mov    $0x0,%edi
  mov    $0x28,%esi
  mov    $0x0,%ebx
  test   %r10d,%r10d
  jle    L148
  mov    %r10d,%r11d
  lea    0x80(%rsp),%rbp
  lea    -0x2(%rax),%r8d
  lea    0x58(%rsp),%r12
  jmp    L37
L148:
  mov    $0x0,%ebx
L237:
  lea    D88(%rip),%r12
  lea    D84(%rip),%rbp
  lea    D75(%rip),%r13
  jmp    L161
L182:
  movss  0x4(%rax),%xmm0
  subss  (%rax),%xmm0
L166:
  lea    (%rax,%rsi,1),%rcx
  movss  %xmm0,(%rcx,%rdi,1)
  add    $0x4,%rax
  add    $0x4,%rdx
  cmp    %r9,%rdx
  je     L38
L18:
  test   %ebx,%ebx
  jne    L182
  movss  (%rdx),%xmm0
  subss  -0x4(%rdx),%xmm0
  jmp    L166
L38:
  add    $0x1,%ebx
  cmp    $0x3,%ebx
  je     L237
  sub    $0x28,%rsi
  add    $0x28,%rdi
  cmp    %r10d,%ebx
  jge    L237
L37:
  mov    %r11d,%eax
  sub    %ebx,%eax
  test   %eax,%eax
  jle    L38
  mov    %rbp,%rax
  sub    %rsi,%rax
  lea    0x54(%rsp),%rdx
  mov    %r8d,%ecx
  sub    %ebx,%ecx
  lea    (%r12,%rcx,4),%r9
  jmp    L18
L159:
  movss  0x20(%rsp),%xmm2
  movss  0x1c(%rsp),%xmm0
  subss  %xmm2,%xmm0
  movslq %ebx,%rbx
  movss  0x20(%rsp,%rbx,4),%xmm1
  subss  %xmm2,%xmm1
  divss  %xmm1,%xmm0
  movss  0x50(%rsp),%xmm7
  movss  %xmm7,0xc(%rsp)
  mov    0x14(%rsp),%ecx
  lea    -0x1(%rcx),%edx
  test   %edx,%edx
  jle    L66
  movaps %xmm0,%xmm2
  xorps  D36(%rip),%xmm2
  movaps %xmm2,%xmm1
  mulss  0x80(%rsp),%xmm1
  movaps %xmm1,%xmm5
  addss  %xmm7,%xmm5
  movss  %xmm5,0xc(%rsp)
  cmp    $0x1,%edx
  jle    L6
  movaps %xmm0,%xmm1
  subss  D31(%rip),%xmm1
  divss  D98(%rip),%xmm1
  mulss  %xmm2,%xmm1
  movaps %xmm1,%xmm2
  mulss  0xa8(%rsp),%xmm2
  movaps %xmm2,%xmm6
  addss  %xmm5,%xmm6
  movss  %xmm6,0xc(%rsp)
  cmp    $0x2,%edx
  jle    L44
  subss  D23(%rip),%xmm0
  mulss  %xmm1,%xmm0
  mulss  0xd0(%rsp),%xmm0
  addss  %xmm6,%xmm0
  movss  %xmm0,0xc(%rsp)
  mov    $0x3,%ebx
L123:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x1c(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  lea    D22(%rip),%rdi
  mov    $0x2,%eax
  call   <printf@plt>
L161:
  mov    %r12,%rdi
  call   <puts@plt>
  lea    0x18(%rsp),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  cmpl   $0x3,0x18(%rsp)
  je     L254
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x1c(%rsp),%rsi
  lea    D136(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  cmp    $0x1,%eax
  je     L159
  cmp    $0x2,%eax
  jne    L123
  mov    0x14(%rsp),%eax
  lea    -0x1(%rax),%edx
  movslq %edx,%rcx
  movss  0x50(%rsp,%rcx,4),%xmm3
  movss  %xmm3,0xc(%rsp)
  test   %edx,%edx
  jle    L48
  movss  0x1c(%rsp),%xmm1
  subss  0x20(%rsp,%rcx,4),%xmm1
  movslq %ebx,%rbx
  movss  0x20(%rsp,%rbx,4),%xmm0
  subss  0x20(%rsp),%xmm0
  divss  %xmm0,%xmm1
  cltq
  lea    0x80(%rsp,%rax,4),%rax
  movss  D31(%rip),%xmm0
  mov    $0x0,%ebx
  addss  %xmm0,%xmm1
L133:
  add    $0x1,%ebx
  pxor   %xmm3,%xmm3
  cvtsi2ss %ebx,%xmm3
  movaps %xmm1,%xmm2
  divss  %xmm3,%xmm2
  mulss  %xmm2,%xmm0
  movaps %xmm0,%xmm2
  mulss  -0x8(%rax),%xmm2
  addss  0xc(%rsp),%xmm2
  movss  %xmm2,0xc(%rsp)
  add    $0x24,%rax
  cmp    %ebx,%edx
  jle    L123
  cmp    $0x2,%ebx
  jle    L133
  jmp    L123
L66:
  mov    $0x0,%eax
L6:
  mov    %eax,%ebx
  jmp    L123
L44:
  mov    $0x2,%eax
  jmp    L6
L48:
  mov    $0x0,%ebx
  jmp    L123
L254:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L100
  mov    $0x0,%eax
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L100:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D55
type_infered: string
name: unpack_data
arguments: data_tag: D84
type_infered: string
name: unpack_data
arguments: data_tag: D94
type_infered: string
name: unpack_data
arguments: data_tag: D128
type_infered: string
name: unpack_data
arguments: data_tag: D88
type_infered: string
name: unpack_data
arguments: data_tag: D75
type_infered: string
name: unpack_data
arguments: data_tag: D36
type_infered: byte[16]
name: unpack_data
arguments: data_tag: D31
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D98
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D23
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D22
type_infered: string
name: unpack_data
arguments: data_tag: D136
type_infered: string

tool: D55: 
No. of pair of points: 

tool: D84: %d

tool: D94: %dth value of x and y wanted: 

tool: D128: %f %f

tool: D88: 
 Give option: Press 1 for Forward
Press 2 for Backward
3 for exit

tool: D75: 
Give value of x for which y to be interpolated: 

tool: {"D36": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D31": [0x00,0x00,0x80,0x3f]}

tool: {"D98": [0x00,0x00,0x00,0x00]}

tool: {"D23": [0x00,0x00,0x00,0x40]}

tool: D22: x = %f	y = %f


tool: D136: %f

assistant: ```c
int main() {
  int i, n, j, op;
  float x[10], y[10], xx, yy, d[3][10], u, t;
  printf("\nNo. of pair of points: ");
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    printf("%dth value of x and y wanted: ", i + 1);
    scanf("%f %f", &x[i], &y[i]);
  }
  for (i = 0; i < 3 && i < n - 1; i++) {
    for (j = 0; j < n - i - 1; j++) {
      if (i == 0)
        d[i][j] = y[j + 1] - y[j];
      else
        d[i][j] = d[i - 1][j + 1] - d[i - 1][j];
    }
  }
  while (1) {
    printf("\n Give option: Press 1 for Forward\nPress 2 for Backward\n3 for exit\n");
    scanf("%d", &op);
    if (op == 3)
      break;
    printf("\nGive value of x for which y to be interpolated: ");
    scanf("%f", &xx);
    switch (op) {
    case 1:
      u = (xx - x[0]) / (x[i] - x[0]);
      yy = y[0];
      t = 1;
      for (i = 0; i < 3 && i < n - 1; i++) {
        t *= (u - i) / (i - 1);
        yy = yy + t * d[i][0];
      }
      break;
    case 2:
      u = (xx - x[n - 1]) / (x[i] - x[0]);
      yy = y[n - 1];
      t = 1;
      for (i = 0; i < 3 && i < n - 1; i++) {
        t *= (u + 1) / (i + 1);
        yy = yy + t * d[i][n - i - 2];
      }
    }
    printf("x = %f\ty = %f\n", xx, yy);
  }
  return 0;
}
```