user: Converte this assembly snippet into its equivalent C code:

```asm
<cvJacobiEigens_64d>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdi,0xb0(%rsp)
  mov    %rsi,0xb8(%rsp)
  mov    %rdx,0xd8(%rsp)
  mov    %ecx,0x74(%rsp)
  movq   %xmm0,%rbx
  movsd  D76(%rip),%xmm0
  movq   %rbx,%xmm3
  comisd %xmm3,%xmm0
  jbe    L171
  movq   %xmm0,%rbx
L171:
  mov    0x74(%rsp),%ebp
  pxor   %xmm3,%xmm3
  cvtsi2sd %ebp,%xmm3
  movsd  %xmm3,0xd0(%rsp)
  test   %ebp,%ebp
  jle    L357
  movslq %ebp,%rdi
  shl    $0x3,%rdi
  lea    0x8(%rdi),%r11
  mov    0xb8(%rsp),%r8
  mov    %r8,%r10
  lea    -0x1(%rbp),%eax
  lea    0x8(%r8,%rax,8),%rcx
  mov    0xb0(%rsp),%r9
  lea    0x8(%r9,%rdi,1),%rdx
  mov    $0x0,%esi
  pxor   %xmm0,%xmm0
  movsd  D0(%rip),%xmm2
  jmp    L39
L346:
  mov    %r9,%rax
L96:
  movsd  (%rax),%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L96
L40:
  add    %r11,%r10
  add    %rdi,%rcx
  add    %r11,%rdx
L39:
  mov    %r8,%rax
L284:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L284
  movsd  %xmm2,(%r10)
  add    $0x1,%esi
  add    %rdi,%r8
  add    %rdi,%r9
  cmp    %esi,%ebp
  je     L117
  test   %esi,%esi
  jg     L346
  jmp    L40
L117:
  addsd  %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L187
L144:
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,0x38(%rsp)
L353:
  movq   %rbx,%xmm0
  movsd  0x38(%rsp),%xmm4
  mulsd  %xmm4,%xmm0
  movapd %xmm0,%xmm3
  divsd  0xd0(%rsp),%xmm3
  movsd  %xmm3,0xe0(%rsp)
  comisd %xmm3,%xmm4
  ja     L211
L129:
  mov    0x74(%rsp),%edi
  test   %edi,%edi
  jle    L175
  movslq %edi,%rax
  lea    0x8(,%rax,8),%rsi
  mov    0xb0(%rsp),%rax
  mov    0xd8(%rsp),%rbx
  mov    %rbx,%rdx
  lea    -0x1(%rdi),%ecx
  lea    0x8(%rbx,%rcx,8),%rcx
L147:
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  add    %rsi,%rax
  add    $0x8,%rdx
  cmp    %rdx,%rcx
  jne    L147
L175:
  mov    $0x0,%eax
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L357:
  pxor   %xmm0,%xmm0
  jmp    L144
L187:
  call   <sqrt@plt>
  movsd  %xmm0,0x38(%rsp)
  jmp    L353
L211:
  movslq 0x74(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  add    $0x8,%rax
  mov    %rax,0x28(%rsp)
  mov    0xb0(%rsp),%rdi
  add    %rax,%rdi
  mov    %rdi,0xe8(%rsp)
L303:
  movsd  0x38(%rsp),%xmm3
  divsd  0xd0(%rsp),%xmm3
  movsd  %xmm3,0x38(%rsp)
L392:
  mov    0x74(%rsp),%eax
  cmp    $0x1,%eax
  jle    L244
  sub    $0x2,%eax
  mov    %eax,0xcc(%rsp)
  mov    %eax,%eax
  mov    %rax,0xc0(%rsp)
  mov    0x8(%rsp),%rax
  mov    %rax,0xa0(%rsp)
  mov    0xb0(%rsp),%rax
  mov    %rax,0x78(%rsp)
  mov    0xe8(%rsp),%rax
  mov    %rax,0xa8(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0x40(%rsp)
  mov    $0x0,%edx
  jmp    L31
L329:
  call   <sqrt@plt>
  jmp    L401
L274:
  movsd  D0(%rip),%xmm0
  movsd  (%rsp),%xmm4
  movapd %xmm4,%xmm1
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L55
  sqrtsd %xmm0,%xmm0
L68:
  addsd  D0(%rip),%xmm0
  addsd  %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L241
  sqrtsd %xmm0,%xmm0
L390:
  movsd  (%rsp),%xmm3
  divsd  %xmm0,%xmm3
  movsd  %xmm3,(%rsp)
  mulsd  %xmm3,%xmm3
  movsd  %xmm3,0x58(%rsp)
  movsd  D0(%rip),%xmm0
  subsd  %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L137
  sqrtsd %xmm0,%xmm0
L74:
  movapd %xmm0,%xmm4
  mulsd  %xmm0,%xmm4
  movsd  0x18(%rsp),%xmm1
  addsd  %xmm1,%xmm1
  movapd %xmm1,%xmm3
  mulsd  %xmm0,%xmm3
  mulsd  (%rsp),%xmm3
  cmpl   $0x0,0x40(%rsp)
  jle    L223
  mov    0x90(%rsp),%rdx
  mov    $0x0,%eax
  mov    0x88(%rsp),%rcx
L165:
  movsd  (%rdx),%xmm6
  mov    %rdx,%rsi
  sub    0x10(%rsp),%rsi
  movsd  (%rsi,%rbx,1),%xmm2
  movsd  (%r15,%rax,8),%xmm5
  movsd  (%r14,%rax,8),%xmm1
  movapd %xmm6,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  (%rsp),%xmm9
  movapd %xmm9,%xmm8
  mulsd  %xmm2,%xmm8
  subsd  %xmm8,%xmm7
  movsd  %xmm7,(%rdx)
  mulsd  %xmm0,%xmm2
  mulsd  %xmm9,%xmm6
  addsd  %xmm6,%xmm2
  movsd  %xmm2,(%rsi,%rbx,1)
  movapd %xmm5,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm9,%xmm6
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  mulsd  %xmm0,%xmm1
  mulsd  %xmm9,%xmm5
  addsd  %xmm5,%xmm1
  movsd  %xmm1,(%r14,%rax,8)
  mov    %rax,%rsi
  add    $0x1,%rax
  add    0x8(%rsp),%rdx
  cmp    %rcx,%rsi
  jne    L165
  mov    0x80(%rsp),%rdx
  mov    0xc8(%rsp),%eax
L375:
  mov    %r12d,%ecx
  cmp    %r12d,%eax
  jge    L199
  cltq
  add    %rbx,%rdx
L24:
  movsd  0x0(%rbp,%rax,8),%xmm6
  movsd  (%rdx),%xmm2
  movsd  (%r15,%rax,8),%xmm5
  movsd  (%r14,%rax,8),%xmm1
  movapd %xmm6,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  (%rsp),%xmm10
  movapd %xmm10,%xmm8
  mulsd  %xmm2,%xmm8
  subsd  %xmm8,%xmm7
  movsd  %xmm7,0x0(%rbp,%rax,8)
  mulsd  %xmm0,%xmm2
  mulsd  %xmm10,%xmm6
  addsd  %xmm6,%xmm2
  movsd  %xmm2,(%rdx)
  movapd %xmm5,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm10,%xmm6
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  mulsd  %xmm0,%xmm1
  mulsd  %xmm10,%xmm5
  addsd  %xmm5,%xmm1
  movsd  %xmm1,(%r14,%rax,8)
  add    $0x1,%rax
  add    0x8(%rsp),%rdx
  cmp    %eax,%ecx
  jg     L24
  mov    %r12d,%eax
L199:
  mov    0x74(%rsp),%edx
  cmp    %eax,%edx
  jle    L190
  cltq
L157:
  movsd  0x0(%rbp,%rax,8),%xmm6
  movsd  0x0(%r13,%rax,8),%xmm2
  movsd  (%r15,%rax,8),%xmm5
  movsd  (%r14,%rax,8),%xmm1
  movapd %xmm6,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  (%rsp),%xmm11
  movapd %xmm11,%xmm8
  mulsd  %xmm2,%xmm8
  subsd  %xmm8,%xmm7
  movsd  %xmm7,0x0(%rbp,%rax,8)
  mulsd  %xmm0,%xmm2
  mulsd  %xmm11,%xmm6
  addsd  %xmm6,%xmm2
  movsd  %xmm2,0x0(%r13,%rax,8)
  movapd %xmm5,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm11,%xmm6
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  mulsd  %xmm0,%xmm1
  mulsd  %xmm11,%xmm5
  addsd  %xmm5,%xmm1
  movsd  %xmm1,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L157
L190:
  movsd  0x48(%rsp),%xmm5
  movapd %xmm5,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  0x50(%rsp),%xmm6
  movapd %xmm6,%xmm1
  movsd  0x58(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  subsd  %xmm3,%xmm0
  mov    0x68(%rsp),%rax
  movsd  %xmm0,(%rax)
  mulsd  %xmm2,%xmm5
  movapd %xmm5,%xmm0
  movapd %xmm6,%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mov    0x60(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0x10(%rsp),%rax
  movq   $0x0,0x0(%r13,%rax,1)
  movq   $0x0,0x0(%rbp,%r12,8)
  mov    $0x1,%edx
L25:
  mov    0x8(%rsp),%rax
  add    %rax,%r13
  add    %rax,%r14
  add    $0x1,%r12
  mov    0x28(%rsp),%rdi
  add    %rdi,0x20(%rsp)
  cmp    0x30(%rsp),%r12
  je     L79
L253:
  lea    0x0(,%r12,8),%rbx
  movsd  0x0(%rbp,%r12,8),%xmm4
  movsd  %xmm4,0x18(%rsp)
  movapd %xmm4,%xmm0
  andpd  D78(%rip),%xmm0
  movsd  0x38(%rsp),%xmm3
  comisd %xmm0,%xmm3
  ja     L25
  mov    0x78(%rsp),%rax
  mov    %rax,0x68(%rsp)
  movsd  (%rax),%xmm3
  movsd  %xmm3,0x48(%rsp)
  mov    0x20(%rsp),%rax
  mov    %rax,0x60(%rsp)
  movsd  (%rax),%xmm4
  movsd  %xmm4,0x50(%rsp)
  subsd  %xmm4,%xmm3
  movapd %xmm3,%xmm1
  mulsd  D85(%rip),%xmm1
  movsd  %xmm1,0x58(%rsp)
  movsd  0x18(%rsp),%xmm4
  movapd %xmm4,%xmm3
  xorpd  D84(%rip),%xmm3
  movsd  %xmm3,(%rsp)
  mulsd  %xmm1,%xmm1
  movapd %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L329
  sqrtsd %xmm0,%xmm0
L401:
  movsd  (%rsp),%xmm4
  divsd  %xmm0,%xmm4
  movsd  %xmm4,(%rsp)
  pxor   %xmm0,%xmm0
  comisd 0x58(%rsp),%xmm0
  jbe    L274
  xorpd  D84(%rip),%xmm4
  movsd  %xmm4,(%rsp)
  jmp    L274
L55:
  call   <sqrt@plt>
  jmp    L68
L241:
  call   <sqrt@plt>
  jmp    L390
L137:
  call   <sqrt@plt>
  jmp    L74
L223:
  mov    0xb0(%rsp),%rdx
  mov    $0x0,%eax
  jmp    L375
L79:
  mov    0x40(%rsp),%rdi
  lea    0x1(%rdi),%rax
  mov    0x8(%rsp),%rbx
  add    %rbx,0x98(%rsp)
  mov    0x28(%rsp),%rsi
  add    %rsi,0xa8(%rsp)
  add    %rsi,0x78(%rsp)
  add    %rbx,0xa0(%rsp)
  cmp    0xc0(%rsp),%rdi
  je     L188
  mov    %rax,0x40(%rsp)
L31:
  mov    0x40(%rsp),%rax
  mov    %eax,0xc8(%rsp)
  mov    0x98(%rsp),%rcx
  mov    %rcx,%r15
  mov    0xb8(%rsp),%rbx
  add    %rbx,%r15
  mov    0xb0(%rsp),%rdi
  mov    %rdi,%rbp
  add    %rcx,%rbp
  mov    %rdi,%r13
  mov    0xa0(%rsp),%rcx
  add    %rcx,%r13
  add    %rbx,%rcx
  mov    %rcx,%r14
  mov    %rax,%rbx
  add    $0x1,%eax
  cmp    %eax,0x74(%rsp)
  jle    L79
  lea    0x0(,%rbx,8),%rcx
  mov    %rcx,0x10(%rsp)
  lea    0x1(%rbx),%r12
  mov    0xcc(%rsp),%eax
  sub    %ebx,%eax
  lea    0x2(%rbx,%rax,1),%rax
  mov    %rax,0x30(%rsp)
  mov    %rdi,%rax
  add    %rcx,%rax
  mov    %rax,0x90(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %rax,0x88(%rsp)
  add    $0x1,%rax
  imul   0x8(%rsp),%rax
  add    %rdi,%rax
  mov    %rax,0x80(%rsp)
  mov    0xa8(%rsp),%rax
  mov    %rax,0x20(%rsp)
  jmp    L253
L188:
  test   %edx,%edx
  jne    L392
L244:
  movsd  0x38(%rsp),%xmm3
  comisd 0xe0(%rsp),%xmm3
  jbe    L129
  jmp    L303
```

tool_calls: name: retrieve_data
arguments: label: D76
data_type: byte[8]
name: retrieve_data
arguments: label: D0
data_type: f64
name: retrieve_data
arguments: label: D78
data_type: qword[2]
name: retrieve_data
arguments: label: D85
data_type: f32[2]
name: retrieve_data
arguments: label: D84
data_type: f32[4]

tool: {"D76": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

tool: D0: 1

tool: {"D78": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D85": [0.0,1.75]}

tool: {"D84": [0.0,-0.0,0.0,0.0]}

assistant: ```c
int cvJacobiEigens_64d(double *A, double *V, double *E, int n, double eps) {
  int i, j, k, p, q, ind;
  double *A1 = A, *V1 = V, *A2 = A, *V2 = V;
  double Amax = 0.0, anorm = 0.0, ax, deps;
  if (eps < 1.0e-15)
    eps = 1.0e-15;
  deps = eps / (double)n;
  for (i = 0; i < n; i++, V1 += n, A1 += n) {
    for (j = 0; j < i; j++) {
      double Am = A1[j];
      anorm += Am * Am;
    }
    for (j = 0; j < n; j++)
      V1[j] = 0.0;
    V1[i] = 1.0;
  }
  anorm = sqrt(anorm + anorm);
  ax = anorm * eps / n;
  Amax = anorm;
  while (Amax > ax) {
    Amax /= n;
    do {
      ind = 0;
      A1 = A;
      V1 = V;
      for (p = 0; p < n - 1; p++, A1 += n, V1 += n) {
        A2 = A + n * (p + 1);
        V2 = V + n * (p + 1);
        for (q = p + 1; q < n; q++, A2 += n, V2 += n) {
          double x, y, c, s, c2, s2, a;
          double *A3, Apq, App, Aqq, App2, Aqq2, Aip, Aiq, Vpi, Vqi;
          if (fabs(A1[q]) < Amax)
            continue;
          Apq = A1[q];
          ind = 1;
          App = A1[p];
          Aqq = A2[q];
          y = 5.0e-1 * (App - Aqq);
          x = -Apq / sqrt(Apq * Apq + y * y);
          if (y < 0.0)
            x = -x;
          s = x / sqrt(2.0 * (1.0 + sqrt(1.0 - x * x)));
          s2 = s * s;
          c = sqrt(1.0 - s2);
          c2 = c * c;
          a = 2.0 * Apq * c * s;
          A3 = A;
          for (i = 0; i < p; i++, A3 += n) {
            Aip = A3[p];
            Aiq = A3[q];
            Vpi = V1[i];
            Vqi = V2[i];
            A3[p] = Aip * c - Aiq * s;
            A3[q] = Aiq * c + Aip * s;
            V1[i] = Vpi * c - Vqi * s;
            V2[i] = Vqi * c + Vpi * s;
          }
          for (; i < q; i++, A3 += n) {
            Aip = A1[i];
            Aiq = A3[q];
            Vpi = V1[i];
            Vqi = V2[i];
            A1[i] = Aip * c - Aiq * s;
            A3[q] = Aiq * c + Aip * s;
            V1[i] = Vpi * c - Vqi * s;
            V2[i] = Vqi * c + Vpi * s;
          }
          for (; i < n; i++) {
            Aip = A1[i];
            Aiq = A2[i];
            Vpi = V1[i];
            Vqi = V2[i];
            A1[i] = Aip * c - Aiq * s;
            A2[i] = Aiq * c + Aip * s;
            V1[i] = Vpi * c - Vqi * s;
            V2[i] = Vqi * c + Vpi * s;
          }
          App2 = App * c2 + Aqq * s2 - a;
          Aqq2 = App * s2 + Aqq * c2 + a;
          A1[p] = App2;
          A2[q] = Aqq2;
          A1[q] = A2[p] = 0.0;
        }
      }
    } while (ind);
  }
  for (i = 0, k = 0; i < n; i++, k += n + 1)
    E[i] = A[k];
  return 0;
}
```