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

```asm
<fmprint>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  mov    $0x4,%edx
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  lea    D37(%rip),%rdi
  mov    %esi,0x4(%rsp)
  mov    $0x1,%esi
  call   <fwrite@plt>
  test   %r12d,%r12d
  jle    L105
  xor    %ebx,%ebx
  lea    D44(%rip),%rbp
  nopl   0x0(%rax)
L106:
  mov    %r15,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jne    L106
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x4(%rsp),%edx
  test   %edx,%edx
  jle    L98
L23:
  movl   $0x0,(%rsp)
  xor    %r13d,%r13d
  lea    D76(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L63:
  mov    %r15,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D12(%rip),%rdi
  call   <fwrite@plt>
  test   %r12d,%r12d
  jle    L41
  movslq (%rsp),%rsi
  mov    0x8(%rsp),%rdx
  lea    -0x1(%r12),%eax
  add    %rsi,%rax
  lea    (%rdx,%rsi,8),%r14
  lea    0x8(%rdx,%rax,8),%rbx
  nopl   0x0(%rax,%rax,1)
L48:
  movsd  (%r14),%xmm0
  mov    %rbp,%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  add    $0x8,%r14
  call   <fprintf@plt>
  cmp    %r14,%rbx
  jne    L48
L41:
  mov    %r15,%rsi
  mov    $0xa,%edi
  add    $0x1,%r13d
  call   <fputc@plt>
  add    %r12d,(%rsp)
  cmp    %r13d,0x4(%rsp)
  jg     L63
  mov    %r15,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  test   %r12d,%r12d
  jle    L35
  lea    D44(%rip),%rbp
L18:
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L4:
  mov    %r15,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jne    L4
L35:
  add    $0x18,%rsp
  mov    %r15,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  pop    %rbx
  lea    D74(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <fwrite@plt>
L105:
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jg     L23
  mov    %r15,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  jmp    L35
L98:
  mov    %r15,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  jmp    L18
```

tool_calls: name: parse_data
arguments: data_label: D37
data_type: string
name: parse_data
arguments: data_label: D44
data_type: string
name: parse_data
arguments: data_label: D76
data_type: string
name: parse_data
arguments: data_label: D12
data_type: string
name: parse_data
arguments: data_label: D19
data_type: string
name: parse_data
arguments: data_label: D74
data_type: string

tool: D37: 
  +

tool: D44: --------------+

tool: D76:  %12.4f |

tool: D12:   |

tool: D19:   +

tool: D74: 



assistant: ```c
void fmprint(double *matrix, int nrows, int ncols, FILE *file) {
  int i, j;
  fprintf(file, "\n  +");
  for (i = 0; i < ncols; i++) {
    fprintf(file, "--------------+");
  }
  fputs("\n", file);
  for (i = 0; i < nrows; i++) {
    fprintf(file, "  |");
    for (j = 0; j < ncols; j++) {
      fprintf(file, " %12.4f |", matrix[((i) * (ncols) + (j))]);
    }
    fputs("\n", file);
  }
  fprintf(file, "  +");
  for (i = 0; i < ncols; i++) {
    fprintf(file, "--------------+");
  }
  fputs("\n\n", file);
}
```