user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D17(%rip),%r14
  push   %r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r15
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L109:
  mov    0x4(%rsp),%eax
  mov    %eax,(%r12,%rbx,4)
  add    $0x1,%rbx
L96:
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    %ebx,%r13d
  call   <scanf@plt>
  test   %eax,%eax
  jle    L110
  cmp    %ebx,%ebp
  jne    L109
  add    $0xa,%ebp
  mov    %r12,%rdi
  lea    0x0(,%rbp,4),%esi
  call   <realloc@plt>
  mov    %rax,%r12
  jmp    L109
  nopl   0x0(%rax)
L110:
  lea    0x0(,%rbx,4),%edi
  movslq %ebx,%r14
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %ebx,%ebx
  je     L75
  lea    0x0(,%r14,4),%rax
  movss  D12(%rip),%xmm2
  movss  D49(%rip),%xmm1
  sub    $0x1,%r13d
  lea    -0x8(%r12,%rax,1),%rsi
  lea    -0x4(%r12,%rax,1),%rcx
  xor    %eax,%eax
  jmp    L42
  nopl   0x0(%rax)
L26:
  cmp    %eax,%r13d
  je     L102
  mov    (%r12,%rax,4),%edx
  pxor   %xmm0,%xmm0
  add    -0x4(%r12,%rax,4),%edx
  add    0x4(%r12,%rax,4),%edx
  cvtsi2ss %edx,%xmm0
  divss  %xmm2,%xmm0
  movss  %xmm0,0x0(%rbp,%rax,4)
L84:
  add    $0x1,%rax
  cmp    %rax,%rbx
  je     L64
L42:
  test   %rax,%rax
  jne    L26
  mov    0x4(%r12),%edx
  pxor   %xmm0,%xmm0
  add    (%r12),%edx
  add    $0x1,%rax
  cvtsi2ss %edx,%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,0x0(%rbp)
  cmp    %rax,%rbx
  jne    L42
L64:
  lea    0x0(%rbp,%rbx,4),%r12
  lea    D21(%rip),%rbx
  xchg   %ax,%ax
L125:
  movss  0x0(%rbp),%xmm0
  mov    %rbx,%rdi
  add    $0x4,%rbp
  call   <printf@plt>
  cmp    %rbp,%r12
  jne    L125
L75:
  lea    D42(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L94
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L102:
  mov    (%rcx),%edx
  pxor   %xmm0,%xmm0
  add    (%rsi),%edx
  cvtsi2ss %edx,%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,0x0(%rbp,%rax,4)
  jmp    L84
L94:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D17
datatype: string
name: extract_symbolic_data
arguments: tag: D12
datatype: byte[4]
name: extract_symbolic_data
arguments: tag: D49
datatype: byte[4]
name: extract_symbolic_data
arguments: tag: D21
datatype: string
name: extract_symbolic_data
arguments: tag: D42
datatype: string

tool: D17: %d

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

tool: {"D49": [0x00,0x00,0x00,0x3f]}

tool: D21: %.2f 

tool: 

assistant: ```c
int main() {
  int *v = 0;
  int vCount = 0;
  int vCapacity = 0;
  for (;;) {
    int new;
    if (scanf("%d", &new) < 1) {
      break;
    }
    if (vCount == vCapacity) {
      vCapacity += 10;
      v = realloc(v, sizeof(int) * vCapacity);
    }
    v[vCount++] = new;
  }
  float *avg = malloc(sizeof(float) * vCount);
  for (int i = 0; i < vCount; ++i) {
    if (i == 0) {
      avg[i] = (float)(v[0] + v[1]) / 2.0f;
    } else if (i == vCount - 1) {
      avg[i] = (float)(v[vCount - 2] + v[vCount - 1]) / 2.0f;
    } else {
      avg[i] = (float)(v[i - 1] + v[i] + v[i + 1]) / 3.0f;
    }
  }
  for (int i = 0; i < vCount; ++i) {
    printf("%.2f ", avg[i]);
  }
  puts("");
  return 0;
}
```