user: Demonstrate the C code that generates the assembly output below:

```asm
<dump_velocity_c>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x260,%rsp
  mov    %rdi,-0x238(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %edx,-0x244(%rbp)
  mov    %ecx,-0x248(%rbp)
  mov    %r8d,-0x24c(%rbp)
  mov    %r9,-0x258(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x240(%rbp),%rcx
  mov    -0x238(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D47(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  lea    -0x110(%rbp),%rax
  lea    D115(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  jne    L0
  lea    -0x110(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rcx
  lea    D8(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  jmp    L54
L0:
  mov    -0x240(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D63(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  lea    -0x110(%rbp),%rdx
  mov    -0x220(%rbp),%rax
  lea    D22(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x24c(%rbp),%esi
  mov    -0x248(%rbp),%ecx
  mov    -0x244(%rbp),%edx
  mov    -0x220(%rbp),%rax
  mov    %esi,%r8d
  lea    D43(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D92(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x240(%rbp),%rcx
  mov    -0x238(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D114(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  lea    -0x110(%rbp),%rax
  lea    D115(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  jne    L24
  lea    -0x110(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rcx
  lea    D90(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  jmp    L54
L24:
  mov    -0x244(%rbp),%eax
  imul   -0x248(%rbp),%eax
  imul   -0x24c(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x218(%rbp)
  cmpq   $0x0,-0x218(%rbp)
  jne    L85
  lea    -0x210(%rbp),%rax
  lea    D102(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  jmp    L54
L85:
  movl   $0x0,-0x224(%rbp)
  jmp    L14
L84:
  mov    -0x224(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x258(%rbp),%rax
  add    %rax,%rdx
  mov    -0x224(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x218(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x224(%rbp)
L14:
  mov    -0x244(%rbp),%eax
  imul   -0x248(%rbp),%eax
  imul   -0x24c(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cmp    %eax,-0x224(%rbp)
  jl     L84
  mov    -0x244(%rbp),%eax
  imul   -0x248(%rbp),%eax
  imul   -0x24c(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%esi
  mov    -0x220(%rbp),%rdx
  mov    -0x218(%rbp),%rax
  mov    %rdx,%rcx
  mov    %esi,%edx
  mov    $0x8,%esi
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x218(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x220(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
L54:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L1
  call   <__stack_chk_fail@plt>
L1:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D47
type_guessed: string
name: parse_data
arguments: label: D115
type_guessed: string
name: parse_data
arguments: label: D8
type_guessed: string
name: parse_data
arguments: label: D63
type_guessed: string
name: parse_data
arguments: label: D124
type_guessed: string
name: parse_data
arguments: label: D22
type_guessed: string
name: parse_data
arguments: label: D43
type_guessed: string
name: parse_data
arguments: label: D29
type_guessed: string
name: parse_data
arguments: label: D92
type_guessed: string
name: parse_data
arguments: label: D105
type_guessed: string
name: parse_data
arguments: label: D114
type_guessed: string
name: parse_data
arguments: label: D90
type_guessed: string
name: parse_data
arguments: label: D102
type_guessed: string

tool: D47: %s/%s.bov

tool: D115: wb

tool: D8: WARNING: Unable to create BOV file (%s)

tool: D63: %s.dat

tool: D124: VARIABLE: velocity


tool: D22: DATA_FILE: %s


tool: D43: DATA_SIZE: %d %d %d


tool: D29: DATA_COMPONENTS: 3


tool: D92: DATA_FORMAT: DOUBLE


tool: D105: DATA_ENDIAN: LITTLE


tool: D114: %s/%s.dat

tool: D90: WARNING: Unable to create DAT file (%s)

tool: D102: WARNING: Unable to allocate write buffer

assistant: ```c
void dump_velocity_c(char *dname, char *fname, int nx, int ny, int nz, double *array) {
  int i, j, k;
  FILE *fp;
  char errmsg[256];
  char buf[256];
  double *wbuf;
  snprintf(buf, 256, "%s/%s.bov", dname, fname);
  fp = fopen(buf, "wb");
  if (fp == NULL) {
    snprintf(errmsg, 256, "WARNING: Unable to create BOV file (%s)", buf);
    perror(errmsg);
    return;
  }
  snprintf(buf, 256, "%s.dat", fname);
  fprintf(fp, "VARIABLE: velocity\n");
  fprintf(fp, "DATA_FILE: %s\n", buf);
  fprintf(fp, "DATA_SIZE: %d %d %d\n", nx, ny, nz);
  fprintf(fp, "DATA_COMPONENTS: 3\n");
  fprintf(fp, "DATA_FORMAT: DOUBLE\n");
  fprintf(fp, "DATA_ENDIAN: LITTLE\n");
  fclose(fp);
  snprintf(buf, 256, "%s/%s.dat", dname, fname);
  fp = fopen(buf, "wb");
  if (fp == NULL) {
    snprintf(errmsg, 256, "WARNING: Unable to create DAT file (%s)", buf);
    perror(errmsg);
    return;
  }
  wbuf = (double *)malloc(3 * nx * ny * nz * sizeof(double));
  if (wbuf == NULL) {
    snprintf(errmsg, 256, "WARNING: Unable to allocate write buffer");
    perror(errmsg);
    return;
  }
  for (i = 0; i < 3 * nx * ny * nz; i++)
    wbuf[i] = array[2 * i];
  fwrite(wbuf, sizeof(double), 3 * nx * ny * nz, fp);
  free(wbuf);
  fclose(fp);
}
```