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

```asm
<save_matrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r15
  mov    %edx,0x18(%rsp)
  mov    %ecx,%r13d
  mov    %r8d,0xc(%rsp)
  mov    %r9d,%r14d
  mov    0x78(%rsp),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmpl   $0x0,0x70(%rsp)
  je     L79
  mov    %r9d,%eax
  sub    %r8d,%eax
  add    $0x1,%eax
  mov    %eax,0x10(%rsp)
  mov    %ecx,%eax
  sub    %edx,%eax
  add    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L200
  lea    0x24(%rsp),%rbp
  mov    %rbp,%rdi
  call   <time@plt>
  mov    %rbp,%rdi
  call   <ctime@plt>
  mov    %rax,%rcx
  mov    %rbx,%rdx
  lea    D53(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  lea    D20(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x10(%rsp),%edx
  lea    D114(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x1c(%rsp),%edx
  lea    D100(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0xc(%rsp),%eax
  cmp    %eax,%r14d
  jl     L34
  movslq %eax,%rbp
  shl    $0x2,%rbp
  jmp    L41
L79:
  mov    %ecx,%eax
  sub    0x18(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x10(%rsp)
  mov    %r9d,%eax
  sub    0xc(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L200
  lea    0x24(%rsp),%rbp
  mov    %rbp,%rdi
  call   <time@plt>
  mov    %rbp,%rdi
  call   <ctime@plt>
  mov    %rax,%rcx
  mov    %rbx,%rdx
  lea    D53(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  lea    D20(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x10(%rsp),%edx
  lea    D114(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x1c(%rsp),%edx
  lea    D100(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x18(%rsp),%eax
  cmp    %eax,%r13d
  jl     L34
  cltq
  lea    (%r15,%rax,8),%r15
  movslq 0xc(%rsp),%rax
  shl    $0x2,%rax
  mov    %rax,0x10(%rsp)
  jmp    L143
L200:
  mov    %rbx,%rsi
  lea    D129(%rip),%rdi
  call   <printf@plt>
  mov    $0x3f5,%edi
  call   <exit@plt>
L142:
  cvtss2sd %xmm0,%xmm0
  lea    D91(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
L173:
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jl     L172
L134:
  mov    (%r15,%rbx,8),%rax
  movss  (%rax,%rbp,1),%xmm0
  ucomiss D19(%rip),%xmm0
  jp     L142
  jne    L142
  mov    %r12,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  lea    D48(%rip),%rdi
  call   <fwrite@plt>
  jmp    L173
L172:
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  add    $0x4,%rbp
  cmp    %eax,%r14d
  jl     L34
L41:
  mov    0x18(%rsp),%eax
  movslq %eax,%rbx
  cmp    %eax,%r13d
  jge    L134
  jmp    L172
L63:
  cvtss2sd %xmm0,%xmm0
  lea    D91(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
L23:
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,%r14d
  jl     L33
L133:
  mov    (%r15),%rax
  movss  (%rax,%rbp,1),%xmm0
  ucomiss D19(%rip),%xmm0
  jp     L63
  jne    L63
  mov    %r12,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  lea    D48(%rip),%rdi
  call   <fwrite@plt>
  jmp    L23
L33:
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  add    $0x8,%r15
  cmp    %eax,%r13d
  jl     L34
L143:
  mov    0x10(%rsp),%rbp
  mov    0xc(%rsp),%eax
  mov    %eax,%ebx
  cmp    %eax,%r14d
  jge    L133
  jmp    L33
L34:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D53
type_guessed: string
name: read_data
arguments: label: D20
type_guessed: string
name: read_data
arguments: label: D114
type_guessed: string
name: read_data
arguments: label: D100
type_guessed: string
name: read_data
arguments: label: D129
type_guessed: string
name: read_data
arguments: label: D91
type_guessed: string
name: read_data
arguments: label: D19
type_guessed: byte[4]
name: read_data
arguments: label: D48
type_guessed: string

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

tool: D20: %% type: matrix 


tool: D114: %% rows: %d


tool: D100: %% columns: %d


tool: D129:  error: cannot open file: %s 


tool: D91: %15.6e

tool: {"D19": [0x00,0x00,0x00,0x00]}

tool: D48:     0          

assistant: ```c
void save_matrix(char filename[], float **A, int ml, int mh, int nl, int nh, int transpose, const char *mode) {
  FILE *fp_m;
  int i, j, rows, cols;
  void exit();
  time_t now;
  if (transpose)
    rows = nh - nl + 1;
  else
    rows = mh - ml + 1;
  if (transpose)
    cols = mh - ml + 1;
  else
    cols = nh - nl + 1;
  if ((fp_m = fopen(filename, mode)) == NULL) {
    printf(" error: cannot open file: %s \n", filename);
    exit(1013);
  }
  (void)time(&now);
  fprintf(fp_m, "%% filename: %s - %s", filename, ctime(&now));
  fprintf(fp_m, "%% type: matrix \n");
  fprintf(fp_m, "%% rows: %d\n", rows);
  fprintf(fp_m, "%% columns: %d\n", cols);
  if (transpose) {
    for (j = nl; j <= nh; j++) {
      for (i = ml; i <= mh; i++) {
        if (A[i][j] != 0)
          fprintf(fp_m, "%15.6e", A[i][j]);
        else
          fprintf(fp_m, "    0          ");
      }
      fprintf(fp_m, "\n");
    }
  } else {
    for (i = ml; i <= mh; i++) {
      for (j = nl; j <= nh; j++) {
        if (A[i][j] != 0)
          fprintf(fp_m, "%15.6e", A[i][j]);
        else
          fprintf(fp_m, "    0          ");
      }
      fprintf(fp_m, "\n");
    }
  }
  fclose(fp_m);
  return;
}
```