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

```asm
<write_embedding_to_file>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rcx,%rdi
  sub    $0x28,%rsp
  mov    %esi,0x14(%rsp)
  lea    D10(%rip),%rsi
  mov    %edx,0x10(%rsp)
  mov    %r8,0x18(%rsp)
  call   <fopen@plt>
  mov    %rax,%r15
  test   %r14d,%r14d
  jle    L53
  movl   $0x0,0xc(%rsp)
  lea    D37(%rip),%r12
  nop
L172:
  mov    0x10(%rsp),%edx
  test   %edx,%edx
  jle    L40
  mov    0x10(%rsp),%edx
  mov    0x14(%rsp),%eax
  lea    -0x1(%rdx),%ebp
  sub    $0x1,%eax
  cmp    0xc(%rsp),%eax
  jne    L94
  movslq %edx,%r14
  xor    %r13d,%r13d
  nopw   0x0(%rax,%rax,1)
L23:
  mov    (%rbx),%rax
  mov    %r12,%rsi
  mov    %r15,%rdi
  movsd  (%rax,%r13,8),%xmm0
  mov    $0x1,%eax
  call   <fprintf@plt>
  cmp    %r13d,%ebp
  je     L135
  mov    %r15,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
L135:
  add    $0x1,%r13
  cmp    %r14,%r13
  jne    L23
L40:
  mov    0xc(%rsp),%eax
  add    $0x8,%rbx
  lea    0x1(%rax),%ebp
  cmp    %ebp,0x14(%rsp)
  je     L58
  mov    %ebp,0xc(%rsp)
  jmp    L172
  nopl   0x0(%rax,%rax,1)
L94:
  movslq 0x10(%rsp),%r14
  xor    %r13d,%r13d
  jmp    L67
  nopw   0x0(%rax,%rax,1)
L163:
  mov    $0x20,%edi
  call   <fputc@plt>
L136:
  add    $0x1,%r13
  cmp    %r14,%r13
  je     L40
L67:
  mov    (%rbx),%rax
  mov    %r12,%rsi
  mov    %r15,%rdi
  movsd  (%rax,%r13,8),%xmm0
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    %r15,%rsi
  cmp    %r13d,%ebp
  jne    L163
  mov    $0xa,%edi
  call   <fputc@plt>
  jmp    L136
  nopl   0x0(%rax,%rax,1)
L58:
  cmpq   $0x0,0x18(%rsp)
  je     L115
  mov    %r15,%rcx
  mov    $0x1f,%edx
  mov    $0x1,%esi
  lea    D59(%rip),%rdi
  call   <fwrite@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L160
  lea    D37(%rip),%r12
L148:
  movslq 0xc(%rsp),%r13
  nopl   (%rax)
L89:
  mov    0x18(%rsp),%rax
  mov    %r12,%rsi
  mov    %r15,%rdi
  movsd  (%rax,%r13,8),%xmm0
  mov    $0x1,%eax
  add    $0x1,%r13
  call   <fprintf@plt>
  cmp    %r13d,%ebp
  jg     L89
L115:
  add    $0x28,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <fclose@plt>
L160:
  mov    0x18(%rsp),%r14
  xor    %ebx,%ebx
  lea    D37(%rip),%r12
L26:
  movsd  (%r14),%xmm0
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  add    $0x8,%r14
  call   <fprintf@plt>
  mov    %r15,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %ebx,%eax
  add    $0x1,%ebx
  cmp    0xc(%rsp),%ebx
  jl     L26
  cmp    %eax,0xc(%rsp)
  jle    L115
  mov    %ebx,0xc(%rsp)
  jmp    L148
L53:
  cmpq   $0x0,0x18(%rsp)
  je     L115
  mov    %rax,%rcx
  mov    $0x1f,%edx
  mov    $0x1,%esi
  lea    D59(%rip),%rdi
  call   <fwrite@plt>
  jmp    L115
```

tool_calls: name: parse_data
arguments: data_label: D10
type_guessed: string
name: parse_data
arguments: data_label: D37
type_guessed: string
name: parse_data
arguments: data_label: D59
type_guessed: string

tool: D10: w

tool: D37: %f

tool: D59: 
## bias terms after this line


assistant: ```c
void write_embedding_to_file(double **X, int m, int n, char *filename, double *bias_terms) {
  FILE *fp = fopen(filename, "w");
  int i;
  int j;
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      fprintf(fp, "%f", X[i][j]);
      if (j != n - 1)
        fputc(' ', fp);
      else if (j == n - 1 && i != m - 1)
        fputc('\n', fp);
    }
  }
  if (bias_terms != 0) {
    fprintf(fp, "\n## bias terms after this line\n");
    for (i = 0; i < m; i++) {
      fprintf(fp, "%f", bias_terms[i]);
      if (i < m - 1)
        fputc('\n', fp);
    }
  }
  fclose(fp);
}
```