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

```asm
<hessian_edmiston>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %edi,%r13d
  mov    %rdx,%rdi
  lea    -0x1(%r13),%eax
  push   %r12
  imul   %r13d,%eax
  push   %rbp
  push   %rbx
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  mov    %rcx,-0x18(%rsp)
  mov    %ebx,%edx
  add    %eax,%edx
  mov    %edx,%ebx
  sar    %ebx
  mov    %ebx,-0xc(%rsp)
  cmp    $0x1,%eax
  jle    L49
  lea    -0x1(%rbx),%eax
  movl   $0x0,-0x60(%rsp)
  movq   D17(%rip),%xmm4
  mov    %rsi,%r15
  mov    %eax,-0x3c(%rsp)
  mov    %r13d,%eax
  pxor   %xmm5,%xmm5
  movsd  D28(%rip),%xmm2
  imul   %r13d,%eax
  movapd D28(%rip),%xmm3
  movq   $0x0,-0x58(%rsp)
  imul   %r13d,%eax
  cltq
  mov    %rax,%rbx
  shl    $0x3,%rax
  mov    %rax,-0x50(%rsp)
  lea    0x1(%r13),%eax
  shl    $0x4,%rbx
  imul   %r13d,%eax
  mov    %rbx,-0x30(%rsp)
  cltq
  add    $0x1,%rax
  mov    %rax,%rbx
  lea    0x0(,%rax,8),%r14
  movslq %r13d,%rax
  shl    $0x4,%rbx
  mov    %rax,-0x28(%rsp)
  mov    %rbx,-0x38(%rsp)
  xchg   %ax,%ax
L26:
  mov    -0x3c(%rsp),%edx
  mov    $0x2,%esi
  test   %edx,%edx
  jle    L157
  nopl   (%rax)
L52:
  mov    %esi,%eax
  add    $0x1,%esi
  imul   %esi,%eax
  sar    %eax
  cmp    %edx,%eax
  jle    L52
L157:
  mov    %r13d,%ecx
  mov    %r13d,%r11d
  sub    %esi,%ecx
  lea    0x1(%rcx),%edx
  lea    0x2(%rcx),%eax
  imul   %edx,%eax
  imul   %ecx,%r11d
  mov    %eax,%r8d
  shr    $0x1f,%r8d
  mov    %r11d,-0x64(%rsp)
  add    %eax,%r8d
  mov    -0x60(%rsp),%eax
  mov    %r8d,%r10d
  sar    %r10d
  sub    %r11d,%eax
  mov    %r10d,-0x20(%rsp)
  add    %r10d,%eax
  cmp    %r13d,%edx
  jge    L179
  mov    %r13d,%ebx
  lea    -0x1(%rsi),%r9d
  imul   %eax,%ebx
  mov    %r9d,-0x40(%rsp)
  mov    %ebx,-0x5c(%rsp)
  cmp    $0x2,%esi
  je     L155
  mov    -0x28(%rsp),%rbp
  lea    (%r11,%r13,1),%r9d
  movslq %esi,%r8
  movslq %r10d,%r10
  mov    %ecx,-0x1c(%rsp)
  movapd %xmm5,%xmm0
  sub    %r8,%rbp
  lea    (%rcx,%r9,1),%r8d
  add    %eax,%r9d
  mov    %eax,-0x10(%rsp)
  imul   %r13d,%r8d
  mov    %rbp,-0x48(%rsp)
  imul   %r13d,%r9d
  add    %eax,%r8d
  imul   %r13d,%r8d
  movslq %r8d,%r8
  add    %rbp,%r8
  lea    (%r15,%r8,8),%rbx
  lea    (%rcx,%r9,1),%r8d
  add    %eax,%r9d
  mov    -0x30(%rsp),%rcx
  imul   %r13d,%r8d
  imul   %r13d,%r9d
  movslq %r8d,%r8
  add    %rbp,%r8
  movslq %r9d,%r9
  lea    (%r15,%r8,8),%r12
  movslq %r11d,%r8
  mov    -0x58(%rsp),%r11
  sub    %r8,%r11
  add    %r10,%r11
  add    %r9,%r11
  lea    (%r15,%r11,8),%rbp
  mov    -0x48(%rsp),%r11
  lea    0x1(%r11),%r9
  mov    -0x5c(%rsp),%r11d
  add    %r9,%r8
  sub    %r10,%r8
  lea    (%rdi,%r8,8),%r10
  lea    (%rdx,%r11,1),%r8d
  imul   %r13d,%r8d
  add    %edx,%r8d
  imul   %r13d,%r8d
  movslq %r8d,%r8
  add    %r9,%r8
  lea    (%r15,%r8,8),%r11
  mov    -0x40(%rsp),%r8d
  shr    %r8d
  shl    $0x4,%r8
  lea    (%r8,%r10,1),%r9
  xor    %r8d,%r8d
  mov    %r9,-0x48(%rsp)
  mov    -0x50(%rsp),%r9
  mov    -0x48(%rsp),%rax
  mov    %edx,-0x48(%rsp)
  mov    -0x38(%rsp),%rdx
  nopl   0x0(%rax)
L119:
  movsd  (%rbx,%r8,1),%xmm6
  movsd  (%r12,%r8,1),%xmm1
  add    $0x10,%r10
  movupd -0x10(%r10),%xmm7
  movhpd (%rbx,%r9,1),%xmm6
  movhpd (%r12,%r9,1),%xmm1
  mulpd  %xmm3,%xmm6
  addpd  %xmm1,%xmm1
  addpd  %xmm6,%xmm1
  movsd  0x0(%rbp,%r8,1),%xmm6
  add    %rcx,%r8
  movhpd 0x0(%rbp,%r9,1),%xmm6
  add    %rcx,%r9
  subpd  %xmm6,%xmm1
  movsd  (%r11),%xmm6
  movhpd (%r11,%r14,1),%xmm6
  add    %rdx,%r11
  subpd  %xmm6,%xmm1
  addpd  %xmm1,%xmm1
  mulpd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  cmp    %rax,%r10
  jne    L119
  mov    -0x40(%rsp),%ebx
  mov    -0x48(%rsp),%edx
  mov    -0x1c(%rsp),%ecx
  mov    -0x10(%rsp),%eax
  mov    %ebx,%r8d
  and    $0xfffffffe,%r8d
  add    %r8d,%edx
  cmp    %ebx,%r8d
  je     L89
L177:
  mov    %r13d,%r8d
  imul   %edx,%r8d
  lea    (%rax,%r8,1),%r9d
  add    %ecx,%r8d
  imul   %r13d,%r8d
  imul   %r13d,%r9d
  add    %eax,%r8d
  imul   %r13d,%r8d
  add    %ecx,%r8d
  movslq %r8d,%r8
  movsd  (%r15,%r8,8),%xmm1
  lea    (%rcx,%r9,1),%r8d
  add    %eax,%r9d
  imul   %r13d,%r8d
  mulsd  %xmm2,%xmm1
  imul   %r13d,%r9d
  add    %ecx,%r8d
  movslq %r8d,%r8
  add    %eax,%r9d
  movsd  (%r15,%r8,8),%xmm6
  mov    -0x5c(%rsp),%r8d
  movslq %r9d,%r9
  add    %edx,%r8d
  addsd  %xmm6,%xmm6
  imul   %r13d,%r8d
  addsd  %xmm6,%xmm1
  subsd  (%r15,%r9,8),%xmm1
  add    %edx,%r8d
  imul   %r13d,%r8d
  add    %edx,%r8d
  add    -0x60(%rsp),%edx
  movslq %r8d,%r8
  sub    %eax,%edx
  subsd  (%r15,%r8,8),%xmm1
  movslq %edx,%rdx
  addsd  %xmm1,%xmm1
  mulsd  (%rdi,%rdx,8),%xmm1
  addsd  %xmm1,%xmm0
L89:
  test   %eax,%eax
  jle    L7
  mov    -0x64(%rsp),%ebx
  mov    %r13d,%edx
  movslq %ecx,%r12
  movslq %eax,%r8
  imul   %eax,%edx
  mov    %ecx,-0x5c(%rsp)
  mov    %ebx,%r10d
  lea    (%rbx,%rax,1),%ebp
  add    %ecx,%ebx
  imul   %r13d,%r10d
  add    %ecx,%edx
  imul   %r13d,%ebx
  mov    -0x50(%rsp),%rcx
  imul   %r13d,%edx
  imul   %r13d,%r10d
  imul   %r13d,%ebp
  movslq %ebx,%rbx
  movslq %edx,%rdx
  add    %r12,%rbx
  lea    (%rdx,%r8,1),%r9
  movslq %r10d,%r10
  sub    %r8,%rbx
  xor    %r8d,%r8d
  movslq %ebp,%rbp
  lea    (%r15,%r10,8),%r11
  lea    (%r15,%r9,8),%r9
  mov    %eax,%r10d
  sub    %rdx,%rbp
  sub    %rdx,%rbx
  cs nopw 0x0(%rax,%rax,1)
L176:
  mov    %r8d,%edx
  movsd  (%r9),%xmm1
  add    $0x1,%r8d
  movsd  (%r9,%rbp,8),%xmm6
  add    $0x2,%edx
  imul   %r8d,%edx
  mulsd  %xmm2,%xmm1
  addsd  %xmm6,%xmm6
  mov    %edx,%r12d
  shr    $0x1f,%r12d
  add    %r12d,%edx
  addsd  %xmm6,%xmm1
  subsd  (%r9,%rbx,8),%xmm1
  mov    %r10d,%r12d
  subsd  (%r11),%xmm1
  sar    %edx
  add    %rcx,%r9
  add    %r14,%r11
  sub    %edx,%r12d
  add    %r13d,%r10d
  movslq %r12d,%r12
  addsd  %xmm1,%xmm1
  mulsd  (%rdi,%r12,8),%xmm1
  addsd  %xmm1,%xmm0
  cmp    %eax,%r8d
  jne    L176
  mov    -0x5c(%rsp),%ecx
L7:
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  jle    L17
  lea    0x2(%rax),%r8d
  mov    %r13d,%ebx
  imul   %edx,%r8d
  imul   %eax,%ebx
  mov    %r8d,%r9d
  shr    $0x1f,%r9d
  mov    %ebx,-0x5c(%rsp)
  add    %r8d,%r9d
  mov    %r13d,%r8d
  sar    %r9d
  sub    %eax,%r8d
  mov    %r9d,%r11d
  lea    -0x1(%r8),%r10d
  neg    %r11d
  mov    %r10d,-0x48(%rsp)
  mov    %r11d,-0x40(%rsp)
  cmp    $0x2,%r8d
  je     L95
  movslq -0x64(%rsp),%r10
  lea    (%rbx,%r13,1),%r9d
  movslq %esi,%rsi
  mov    %eax,-0x1c(%rsp)
  mov    -0x58(%rsp),%r8
  mov    -0x28(%rsp),%r12
  sub    %r10,%r8
  movslq -0x20(%rsp),%r10
  sub    %rsi,%r12
  movslq -0x5c(%rsp),%rsi
  mov    %ecx,-0x20(%rsp)
  add    %r10,%r8
  lea    (%rax,%r9,1),%r10d
  add    %ecx,%r9d
  imul   %r13d,%r10d
  imul   %r13d,%r9d
  add    %ecx,%r10d
  imul   %r13d,%r10d
  movslq %r10d,%r10
  add    %r8,%r10
  lea    (%r15,%r10,8),%rbp
  lea    (%rax,%r9,1),%r10d
  add    %ecx,%r9d
  mov    -0x38(%rsp),%rax
  imul   %r13d,%r10d
  mov    -0x30(%rsp),%rcx
  imul   %r13d,%r9d
  movslq %r10d,%r10
  movslq %r9d,%r9
  add    %r8,%r10
  add    $0x1,%r8
  add    %r12,%r9
  add    %r8,%rsi
  lea    (%r15,%r10,8),%rbx
  lea    (%r15,%r9,8),%r12
  movslq %r11d,%r9
  mov    -0x48(%rsp),%r11d
  add    %r9,%rsi
  lea    (%rdi,%rsi,8),%r9
  mov    -0x64(%rsp),%esi
  shr    %r11d
  shl    $0x4,%r11
  add    %edx,%esi
  add    %r9,%r11
  imul   %r13d,%esi
  add    %edx,%esi
  imul   %r13d,%esi
  movslq %esi,%rsi
  add    %r8,%rsi
  mov    -0x50(%rsp),%r8
  lea    (%r15,%rsi,8),%r10
  xor    %esi,%esi
  nopl   0x0(%rax,%rax,1)
L109:
  movsd  0x0(%rbp,%rsi,1),%xmm6
  movsd  (%rbx,%rsi,1),%xmm1
  add    $0x10,%r9
  movupd -0x10(%r9),%xmm7
  movhpd 0x0(%rbp,%r8,1),%xmm6
  movhpd (%rbx,%r8,1),%xmm1
  mulpd  %xmm3,%xmm6
  addpd  %xmm1,%xmm1
  addpd  %xmm6,%xmm1
  movsd  (%r12,%rsi,1),%xmm6
  add    %rcx,%rsi
  movhpd (%r12,%r8,1),%xmm6
  add    %rcx,%r8
  subpd  %xmm6,%xmm1
  movsd  (%r10),%xmm6
  movhpd (%r10,%r14,1),%xmm6
  add    %rax,%r10
  subpd  %xmm6,%xmm1
  addpd  %xmm1,%xmm1
  mulpd  %xmm7,%xmm1
  subsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  cmp    %r11,%r9
  jne    L109
  mov    -0x48(%rsp),%ebx
  mov    -0x20(%rsp),%ecx
  mov    -0x1c(%rsp),%eax
  mov    %ebx,%esi
  and    $0xfffffffe,%esi
  add    %esi,%edx
  cmp    %ebx,%esi
  je     L17
L95:
  mov    %r13d,%esi
  mov    -0x64(%rsp),%ebx
  imul   %edx,%esi
  lea    (%rcx,%rsi,1),%r8d
  add    %eax,%esi
  imul   %r13d,%esi
  imul   %r13d,%r8d
  add    %ecx,%esi
  imul   %r13d,%esi
  add    %eax,%esi
  movslq %esi,%rsi
  movsd  (%r15,%rsi,8),%xmm1
  lea    (%rax,%r8,1),%esi
  add    %ecx,%r8d
  imul   %r13d,%esi
  mulsd  %xmm2,%xmm1
  imul   %r13d,%r8d
  add    %eax,%esi
  movslq %esi,%rsi
  add    %ecx,%r8d
  movsd  (%r15,%rsi,8),%xmm6
  lea    (%rbx,%rdx,1),%esi
  movslq %r8d,%r8
  imul   %r13d,%esi
  addsd  %xmm6,%xmm6
  add    %edx,%esi
  imul   %r13d,%esi
  addsd  %xmm6,%xmm1
  subsd  (%r15,%r8,8),%xmm1
  add    %edx,%esi
  add    -0x5c(%rsp),%edx
  add    -0x40(%rsp),%edx
  movslq %esi,%rsi
  movslq %edx,%rdx
  subsd  (%r15,%rsi,8),%xmm1
  addsd  %xmm1,%xmm1
  mulsd  (%rdi,%rdx,8),%xmm1
  subsd  %xmm1,%xmm0
L17:
  test   %ecx,%ecx
  jle    L123
  mov    %r13d,%r10d
  mov    -0x64(%rsp),%r9d
  movslq %ecx,%rbx
  imul   %eax,%r10d
  add    %eax,%r9d
  imul   %r13d,%r9d
  mov    %r10d,%esi
  lea    (%r10,%rcx,1),%r11d
  add    %eax,%r10d
  cltq
  imul   %r13d,%esi
  sub    %rbx,%rax
  imul   %r13d,%r10d
  movslq %r9d,%r9
  imul   %r13d,%r11d
  lea    (%rbx,%r9,1),%rdx
  mov    -0x50(%rsp),%rbx
  imul   %r13d,%esi
  lea    (%r15,%rdx,8),%rdx
  movslq %r10d,%r10
  movslq %r11d,%r11
  add    %rax,%r10
  movslq %esi,%rsi
  sub    %r9,%r11
  sub    %r9,%r10
  xor    %r9d,%r9d
  lea    (%r15,%rsi,8),%r8
  mov    %ecx,%esi
  nopl   (%rax)
L92:
  mov    %r9d,%eax
  movsd  (%rdx),%xmm1
  add    $0x1,%r9d
  movsd  (%rdx,%r11,8),%xmm6
  add    $0x2,%eax
  imul   %r9d,%eax
  mulsd  %xmm2,%xmm1
  addsd  %xmm6,%xmm6
  mov    %eax,%ebp
  shr    $0x1f,%ebp
  add    %ebp,%eax
  addsd  %xmm6,%xmm1
  subsd  (%rdx,%r10,8),%xmm1
  mov    %esi,%ebp
  subsd  (%r8),%xmm1
  sar    %eax
  add    %rbx,%rdx
  add    %r14,%r8
  sub    %eax,%ebp
  add    %r13d,%esi
  movslq %ebp,%rax
  addsd  %xmm1,%xmm1
  mulsd  (%rdi,%rax,8),%xmm1
  subsd  %xmm1,%xmm0
  cmp    %ecx,%r9d
  jne    L92
L123:
  mov    -0x58(%rsp),%rax
  mov    -0x18(%rsp),%rbx
  xorpd  %xmm4,%xmm0
  addl   $0x1,-0x60(%rsp)
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  mov    -0x60(%rsp),%ebx
  subl   $0x1,-0x3c(%rsp)
  mov    %rax,-0x58(%rsp)
  cmp    %ebx,-0xc(%rsp)
  jg     L26
L49:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L179:
  movapd %xmm5,%xmm0
  jmp    L89
L155:
  movapd %xmm5,%xmm0
  jmp    L177
```

tool_calls: name: disassemble_data
arguments: data_label: D17
type_infered: f32[2]
name: disassemble_data
arguments: data_label: D28
type_infered: f32[4]

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

tool: {"D28": [0.0,2.25,0.0,2.25]}

assistant: ```c
void hessian_edmiston(const int Norbs, double *eri, double *vector_in, double *vector_out) {
  int rowindex, p, q, r, s;
  const int num_vars = (Norbs * (Norbs - 1)) / 2;
#pragma omp parallel for schedule(static)
  for (rowindex = 0; rowindex < num_vars; rowindex++) {
    s = num_vars - 1 - rowindex;
    r = 2;
    while ((r * (r - 1)) / 2 <= s) {
      r++;
    }
    p = Norbs - r;
    q = rowindex - p * Norbs + ((p + 1) * (p + 2)) / 2;
    double value = 0.0;
    for (s = p + 1; s < Norbs; s++) {
      const int pqps = p + Norbs * (q + Norbs * (p + Norbs * s));
      const int ppqs = p + Norbs * (p + Norbs * (q + Norbs * s));
      const int qqqs = q + Norbs * (q + Norbs * (q + Norbs * s));
      const int sssq = s + Norbs * (s + Norbs * (s + Norbs * q));
      const double prefactor = 2 * (4 * eri[pqps] + 2 * eri[ppqs] - eri[qqqs] - eri[sssq]);
      const int colindex = rowindex + s - q;
      value += prefactor * vector_in[colindex];
    }
    for (r = 0; r < q; r++) {
      const int qpqr = q + Norbs * (p + Norbs * (q + Norbs * r));
      const int qqpr = q + Norbs * (q + Norbs * (p + Norbs * r));
      const int pppr = p + Norbs * (p + Norbs * (p + Norbs * r));
      const int rrrp = r + Norbs * (r + Norbs * (r + Norbs * p));
      const double prefactor = 2 * (4 * eri[qpqr] + 2 * eri[qqpr] - eri[pppr] - eri[rrrp]);
      const int colindex = q + r * Norbs - ((r + 1) * (r + 2)) / 2;
      value += prefactor * vector_in[colindex];
    }
    for (s = q + 1; s < Norbs; s++) {
      const int qpqs = q + Norbs * (p + Norbs * (q + Norbs * s));
      const int qqps = q + Norbs * (q + Norbs * (p + Norbs * s));
      const int ppps = p + Norbs * (p + Norbs * (p + Norbs * s));
      const int sssp = s + Norbs * (s + Norbs * (s + Norbs * p));
      const double prefactor = 2 * (4 * eri[qpqs] + 2 * eri[qqps] - eri[ppps] - eri[sssp]);
      const int colindex = s + q * Norbs - ((q + 1) * (q + 2)) / 2;
      value -= prefactor * vector_in[colindex];
    }
    for (r = 0; r < p; r++) {
      const int pqpr = p + Norbs * (q + Norbs * (p + Norbs * r));
      const int ppqr = p + Norbs * (p + Norbs * (q + Norbs * r));
      const int qqqr = q + Norbs * (q + Norbs * (q + Norbs * r));
      const int rrrq = r + Norbs * (r + Norbs * (r + Norbs * q));
      const double prefactor = 2 * (4 * eri[pqpr] + 2 * eri[ppqr] - eri[qqqr] - eri[rrrq]);
      const int colindex = p + r * Norbs - ((r + 1) * (r + 2)) / 2;
      value -= prefactor * vector_in[colindex];
    }
    vector_out[rowindex] = -value;
  }
}
```