#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int abs(int);
double compute_cre_des_sign(int, int, int *, int);
int *compute_occ_list(int *, int, int, int);
int /*<<< orphan*/ free(int *);
int *get_single_excitation(int *, int *, int);
int *malloc(int);
int n_excitations(int *, int *, int);
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);
}


x86 assembly (clang, -O0):
<contract_ss_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3f,%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,-0x54(%rbp)
mov    -0x30(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
movq   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
jae    1289 <contract_ss_c+0x119>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x70(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1050 <n_excitations@plt>
mov    %eax,-0xfc(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1050 <n_excitations@plt>
mov    -0xfc(%rbp),%edx
add    %eax,%edx
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11e5 <contract_ss_c+0x75>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
jae    16f6 <contract_ss_c+0x586>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
jae    16e0 <contract_ss_c+0x570>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
sub    (%rax,%rcx,4),%edi
call   1040 <abs@plt>
cmp    $0x3,%eax
jge    16ca <contract_ss_c+0x55a>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x40(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x40(%rbp),%rcx
shl    $0x1,%rcx
movslq -0x54(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x98(%rbp)
mov    -0x80(%rbp),%rdi
mov    -0x90(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1050 <n_excitations@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1050 <n_excitations@plt>
mov    %eax,-0xa0(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
jne    1552 <contract_ss_c+0x3e2>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  0xc17(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xb0(%rbp),%xmm1
ff
movsd  0xbf3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x80(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
call   1080 <compute_occ_list@plt>
mov    %rax,-0xc0(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1080 <compute_occ_list@plt>
mov    %rax,-0xc8(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    1506 <contract_ss_c+0x396>
mov    -0xc0(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xcc(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jae    14f0 <contract_ss_c+0x380>
mov    -0xc8(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xd0(%rbp)
mov    -0xcc(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jne    14da <contract_ss_c+0x36a>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  0xb42(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    14df <contract_ss_c+0x36f>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1487 <contract_ss_c+0x317>
jmp    14f5 <contract_ss_c+0x385>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    145a <contract_ss_c+0x2ea>
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc8(%rbp),%rdi
call   1030 <free@plt>
jmp    16c5 <contract_ss_c+0x555>
mov    -0x9c(%rbp),%eax
add    -0xa0(%rbp),%eax
cmp    $0x2,%eax
jne    16c0 <contract_ss_c+0x550>
mov    -0x9c(%rbp),%eax
cmp    -0xa0(%rbp),%eax
jne    16bb <contract_ss_c+0x54b>
mov    -0x80(%rbp),%rdi
mov    -0x90(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1090 <get_single_excitation@plt>
mov    %rax,-0xe8(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1090 <get_single_excitation@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xe8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xe8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xdc(%rbp)
mov    -0xf0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xd8(%rbp)
mov    -0xf0(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xe0(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xe0(%rbp),%eax
jne    16a3 <contract_ss_c+0x533>
mov    -0xd8(%rbp),%eax
cmp    -0xdc(%rbp),%eax
jne    16a3 <contract_ss_c+0x533>
mov    -0xdc(%rbp),%edi
mov    -0xd4(%rbp),%esi
mov    -0x80(%rbp),%rdx
mov    -0x54(%rbp),%ecx
call   1070 <compute_cre_des_sign@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0xe0(%rbp),%edi
mov    -0xd8(%rbp),%esi
mov    -0x88(%rbp),%rdx
mov    -0x54(%rbp),%ecx
call   1070 <compute_cre_des_sign@plt>
mulsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
jmp    16c0 <contract_ss_c+0x550>
jmp    16c5 <contract_ss_c+0x555>
jmp    16ca <contract_ss_c+0x55a>
jmp    16cf <contract_ss_c+0x55f>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    12aa <contract_ss_c+0x13a>
jmp    16e5 <contract_ss_c+0x575>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1291 <contract_ss_c+0x121>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<contract_ss_c>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r8,0x70(%rsp)
mov    %rcx,%r15
mov    %rdx,0x60(%rsp)
mov    %rsi,0x48(%rsp)
mov    %edi,%ebx
mov    0xe0(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    %r9d,0x40(%rsp)
movslq %r9d,%r12
lea    0x0(,%r12,4),%edi
call   1050 <malloc@plt>
mov    %rax,%rsi
lea    0x3f(%rbx),%eax
mov    %rbx,0xa0(%rsp)
lea    0x7e(%rbx),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x6,%ecx
mov    %ecx,0xc(%rsp)
movl   $0x0,(%rsi)
movslq %ecx,%rax
mov    %rax,0x28(%rsp)
cmp    $0x2,%r12d
mov    %r15,0x50(%rsp)
mov    %rsi,0x30(%rsp)
jb     1253 <contract_ss_c+0xf3>
mov    0x28(%rsp),%rcx
lea    (%r15,%rcx,4),%rax
mov    %rax,0x10(%rsp)
lea    (%rcx,%rcx,2),%rax
lea    (%r15,%rax,4),%rbx
lea    0x0(,%rcx,8),%r13
lea    (%r15,%rcx,8),%rbp
mov    $0x1,%r14d
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
call   1040 <n_excitations@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
mov    0xc(%rsp),%edx
call   1040 <n_excitations@plt>
mov    0x30(%rsp),%rsi
add    %r15d,%eax
mov    0x50(%rsp),%r15
mov    %eax,(%rsi,%r14,4)
add    $0x1,%r14
add    %r13,%rbx
add    %r13,%rbp
cmp    %r14,%r12
jne    1210 <contract_ss_c+0xb0>
cmpl   $0x0,0x40(%rsp)
je     1635 <contract_ss_c+0x4d5>
mov    0x28(%rsp),%rax
add    %rax,%rax
mov    %rax,0x80(%rsp)
mov    0x60(%rsp),%rcx
mov    0x48(%rsp),%rdx
lea    (%rcx,%rdx,1),%eax
cvtsi2sd %eax,%xmm0
mov    %edx,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
mulsd  0xd71(%rip),%xmm0
mulsd  %xmm1,%xmm1
mulsd  0xd6d(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x78(%rsp)
cmp    $0x2,%ecx
mov    $0x1,%eax
cmovae %ecx,%eax
mov    $0x1,%ecx
cmp    $0x2,%edx
cmovae %edx,%ecx
mov    0xc(%rsp),%ebx
movslq %eax,%r13
movslq %ecx,%rax
mov    %rax,0x98(%rsp)
cmp    $0x2,%r12
mov    $0x1,%eax
cmovae %r12,%rax
mov    %rax,0x40(%rsp)
lea    -0x1(%r13),%rax
mov    %rax,0x90(%rsp)
mov    %r13d,%r14d
and    $0x3,%r14d
and    $0xfffffffffffffffc,%r13
xor    %eax,%eax
mov    %rax,0x88(%rsp)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x80(%rsp),%rax
mov    %rcx,0x38(%rsp)
imul   %rcx,%rax
lea    (%r15,%rax,4),%rdi
mov    0x28(%rsp),%rax
lea    (%rdi,%rax,4),%r15
xor    %r12d,%r12d
mov    %rdi,0x20(%rsp)
mov    %r15,0x18(%rsp)
jmp    138d <contract_ss_c+0x22d>
nopl   (%rax)
mov    0x70(%rsp),%rax
mov    0x38(%rsp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    0x68(%rsp),%rax
addsd  (%rax,%rcx,8),%xmm1
movsd  %xmm1,(%rax,%rcx,8)
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rsi
mov    0xc(%rsp),%ebx
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%r15
add    $0x1,%r12
cmp    0x40(%rsp),%r12
je     1610 <contract_ss_c+0x4b0>
mov    0x88(%rsp),%rax
sub    (%rsi,%r12,4),%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
cmp    $0x2,%ecx
ja     137e <contract_ss_c+0x21e>
mov    0x80(%rsp),%rax
imul   %r12,%rax
mov    0x50(%rsp),%rcx
lea    (%rcx,%rax,4),%rbp
mov    0x28(%rsp),%rax
lea    0x0(,%rax,4),%rax
add    %rbp,%rax
mov    %rax,0x10(%rsp)
mov    %rbp,%rsi
mov    %ebx,%edx
call   1040 <n_excitations@plt>
mov    %eax,0x58(%rsp)
mov    %r15,%rdi
mov    0x10(%rsp),%rsi
mov    %ebx,%edx
call   1040 <n_excitations@plt>
cmp    %r12,0x38(%rsp)
jne    1540 <contract_ss_c+0x3e0>
mov    0x20(%rsp),%rdi
mov    %ebx,%esi
mov    0xa0(%rsp),%rbp
mov    %ebp,%edx
mov    0x48(%rsp),%rcx
call   1070 <compute_occ_list@plt>
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    0x60(%rsp),%r15
mov    %r15d,%ecx
call   1070 <compute_occ_list@plt>
mov    0x10(%rsp),%rdi
mov    %rax,%rbp
movsd  0x78(%rsp),%xmm1
cmpl   $0x0,0x48(%rsp)
mov    0x98(%rsp),%rbx
mov    0x90(%rsp),%r8
movsd  0xbb8(%rip),%xmm2
je     1340 <contract_ss_c+0x1e0>
xor    %eax,%eax
movsd  0x78(%rsp),%xmm0
jmp    1485 <contract_ss_c+0x325>
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm1
add    $0x1,%rax
movapd %xmm1,%xmm0
cmp    %rbx,%rax
je     1340 <contract_ss_c+0x1e0>
test   %r15d,%r15d
je     1470 <contract_ss_c+0x310>
mov    (%rdi,%rax,4),%ecx
xor    %edx,%edx
cmp    $0x3,%r8
jae    14e9 <contract_ss_c+0x389>
movapd %xmm0,%xmm1
test   %r14,%r14
je     1474 <contract_ss_c+0x314>
lea    0x0(,%rdx,4),%rdx
add    %rbp,%rdx
xor    %esi,%esi
movapd %xmm0,%xmm1
jmp    14cd <contract_ss_c+0x36d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
movapd %xmm1,%xmm0
cmp    %rsi,%r14
je     1474 <contract_ss_c+0x314>
addsd  %xmm2,%xmm1
cmp    (%rdx,%rsi,4),%ecx
je     14c0 <contract_ss_c+0x360>
movapd %xmm0,%xmm1
jmp    14c0 <contract_ss_c+0x360>
nopl   0x0(%rax)
add    $0x4,%rdx
cmp    %rdx,%r13
je     1495 <contract_ss_c+0x335>
cmp    0x0(%rbp,%rdx,4),%ecx
je     1510 <contract_ss_c+0x3b0>
cmp    0x4(%rbp,%rdx,4),%ecx
je     151a <contract_ss_c+0x3ba>
cmp    0x8(%rbp,%rdx,4),%ecx
je     1524 <contract_ss_c+0x3c4>
cmp    0xc(%rbp,%rdx,4),%ecx
jne    14e0 <contract_ss_c+0x380>
jmp    152e <contract_ss_c+0x3ce>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  %xmm2,%xmm0
cmp    0x4(%rbp,%rdx,4),%ecx
jne    14f5 <contract_ss_c+0x395>
addsd  %xmm2,%xmm0
cmp    0x8(%rbp,%rdx,4),%ecx
jne    14fb <contract_ss_c+0x39b>
addsd  %xmm2,%xmm0
cmp    0xc(%rbp,%rdx,4),%ecx
jne    14e0 <contract_ss_c+0x380>
addsd  %xmm2,%xmm0
jmp    14e0 <contract_ss_c+0x380>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x58(%rsp),%ecx
cmp    %eax,%ecx
mov    0x30(%rsp),%rsi
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%r15
jne    137e <contract_ss_c+0x21e>
add    %ecx,%eax
cmp    $0x2,%eax
jne    137e <contract_ss_c+0x21e>
mov    %rbp,%rsi
mov    %ebx,%edx
call   1080 <get_single_excitation@plt>
mov    %rax,%rbp
mov    %r15,%rdi
mov    0x10(%rsp),%rsi
mov    %ebx,%edx
call   1080 <get_single_excitation@plt>
mov    %rax,%r15
mov    %rbp,%rax
mov    0x0(%rbp),%ebx
cmp    0x4(%r15),%ebx
jne    15f6 <contract_ss_c+0x496>
mov    0x4(%rax),%ebp
cmp    %ebp,(%r15)
jne    15f6 <contract_ss_c+0x496>
mov    %ebp,%edi
mov    %ebx,%esi
mov    0x20(%rsp),%rdx
mov    0xc(%rsp),%ecx
mov    %rax,0x10(%rsp)
call   1060 <compute_cre_des_sign@plt>
movsd  %xmm0,0x58(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
mov    0x18(%rsp),%rdx
mov    0xc(%rsp),%ecx
call   1060 <compute_cre_des_sign@plt>
mov    0x68(%rsp),%rcx
mov    0x38(%rsp),%rdx
movsd  (%rcx,%rdx,8),%xmm1
mulsd  0x58(%rsp),%xmm0
mov    0x70(%rsp),%rax
mulsd  (%rax,%r12,8),%xmm0
mov    0x10(%rsp),%rax
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rdx,8)
mov    %rax,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
jmp    1366 <contract_ss_c+0x206>
cs nopw 0x0(%rax,%rax,1)
mov    0x38(%rsp),%rcx
add    $0x1,%rcx
cmp    0x40(%rsp),%rcx
mov    0x50(%rsp),%r15
je     1635 <contract_ss_c+0x4d5>
mov    (%rsi,%rcx,4),%eax
mov    %rax,0x88(%rsp)
jmp    1310 <contract_ss_c+0x1b0>
mov    %rsi,%rdi
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @contract_ss_c(i32 %0, i32 %1, i32 %2, i32* %3, double* %4, i32 %5, double* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca double*
%13 = alloca i32
%14 = alloca double*
%15 = alloca i32*
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i32
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca i32*
%24 = alloca i32*
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i32*
%28 = alloca i32*
%29 = alloca i32
%30 = alloca i32
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca i32*
%35 = alloca i32*
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32*
%43 = alloca i32*
%44 = alloca double
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32* %3, i32** %11
store double* %4, double** %12
store i32 %5, i32* %13
store double* %6, double** %14
%45 = load i32, i32* %13
%46 = sext i32 %45 to i64
%47 = mul i64 4, %46
%48 = trunc i64 %47 to i32
%49 = call i32* @malloc(i32 %48)
store i32* %49, i32** %15
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 63
%52 = sdiv i32 %51, 64
store i32 %52, i32* %20
%53 = load i32*, i32** %15
%54 = getelementptr inbounds i32, i32* %53, i64 0
store i32 0, i32* %54
%55 = load i32*, i32** %11
store i32* %55, i32** %21
%56 = load i32*, i32** %11
%57 = load i32, i32* %20
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %56, i64 %58
store i32* %59, i32** %22
store i64 1, i64* %16
br label %60
60: ; preds = %95, %7
%61 = load i64, i64* %16
%62 = load i32, i32* %13
%63 = sext i32 %62 to i64
%64 = icmp ult i64 %61, %63
br i1 %64, label %65, label %98
65: ; preds = %60
%66 = load i32*, i32** %11
%67 = load i64, i64* %16
%68 = mul i64 %67, 2
%69 = load i32, i32* %20
%70 = sext i32 %69 to i64
%71 = mul i64 %68, %70
%72 = getelementptr inbounds i32, i32* %66, i64 %71
store i32* %72, i32** %23
%73 = load i32*, i32** %11
%74 = load i64, i64* %16
%75 = mul i64 %74, 2
%76 = load i32, i32* %20
%77 = sext i32 %76 to i64
%78 = mul i64 %75, %77
%79 = getelementptr inbounds i32, i32* %73, i64 %78
%80 = load i32, i32* %20
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i32, i32* %79, i64 %81
store i32* %82, i32** %24
%83 = load i32*, i32** %23
%84 = load i32*, i32** %21
%85 = load i32, i32* %20
%86 = call i32 @n_excitations(i32* %83, i32* %84, i32 %85)
%87 = load i32*, i32** %24
%88 = load i32*, i32** %22
%89 = load i32, i32* %20
%90 = call i32 @n_excitations(i32* %87, i32* %88, i32 %89)
%91 = add nsw i32 %86, %90
%92 = load i32*, i32** %15
%93 = load i64, i64* %16
%94 = getelementptr inbounds i32, i32* %92, i64 %93
store i32 %91, i32* %94
br label %95
95: ; preds = %65
%96 = load i64, i64* %16
%97 = add i64 %96, 1
store i64 %97, i64* %16
br label %60
98: ; preds = %60
store i64 0, i64* %16
br label %99
99: ; preds = %317, %98
%100 = load i64, i64* %16
%101 = load i32, i32* %13
%102 = sext i32 %101 to i64
%103 = icmp ult i64 %100, %102
br i1 %103, label %104, label %320
104: ; preds = %99
store i64 0, i64* %17
br label %105
105: ; preds = %313, %104
%106 = load i64, i64* %17
%107 = load i32, i32* %13
%108 = sext i32 %107 to i64
%109 = icmp ult i64 %106, %108
br i1 %109, label %110, label %316
110: ; preds = %105
%111 = load i32*, i32** %15
%112 = load i64, i64* %16
%113 = getelementptr inbounds i32, i32* %111, i64 %112
%114 = load i32, i32* %113
%115 = load i32*, i32** %15
%116 = load i64, i64* %17
%117 = getelementptr inbounds i32, i32* %115, i64 %116
%118 = load i32, i32* %117
%119 = sub nsw i32 %114, %118
%120 = call i32 @abs(i32 %119)
%121 = icmp slt i32 %120, 3
br i1 %121, label %122, label %312
122: ; preds = %110
%123 = load i32*, i32** %11
%124 = load i64, i64* %16
%125 = mul i64 %124, 2
%126 = load i32, i32* %20
%127 = sext i32 %126 to i64
%128 = mul i64 %125, %127
%129 = getelementptr inbounds i32, i32* %123, i64 %128
store i32* %129, i32** %25
%130 = load i32*, i32** %11
%131 = load i64, i64* %16
%132 = mul i64 %131, 2
%133 = load i32, i32* %20
%134 = sext i32 %133 to i64
%135 = mul i64 %132, %134
%136 = getelementptr inbounds i32, i32* %130, i64 %135
%137 = load i32, i32* %20
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds i32, i32* %136, i64 %138
store i32* %139, i32** %26
%140 = load i32*, i32** %11
%141 = load i64, i64* %17
%142 = mul i64 %141, 2
%143 = load i32, i32* %20
%144 = sext i32 %143 to i64
%145 = mul i64 %142, %144
%146 = getelementptr inbounds i32, i32* %140, i64 %145
store i32* %146, i32** %27
%147 = load i32*, i32** %11
%148 = load i64, i64* %17
%149 = mul i64 %148, 2
%150 = load i32, i32* %20
%151 = sext i32 %150 to i64
%152 = mul i64 %149, %151
%153 = getelementptr inbounds i32, i32* %147, i64 %152
%154 = load i32, i32* %20
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i32, i32* %153, i64 %155
store i32* %156, i32** %28
%157 = load i32*, i32** %25
%158 = load i32*, i32** %27
%159 = load i32, i32* %20
%160 = call i32 @n_excitations(i32* %157, i32* %158, i32 %159)
store i32 %160, i32* %29
%161 = load i32*, i32** %26
%162 = load i32*, i32** %28
%163 = load i32, i32* %20
%164 = call i32 @n_excitations(i32* %161, i32* %162, i32 %163)
store i32 %164, i32* %30
%165 = load i64, i64* %16
%166 = load i64, i64* %17
%167 = icmp eq i64 %165, %166
br i1 %167, label %168, label %243
168: ; preds = %122
%169 = load i32, i32* %9
%170 = load i32, i32* %10
%171 = add nsw i32 %169, %170
%172 = sitofp i32 %171 to double
store double %172, double* %31
%173 = load i32, i32* %9
%174 = load i32, i32* %10
%175 = sub nsw i32 %173, %174
%176 = sitofp i32 %175 to double
store double %176, double* %32
%177 = load double, double* %31
%178 = fdiv double %177, 2.000000e+00
%179 = load double, double* %32
%180 = load double, double* %32
%181 = fmul double %179, %180
%182 = fdiv double %181, 4.000000e+00
%183 = fadd double %178, %182
store double %183, double* %33
%184 = load i32*, i32** %25
%185 = load i32, i32* %20
%186 = load i32, i32* %8
%187 = load i32, i32* %9
%188 = call i32* @compute_occ_list(i32* %184, i32 %185, i32 %186, i32 %187)
store i32* %188, i32** %34
%189 = load i32*, i32** %26
%190 = load i32, i32* %20
%191 = load i32, i32* %8
%192 = load i32, i32* %10
%193 = call i32* @compute_occ_list(i32* %189, i32 %190, i32 %191, i32 %192)
store i32* %193, i32** %35
store i64 0, i64* %18
br label %194
194: ; preds = %225, %168
%195 = load i64, i64* %18
%196 = load i32, i32* %9
%197 = sext i32 %196 to i64
%198 = icmp ult i64 %195, %197
br i1 %198, label %199, label %228
199: ; preds = %194
%200 = load i32*, i32** %34
%201 = load i64, i64* %18
%202 = getelementptr inbounds i32, i32* %200, i64 %201
%203 = load i32, i32* %202
store i32 %203, i32* %36
store i64 0, i64* %19
br label %204
204: ; preds = %221, %199
%205 = load i64, i64* %19
%206 = load i32, i32* %10
%207 = sext i32 %206 to i64
%208 = icmp ult i64 %205, %207
br i1 %208, label %209, label %224
209: ; preds = %204
%210 = load i32*, i32** %35
%211 = load i64, i64* %19
%212 = getelementptr inbounds i32, i32* %210, i64 %211
%213 = load i32, i32* %212
store i32 %213, i32* %37
%214 = load i32, i32* %36
%215 = load i32, i32* %37
%216 = icmp eq i32 %214, %215
br i1 %216, label %217, label %220
217: ; preds = %209
%218 = load double, double* %33
%219 = fsub double %218, 1.000000e+00
store double %219, double* %33
br label %220
220: ; preds = %217, %209
br label %221
221: ; preds = %220
%222 = load i64, i64* %19
%223 = add i64 %222, 1
store i64 %223, i64* %19
br label %204
224: ; preds = %204
br label %225
225: ; preds = %224
%226 = load i64, i64* %18
%227 = add i64 %226, 1
store i64 %227, i64* %18
br label %194
228: ; preds = %194
%229 = load double, double* %33
%230 = load double*, double** %12
%231 = load i64, i64* %16
%232 = getelementptr inbounds double, double* %230, i64 %231
%233 = load double, double* %232
%234 = load double*, double** %14
%235 = load i64, i64* %16
%236 = getelementptr inbounds double, double* %234, i64 %235
%237 = load double, double* %236
%238 = call double @llvm.fmuladd.f64(double %229, double %233, double %237)
store double %238, double* %236
%239 = load i32*, i32** %34
%240 = call i32 @free(i32* %239)
%241 = load i32*, i32** %35
%242 = call i32 @free(i32* %241)
br label %311
243: ; preds = %122
%244 = load i32, i32* %29
%245 = load i32, i32* %30
%246 = add nsw i32 %244, %245
%247 = icmp eq i32 %246, 2
br i1 %247, label %248, label %310
248: ; preds = %243
%249 = load i32, i32* %29
%250 = load i32, i32* %30
%251 = icmp eq i32 %249, %250
br i1 %251, label %252, label %309
252: ; preds = %248
%253 = load i32*, i32** %25
%254 = load i32*, i32** %27
%255 = load i32, i32* %20
%256 = call i32* @get_single_excitation(i32* %253, i32* %254, i32 %255)
store i32* %256, i32** %42
%257 = load i32*, i32** %26
%258 = load i32*, i32** %28
%259 = load i32, i32* %20
%260 = call i32* @get_single_excitation(i32* %257, i32* %258, i32 %259)
store i32* %260, i32** %43
%261 = load i32*, i32** %42
%262 = getelementptr inbounds i32, i32* %261, i64 0
%263 = load i32, i32* %262
store i32 %263, i32* %38
%264 = load i32*, i32** %42
%265 = getelementptr inbounds i32, i32* %264, i64 1
%266 = load i32, i32* %265
store i32 %266, i32* %40
%267 = load i32*, i32** %43
%268 = getelementptr inbounds i32, i32* %267, i64 0
%269 = load i32, i32* %268
store i32 %269, i32* %39
%270 = load i32*, i32** %43
%271 = getelementptr inbounds i32, i32* %270, i64 1
%272 = load i32, i32* %271
store i32 %272, i32* %41
%273 = load i32, i32* %38
%274 = load i32, i32* %41
%275 = icmp eq i32 %273, %274
br i1 %275, label %276, label %304
276: ; preds = %252
%277 = load i32, i32* %39
%278 = load i32, i32* %40
%279 = icmp eq i32 %277, %278
br i1 %279, label %280, label %304
280: ; preds = %276
%281 = load i32, i32* %40
%282 = load i32, i32* %38
%283 = load i32*, i32** %25
%284 = load i32, i32* %20
%285 = call double @compute_cre_des_sign(i32 %281, i32 %282, i32* %283, i32 %284)
store double %285, double* %44
%286 = load i32, i32* %41
%287 = load i32, i32* %39
%288 = load i32*, i32** %26
%289 = load i32, i32* %20
%290 = call double @compute_cre_des_sign(i32 %286, i32 %287, i32* %288, i32 %289)
%291 = load double, double* %44
%292 = fmul double %291, %290
store double %292, double* %44
%293 = load double, double* %44
%294 = load double*, double** %12
%295 = load i64, i64* %17
%296 = getelementptr inbounds double, double* %294, i64 %295
%297 = load double, double* %296
%298 = load double*, double** %14
%299 = load i64, i64* %16
%300 = getelementptr inbounds double, double* %298, i64 %299
%301 = load double, double* %300
%302 = fneg double %293
%303 = call double @llvm.fmuladd.f64(double %302, double %297, double %301)
store double %303, double* %300
br label %304
304: ; preds = %280, %276, %252
%305 = load i32*, i32** %42
%306 = call i32 @free(i32* %305)
%307 = load i32*, i32** %43
%308 = call i32 @free(i32* %307)
br label %309
309: ; preds = %304, %248
br label %310
310: ; preds = %309, %243
br label %311
311: ; preds = %310, %228
br label %312
312: ; preds = %311, %110
br label %313
313: ; preds = %312
%314 = load i64, i64* %17
%315 = add i64 %314, 1
store i64 %315, i64* %17
br label %105
316: ; preds = %105
br label %317
317: ; preds = %316
%318 = load i64, i64* %16
%319 = add i64 %318, 1
store i64 %319, i64* %16
br label %99
320: ; preds = %99
%321 = load i32*, i32** %15
%322 = call i32 @free(i32* %321)
ret void
}

LLVM IR (-O2):
define void @contract_ss_c(i32 %0, i32 %1, i32 %2, i32* %3, double* nocapture %4, i32 %5, double* nocapture %6) {
%8 = sext i32 %5 to i64
%9 = shl i32 %5, 2
%10 = tail call i32* @malloc(i32 %9)
%11 = add nsw i32 %0, 63
%12 = sdiv i32 %11, 64
store i32 0, i32* %10
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %3, i64 %13
%15 = icmp ugt i32 %5, 1
br i1 %15, label %16, label %18
16: ; preds = %7
%17 = shl nsw i64 %13, 1
br label %42
18: ; preds = %42, %7
%19 = icmp eq i32 %5, 0
br i1 %19, label %179, label %20
20: ; preds = %18
%21 = shl nsw i64 %13, 1
%22 = add nsw i32 %2, %1
%23 = sitofp i32 %22 to double
%24 = sub nsw i32 %1, %2
%25 = sitofp i32 %24 to double
%26 = fmul double %23, 5.000000e-01
%27 = fmul double %25, %25
%28 = fmul double %27, 2.500000e-01
%29 = fadd double %26, %28
%30 = icmp eq i32 %1, 0
%31 = icmp eq i32 %2, 0
%32 = call i32 @llvm.umax.i32(i32 %2, i32 1)
%33 = sext i32 %32 to i64
%34 = call i32 @llvm.umax.i32(i32 %1, i32 1)
%35 = sext i32 %34 to i64
%36 = call i64 @llvm.umax.i64(i64 %8, i64 1)
%37 = add nsw i64 %33, -1
%38 = and i64 %33, 3
%39 = icmp ult i64 %37, 3
%40 = and i64 %33, -4
%41 = icmp eq i64 %38, 0
br label %53
42: ; preds = %16, %42
%43 = phi i64 [ 1, %16 ], [ %51, %42 ]
%44 = mul i64 %17, %43
%45 = getelementptr inbounds i32, i32* %3, i64 %44
%46 = getelementptr inbounds i32, i32* %45, i64 %13
%47 = tail call i32 @n_excitations(i32* %45, i32* %3, i32 %12)
%48 = tail call i32 @n_excitations(i32* %46, i32* %14, i32 %12)
%49 = add nsw i32 %48, %47
%50 = getelementptr inbounds i32, i32* %10, i64 %43
store i32 %49, i32* %50
%51 = add nuw i64 %43, 1
%52 = icmp eq i64 %51, %8
br i1 %52, label %18, label %42
53: ; preds = %176, %20
%54 = phi i32 [ 0, %20 ], [ %178, %176 ]
%55 = phi i64 [ 0, %20 ], [ %174, %176 ]
%56 = mul i64 %21, %55
%57 = getelementptr inbounds i32, i32* %3, i64 %56
%58 = getelementptr inbounds i32, i32* %57, i64 %13
%59 = getelementptr inbounds double, double* %6, i64 %55
%60 = getelementptr inbounds double, double* %4, i64 %55
br label %61
61: ; preds = %53, %170
%62 = phi i64 [ 0, %53 ], [ %171, %170 ]
%63 = getelementptr inbounds i32, i32* %10, i64 %62
%64 = load i32, i32* %63
%65 = sub nsw i32 %54, %64
%66 = tail call i32 @llvm.abs.i32(i32 %65, i1 true)
%67 = icmp ult i32 %66, 3
br i1 %67, label %68, label %170
68: ; preds = %61
%69 = mul i64 %21, %62
%70 = getelementptr inbounds i32, i32* %3, i64 %69
%71 = getelementptr inbounds i32, i32* %70, i64 %13
%72 = tail call i32 @n_excitations(i32* %57, i32* %70, i32 %12)
%73 = tail call i32 @n_excitations(i32* %58, i32* %71, i32 %12)
%74 = icmp eq i64 %55, %62
br i1 %74, label %75, label %141
75: ; preds = %68
%76 = tail call i32* @compute_occ_list(i32* %57, i32 %12, i32 %0, i32 %1)
%77 = tail call i32* @compute_occ_list(i32* %58, i32 %12, i32 %0, i32 %2)
br i1 %30, label %134, label %78
78: ; preds = %75, %130
%79 = phi i64 [ %132, %130 ], [ 0, %75 ]
%80 = phi double [ %131, %130 ], [ %29, %75 ]
%81 = getelementptr inbounds i32, i32* %76, i64 %79
%82 = load i32, i32* %81
br i1 %31, label %130, label %83
83: ; preds = %78
br i1 %39, label %114, label %84
84: ; preds = %83, %84
%85 = phi i64 [ %111, %84 ], [ 0, %83 ]
%86 = phi double [ %110, %84 ], [ %80, %83 ]
%87 = phi i64 [ %112, %84 ], [ 0, %83 ]
%88 = getelementptr inbounds i32, i32* %77, i64 %85
%89 = load i32, i32* %88
%90 = icmp eq i32 %82, %89
%91 = fadd double %86, -1.000000e+00
%92 = select i1 %90, double %91, double %86
%93 = or i64 %85, 1
%94 = getelementptr inbounds i32, i32* %77, i64 %93
%95 = load i32, i32* %94
%96 = icmp eq i32 %82, %95
%97 = fadd double %92, -1.000000e+00
%98 = select i1 %96, double %97, double %92
%99 = or i64 %85, 2
%100 = getelementptr inbounds i32, i32* %77, i64 %99
%101 = load i32, i32* %100
%102 = icmp eq i32 %82, %101
%103 = fadd double %98, -1.000000e+00
%104 = select i1 %102, double %103, double %98
%105 = or i64 %85, 3
%106 = getelementptr inbounds i32, i32* %77, i64 %105
%107 = load i32, i32* %106
%108 = icmp eq i32 %82, %107
%109 = fadd double %104, -1.000000e+00
%110 = select i1 %108, double %109, double %104
%111 = add nuw i64 %85, 4
%112 = add i64 %87, 4
%113 = icmp eq i64 %112, %40
br i1 %113, label %114, label %84
114: ; preds = %84, %83
%115 = phi double [ undef, %83 ], [ %110, %84 ]
%116 = phi i64 [ 0, %83 ], [ %111, %84 ]
%117 = phi double [ %80, %83 ], [ %110, %84 ]
br i1 %41, label %130, label %118
118: ; preds = %114, %118
%119 = phi i64 [ %127, %118 ], [ %116, %114 ]
%120 = phi double [ %126, %118 ], [ %117, %114 ]
%121 = phi i64 [ %128, %118 ], [ 0, %114 ]
%122 = getelementptr inbounds i32, i32* %77, i64 %119
%123 = load i32, i32* %122
%124 = icmp eq i32 %82, %123
%125 = fadd double %120, -1.000000e+00
%126 = select i1 %124, double %125, double %120
%127 = add nuw i64 %119, 1
%128 = add i64 %121, 1
%129 = icmp eq i64 %128, %38
br i1 %129, label %130, label %118
130: ; preds = %114, %118, %78
%131 = phi double [ %80, %78 ], [ %115, %114 ], [ %126, %118 ]
%132 = add nuw i64 %79, 1
%133 = icmp eq i64 %132, %35
br i1 %133, label %134, label %78
134: ; preds = %130, %75
%135 = phi double [ %29, %75 ], [ %131, %130 ]
%136 = load double, double* %60
%137 = load double, double* %59
%138 = tail call double @llvm.fmuladd.f64(double %135, double %136, double %137)
store double %138, double* %59
%139 = tail call i32 @free(i32* %76)
%140 = tail call i32 @free(i32* %77)
br label %170
141: ; preds = %68
%142 = add nsw i32 %73, %72
%143 = icmp eq i32 %142, 2
%144 = icmp eq i32 %72, %73
%145 = and i1 %144, %143
br i1 %145, label %146, label %170
146: ; preds = %141
%147 = tail call i32* @get_single_excitation(i32* %57, i32* %70, i32 %12)
%148 = tail call i32* @get_single_excitation(i32* %58, i32* %71, i32 %12)
%149 = load i32, i32* %147
%150 = getelementptr inbounds i32, i32* %147, i64 1
%151 = load i32, i32* %150
%152 = load i32, i32* %148
%153 = getelementptr inbounds i32, i32* %148, i64 1
%154 = load i32, i32* %153
%155 = icmp eq i32 %149, %154
%156 = icmp eq i32 %152, %151
%157 = select i1 %155, i1 %156, i1 false
br i1 %157, label %158, label %167
158: ; preds = %146
%159 = tail call double @compute_cre_des_sign(i32 %151, i32 %149, i32* %57, i32 %12)
%160 = tail call double @compute_cre_des_sign(i32 %149, i32 %151, i32* %58, i32 %12)
%161 = getelementptr inbounds double, double* %4, i64 %62
%162 = load double, double* %161
%163 = load double, double* %59
%164 = fneg double %159
%165 = fmul double %160, %164
%166 = tail call double @llvm.fmuladd.f64(double %165, double %162, double %163)
store double %166, double* %59
br label %167
167: ; preds = %158, %146
%168 = tail call i32 @free(i32* %147)
%169 = tail call i32 @free(i32* %148)
br label %170
170: ; preds = %134, %141, %167, %61
%171 = add nuw i64 %62, 1
%172 = icmp eq i64 %171, %36
br i1 %172, label %173, label %61
173: ; preds = %170
%174 = add nuw i64 %55, 1
%175 = icmp eq i64 %174, %36
br i1 %175, label %179, label %176
176: ; preds = %173
%177 = getelementptr inbounds i32, i32* %10, i64 %174
%178 = load i32, i32* %177
br label %53
179: ; preds = %173, %18
%180 = tail call i32 @free(i32* %10)
ret void
}