user: Translate the below assembly code into C programming language:

```asm
<contract_ss_c>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %edi,-0xe4(%rbp)
  mov    %esi,-0xe8(%rbp)
  mov    %edx,-0xec(%rbp)
  mov    %rcx,-0xf8(%rbp)
  mov    %r8,-0x100(%rbp)
  mov    %r9d,-0xf0(%rbp)
  mov    -0xf0(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x90(%rbp)
  mov    -0xe4(%rbp),%eax
  add    $0x3f,%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,-0xdc(%rbp)
  mov    -0x90(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0xf8(%rbp),%rax
  mov    %rax,-0x88(%rbp)
  mov    -0xdc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x80(%rbp)
  movq   $0x1,-0xb8(%rbp)
  jmp    L24
L10:
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb8(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0xdc(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0x88(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <n_excitations@plt>
  mov    %eax,%ebx
  mov    -0xdc(%rbp),%edx
  mov    -0x80(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <n_excitations@plt>
  mov    %eax,%edx
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x90(%rbp),%rax
  add    %rcx,%rax
  add    %ebx,%edx
  mov    %edx,(%rax)
  addq   $0x1,-0xb8(%rbp)
L24:
  mov    -0xf0(%rbp),%eax
  cltq
  cmp    %rax,-0xb8(%rbp)
  jb     L10
  movq   $0x0,-0xb8(%rbp)
  jmp    L144
L55:
  movq   $0x0,-0xb0(%rbp)
  jmp    L127
L120:
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0xb0(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  cmp    $0xfffffffe,%eax
  jl     L129
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0xb0(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  cmp    $0x2,%eax
  jg     L129
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x78(%rbp)
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb8(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0xdc(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0xdc(%rbp),%eax
  cltq
  imul   -0xb0(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0xdc(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0x68(%rbp),%rcx
  mov    -0x78(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <n_excitations@plt>
  mov    %eax,-0xd8(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0x60(%rbp),%rcx
  mov    -0x70(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <n_excitations@plt>
  mov    %eax,-0xd4(%rbp)
  mov    -0xb8(%rbp),%rax
  cmp    -0xb0(%rbp),%rax
  jne    L19
  mov    -0xe8(%rbp),%edx
  mov    -0xec(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0xe8(%rbp),%eax
  sub    -0xec(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  D20(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  D10(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0xe8(%rbp),%ecx
  mov    -0xe4(%rbp),%edx
  mov    -0xdc(%rbp),%esi
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <compute_occ_list@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0xec(%rbp),%ecx
  mov    -0xe4(%rbp),%edx
  mov    -0xdc(%rbp),%esi
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <compute_occ_list@plt>
  mov    %rax,-0x28(%rbp)
  movq   $0x0,-0xa8(%rbp)
  jmp    L165
L18:
  mov    -0xa8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc0(%rbp)
  movq   $0x0,-0xa0(%rbp)
  jmp    L79
L116:
  mov    -0xa0(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xbc(%rbp)
  mov    -0xc0(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jne    L168
  movsd  -0x98(%rbp),%xmm0
  movsd  D1(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
L168:
  addq   $0x1,-0xa0(%rbp)
L79:
  mov    -0xec(%rbp),%eax
  cltq
  cmp    %rax,-0xa0(%rbp)
  jb     L116
  addq   $0x1,-0xa8(%rbp)
L165:
  mov    -0xe8(%rbp),%eax
  cltq
  cmp    %rax,-0xa8(%rbp)
  jb     L18
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x100(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x98(%rbp),%xmm0
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L129
L19:
  mov    -0xd8(%rbp),%edx
  mov    -0xd4(%rbp),%eax
  add    %edx,%eax
  cmp    $0x2,%eax
  jne    L129
  mov    -0xd8(%rbp),%eax
  cmp    -0xd4(%rbp),%eax
  jne    L129
  mov    -0xdc(%rbp),%edx
  mov    -0x68(%rbp),%rcx
  mov    -0x78(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <get_single_excitation@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0xdc(%rbp),%edx
  mov    -0x60(%rbp),%rcx
  mov    -0x70(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <get_single_excitation@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0xd0(%rbp)
  mov    -0x58(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0xcc(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0xc8(%rbp)
  mov    -0x50(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0xc4(%rbp)
  mov    -0xd0(%rbp),%eax
  cmp    -0xc4(%rbp),%eax
  jne    L124
  mov    -0xc8(%rbp),%eax
  cmp    -0xcc(%rbp),%eax
  jne    L124
  mov    -0xdc(%rbp),%ecx
  mov    -0x78(%rbp),%rdx
  mov    -0xd0(%rbp),%esi
  mov    -0xcc(%rbp),%eax
  mov    %eax,%edi
  call   <compute_cre_des_sign@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0xdc(%rbp),%ecx
  mov    -0x70(%rbp),%rdx
  mov    -0xc8(%rbp),%esi
  mov    -0xc4(%rbp),%eax
  mov    %eax,%edi
  call   <compute_cre_des_sign@plt>
  movsd  -0x48(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xb0(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x100(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x48(%rbp),%xmm1
  mov    -0xb8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L124:
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L129:
  addq   $0x1,-0xb0(%rbp)
L127:
  mov    -0xf0(%rbp),%eax
  cltq
  cmp    %rax,-0xb0(%rbp)
  jb     L120
  addq   $0x1,-0xb8(%rbp)
L144:
  mov    -0xf0(%rbp),%eax
  cltq
  cmp    %rax,-0xb8(%rbp)
  jb     L55
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D20
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D10
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D1
type_infered: f64

tool: D20: 2

tool: D10: 4

tool: D1: 1

assistant: ```c
void contract_ss_c(int norb, int neleca, int nelecb, uint64_t *strs, double *civec, uint64_t ndet, double *ci1) {
  int *ts = malloc(sizeof(int) * ndet);
#pragma omp parallel
  {
    size_t ip, jp, p, q;
    int nset = (norb + 63) / 64;
    ts[0] = 0;
    uint64_t *str1a = strs;
    uint64_t *str1b = strs + nset;
#pragma omp for schedule(static)
    for (ip = 1; ip < ndet; ++ip) {
      uint64_t *stria = strs + ip * 2 * nset;
      uint64_t *strib = strs + ip * 2 * nset + nset;
      ts[ip] = (n_excitations(stria, str1a, nset) + n_excitations(strib, str1b, nset));
    }
#pragma omp for schedule(static)
    for (ip = 0; ip < ndet; ++ip) {
      for (jp = 0; jp < ndet; ++jp) {
        if (abs(ts[ip] - ts[jp]) < 3) {
          uint64_t *stria = strs + ip * 2 * nset;
          uint64_t *strib = strs + ip * 2 * nset + nset;
          uint64_t *strja = strs + jp * 2 * nset;
          uint64_t *strjb = strs + jp * 2 * nset + nset;
          int n_excit_a = n_excitations(stria, strja, nset);
          int n_excit_b = n_excitations(strib, strjb, nset);
          if (ip == jp) {
            double apb = (double)(neleca + nelecb);
            double amb = (double)(neleca - nelecb);
            double prefactor = apb / 2.0 + amb * amb / 4.0;
            int *occsa = compute_occ_list(stria, nset, norb, neleca);
            int *occsb = compute_occ_list(strib, nset, norb, nelecb);
            for (p = 0; p < neleca; ++p) {
              int pa = occsa[p];
              for (q = 0; q < nelecb; ++q) {
                int qb = occsb[q];
                if (pa == qb)
                  prefactor -= 1.0;
              }
            }
            ci1[ip] += prefactor * civec[ip];
            free(occsa);
            free(occsb);
          } else if ((n_excit_a + n_excit_b) == 2) {
            int i, j, a, b;
            if (n_excit_a == n_excit_b) {
              int *ia = get_single_excitation(stria, strja, nset);
              int *jb = get_single_excitation(strib, strjb, nset);
              i = ia[0];
              a = ia[1];
              j = jb[0];
              b = jb[1];
              if (i == b && j == a) {
                double sign = compute_cre_des_sign(a, i, stria, nset);
                sign *= compute_cre_des_sign(b, j, strib, nset);
                ci1[ip] -= sign * civec[jp];
              }
              free(ia);
              free(jb);
            }
          }
        }
      }
    }
  }
  free(ts);
}
```