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

```asm
<ncctop>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x78(%rbp)
  mov    %rdi,-0x80(%rbp)
  mov    %rsi,-0x88(%rbp)
  mov    %rdx,-0x90(%rbp)
  mov    %rcx,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rsi
  movq   $0x0,-0x68(%rbp)
  mov    -0x88(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  mov    %rax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  mov    %rax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L115:
  cmp    %rdx,%rsp
  je     L86
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L115
L86:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L12
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L12:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x80(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  mov    %rax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  mov    %rax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L85:
  cmp    %rdx,%rsp
  je     L100
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L85
L100:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L132
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L132:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x40(%rbp)
  movq   $0x0,-0x60(%rbp)
  jmp    L127
L0:
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm1
  movsd  D16(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x38(%rbp),%xmm0
  mov    -0x50(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addq   $0x1,-0x60(%rbp)
L127:
  mov    -0x60(%rbp),%rax
  cmp    -0x88(%rbp),%rax
  jl     L0
  movq   $0x0,-0x60(%rbp)
  jmp    L149
L137:
  mov    -0x50(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  movsd  (%rax,%rdx,8),%xmm1
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x50(%rbp),%rax
  movsd  (%rax,%rdx,8),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addq   $0x1,-0x60(%rbp)
L149:
  mov    -0x60(%rbp),%rax
  cmp    -0x80(%rbp),%rax
  jl     L137
  movq   $0x0,-0x60(%rbp)
  jmp    L36
L111:
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x40(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  movsd  (%rax,%rdx,8),%xmm0
  comisd -0x78(%rbp),%xmm0
  jae    L60
  addq   $0x1,-0x60(%rbp)
L36:
  mov    -0x60(%rbp),%rax
  cmp    -0x80(%rbp),%rax
  jl     L111
  jmp    L7
L60:
  nop
L7:
  mov    -0x68(%rbp),%rax
  mov    %rsi,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L42
  call   <__stack_chk_fail@plt>
L42:
  lea    -0x20(%rbp),%rsp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D16
data_type: f64
name: extract_symbolic_data
arguments: tag: D3
data_type: f64

tool: D16: 101320

tool: D3: 0.5

assistant: ```c
long ncctop(double cptop, long nlev, long nlevp1, double *vct_a, double *vct_b) {
  long nctop = 0;
  long jk;
  double za, zb, zph[nlevp1], zp[nlev];
  for (jk = 0; jk < nlevp1; ++jk) {
    za = vct_a[jk];
    zb = vct_b[jk];
    zph[jk] = za + zb * 101320.;
  }
  for (jk = 0; jk < nlev; ++jk)
    zp[jk] = (zph[jk] + zph[jk + 1]) * 0.5;
  for (jk = 0; jk < nlev; ++jk) {
    nctop = jk;
    if (zp[jk] >= cptop)
      break;
  }
  return (nctop);
}
```