user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<eigen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%r13d
  mov    %rsi,0x10(%rsp)
  mov    %edx,%ebx
  mov    %rcx,%rbp
  mov    %r8,%r12
  mov    %r9,%r15
  mov    0x70(%rsp),%rax
  mov    %rax,(%rsp)
  mov    0x78(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movsd  D17(%rip),%xmm1
  movsd  D20(%rip),%xmm0
  call   <pow@plt>
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  %xmm0,0x8(%rsp)
  lea    0x24(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    %r14,0x18(%rsp)
  mov    %r14,%r8
  mov    %ebx,%esi
  mov    0x10(%rsp),%rdi
  call   <balance@plt>
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%r14
  mov    0x18(%rsp),%rsi
  lea    (%rsi,%r14,1),%rax
  push   %rax
  push   0x8(%rsp)
  mov    %r15,%r9
  mov    0x34(%rsp),%r8d
  mov    0x30(%rsp),%ecx
  mov    %ebx,%edx
  mov    0x20(%rsp),%rsi
  mov    %r13d,%edi
  call   <elemhess@plt>
  add    $0x8,%rsp
  push   0x8(%rsp)
  push   %r15
  push   %r12
  mov    %rbp,%r9
  mov    0x44(%rsp),%r8d
  mov    0x40(%rsp),%ecx
  mov    %ebx,%edx
  mov    0x30(%rsp),%rsi
  mov    %r13d,%edi
  call   <realeig@plt>
  mov    %eax,%r10d
  add    $0x20,%rsp
  cmp    $0xffffffff,%eax
  je     L64
  test   %r13d,%r13d
  jne    L50
L26:
  test   %ebx,%ebx
  jle    L66
  mov    %ebx,%r13d
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%r10d
  movq   D26(%rip),%xmm3
  mov    $0x1,%r11d
L2:
  mov    %r8d,%edi
  movsd  0x0(%rbp,%r8,8),%xmm2
  cmp    %r9d,%ebx
  jle    L27
  mov    %r9,%rax
  movapd %xmm2,%xmm0
L52:
  movsd  0x0(%rbp,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  maxsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  cmova  %eax,%edi
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L52
L57:
  movslq %edi,%rdi
  lea    0x0(,%rdi,8),%rax
  movsd  %xmm2,0x0(%rbp,%rdi,8)
  movsd  %xmm0,0x0(%rbp,%r8,8)
  lea    (%r12,%rax,1),%rdx
  movsd  (%rdx),%xmm0
  movsd  (%r12,%r8,8),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%r12,%r8,8)
  lea    (%r15,%rax,1),%rdx
  add    (%rsp),%rax
  mov    $0x0,%esi
  mov    %r8,%rcx
  sub    %rdi,%rcx
L40:
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%rcx,8),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%rcx,8)
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  add    $0x1,%esi
  add    %r14,%rdx
  add    %r14,%rax
  cmp    %esi,%ebx
  jne    L40
  movsd  (%r12,%r8,8),%xmm0
  andpd  %xmm3,%xmm0
  ucomisd 0x8(%rsp),%xmm0
  cmova  %r11d,%r10d
  add    $0x1,%r8
  add    $0x1,%r9
  cmp    %r13,%r8
  jne    L2
L64:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  mov    %r10d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L50:
  mov    0x18(%rsp),%r9
  mov    0x24(%rsp),%r8d
  mov    0x20(%rsp),%ecx
  mov    (%rsp),%rdx
  mov    %r15,%rsi
  mov    %ebx,%edi
  call   <unbalance@plt>
  jmp    L26
L27:
  movapd %xmm2,%xmm0
  jmp    L57
L66:
  mov    $0x0,%r10d
  jmp    L64
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D17
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D20
type_guessed: f64
name: unpack_data
arguments: data_tag: D26
type_guessed: qword

tool: {"D17": [0x00,0x00,0x00,0x00,0x00,0x80,0x43,0xc0]}

tool: D20: 2

tool: D26: 9223372036854775807

assistant: ```c
int eigen(int job, double *A, int n, double *rr, double *ri, double *vr, double *vi, double *work) {
  int low, hi, i, j, k, it, istate = 0;
  double tiny = sqrt(pow((double)2, (double)(1 - 40))), t;
  balance(A, n, &low, &hi, work);
  elemhess(job, A, n, low, hi, vr, vi, (int *)(work + n));
  if (-1 == realeig(job, A, n, low, hi, rr, ri, vr, vi))
    return (-1);
  if (job)
    unbalance(n, vr, vi, low, hi, work);
  for (i = 0; i < n; i++) {
    for (j = i + 1, it = i, t = rr[i]; j < n; j++)
      if (t < rr[j]) {
        t = rr[j];
        it = j;
      }
    rr[it] = rr[i];
    rr[i] = t;
    t = ri[it];
    ri[it] = ri[i];
    ri[i] = t;
    for (k = 0; k < n; k++) {
      t = vr[k * n + it];
      vr[k * n + it] = vr[k * n + i];
      vr[k * n + i] = t;
      t = vi[k * n + it];
      vi[k * n + it] = vi[k * n + i];
      vi[k * n + i] = t;
    }
    if (fabs(ri[i]) > tiny)
      istate = 1;
  }
  return (istate);
}
```