user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x4a0,%rsp
  mov    %edi,-0x494(%rbp)
  mov    %rsi,-0x4a0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x4a0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x450(%rbp)
  movl   $0x60,-0x40c(%rbp)
  movl   $0x60,-0x408(%rbp)
  movl   $0x120,-0x404(%rbp)
  movl   $0x1,-0x464(%rbp)
  movl   $0x1,-0x428(%rbp)
  movl   $0x1,-0x424(%rbp)
  lea    D48(%rip),%rax
  mov    %rax,-0x420(%rbp)
  mov    $0x1e60000,%edi
  call   <malloc@plt>
  mov    %rax,-0x448(%rbp)
  mov    $0xa20000,%edi
  call   <malloc@plt>
  mov    %rax,-0x440(%rbp)
  mov    -0x440(%rbp),%rax
  mov    %rax,-0x418(%rbp)
  movl   $0x0,-0x484(%rbp)
  movl   $0x0,-0x480(%rbp)
  movl   $0x0,-0x47c(%rbp)
  movl   $0x0,-0x478(%rbp)
  movl   $0x0,-0x474(%rbp)
  jmp    L88
L48:
  movl   $0x0,-0x470(%rbp)
  jmp    L151
L18:
  movl   $0x0,-0x46c(%rbp)
  jmp    L160
L89:
  mov    -0x478(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x478(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x46c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x478(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x478(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x470(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x478(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x478(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x474(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x46c(%rbp)
L160:
  cmpl   $0x5f,-0x46c(%rbp)
  jle    L89
  addl   $0x1,-0x470(%rbp)
L151:
  cmpl   $0x5f,-0x470(%rbp)
  jle    L18
  addl   $0x1,-0x474(%rbp)
L88:
  cmpl   $0x11f,-0x474(%rbp)
  jle    L48
  jmp    L164
L96:
  lea    -0x400(%rbp),%rdx
  lea    -0x200(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x478(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  movslq %edx,%rax
  imul   $0x68db8bad,%rax,%rax
  shr    $0x20,%rax
  sar    $0xc,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x2710,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L95
  mov    -0x478(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L95:
  lea    -0x200(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x1,%eax
  jle    L164
  movl   $0x0,-0x468(%rbp)
  lea    -0x200(%rbp),%rax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x458(%rbp)
  jmp    L109
L56:
  cmpl   $0x2,-0x468(%rbp)
  jg     L181
  mov    -0x458(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x430(%rbp)
  cmpl   $0x0,-0x468(%rbp)
  jne    L55
  movsd  -0x430(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x484(%rbp)
  jmp    L42
L55:
  cmpl   $0x1,-0x468(%rbp)
  jne    L107
  movsd  -0x430(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x480(%rbp)
  jmp    L42
L107:
  movsd  -0x430(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x47c(%rbp)
L42:
  addl   $0x1,-0x468(%rbp)
  jmp    L72
L181:
  mov    -0x458(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x438(%rbp)
  mov    -0x47c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  add    %edx,%eax
  shl    $0xa,%eax
  mov    %eax,%ecx
  mov    -0x480(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x5,%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x484(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x45c(%rbp)
  mov    -0x45c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x440(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x438(%rbp),%xmm0
  movss  %xmm0,(%rax)
L72:
  lea    D4(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x458(%rbp)
L109:
  cmpq   $0x0,-0x458(%rbp)
  jne    L56
L164:
  mov    -0x450(%rbp),%rdx
  lea    -0x400(%rbp),%rax
  mov    $0x1f4,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L96
  movl   $0x44012,-0x460(%rbp)
  mov    -0x460(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x440(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  movd   %eax,%xmm0
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4a0(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    -0x428(%rbp),%r8
  mov    -0x464(%rbp),%edi
  mov    -0x448(%rbp),%rcx
  lea    -0x40c(%rbp),%rdx
  sub    $0x8,%rsp
  lea    -0x418(%rbp),%rsi
  push   %rsi
  lea    -0x420(%rbp),%rsi
  push   %rsi
  lea    -0x424(%rbp),%rsi
  push   %rsi
  mov    %r8,%r9
  mov    %edi,%r8d
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <write_curvilinear_mesh@plt>
  add    $0x20,%rsp
  mov    -0x440(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D24
datatype: string
name: read_data
arguments: data_tag: D48
datatype: string
name: read_data
arguments: data_tag: D18
datatype: string
name: read_data
arguments: data_tag: D4
datatype: string
name: read_data
arguments: data_tag: D10
datatype: string

tool: D24: r

tool: D48: zonal

tool: D18: Processed %d lines


tool: D4: 	

tool: D10: %f


assistant: ```c
int main(int argc, char *argv[]) {
  FILE *file = fopen(argv[1], "r");
  char str[500];
  int dims[] = {96, 96, 288};
  int nvars = 1;
  int vardims[] = {1};
  int centering[] = {1};
  int i, j, k;
  const char *varnames[] = {"zonal"};
  float *pts = (float *)malloc(96 * 96 * 288 * 3 * sizeof(float));
  float *zonal = (float *)malloc(96 * 96 * 288 * sizeof(float));
  float *vars[] = {(float *)zonal};
  int x = 0;
  int y = 0;
  int z = 0;
  int index = 0;
  for (int i = 0; i < 288; i++) {
    for (int j = 0; j < 96; j++) {
      for (int k = 0; k < 96; k++) {
        pts[index++] = k;
        pts[index++] = j;
        pts[index++] = i;
      }
    }
  }
  while (fgets(str, 500, file) != NULL) {
    char line[500];
    strcpy(line, str);
    if ((index / 3) % 10000 == 0) {
      printf("Processed %d lines\n", index / 3);
    }
    if (strlen(line) >= 2) {
      int count = 0;
      for (char *token = strtok(line, "\t"); token != NULL; token = strtok(NULL, "\t")) {
        if (count < 3) {
          double point_val = atoi(token);
          if (count == 0) {
            x = point_val;
          } else if (count == 1) {
            y = point_val;
          } else {
            z = point_val;
          }
          count++;
        } else {
          double val = atof(token);
          int pos = z * 96 * 96 + y * 96 + x;
          zonal[pos] = val;
        }
      }
    }
  }
  int pos = 30 * 96 * 96 + 21 * 96 + 50;
  printf("%f\n", zonal[pos]);
  write_curvilinear_mesh(argv[2], 1, dims, pts, nvars, vardims, centering, varnames, vars);
  free(zonal);
  free(pts);
}
```