user: Demonstrate the C code that generates the assembly output below:

```asm
<related>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%rbx
  mov    %rcx,%r13
  mov    %r8,%r14
  mov    %r9,%rbp
  mov    %r9,%rsi
  call   <aaf@plt>
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm0,%xmm6
  movapd %xmm6,%xmm2
  addsd  %xmm6,%xmm2
  movsd  D39(%rip),%xmm4
  subsd  %xmm6,%xmm4
  mulsd  %xmm2,%xmm4
  cvtsd2ss %xmm4,%xmm4
  ucomiss D39(%rip),%xmm4
  jp     L140
  movl   $0x0,0x1c(%rsp)
  je     L27
L140:
  test   %rbp,%rbp
  je     L46
  mov    %ebp,0x10(%rsp)
  lea    0x1(%rbp),%eax
  mov    %eax,0x18(%rsp)
  mov    $0x0,%r10d
  movl   $0x0,0x14(%rsp)
  mov    $0x0,%r9d
  movl   $0x0,0x1c(%rsp)
  mov    $0x0,%r11d
  pxor   %xmm5,%xmm5
  movss  D40(%rip),%xmm8
  movsd  D39(%rip),%xmm7
  movaps %xmm8,%xmm3
  jmp    L56
L129:
  movaps %xmm1,%xmm0
  mulss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  movapd %xmm2,%xmm10
  addsd  %xmm7,%xmm10
  pxor   %xmm11,%xmm11
  cvtss2sd %xmm1,%xmm11
  mulsd  %xmm11,%xmm10
  subsd  %xmm10,%xmm0
  movapd %xmm6,%xmm10
  mulsd  %xmm2,%xmm10
  addsd  %xmm10,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movslq %eax,%rdx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rdx,8),%rdx
  movapd %xmm7,%xmm10
  addsd  (%rdx),%xmm10
  movsd  %xmm10,(%rdx)
  jmp    L36
L70:
  comiss D34(%rip),%xmm0
  jbe    L95
  movslq %eax,%r15
  ucomiss %xmm8,%xmm9
  setp   %sil
  cmovne %edi,%esi
  and    %edx,%esi
  movzbl %sil,%esi
  add    %rsi,(%r14,%r15,8)
L95:
  cltq
  shl    $0x3,%rax
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rax,1),%rdx
  cvtss2sd %xmm0,%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  addq   $0x1,(%rbx,%rax,1)
L21:
  add    $0x1,%rcx
  add    0x10(%rsp),%r8d
  cmp    %rcx,%rbp
  je     L142
L5:
  mov    (%r12,%rcx,4),%edx
  cmp    $0x3,%edx
  je     L21
  lea    (%r10,%rcx,1),%eax
  pxor   %xmm9,%xmm9
  cvtsi2ss %edx,%xmm9
  cmp    %rcx,%r9
  je     L129
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  subsd  %xmm2,%xmm0
  pxor   %xmm10,%xmm10
  cvtss2sd %xmm9,%xmm10
  subsd  %xmm2,%xmm10
  mulsd  %xmm10,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movslq %eax,%r15
  ucomiss %xmm3,%xmm9
  setp   %sil
  cmovne %edi,%esi
  ucomiss %xmm9,%xmm1
  setp   %dl
  cmovne %edi,%edx
  and    %edx,%esi
  ucomiss %xmm3,%xmm1
  setp   %dl
  cmovne %edi,%edx
  and    %esi,%edx
  movzbl %dl,%edx
  add    %rdx,0x0(%r13,%r15,8)
L36:
  divss  %xmm4,%xmm0
  ucomiss %xmm9,%xmm1
  setnp  %dl
  cmovne %r11d,%edx
  ucomiss %xmm5,%xmm1
  setp   %sil
  cmovne %edi,%esi
  test   %sil,%sil
  je     L70
  test   %dl,%dl
  je     L70
  comiss D34(%rip),%xmm0
  jbe    L70
  movslq %r8d,%rdx
  addq   $0x1,(%r14,%rdx,8)
  jmp    L95
L142:
  add    $0x1,%r9
  mov    0x18(%rsp),%edi
  add    %edi,0x14(%rsp)
  add    0x10(%rsp),%r10d
  cmp    %r9,%rbp
  je     L27
L56:
  mov    (%r12,%r9,4),%eax
  cmp    $0x3,%eax
  je     L142
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  addl   $0x1,0x1c(%rsp)
  cmp    %r9,%rbp
  jbe    L142
  mov    0x14(%rsp),%r8d
  mov    %r9,%rcx
  mov    $0x1,%edi
  jmp    L5
L46:
  movl   $0x0,0x1c(%rsp)
L27:
  mov    0x1c(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D39
type: f64
name: disassemble_data
arguments: tag: D40
type: byte[4]
name: disassemble_data
arguments: tag: D34
type: f32

tool: D39: 1

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

tool: D34: 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;
}
```