user: Translate the below assembly code into C programming language:

```asm
<save_dvector>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  mov    %r8,%rsi
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  push   %rbx
  movslq %edx,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L10
L50:
  lea    0x4(%rsp),%r15
  mov    %r15,%rdi
  call   <time@plt>
  mov    %r15,%rdi
  call   <ctime@plt>
  mov    %r14,%rdx
  lea    D53(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rax,%rcx
  xor    %eax,%eax
  call   <fprintf@plt>
  lea    D50(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    $0x1,%edx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D58(%rip),%rsi
  call   <fprintf@plt>
  mov    %r12d,%edx
  xor    %eax,%eax
  mov    %rbp,%rdi
  sub    %ebx,%edx
  lea    D30(%rip),%rsi
  add    $0x1,%edx
  call   <fprintf@plt>
  cmp    %ebx,%r12d
  jl     L19
  lea    D24(%rip),%r15
  lea    D33(%rip),%r14
  jmp    L44
  nopl   0x0(%rax,%rax,1)
L42:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
L59:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  add    $0x1,%rbx
  call   <fputc@plt>
  cmp    %ebx,%r12d
  jl     L19
L44:
  movsd  0x0(%r13,%rbx,8),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L42
  jne    L42
  mov    %rbp,%rcx
  mov    $0x15,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  jmp    L59
  nopl   0x0(%rax,%rax,1)
L19:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L10:
  mov    %r14,%rsi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    $0x3f3,%edi
  call   <exit@plt>
  jmp    L50
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D53
datatype: string
name: unpack_data
arguments: data_tag: D50
datatype: string
name: unpack_data
arguments: data_tag: D58
datatype: string
name: unpack_data
arguments: data_tag: D30
datatype: string
name: unpack_data
arguments: data_tag: D24
datatype: string
name: unpack_data
arguments: data_tag: D33
datatype: string
name: unpack_data
arguments: data_tag: D18
datatype: string

tool: D53: %% filename: %s - %s

tool: D50: %% type: vector


tool: D58: %% rows: %d


tool: D30: %% columns: %d


tool: D24: %21.12e

tool: D33:     0                

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


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;
}
```