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

```asm
<write_embedding_to_file>:
  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    %r8,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L77
L49:
  movl   $0x0,-0xc(%rbp)
  jmp    L63
L88:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D17(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  je     L47
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
  jmp    L5
L47:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jne    L5
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  je     L5
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
L5:
  addl   $0x1,-0xc(%rbp)
L63:
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L88
  addl   $0x1,-0x10(%rbp)
L77:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L49
  cmpq   $0x0,-0x30(%rbp)
  je     L118
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x1f,%edx
  mov    $0x1,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x10(%rbp)
  jmp    L111
L29:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D17(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  jge    L4
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
L4:
  addl   $0x1,-0x10(%rbp)
L111:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L29
L118:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D11
datatype: string
name: parse_data
arguments: data_tag: D17
datatype: string
name: parse_data
arguments: data_tag: D38
datatype: string

tool: D11: w

tool: D17: %f

tool: D38: 
## 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);
}
```