user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<SNPHWE_pValue>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    -0x48(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x44(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  add    %eax,%eax
  sub    -0x20(%rbp),%eax
  imul   -0x20(%rbp),%eax
  mov    -0x1c(%rbp),%edx
  lea    (%rdx,%rdx,1),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x38(%rbp)
  mov    -0x20(%rbp),%eax
  xor    -0x38(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L179
  addl   $0x1,-0x38(%rbp)
L179:
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x38(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    -0x34(%rbp),%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  D8(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L178
L122:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x34(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x34(%rbp),%xmm0
  movsd  D8(%rip),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x30(%rbp),%xmm2
  movsd  D8(%rip),%xmm1
  addsd  %xmm1,%xmm2
  movsd  D99(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  pxor   %xmm3,%xmm3
  cvtsi2sdl -0x2c(%rbp),%xmm3
  movsd  D8(%rip),%xmm1
  addsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x1,-0x30(%rbp)
  addl   $0x1,-0x2c(%rbp)
  subl   $0x2,-0x34(%rbp)
L178:
  cmpl   $0x1,-0x34(%rbp)
  jg     L122
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x38(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    -0x34(%rbp),%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L97
L100:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D99(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x34(%rbp),%xmm2
  movsd  D35(%rip),%xmm1
  addsd  %xmm1,%xmm2
  pxor   %xmm3,%xmm3
  cvtsi2sdl -0x34(%rbp),%xmm3
  movsd  D8(%rip),%xmm1
  addsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  subl   $0x1,-0x30(%rbp)
  subl   $0x1,-0x2c(%rbp)
  addl   $0x2,-0x34(%rbp)
L97:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x34(%rbp)
  jl     L100
  movl   $0x0,-0x3c(%rbp)
  jmp    L6
L15:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L6:
  mov    -0x3c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L15
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  cmpl   $0x1,-0x50(%rbp)
  jne    L116
  movl   $0x0,-0x3c(%rbp)
  jmp    L28
L141:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  comisd %xmm1,%xmm0
  ja     L68
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L173
L68:
  nop
L173:
  addl   $0x1,-0x3c(%rbp)
L28:
  mov    -0x3c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L141
  jmp    L71
L116:
  cmpl   $0x2,-0x50(%rbp)
  jne    L71
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L156
L41:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x3c(%rbp)
L156:
  mov    -0x3c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L41
L71:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movsd  -0x18(%rbp),%xmm0
  movsd  D8(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L165
  movsd  D8(%rip),%xmm0
  jmp    L60
L165:
  movsd  -0x18(%rbp),%xmm0
L60:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D8
type_guessed: f64
name: disassemble_data
arguments: data_tag: D99
type_guessed: f64
name: disassemble_data
arguments: data_tag: D35
type_guessed: f64

tool: D8: 1

tool: D99: 4

tool: D35: 2

assistant: ```c
double SNPHWE_pValue(int obs_hets, int obs_hom1, int obs_hom2, int ctype) {
  int i;
  double p_hwe;
  int obs_homc = (obs_hom1 < obs_hom2) ? obs_hom2 : obs_hom1;
  int obs_homr = (obs_hom1 < obs_hom2) ? obs_hom1 : obs_hom2;
  int rare_copies = 2 * obs_homr + obs_hets;
  int genotypes = obs_hets + obs_homc + obs_homr;
  double *het_probs = malloc((rare_copies + 1) * sizeof(double));
  int mid = rare_copies * (2 * genotypes - rare_copies) / (2 * genotypes);
  if ((rare_copies & 1) ^ (mid & 1)) {
    mid++;
  }
  int curr_hets = mid;
  int curr_homr = (rare_copies - mid) / 2;
  int curr_homc = genotypes - curr_hets - curr_homr;
  het_probs[mid] = 1.0;
  double sum = het_probs[mid];
  for (curr_hets = mid; curr_hets > 1; curr_hets -= 2) {
    het_probs[curr_hets - 2] = het_probs[curr_hets] * curr_hets * (curr_hets - 1.0) / (4.0 * (curr_homr + 1.0) * (curr_homc + 1.0));
    sum += het_probs[curr_hets - 2];
    curr_homr++;
    curr_homc++;
  }
  curr_hets = mid;
  curr_homr = (rare_copies - mid) / 2;
  curr_homc = genotypes - curr_hets - curr_homr;
  for (curr_hets = mid; curr_hets <= rare_copies - 2; curr_hets += 2) {
    het_probs[curr_hets + 2] = het_probs[curr_hets] * 4.0 * curr_homr * curr_homc / ((curr_hets + 2.0) * (curr_hets + 1.0));
    sum += het_probs[curr_hets + 2];
    curr_homr--;
    curr_homc--;
  }
  for (i = 0; i <= rare_copies; i++) {
    het_probs[i] /= sum;
  }
  p_hwe = 0.0;
  if (ctype == 1) {
    for (i = 0; i <= rare_copies; i++) {
      if (het_probs[i] > het_probs[obs_hets])
        continue;
      p_hwe += het_probs[i];
    }
  } else if (ctype == 2) {
    for (i = obs_hets; i <= rare_copies; i++) {
      p_hwe += het_probs[i];
    }
  }
  free(het_probs);
  return (p_hwe > 1.0) ? 1.0 : p_hwe;
}
```