user: 请从给定的汇编指令推导出C源代码:

```asm
<fmprint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L15
L44:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  addl   $0x1,-0x8(%rbp)
L15:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L44
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L45
L77:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L66
L7:
  mov    -0x8(%rbp),%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  addl   $0x1,-0x4(%rbp)
L66:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L7
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,-0x8(%rbp)
L45:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L77
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L59
L47:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0xf,%edx
  mov    $0x1,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  addl   $0x1,-0x8(%rbp)
L59:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L47
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D56
data_type: string
name: disassemble_data
arguments: tag: D0
data_type: string
name: disassemble_data
arguments: tag: D7
data_type: string
name: disassemble_data
arguments: tag: D27
data_type: string
name: disassemble_data
arguments: tag: D35
data_type: string
name: disassemble_data
arguments: tag: D43
data_type: string

tool: D56: 
  +

tool: D0: --------------+

tool: D7:   |

tool: D27:  %12.4f |

tool: D35:   +

tool: D43: 



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