user: Please show me the C implementation that matches the assembly code listed below:

```asm
<eigen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xd8,%rsp
  mov    %rcx,0x50(%rsp)
  mov    %rdi,%r11
  mov    %esi,%r10d
  mov    %rdx,%r9
  mov    %r8,0x60(%rsp)
  movslq %esi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x10c8(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L68
  mov    0x50(%rsp),%r12
  mov    %rdi,0x8(%rsp)
  mov    %rbx,%rax
  xor    %ebp,%ebp
  movsd  D69(%rip),%xmm7
  mov    %rdx,0x10(%rsp)
  lea    0x0(,%rbx,8),%r14
  mov    %esi,%r15d
  lea    0x8(%r14),%r13
  mov    %r14,%rbx
  mov    %r12,%rcx
  mov    %rax,%r14
  movsd  %xmm7,(%rsp)
L110:
  mov    %rcx,%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  add    $0x1,%ebp
  call   <memset@plt>
  movsd  (%rsp),%xmm7
  mov    %rax,%rcx
  movsd  %xmm7,(%r12)
  add    %rbx,%rcx
  add    %r13,%r12
  cmp    %ebp,%r15d
  jne    L110
  mov    0x8(%rsp),%r11
  mov    %r14,%rax
  mov    0x10(%rsp),%r9
  mov    %rbx,%r14
  mov    %r15d,%r10d
  mov    %rax,%rbx
  lea    0xc0(%rsp),%rcx
  xor    %eax,%eax
  mov    %r11,%rdx
L56:
  movsd  (%rdx),%xmm0
  add    %r13,%rdx
  movsd  %xmm0,(%rcx,%rax,8)
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L56
  lea    0x8c0(%rsp),%rdi
  mov    %r14,%rdx
  xor    %esi,%esi
  mov    %r11,0x10(%rsp)
  mov    %r10d,0x8(%rsp)
  mov    %r9,(%rsp)
  call   <memset@plt>
  mov    (%rsp),%r9
  mov    0x8(%rsp),%r10d
  mov    0x10(%rsp),%r11
L68:
  mov    %r10d,%eax
  movl   $0x1,0x8(%rsp)
  lea    0x0(,%rbx,8),%r8
  movq   D21(%rip),%xmm3
  imul   %r10d,%eax
  movl   $0x0,0x44(%rsp)
  movq   D54(%rip),%xmm8
  mov    %eax,0x5c(%rsp)
  mov    %r9,%rax
  mov    %r11,%r9
  mov    %r10d,%r11d
  mov    %r8,%r10
  mov    %rax,%r8
L230:
  cmp    $0x1,%r11d
  jle    L13
  lea    -0x2(%r11),%eax
  pxor   %xmm7,%xmm7
  mov    $0x1,%edx
  xor    %esi,%esi
  mov    %eax,0x58(%rsp)
  lea    0x2(%rax),%r12
  movapd %xmm7,%xmm1
  lea    -0x1(%r11),%ebp
  mov    %rax,0x48(%rsp)
  lea    0x10(%r9),%rbx
  nopl   (%rax)
L107:
  cmp    %edx,%r11d
  jle    L387
  movslq %esi,%rcx
  mov    %ebp,%edi
  lea    (%rcx,%rdx,1),%rax
  sub    %edx,%edi
  lea    -0x1(%rcx,%rdx,1),%rcx
  add    %rdi,%rcx
  lea    (%r9,%rax,8),%rax
  lea    (%rbx,%rcx,8),%rcx
  nopl   0x0(%rax,%rax,1)
L237:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  andpd  %xmm3,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L237
L387:
  add    $0x1,%rdx
  add    %r11d,%esi
  cmp    %r12,%rdx
  jne    L107
  ucomisd %xmm7,%xmm1
  jp     L222
  je     L13
L222:
  cmpl   $0x5,0x8(%rsp)
  movapd %xmm7,%xmm5
  jle    L388
L333:
  mov    %r11d,0x40(%rsp)
  xor    %edi,%edi
  movq   D21(%rip),%xmm2
  movq   $0x1,0x38(%rsp)
  movsd  D47(%rip),%xmm4
  mov    %rdi,%r13
  nop
L57:
  mov    0x38(%rsp),%rsi
  mov    %esi,0x1c(%rsp)
  cmp    %r11d,%esi
  jge    L228
  mov    0x40(%rsp),%r14d
  mov    %rsi,%r12
  lea    0x2(%r13),%rbp
  mov    $0x1,%ebx
  movsd  D69(%rip),%xmm6
  mov    %r14d,%eax
  sub    %r11d,%eax
  cltq
  add    %rax,%r12
  mov    %rax,0x10(%rsp)
  movslq %r14d,%rax
  add    %rsi,%rax
  lea    (%r9,%rax,8),%r15
  mov    0x58(%rsp),%eax
  sub    %r13d,%eax
  lea    0x3(%r13,%rax,1),%rax
  mov    %rax,(%rsp)
  lea    0x0(,%r13,8),%rax
  lea    (%rax,%r9,1),%rdi
  add    0x50(%rsp),%rax
  mov    %rdi,0x28(%rsp)
  lea    (%r9,%r12,8),%rdi
  mov    %rdi,0x30(%rsp)
  mov    %rax,0x20(%rsp)
  jmp    L116
  nopl   0x0(%rax,%rax,1)
L5:
  movsd  -0x8(%r8,%rbp,8),%xmm0
  andpd  %xmm2,%xmm0
  movapd %xmm0,%xmm11
  addsd  %xmm1,%xmm11
  ucomisd %xmm11,%xmm0
  jp     L405
  jne    L405
  movq   $0x0,(%r9,%r12,8)
L272:
  add    $0x1,%rbp
  add    $0x1,%rbx
  add    %r11d,%r14d
  add    $0x1,%r12
  add    $0x8,%r15
  cmp    %rbp,(%rsp)
  je     L228
L116:
  movsd  (%r9,%r12,8),%xmm10
  cmpl   $0x6,0x8(%rsp)
  mov    %ebp,%edi
  lea    -0x1(%rbp),%esi
  movapd %xmm10,%xmm9
  andpd  %xmm2,%xmm9
  movapd %xmm9,%xmm1
  mulsd  %xmm4,%xmm1
  jle    L405
  movsd  (%r8,%r13,8),%xmm0
  andpd  %xmm2,%xmm0
  movapd %xmm0,%xmm11
  addsd  %xmm1,%xmm11
  ucomisd %xmm11,%xmm0
  jp     L405
  je     L5
L405:
  comisd %xmm5,%xmm9
  jbe    L272
  movsd  (%r8,%r13,8),%xmm11
  movsd  -0x8(%r8,%rbp,8),%xmm0
  subsd  %xmm11,%xmm0
  movapd %xmm0,%xmm9
  andpd  %xmm2,%xmm9
  addsd  %xmm9,%xmm1
  ucomisd %xmm1,%xmm9
  jp     L292
  jne    L292
  movapd %xmm10,%xmm12
  movapd %xmm6,%xmm9
  divsd  %xmm0,%xmm12
L341:
  movapd %xmm12,%xmm0
  mulsd  %xmm12,%xmm0
  addsd  %xmm9,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L378
  sqrtsd %xmm0,%xmm0
L320:
  movapd %xmm9,%xmm13
  movapd %xmm12,%xmm1
  mov    %r13d,%ecx
  xor    %edx,%edx
  mulsd  %xmm12,%xmm10
  lea    0x8c0(%rsp),%rax
  divsd  %xmm0,%xmm13
  movsd  (%rax,%r13,8),%xmm0
  subsd  %xmm10,%xmm11
  subsd  %xmm10,%xmm0
  movsd  %xmm11,(%r8,%r13,8)
  movsd  %xmm0,(%rax,%r13,8)
  mov    0x28(%rsp),%rax
  movsd  0x8b8(%rsp,%rbp,8),%xmm0
  addsd  %xmm10,%xmm0
  addsd  -0x8(%r8,%rbp,8),%xmm10
  movsd  %xmm0,0x8b8(%rsp,%rbp,8)
  movsd  %xmm10,-0x8(%r8,%rbp,8)
  movq   $0x0,(%r9,%r12,8)
  mulsd  %xmm13,%xmm1
  addsd  %xmm9,%xmm13
  movapd %xmm1,%xmm9
  divsd  %xmm13,%xmm9
  test   %r13,%r13
  je     L391
  cs nopw 0x0(%rax,%rax,1)
L367:
  movsd  (%rax),%xmm0
  movapd %xmm9,%xmm10
  movsd  (%rax,%rbx,8),%xmm11
  add    $0x1,%edx
  mulsd  %xmm0,%xmm10
  movapd %xmm0,%xmm12
  addsd  %xmm11,%xmm10
  mulsd  %xmm1,%xmm10
  subsd  %xmm10,%xmm12
  movapd %xmm9,%xmm10
  mulsd  %xmm11,%xmm10
  movsd  %xmm12,(%rax)
  subsd  %xmm10,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm11,%xmm0
  movsd  %xmm0,(%rax,%rbx,8)
  add    %r10,%rax
  cmp    %ecx,%edx
  jne    L367
L391:
  cmp    %esi,0x1c(%rsp)
  jge    L16
  mov    0x10(%rsp),%rsi
  lea    -0x2(%rbx),%eax
  lea    0x0(%r13,%rsi,1),%rdx
  add    %rdx,%rax
  mov    %r15,%rdx
  lea    0x10(%r9,%rax,8),%rcx
  mov    0x30(%rsp),%rax
  nopw   0x0(%rax,%rax,1)
L118:
  movsd  (%rax),%xmm0
  movapd %xmm9,%xmm10
  movsd  (%rdx),%xmm11
  add    $0x8,%rax
  mulsd  %xmm0,%xmm10
  movapd %xmm0,%xmm12
  addsd  %xmm11,%xmm10
  mulsd  %xmm1,%xmm10
  subsd  %xmm10,%xmm12
  movapd %xmm9,%xmm10
  mulsd  %xmm11,%xmm10
  movsd  %xmm12,-0x8(%rax)
  subsd  %xmm10,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm11,%xmm0
  movsd  %xmm0,(%rdx)
  add    %r10,%rdx
  cmp    %rax,%rcx
  jne    L118
L16:
  cmp    %r11d,%ebp
  jge    L234
  lea    -0x1(%r11),%edx
  mov    0x10(%rsp),%rsi
  movslq %ebp,%rax
  sub    %edi,%edx
  add    %r12,%rdx
  add    %rsi,%rax
  lea    0x10(%r9,%rdx,8),%rcx
  movslq %r14d,%rdx
  lea    (%r9,%rax,8),%rax
  sub    %rsi,%rdx
  nopl   (%rax)
L271:
  movsd  (%rax),%xmm0
  movapd %xmm9,%xmm10
  movsd  (%rax,%rdx,8),%xmm11
  mulsd  %xmm0,%xmm10
  movapd %xmm0,%xmm12
  addsd  %xmm11,%xmm10
  mulsd  %xmm1,%xmm10
  subsd  %xmm10,%xmm12
  movapd %xmm9,%xmm10
  mulsd  %xmm11,%xmm10
  movsd  %xmm12,(%rax)
  subsd  %xmm10,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm11,%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %rax,%rcx
  jne    L271
L234:
  mov    0x20(%rsp),%rax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L350:
  movsd  (%rax),%xmm0
  movapd %xmm9,%xmm10
  movsd  (%rax,%rbx,8),%xmm11
  add    $0x1,%edx
  mulsd  %xmm0,%xmm10
  movapd %xmm0,%xmm12
  addsd  %xmm11,%xmm10
  mulsd  %xmm1,%xmm10
  subsd  %xmm10,%xmm12
  movapd %xmm9,%xmm10
  mulsd  %xmm11,%xmm10
  movsd  %xmm12,(%rax)
  subsd  %xmm10,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm11,%xmm0
  movsd  %xmm0,(%rax,%rbx,8)
  add    %r10,%rax
  cmp    %edx,%r11d
  jne    L350
  addl   $0x1,0x44(%rsp)
  jmp    L272
  nop
L228:
  addq   $0x1,0x38(%rsp)
  lea    0x1(%r13),%rax
  add    %r11d,0x40(%rsp)
  cmp    0x48(%rsp),%r13
  je     L247
  mov    %rax,%r13
  jmp    L57
  xchg   %ax,%ax
L292:
  mulsd  D152(%rip),%xmm0
  movapd %xmm6,%xmm9
  movapd %xmm0,%xmm1
  divsd  %xmm10,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm12
  mulsd  %xmm1,%xmm0
  andpd  %xmm2,%xmm12
  addsd  %xmm6,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L264
  sqrtsd %xmm0,%xmm0
L196:
  addsd  %xmm12,%xmm0
  comisd %xmm1,%xmm7
  movapd %xmm6,%xmm12
  divsd  %xmm0,%xmm12
  jbe    L341
  xorpd  %xmm8,%xmm12
  jmp    L341
L247:
  test   %r11d,%r11d
  jle    L357
  lea    -0x1(%r11),%edi
  xor    %eax,%eax
  lea    0xc0(%rsp),%rcx
  lea    0x8c0(%rsp),%rdx
  nopl   0x0(%rax,%rax,1)
L164:
  movsd  (%rcx,%rax,8),%xmm0
  addsd  (%rdx,%rax,8),%xmm0
  mov    %rax,%rsi
  movq   $0x0,(%rdx,%rax,8)
  movsd  %xmm0,(%rcx,%rax,8)
  movsd  %xmm0,(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %rsi,%rdi
  jne    L164
L357:
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cmp    $0x32,%eax
  jne    L230
  lea    D106(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L301
L13:
  xor    %eax,%eax
L301:
  mov    0x60(%rsp),%rsi
  mov    0x44(%rsp),%edi
  mov    %edi,(%rsi)
  mov    0x10c8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  add    $0x10d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L388:
  mulsd  D28(%rip),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x5c(%rsp),%xmm0
  movapd %xmm1,%xmm5
  divsd  %xmm0,%xmm5
  jmp    L333
L378:
  mov    %r8,0xa8(%rsp)
  mov    %r11d,0xa0(%rsp)
  mov    %r9,0x98(%rsp)
  mov    %r10,0x90(%rsp)
  mov    %edi,0x8c(%rsp)
  mov    %esi,0x88(%rsp)
  movsd  %xmm9,0xb0(%rsp)
  movsd  %xmm12,0x80(%rsp)
  movsd  %xmm5,0x78(%rsp)
  movsd  %xmm11,0x70(%rsp)
  movsd  %xmm10,0x68(%rsp)
  call   <sqrt@plt>
  mov    D47(%rip),%rax
  movq   D21(%rip),%xmm3
  pxor   %xmm7,%xmm7
  movsd  0xb0(%rsp),%xmm9
  mov    0xa8(%rsp),%r8
  movq   %rax,%xmm4
  mov    D69(%rip),%rax
  mov    0xa0(%rsp),%r11d
  movapd %xmm3,%xmm2
  mov    0x98(%rsp),%r9
  mov    0x90(%rsp),%r10
  movq   D54(%rip),%xmm8
  movsd  0x78(%rsp),%xmm5
  movq   %rax,%xmm6
  mov    0x8c(%rsp),%edi
  mov    0x88(%rsp),%esi
  movsd  0x70(%rsp),%xmm11
  movsd  0x68(%rsp),%xmm10
  movsd  0x80(%rsp),%xmm12
  jmp    L320
L31:
  call   <__stack_chk_fail@plt>
  nop
L264:
  mov    %r8,0xb0(%rsp)
  mov    %r11d,0xa8(%rsp)
  mov    %r9,0xa0(%rsp)
  mov    %r10,0x98(%rsp)
  mov    %edi,0x8c(%rsp)
  mov    %esi,0x88(%rsp)
  movsd  %xmm6,0xb8(%rsp)
  movsd  %xmm1,0x90(%rsp)
  movsd  %xmm5,0x80(%rsp)
  movsd  %xmm12,0x78(%rsp)
  movsd  %xmm11,0x70(%rsp)
  movsd  %xmm10,0x68(%rsp)
  call   <sqrt@plt>
  mov    D47(%rip),%rax
  movq   D21(%rip),%xmm3
  pxor   %xmm7,%xmm7
  mov    0xb0(%rsp),%r8
  mov    0xa8(%rsp),%r11d
  movq   %rax,%xmm4
  mov    D69(%rip),%rax
  movsd  0xb8(%rsp),%xmm9
  movapd %xmm3,%xmm2
  mov    0xa0(%rsp),%r9
  mov    0x8c(%rsp),%edi
  mov    0x98(%rsp),%r10
  mov    0x88(%rsp),%esi
  movq   %rax,%xmm6
  movq   D54(%rip),%xmm8
  movsd  0x78(%rsp),%xmm12
  movsd  0x90(%rsp),%xmm1
  movsd  0x70(%rsp),%xmm11
  movsd  0x80(%rsp),%xmm5
  movsd  0x68(%rsp),%xmm10
  jmp    L196
```

tool_calls: name: parse_data
arguments: label: D69
type_guessed: f64
name: parse_data
arguments: label: D21
type_guessed: qword
name: parse_data
arguments: label: D54
type_guessed: f32[2]
name: parse_data
arguments: label: D47
type_guessed: f64
name: parse_data
arguments: label: D152
type_guessed: f64
name: parse_data
arguments: label: D106
type_guessed: string
name: parse_data
arguments: label: D28
type_guessed: f64

tool: D69: 1

tool: D21: 9223372036854775807

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

tool: D47: 100

tool: D152: 0.5

tool: D106: routine JACOBI: 50 iterations should not happen

tool: D28: 0.2

assistant: ```c
int eigen(a, n, d, v, nr)
double *a;
int n;
double *d;
double *v;
int *nr;
{
  int nrot;
  int j, iq, ip, i;
  double tresh, theta, tau, t, sm, s, h, g, c;
  double b[256], z[256];
  for (ip = 0; ip < n; ip++) {
    for (iq = 0; iq < n; iq++) {
      v[ip * n + iq] = 0.0;
    }
    v[ip * n + ip] = 1.0;
  }
  for (ip = 0; ip < n; ip++) {
    b[ip] = a[ip * n + ip];
    d[ip] = b[ip];
    z[ip] = 0.0;
  }
  nrot = 0;
  for (i = 1; i < 50; i++) {
    sm = 0.0;
    for (ip = 0; ip < n - 1; ip++) {
      for (iq = ip + 1; iq < n; iq++) {
        sm += fabs(a[ip * n + iq]);
      }
    }
    if (sm == 0.0) {
      *nr = nrot;
      return 0;
    }
    if (i < 6) {
      tresh = (double)0.2 * sm / (double)(n * n);
    } else {
      tresh = 0.0;
    }
    for (ip = 0; ip < n - 1; ip++) {
      for (iq = ip + 1; iq < n; iq++) {
        g = 100.0 * fabs(a[ip * n + iq]);
        if ((i > 6) && ((fabs(d[ip]) + g) == fabs(d[ip])) && ((fabs(d[iq]) + g) == fabs(d[iq]))) {
          a[ip * n + iq] = 0.0;
        } else if (fabs(a[ip * n + iq]) > tresh) {
          h = d[iq] - d[ip];
          if ((fabs(h) + g) == fabs(h)) {
            t = a[ip * n + iq] / h;
          } else {
            theta = 0.5 * h / a[ip * n + iq];
            t = 1.0 / (fabs(theta) + sqrt(1.0 + theta * theta));
            if (theta < 0.0)
              t = -t;
          }
          c = 1.0 / sqrt(1 + t * t);
          s = t * c;
          tau = s / (1.0 + c);
          h = t * a[ip * n + iq];
          z[ip] = z[ip] - h;
          z[iq] = z[iq] + h;
          d[ip] = d[ip] - h;
          d[iq] = d[iq] + h;
          a[ip * n + iq] = 0.0;
          for (j = 0; j <= ip - 1; j++) {
            g = a[j * n + ip];
            h = a[j * n + iq];
            a[j * n + ip] = g - s * (h + g * tau);
            a[j * n + iq] = h + s * (g - h * tau);
          }
          for (j = ip + 1; j <= iq - 1; j++) {
            g = a[ip * n + j];
            h = a[j * n + iq];
            a[ip * n + j] = g - s * (h + g * tau);
            a[j * n + iq] = h + s * (g - h * tau);
          }
          for (j = iq + 1; j < n; j++) {
            g = a[ip * n + j];
            h = a[iq * n + j];
            a[ip * n + j] = g - s * (h + g * tau);
            a[iq * n + j] = h + s * (g - h * tau);
          }
          for (j = 0; j < n; j++) {
            g = v[j * n + ip];
            h = v[j * n + iq];
            v[j * n + ip] = g - s * (h + g * tau);
            v[j * n + iq] = h + s * (g - h * tau);
          }
          nrot++;
        }
      }
    }
    for (ip = 0; ip < n; ip++) {
      b[ip] = b[ip] + z[ip];
      d[ip] = b[ip];
      z[ip] = 0.0;
    }
  }
  printf("routine JACOBI: 50 iterations should not happen\n");
  *nr = nrot;
  return -1;
}
```