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

```asm
<inconsistency_calculation_alt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %ecx,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x84(%rbp),%xmm0
  movsd  D4(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  mov    -0x84(%rbp),%eax
  cltq
  shr    $0x3,%rax
  test   %rax,%rax
  js     L117
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L164
L117:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L164:
  ucomisd %xmm0,%xmm1
  jp     L27
  ucomisd %xmm0,%xmm1
  jne    L27
  mov    -0x84(%rbp),%eax
  cltq
  shr    $0x3,%rax
  jmp    L29
L27:
  mov    -0x84(%rbp),%eax
  cltq
  shr    $0x3,%rax
  add    $0x1,%eax
L29:
  mov    %eax,-0x58(%rbp)
  movl   $0x0,-0x60(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x64(%rbp)
  jmp    L151
L196:
  movl   $0x0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x5c(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x28(%rbp),%rdx
  mov    %rdx,%rcx
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    %rcx,%rdi
  call   <memset@plt>
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rcx
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    %rcx,%rdi
  call   <memset@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x64(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x0,-0x60(%rbp)
  jmp    L139
L15:
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x88(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x60(%rbp)
  jge    L79
  mov    -0x50(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L21
  mov    -0x54(%rbp),%eax
  cltq
  shr    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x54(%rbp),%eax
  not    %eax
  and    $0x7,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L21
  mov    -0x54(%rbp),%eax
  cltq
  shr    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edi
  mov    -0x54(%rbp),%eax
  not    %eax
  and    $0x7,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edi
  mov    %edi,%ecx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%eax
  sub    -0x84(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L139
L21:
  mov    -0x4c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L79
  mov    -0x54(%rbp),%eax
  cltq
  shr    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x54(%rbp),%eax
  not    %eax
  and    $0x7,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L79
  mov    -0x54(%rbp),%eax
  cltq
  shr    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edi
  mov    -0x54(%rbp),%eax
  not    %eax
  and    $0x7,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edi
  mov    %edi,%ecx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4c(%rbp),%eax
  sub    -0x84(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L139
L79:
  addl   $0x1,-0x5c(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  subl   $0x1,-0x60(%rbp)
L139:
  cmpl   $0x0,-0x60(%rbp)
  jns    L15
  mov    -0x64(%rbp),%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x5c(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  mov    -0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x5c(%rbp)
  jg     L190
  movsd  -0x40(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x5c(%rbp),%xmm1
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L179
L190:
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x5c(%rbp),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0x5c(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L179:
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L172
  mov    D12(%rip),%rax
  jmp    L202
L172:
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%rax
L202:
  mov    -0x18(%rbp),%rdx
  lea    0x8(%rdx),%rbx
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L65
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L65:
  addl   $0x1,-0x64(%rbp)
L151:
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x64(%rbp)
  jl     L196
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type: f32[2]
name: unpack_data
arguments: data_tag: D12
type: f32[2]

tool: {"D4": [0.0,2.5]}

tool: {"D12": [0.0,0.0]}

assistant: ```c
void inconsistency_calculation_alt(const double *Z, double *R, int n, int d) {
  int *curNode;
  int ndid, lid, rid, i, k;
  unsigned char *lvisited, *rvisited;
  const double *Zrow;
  double *Rrow;
  double levelSum, levelStdSum;
  int levelCnt;
  const int bff = (((((double)(n)) / (double)(sizeof(unsigned char) * 8)) == ((double)(((n)) / ((sizeof(unsigned char) * 8)))) ? (((n)) / ((sizeof(unsigned char) * 8))) : (((n)) / ((sizeof(unsigned char) * 8)) + 1)));
  k = 0;
  curNode = (int *)malloc(n * sizeof(int));
  lvisited = (unsigned char *)malloc(bff);
  rvisited = (unsigned char *)malloc(bff);
  for (i = 0; i < n - 1; i++) {
    k = 0;
    levelSum = 0.0;
    levelCnt = 0;
    levelStdSum = 0.0;
    bzero(lvisited, bff);
    bzero(rvisited, bff);
    curNode[0] = i;
    for (k = 0; k >= 0;) {
      ndid = curNode[k];
      Zrow = Z + ((ndid)*4);
      lid = (int)Zrow[0];
      rid = (int)Zrow[1];
      if (k < d - 1) {
        if (lid >= n && !(((lvisited)[(ndid) / (sizeof(unsigned char) * 8)] >> (((sizeof(unsigned char) * 8) - 1) - ((ndid) % (sizeof(unsigned char) * 8)))) & 0x1)) {
          ((lvisited)[(ndid) / (sizeof(unsigned char) * 8)] |= ((0x1) << (((sizeof(unsigned char) * 8) - 1) - ((ndid) % (sizeof(unsigned char) * 8)))));
          k++;
          curNode[k] = lid - n;
          continue;
        }
        if (rid >= n && !(((rvisited)[(ndid) / (sizeof(unsigned char) * 8)] >> (((sizeof(unsigned char) * 8) - 1) - ((ndid) % (sizeof(unsigned char) * 8)))) & 0x1)) {
          ((rvisited)[(ndid) / (sizeof(unsigned char) * 8)] |= ((0x1) << (((sizeof(unsigned char) * 8) - 1) - ((ndid) % (sizeof(unsigned char) * 8)))));
          k++;
          curNode[k] = rid - n;
          continue;
        }
      }
      levelCnt++;
      levelSum += Zrow[2];
      levelStdSum += Zrow[2] * Zrow[2];
      k--;
    }
    Rrow = R + (4 * i);
    Rrow[2] = (double)levelCnt;
    Rrow[0] = levelSum / levelCnt;
    if (levelCnt < 2) {
      Rrow[1] = (levelStdSum - (levelSum * levelSum)) / levelCnt;
    } else {
      Rrow[1] = (levelStdSum - ((levelSum * levelSum) / levelCnt)) / (levelCnt - 1);
    }
    Rrow[1] = sqrt(((0 > Rrow[1]) ? (0) : (Rrow[1])));
    if (Rrow[1] > 0) {
      Rrow[3] = (Zrow[2] - Rrow[0]) / Rrow[1];
    }
  }
  free(curNode);
  free(lvisited);
  free(rvisited);
}
```