user: 请将以下的汇编代码转换成C语言代码：

```asm
<save_dvector>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L31
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x3f3,%edi
  call   <exit@plt>
L31:
  lea    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <time@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <ctime@plt>
  mov    %rax,%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D40(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%rax
  lea    D61(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%rax
  mov    $0x1,%edx
  lea    D48(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x38(%rbp),%eax
  sub    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  lea    D35(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L22
L34:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L15
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L0
L15:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D36(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  jmp    L23
L0:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x15,%edx
  mov    $0x1,%esi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L23:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,-0x14(%rbp)
L22:
  mov    -0x14(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jle    L34
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L20
  call   <__stack_chk_fail@plt>
L20:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D41
datatype: string
name: parse_data
arguments: data_label: D40
datatype: string
name: parse_data
arguments: data_label: D61
datatype: string
name: parse_data
arguments: data_label: D48
datatype: string
name: parse_data
arguments: data_label: D35
datatype: string
name: parse_data
arguments: data_label: D36
datatype: string
name: parse_data
arguments: data_label: D53
datatype: string

tool: D41:  error: cannot open file: '%s' 


tool: D40: %% filename: %s - %s

tool: D61: %% type: vector


tool: D48: %% rows: %d


tool: D35: %% columns: %d


tool: D36: %21.12e

tool: D53:     0                

assistant: ```c
void save_dvector(char filename[], double *V, int nl, int nh, const char *mode) {
  FILE *fp_v;
  int i;
  time_t now;
  if ((fp_v = fopen(filename, mode)) == NULL) {
    printf(" error: cannot open file: '%s' \n", filename);
    exit(1011);
  }
  (void)time(&now);
  fprintf(fp_v, "%% filename: %s - %s", filename, ctime(&now));
  fprintf(fp_v, "%% type: vector\n");
  fprintf(fp_v, "%% rows: %d\n", 1);
  fprintf(fp_v, "%% columns: %d\n", nh - nl + 1);
  for (i = nl; i <= nh; i++) {
    if (V[i] != 0)
      fprintf(fp_v, "%21.12e", V[i]);
    else
      fprintf(fp_v, "    0                ");
    fprintf(fp_v, "\n");
  }
  fclose(fp_v);
  return;
}
```