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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  mov    $0x1,%r13d
  push   %r12
  mov    %edi,%r12d
  mov    $0x100,%edi
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  mov    $0x100,%edi
  mov    %rax,0x10(%rsp)
  call   <malloc@plt>
  mov    $0x100,%edi
  mov    %rax,0x18(%rsp)
  call   <malloc@plt>
  mov    0x8(%rbp),%r14
  lea    D8(%rip),%rsi
  mov    %rax,0x20(%rsp)
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %r14,%rdi
  lea    D40(%rip),%rsi
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r13d
  call   <strcmp@plt>
  lea    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  test   %eax,%eax
  mov    $0x2,%eax
  lea    0x18(%rsp),%rcx
  cmove  %eax,%r13d
  sub    $0x8,%rsp
  xor    %ebx,%ebx
  push   %r13
  lea    0x1c(%rsp),%rax
  push   %rax
  lea    0x1c(%rsp),%rax
  push   %rax
  lea    0x28(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%r9
  lea    0x50(%rsp),%r8
  call   <read_params@plt>
  mov    0x34(%rsp),%edi
  add    $0x30,%rsp
  mov    $0x8,%esi
  call   <calloc@plt>
  mov    0x18(%rsp),%rdi
  lea    D73(%rip),%rsi
  mov    %rax,%rbp
  call   <fopen@plt>
  mov    0x8(%rsp),%edi
  mov    $0x8,%esi
  mov    %rax,%r14
  call   <calloc@plt>
  mov    0x4(%rsp),%edx
  mov    %rax,%r12
  test   %edx,%edx
  jg     L76
  jmp    L63
  nopl   0x0(%rax,%rax,1)
L69:
  movq   $0x0,0x0(%rbp,%rbx,8)
L18:
  add    $0x1,%rbx
  cmp    %ebx,0x4(%rsp)
  jle    L63
L76:
  mov    0x8(%rsp),%edx
  mov    %r13d,%ecx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <get_geno@plt>
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L69
  movsd  D18(%rip),%xmm2
  comisd %xmm0,%xmm2
  jbe    L69
  mov    0xc(%rsp),%r8d
  mov    0x8(%rsp),%ecx
  mov    %r12,%rdi
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  call   <Fst_geno@plt>
  comisd D76(%rip),%xmm0
  ja     L69
  movsd  D45(%rip),%xmm3
  comisd %xmm0,%xmm3
  ja     L69
  movsd  %xmm0,0x0(%rbp,%rbx,8)
  jmp    L18
L63:
  mov    0x20(%rsp),%rdi
  cmpb   $0x0,(%rdi)
  jne    L110
  lea    D74(%rip),%rdi
  mov    %rdi,0x20(%rsp)
L110:
  lea    D5(%rip),%rsi
  xor    %ebx,%ebx
  lea    D79(%rip),%r13
  call   <fopen@plt>
  mov    %rax,%r12
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jle    L101
  cs nopw 0x0(%rax,%rax,1)
L51:
  movsd  0x0(%rbp,%rbx,8),%xmm0
  mov    %r13,%rsi
  mov    %r12,%rdi
  add    $0x1,%rbx
  call   <fprintf@plt>
  cmp    %ebx,0x4(%rsp)
  jg     L51
L101:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x40,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D8
type_guessed: string
name: retrieve_data
arguments: label: D40
type_guessed: string
name: retrieve_data
arguments: label: D73
type_guessed: string
name: retrieve_data
arguments: label: D18
type_guessed: byte[8]
name: retrieve_data
arguments: label: D76
type_guessed: f64[2]
name: retrieve_data
arguments: label: D45
type_guessed: byte[8]
name: retrieve_data
arguments: label: D74
type_guessed: string
name: retrieve_data
arguments: label: D5
type_guessed: string
name: retrieve_data
arguments: label: D79
type_guessed: string

tool: D8: HAPLO

tool: D40: DIPLO

tool: D73: r

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D76": [1.5,-0.5]}

tool: {"D45": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

tool: D74: Fsts

tool: D5: w

tool: D79: %g


assistant: ```c
int main(int argc, char *argv[]) {
  char *popfile = malloc(sizeof(char) * 256);
  char *genofile = malloc(sizeof(char) * 256);
  char *fstfile = malloc(sizeof(char) * 256);
  int nSNP, nIND, nPOP, ploidy = 2, snp = 0, i;
  int *POPs;
  int *PopSizes;
  double af;
  if (!(strcmp(argv[1], "HAPLO")))
    ploidy = 1;
  if (!(strcmp(argv[1], "DIPLO")))
    ploidy = 2;
  read_params(argc, argv, &popfile, &genofile, &fstfile, &POPs, &PopSizes, &nIND, &nSNP, &nPOP, ploidy);
  double *FstWC = calloc(nSNP, sizeof(double));
  double *Geno;
  FILE *MyGenoFile = fopen(genofile, "r");
  Geno = calloc(nIND, sizeof(double));
  for (snp = 0; snp < nSNP; snp++) {
    af = get_geno(MyGenoFile, Geno, nIND, ploidy);
    if (af > 0 && af < 1) {
      FstWC[snp] = Fst_geno(Geno, POPs, PopSizes, nIND, nPOP);
    } else {
      FstWC[snp] = 0;
    }
    if (FstWC[snp] > 1.5 || FstWC[snp] < -.5)
      FstWC[snp] = 0;
  }
  if (!strcmp(fstfile, ""))
    fstfile = "Fsts";
  FILE *MyFstFile = fopen(fstfile, "w");
  for (snp = 0; snp < nSNP; snp++)
    fprintf(MyFstFile, "%g\n", FstWC[snp]);
  free(FstWC);
  return 0;
}
```