user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0x0,%ebx
  mov    $0x0,%r13d
  mov    $0x0,%ebp
  lea    D11(%rip),%r14
  jmp    L125
L79:
  mov    0x4(%rsp),%eax
  mov    %eax,0x0(%rbp,%rbx,4)
  add    $0x1,%rbx
L125:
  mov    %ebx,%r12d
  lea    0x4(%rsp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  test   %eax,%eax
  jle    L38
  cmp    %ebx,%r13d
  jne    L79
  add    $0xa,%r13d
  lea    0x0(,%r13,4),%esi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    %rax,%rbp
  jmp    L79
L38:
  movslq %ebx,%r13
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  mov    %rax,%rcx
  test   %ebx,%ebx
  jle    L9
  lea    0x0(,%r13,4),%rax
  lea    -0x8(%rbp,%rax,1),%r8
  lea    -0x4(%rbp,%rax,1),%rdi
  mov    %ebx,%esi
  mov    $0x0,%eax
  sub    $0x1,%r12d
  movss  D41(%rip),%xmm1
  movss  D24(%rip),%xmm3
  movaps %xmm3,%xmm2
  jmp    L19
L34:
  mov    0x4(%rbp),%edx
  add    0x0(%rbp),%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  mulss  %xmm2,%xmm0
  movss  %xmm0,(%rcx)
L50:
  add    $0x1,%rax
  cmp    %rax,%rsi
  je     L41
L19:
  test   %eax,%eax
  je     L34
  cmp    %eax,%r12d
  je     L114
  mov    0x0(%rbp,%rax,4),%edx
  add    -0x4(%rbp,%rax,4),%edx
  add    0x4(%rbp,%rax,4),%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rcx,%rax,4)
  jmp    L50
L114:
  mov    (%rdi),%edx
  add    (%r8),%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  mulss  %xmm3,%xmm0
  movss  %xmm0,(%rcx,%rax,4)
  jmp    L50
L41:
  mov    %rcx,%rbp
  mov    %ebx,%ebx
  lea    (%rcx,%rbx,4),%r12
  lea    D2(%rip),%rbx
L26:
  movss  0x0(%rbp),%xmm0
  mov    %rbx,%rdi
  call   <printf@plt>
  add    $0x4,%rbp
  cmp    %r12,%rbp
  jne    L26
L9:
  lea    D40(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D11
type: string
name: retrieve_data
arguments: data_label: D41
type: byte[4]
name: retrieve_data
arguments: data_label: D24
type: byte[4]
name: retrieve_data
arguments: data_label: D2
type: string
name: retrieve_data
arguments: data_label: D40
type: string

tool: D11: %d

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

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

tool: D2: %.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;
}
```