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

```asm
<eigen_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0xd0,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %rdx,-0xa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  mov    -0x94(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x70(%rbp)
  movslq %edx,%rax
  mov    %rax,%rcx
  mov    $0x0,%ebx
  movslq %edx,%rax
  mov    %rax,%r8
  mov    $0x0,%r9d
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L152:
  cmp    %rcx,%rsp
  je     L62
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L152
L62:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L195
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L195:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x94(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x60(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  movslq %edx,%rax
  mov    %rax,-0xd0(%rbp)
  movq   $0x0,-0xc8(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L78:
  cmp    %rdx,%rsp
  je     L44
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L78
L44:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L72
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L72:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x94(%rbp),%eax
  imul   %edx,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x50(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L146:
  cmp    %rdx,%rsp
  je     L2
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L146
L2:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L14
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L14:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x94(%rbp),%edx
  mov    -0x94(%rbp),%eax
  imul   %edx,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x40(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L9:
  cmp    %rdx,%rsp
  je     L188
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L9
L188:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L31
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L31:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x38(%rbp)
  movl   $0xffffffff,-0x80(%rbp)
  mov    -0x68(%rbp),%rdi
  lea    -0x94(%rbp),%rsi
  mov    -0xa0(%rbp),%rdx
  lea    -0x94(%rbp),%rax
  lea    -0x84(%rbp),%rcx
  push   %rcx
  lea    -0x80(%rbp),%rcx
  push   %rcx
  lea    -0x78(%rbp),%rcx
  push   %rcx
  lea    -0x94(%rbp),%rcx
  push   %rcx
  push   -0x38(%rbp)
  lea    -0x94(%rbp),%rcx
  push   %rcx
  push   -0x48(%rbp)
  push   -0x58(%rbp)
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rdx,%rcx
  mov    %rax,%rdx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <dgeev_@plt>
  add    $0x40,%rsp
  movsd  -0x78(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x80(%rbp)
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x68(%rbp),%rdi
  lea    -0x94(%rbp),%rsi
  mov    -0xa0(%rbp),%rdx
  lea    -0x94(%rbp),%rax
  lea    -0x84(%rbp),%rcx
  push   %rcx
  lea    -0x80(%rbp),%rcx
  push   %rcx
  push   -0x30(%rbp)
  lea    -0x94(%rbp),%rcx
  push   %rcx
  push   -0x38(%rbp)
  lea    -0x94(%rbp),%rcx
  push   %rcx
  push   -0x48(%rbp)
  push   -0x58(%rbp)
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rdx,%rcx
  mov    %rax,%rdx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <dgeev_@plt>
  add    $0x40,%rsp
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L68
L183:
  mov    -0x58(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L148
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L148
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x68(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movsd  %xmm0,(%rcx)
  jmp    L192
L148:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  D9(%rip),%xmm0
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L192:
  addl   $0x1,-0x7c(%rbp)
L68:
  mov    -0x94(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L183
  mov    -0x84(%rbp),%eax
  test   %eax,%eax
  jle    L51
  mov    $0x1,%eax
  jmp    L60
L51:
  mov    $0x0,%eax
L60:
  mov    %r12,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L121
  call   <__stack_chk_fail@plt>
L121:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D15
type_infered: string
name: unpack_data
arguments: data_label: D9
type_infered: f64

tool: D15: Vectors

tool: D9: 1

assistant: ```c
int eigen_double(int n, double *a, double *out) {
  int j;
  int info, lwork;
  double wkopt;
  double *work;
  double wr[n], wi[n], vl[n * n], vr[n * n];
  lwork = -1;
  dgeev_("Vectors", "Vectors", &n, a, &n, wr, wi, vl, &n, vr, &n, &wkopt, &lwork, &info);
  lwork = (int)wkopt;
  work = (double *)malloc(lwork * sizeof(double));
  dgeev_("Vectors", "Vectors", &n, a, &n, wr, wi, vl, &n, vr, &n, work, &lwork, &info);
  free((void *)work);
  for (j = 0; j < n; j++) {
    if (wi[j] == (double)0.0) {
      out[j] = wr[j];
    } else {
      out[j] = (double)(1.0 / 0.0);
    }
  }
  if (info > 0) {
    return 1;
  } else {
    return 0;
  }
}
```