user: What is the c source code of the assembly code below?

```asm
<related>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x70(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <aaf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd -0x2c(%rbp),%xmm2
  movsd  D26(%rip),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0x28(%rbp),%xmm0
  jp     L175
  pxor   %xmm0,%xmm0
  ucomiss -0x28(%rbp),%xmm0
  jne    L175
  mov    $0x0,%eax
  jmp    L242
L175:
  movq   $0x0,-0x10(%rbp)
  jmp    L57
L133:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  je     L130
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x24(%rbp)
  addl   $0x1,-0x34(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L99
L38:
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  je     L6
  mov    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  imul   %eax,%edx
  mov    -0x10(%rbp),%rax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  imul   %eax,%edx
  mov    -0x8(%rbp),%rax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  je     L80
  pxor   %xmm1,%xmm1
  cvtss2sd -0x24(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd -0x18(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  movapd %xmm0,%xmm3
  addsd  %xmm0,%xmm3
  subsd  %xmm3,%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  movss  D57(%rip),%xmm0
  ucomiss -0x24(%rbp),%xmm0
  jp     L66
  movss  D57(%rip),%xmm0
  ucomiss -0x24(%rbp),%xmm0
  je     L43
L66:
  movss  D57(%rip),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L137
  movss  D57(%rip),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  je     L43
L137:
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L315
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  je     L43
L315:
  mov    $0x1,%eax
  jmp    L108
L43:
  mov    $0x0,%eax
L108:
  movslq %eax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x60(%rbp),%rax
  add    %rsi,%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  jmp    L154
L80:
  movss  -0x24(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  movsd  D26(%rip),%xmm0
  addsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd -0x24(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  D26(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L154:
  movss  -0x30(%rbp),%xmm0
  divss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L120
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jne    L120
  pxor   %xmm0,%xmm0
  ucomiss -0x24(%rbp),%xmm0
  jp     L0
  pxor   %xmm0,%xmm0
  ucomiss -0x24(%rbp),%xmm0
  je     L120
L0:
  movss  -0x14(%rbp),%xmm0
  comiss D32(%rip),%xmm0
  jbe    L120
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  jmp    L40
L120:
  movss  -0x14(%rbp),%xmm0
  comiss D32(%rip),%xmm0
  jbe    L40
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L82
  movss  -0x24(%rbp),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jne    L82
  movss  D57(%rip),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  jp     L30
  movss  D57(%rip),%xmm0
  ucomiss -0x18(%rbp),%xmm0
  je     L82
L30:
  mov    $0x1,%eax
  jmp    L169
L82:
  mov    $0x0,%eax
L169:
  movslq %eax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x68(%rbp),%rax
  add    %rsi,%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
L40:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x14(%rbp),%xmm0
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  jmp    L256
L6:
  nop
L256:
  addq   $0x1,-0x8(%rbp)
L99:
  mov    -0x8(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jb     L38
  jmp    L195
L130:
  nop
L195:
  addq   $0x1,-0x10(%rbp)
L57:
  mov    -0x10(%rbp),%rax
  cmp    -0x70(%rbp),%rax
  jb     L133
  mov    -0x34(%rbp),%eax
L242:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D26
data_type: f64
name: unpack_data
arguments: tag: D57
data_type: byte[4]
name: unpack_data
arguments: tag: D32
data_type: f32

tool: D26: 1

tool: {"D57": [0x00,0x00,0x80,0x3f]}

tool: D32: 2.5

assistant: ```c
int related(int *gt_types, double *asum, int32_t *N, int32_t *ibs0, int32_t *ibs2, int32_t n_samples) {
  int idx, uidx, n_used = 0;
  int32_t j, k;
  float pi = aaf(gt_types, n_samples);
  float numer, val;
  float gtj, gtk;
  float denom = 2.0 * pi * (1.0 - pi);
  if (denom == 0) {
    return 0;
  }
  for (j = 0; j < n_samples; j++) {
    if (gt_types[j] == 3) {
      continue;
    }
    gtj = gt_types[j];
    n_used++;
    for (k = j; k < n_samples; k++) {
      if (gt_types[k] == 3) {
        continue;
      }
      uidx = j + k * n_samples;
      idx = j * n_samples + k;
      gtk = gt_types[k];
      if (j != k) {
        numer = (gtj - 2.0 * pi) * (gtk - 2.0 * pi);
        ibs0[idx] += (gtj != 1 && gtk != 1 && gtj != gtk);
      } else {
        numer = (gtj * gtj) - (1.0 + 2.0 * pi) * gtj + 2.0 * pi * pi;
        asum[idx] += 1;
      }
      val = numer / denom;
      if (gtj == gtk && gtj != 0 && val > 2.5) {
        ibs2[uidx] += 1;
      } else if (val > 2.5) {
        ibs2[idx] += (gtj == gtk && gtk != 1);
      }
      asum[idx] += val;
      N[idx] += 1;
    }
  }
  return n_used;
}
```