user: 请将以下的汇编代码转换成C语言代码：

```asm
<shpCreatePrj>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  movsd  %xmm0,-0x48(%rbp)
  movsd  %xmm1,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D13(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fileAllocNewExten@plt>
  test   %rax,%rax
  je     L45
  mov    $0xffffffff,%eax
  jmp    L31
L45:
  mov    -0x20(%rbp),%rax
  lea    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L29
  mov    -0x20(%rbp),%rax
  mov    %rax,%r8
  lea    D2(%rip),%rax
  mov    %rax,%rcx
  mov    $0xbd,%edx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    $0x3,%edi
  call   <myWarn_Loc@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xfffffffe,%eax
  jmp    L31
L29:
  movsd  -0x48(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x50(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x48(%rbp),%rsi
  mov    -0x40(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  mov    %rdi,%r8
  lea    D23(%rip),%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L31:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D13
data_type: string
name: extract_symbolic_data
arguments: tag: D10
data_type: string
name: extract_symbolic_data
arguments: tag: D2
data_type: string
name: extract_symbolic_data
arguments: tag: D7
data_type: string
name: extract_symbolic_data
arguments: tag: D23
data_type: string

tool: D13: .prj

tool: D10: wb

tool: D2: Problems opening %s for write.


tool: D7: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/brianmckenna/rex2nc/refs/heads/master/src/libaat/shpfile.c

tool: D23: GEOGCS["%s",DATUM["%s",SPHEROID["%s",%.1f,%.13f]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

assistant: ```c
int shpCreatePrj(const char *Filename, const char *gcs, const char *datum, const char *spheroid, double A, double B) {
  char *filename;
  FILE *fp;
  double invFlat;
  if (fileAllocNewExten(Filename, ".prj", &filename) != 0) {
    return -1;
  }
  if ((fp = fopen(filename, "wb")) == NULL) {
    myWarn_Loc(3, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/brianmckenna/rex2nc/refs/heads/master/src/libaat/shpfile.c", 189, "Problems opening %s for write.\n", filename);
    free(filename);
    return -2;
  }
  invFlat = A / (A - B);
  fprintf(fp,
          "GEOGCS[\"%s\",DATUM[\"%s\",SPHEROID[\"%s\",%.1f,%.13f]],"
          "PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]",
          gcs, datum, spheroid, A, invFlat);
  fclose(fp);
  free(filename);
  return 0;
}
```