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

```asm
<read_voxel_file>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D73(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L60
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L60:
  movl   $0x0,-0x10(%rbp)
  jmp    L19
L89:
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rsi,%r8
  lea    D60(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x3,-0xc(%rbp)
  je     L39
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L39:
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rsi,%r8
  lea    D60(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x3,-0xc(%rbp)
  je     L1
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L1:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    D32(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L46
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L46:
  movl   $0x0,-0x14(%rbp)
  jmp    L30
L10:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    D32(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L82
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L82:
  addl   $0x1,-0x14(%rbp)
L30:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L10
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x10(%rbp)
L19:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L89
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D73
type_infered: string
name: read_data
arguments: data_tag: D40
type_infered: string
name: read_data
arguments: data_tag: D60
type_infered: string
name: read_data
arguments: data_tag: D18
type_infered: string
name: read_data
arguments: data_tag: D32
type_infered: string

tool: D73: r

tool: D40: ERROR: HEC-MW-VIS-E0010: Cannot open voxel file

tool: D60: %lf %lf %lf

tool: D18: ERROR: voxel file format error


tool: D32: %d

assistant: ```c
int read_voxel_file(char *filename, int n_voxel, double *voxel_dxyz, double *voxel_orig_xyz, int *level, int *voxel_n_neighbor_pe, int **voxel_neighbor_pe) {
  FILE *fp;
  int i, j;
  int ret;
  if ((fp = fopen(filename, "r")) == NULL)
    HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0010: Cannot open voxel file");
  for (j = 0; j < n_voxel; j++) {
    ret = fscanf(fp, "%lf %lf %lf", &voxel_orig_xyz[j * 3], &voxel_orig_xyz[j * 3 + 1], &voxel_orig_xyz[j * 3 + 2]);
    if (ret != 3)
      HECMW_vis_print_exit("ERROR: voxel file format error\n");
    ret = fscanf(fp, "%lf %lf %lf", &voxel_dxyz[j * 3], &voxel_dxyz[j * 3 + 1], &voxel_dxyz[j * 3 + 2]);
    if (ret != 3)
      HECMW_vis_print_exit("ERROR: voxel file format error\n");
    ret = fscanf(fp, "%d", &voxel_n_neighbor_pe[j]);
    if (ret != 1)
      HECMW_vis_print_exit("ERROR: voxel file format error\n");
    for (i = 0; i < voxel_n_neighbor_pe[j]; i++) {
      ret = fscanf(fp, "%d", &voxel_neighbor_pe[j][i]);
      if (ret != 1)
        HECMW_vis_print_exit("ERROR: voxel file format error\n");
    }
    level[j * 3 + 0] = 0;
    level[j * 3 + 1] = 0;
    level[j * 3 + 2] = 0;
  }
  fclose(fp);
  return 1;
}
```