#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 */

/* Variables and functions */
double *B_array(int, int, int, int, double, double, double, double, double,
                double, double, double, double);
double Fgamma(int, double);
double dist2(double, double, double, double, double, double);
int exp(double);
int /*<<< orphan*/ free(double *);
int pow(double, double);
double product_center_1D(double, double, double, double);
double sqrt(double);
double coulomb_repulsion(double xa, double ya, double za, double norma, int la,
                         int ma, int na, double alphaa, double xb, double yb,
                         double zb, double normb, int lb, int mb, int nb,
                         double alphab, double xc, double yc, double zc,
                         double normc, int lc, int mc, int nc, double alphac,
                         double xd, double yd, double zd, double normd, int ld,
                         int md, int nd, double alphad) {
  double rab2, rcd2, rpq2, xp, yp, zp, xq, yq, zq, gamma1, gamma2, delta, sum;
  double *Bx, *By, *Bz;
  int I, J, K;
  rab2 = dist2(xa, ya, za, xb, yb, zb);
  rcd2 = dist2(xc, yc, zc, xd, yd, zd);
  xp = product_center_1D(alphaa, xa, alphab, xb);
  yp = product_center_1D(alphaa, ya, alphab, yb);
  zp = product_center_1D(alphaa, za, alphab, zb);
  xq = product_center_1D(alphac, xc, alphad, xd);
  yq = product_center_1D(alphac, yc, alphad, yd);
  zq = product_center_1D(alphac, zc, alphad, zd);
  rpq2 = dist2(xp, yp, zp, xq, yq, zq);
  gamma1 = alphaa + alphab;
  gamma2 = alphac + alphad;
  delta = (1. / gamma1 + 1. / gamma2) / 4.;
  Bx = B_array(la, lb, lc, ld, xp, xa, xb, xq, xc, xd, gamma1, gamma2, delta);
  By = B_array(ma, mb, mc, md, yp, ya, yb, yq, yc, yd, gamma1, gamma2, delta);
  Bz = B_array(na, nb, nc, nd, zp, za, zb, zq, zc, zd, gamma1, gamma2, delta);
  sum = 0.;
  for (I = 0; I < la + lb + lc + ld + 1; I++)
    for (J = 0; J < ma + mb + mc + md + 1; J++)
      for (K = 0; K < na + nb + nc + nd + 1; K++)
        sum += Bx[I] * By[J] * Bz[K] * Fgamma(I + J + K, 0.25 * rpq2 / delta);
  free(Bx);
  free(By);
  free(Bz);
  return 2. * pow(3.14159265358979323846, 2.5) /
         (gamma1 * gamma2 * sqrt(gamma1 + gamma2)) *
         exp(-alphaa * alphab * rab2 / gamma1) *
         exp(-alphac * alphad * rcd2 / gamma2) * sum * norma * normb * normc *
         normd;
}


x86 assembly (clang, -O0):
<coulomb_repulsion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movsd  0x98(%rbp),%xmm8
mov    0x90(%rbp),%eax
mov    0x88(%rbp),%eax
mov    0x80(%rbp),%eax
movsd  0x78(%rbp),%xmm8
movsd  0x70(%rbp),%xmm8
movsd  0x68(%rbp),%xmm8
movsd  0x60(%rbp),%xmm8
movsd  0x58(%rbp),%xmm8
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
mov    %ecx,-0x54(%rbp)
mov    %r8d,-0x58(%rbp)
mov    %r9d,-0x5c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
call   1070 <dist2@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0x20(%rbp),%xmm0
movsd  0x28(%rbp),%xmm1
movsd  0x30(%rbp),%xmm2
movsd  0x60(%rbp),%xmm3
movsd  0x68(%rbp),%xmm4
movsd  0x70(%rbp),%xmm5
call   1070 <dist2@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x18(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x18(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0x18(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x58(%rbp),%xmm0
movsd  0x20(%rbp),%xmm1
movsd  0x98(%rbp),%xmm2
movsd  0x60(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0x98(%rbp)
movsd  0x58(%rbp),%xmm0
movsd  0x28(%rbp),%xmm1
movsd  0x98(%rbp),%xmm2
movsd  0x68(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x58(%rbp),%xmm0
movsd  0x30(%rbp),%xmm1
movsd  0x98(%rbp),%xmm2
movsd  0x70(%rbp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm3
ff
movsd  -0xa0(%rbp),%xmm4
ff
movsd  -0xa8(%rbp),%xmm5
ff
call   1070 <dist2@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  0x18(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x58(%rbp),%xmm0
addsd  0x98(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xc59(%rip),%xmm0
divsd  -0xb0(%rbp),%xmm0
ff
movsd  0xc49(%rip),%xmm1
divsd  -0xb8(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  0xc2d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x24(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    0x40(%rbp),%edx
mov    0x80(%rbp),%ecx
movsd  -0x80(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm3
ff
movsd  0x20(%rbp),%xmm4
movsd  0x60(%rbp),%xmm5
movsd  -0xb0(%rbp),%xmm6
ff
movsd  -0xb8(%rbp),%xmm7
ff
movsd  -0xc0(%rbp),%xmm8
ff ff
movsd  %xmm8,(%rsp)
call   1060 <B_array@plt>
mov    %rax,-0xd0(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x58(%rbp),%esi
mov    0x48(%rbp),%edx
mov    0x88(%rbp),%ecx
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm3
ff
movsd  0x28(%rbp),%xmm4
movsd  0x68(%rbp),%xmm5
movsd  -0xb0(%rbp),%xmm6
ff
movsd  -0xb8(%rbp),%xmm7
ff
movsd  -0xc0(%rbp),%xmm8
ff ff
movsd  %xmm8,(%rsp)
call   1060 <B_array@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x5c(%rbp),%esi
mov    0x50(%rbp),%edx
mov    0x90(%rbp),%ecx
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x18(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm3
ff
movsd  0x30(%rbp),%xmm4
movsd  0x70(%rbp),%xmm5
movsd  -0xb0(%rbp),%xmm6
ff
movsd  -0xb8(%rbp),%xmm7
ff
movsd  -0xc0(%rbp),%xmm8
ff ff
movsd  %xmm8,(%rsp)
call   1060 <B_array@plt>
mov    %rax,-0xe0(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x54(%rbp),%ecx
add    0x40(%rbp),%ecx
add    0x80(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1655 <coulomb_repulsion+0x4d5>
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    -0x58(%rbp),%ecx
add    0x48(%rbp),%ecx
add    0x88(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    163c <coulomb_repulsion+0x4bc>
movl   $0x0,-0xec(%rbp)
mov    -0xec(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    -0x5c(%rbp),%ecx
add    0x50(%rbp),%ecx
add    0x90(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1623 <coulomb_repulsion+0x4a3>
mov    -0xd0(%rbp),%rax
movslq -0xe4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xd8(%rbp),%rax
movslq -0xe8(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0xe0(%rbp),%rax
movslq -0xec(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0xe4(%rbp),%edi
add    -0xe8(%rbp),%edi
add    -0xec(%rbp),%edi
movsd  0xa4e(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
call   1040 <Fgamma@plt>
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    155f <coulomb_repulsion+0x3df>
jmp    1628 <coulomb_repulsion+0x4a8>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1535 <coulomb_repulsion+0x3b5>
jmp    1641 <coulomb_repulsion+0x4c1>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    150b <coulomb_repulsion+0x38b>
mov    -0xd0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
movsd  0x997(%rip),%xmm0
movsd  0x997(%rip),%xmm1
call   1090 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0x976(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
call   10a0 <sqrt@plt>
movsd  -0x118(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  0x18(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
divsd  -0xb0(%rbp),%xmm0
ff
call   1080 <exp@plt>
movsd  -0x108(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  0x98(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
call   1080 <exp@plt>
movsd  -0x100(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0x20(%rbp),%xmm0
mulsd  0x10(%rbp),%xmm0
mulsd  0x38(%rbp),%xmm0
mulsd  0x78(%rbp),%xmm0
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coulomb_repulsion>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %r9,0xd8(%rsp)
mov    %r8d,%r15d
mov    %ecx,%ebx
movsd  %xmm7,0x50(%rsp)
movsd  %xmm6,0x40(%rsp)
movsd  %xmm5,0x20(%rsp)
movaps %xmm4,0x70(%rsp)
mov    %rdx,0xd0(%rsp)
mov    %esi,%r13d
mov    %edi,%r14d
movsd  %xmm3,0xf0(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm0,0x28(%rsp)
mov    0x1a0(%rsp),%r12d
movaps %xmm5,%xmm3
movaps %xmm6,%xmm4
movaps %xmm7,%xmm5
call   1070 <dist2@plt>
movsd  %xmm0,0xe0(%rsp)
movsd  0x140(%rsp),%xmm0
movsd  0x148(%rsp),%xmm1
movsd  0x150(%rsp),%xmm2
movsd  0x180(%rsp),%xmm3
movsd  0x188(%rsp),%xmm4
movsd  0x190(%rsp),%xmm5
call   1070 <dist2@plt>
movsd  %xmm0,0xe8(%rsp)
movaps 0x70(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x138(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,0x98(%rsp)
movaps 0x70(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x138(%rsp),%xmm2
movsd  0x40(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,0x30(%rsp)
movaps 0x70(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x138(%rsp),%xmm2
movsd  0x50(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x178(%rsp),%xmm0
movsd  0x140(%rsp),%xmm1
movsd  0x1b8(%rsp),%xmm2
movsd  0x180(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,0x88(%rsp)
movsd  0x178(%rsp),%xmm0
movsd  0x148(%rsp),%xmm1
movsd  0x1b8(%rsp),%xmm2
movsd  0x188(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movsd  %xmm0,0x90(%rsp)
movsd  0x178(%rsp),%xmm0
movsd  0x150(%rsp),%xmm1
movsd  0x1b8(%rsp),%xmm2
movsd  0x190(%rsp),%xmm3
call   1050 <product_center_1D@plt>
movaps %xmm0,%xmm5
movsd  %xmm0,0xc8(%rsp)
movsd  0x98(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
movsd  0x88(%rsp),%xmm3
movsd  0x90(%rsp),%xmm4
call   1070 <dist2@plt>
movsd  %xmm0,0x68(%rsp)
movapd 0x70(%rsp),%xmm1
addsd  0x138(%rsp),%xmm1
movsd  0x178(%rsp),%xmm2
addsd  0x1b8(%rsp),%xmm2
movsd  0xc59(%rip),%xmm3
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm1,%xmm6
movapd %xmm1,0xa0(%rsp)
divsd  %xmm2,%xmm3
movapd %xmm2,%xmm7
movapd %xmm2,0xb0(%rsp)
addsd  %xmm0,%xmm3
mulsd  0xc2f(%rip),%xmm3
movsd  %xmm3,0x18(%rsp)
movsd  %xmm3,(%rsp)
mov    %r14d,%edi
mov    %ebx,%esi
mov    0x160(%rsp),%edx
mov    %r12d,%ecx
movsd  0x98(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x88(%rsp),%xmm3
movsd  0x140(%rsp),%xmm4
movsd  0x180(%rsp),%xmm5
call   1060 <B_array@plt>
mov    %rax,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r13,%r12
mov    %r13d,%edi
mov    %r15,%rbp
mov    %r15d,%esi
mov    0x168(%rsp),%edx
mov    0x1a8(%rsp),%ecx
movsd  0x30(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x90(%rsp),%xmm3
movsd  0x148(%rsp),%xmm4
movsd  0x188(%rsp),%xmm5
movaps 0xa0(%rsp),%xmm6
movaps 0xb0(%rsp),%xmm7
call   1060 <B_array@plt>
mov    %rax,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0xd0(%rsp),%rdi
mov    %rdi,%r15
mov    0xd8(%rsp),%rsi
mov    %rsi,%r13
mov    0x170(%rsp),%edx
mov    0x1b0(%rsp),%ecx
movsd  0x38(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
movsd  0xc8(%rsp),%xmm3
movsd  0x150(%rsp),%xmm4
movsd  0x190(%rsp),%xmm5
movaps 0xa0(%rsp),%xmm6
movaps 0xb0(%rsp),%xmm7
call   1060 <B_array@plt>
mov    0x160(%rsp),%r8d
mov    %rbx,%rdx
movsd  0x68(%rsp),%xmm0
mov    0x1a0(%rsp),%ecx
mov    %rax,%rbx
lea    (%rdx,%r14,1),%eax
add    %r8d,%eax
add    %ecx,%eax
xorpd  %xmm1,%xmm1
js     166b <coulomb_repulsion+0x4eb>
lea    (%r12,%rbp,1),%esi
mov    0x168(%rsp),%r9d
add    %r9d,%esi
mov    0x1a8(%rsp),%eax
add    %eax,%esi
mov    %esi,0x38(%rsp)
lea    (%r15,%r13,1),%esi
mov    0x170(%rsp),%r10d
add    %r10d,%esi
mov    0x1b0(%rsp),%edi
add    %edi,%esi
mov    %esi,0x48(%rsp)
mulsd  0xa90(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
add    %r10d,%edi
add    %r13d,%edi
lea    (%r15,%rdi,1),%esi
add    $0x1,%esi
add    %r9d,%eax
add    %ebp,%eax
add    %r12d,%eax
add    $0x1,%eax
mov    %rax,0x40(%rsp)
add    %r8d,%ecx
add    %edx,%ecx
lea    (%r14,%rcx,1),%eax
add    $0x1,%eax
mov    %rax,0x30(%rsp)
xorpd  %xmm1,%xmm1
xor    %r15d,%r15d
movsd  %xmm0,0x68(%rsp)
mov    %rbx,0x50(%rsp)
jmp    15cf <coulomb_repulsion+0x44f>
add    $0x1,%r15
cmp    0x30(%rsp),%r15
je     166b <coulomb_repulsion+0x4eb>
cmpl   $0x0,0x38(%rsp)
js     15c0 <coulomb_repulsion+0x440>
mov    %r15,%r12
xor    %r13d,%r13d
jmp    15f4 <coulomb_repulsion+0x474>
xchg   %ax,%ax
add    $0x1,%r13
add    $0x1,%r12
cmp    0x40(%rsp),%r13
mov    0x50(%rsp),%rbx
je     15c0 <coulomb_repulsion+0x440>
cmpl   $0x0,0x48(%rsp)
js     15e0 <coulomb_repulsion+0x460>
xor    %r14d,%r14d
mov    0x20(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm1,0x18(%rsp)
mov    0x28(%rsp),%rdi
movsd  (%rdi,%r15,8),%xmm0
mulsd  (%rbx,%r13,8),%xmm0
mov    0x50(%rsp),%rdi
mulsd  (%rdi,%r14,8),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    (%r12,%r14,1),%edi
movsd  0x68(%rsp),%xmm0
mov    %rsi,%rbp
call   1040 <Fgamma@plt>
mov    %rbp,%rsi
movsd  0x18(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm1
add    $0x1,%r14
cmp    %r14,%rbp
jne    1610 <coulomb_repulsion+0x490>
jmp    15e0 <coulomb_repulsion+0x460>
movsd  %xmm1,0x18(%rsp)
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
movsd  0x97b(%rip),%xmm0
movsd  0x97b(%rip),%xmm1
call   1090 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0xa0(%rsp),%xmm0
movapd %xmm0,%xmm2
movapd 0xb0(%rsp),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm1,%xmm0
ucomisd 0x947(%rip),%xmm0
jb     16e1 <coulomb_repulsion+0x561>
sqrtsd %xmm0,%xmm0
jmp    16f2 <coulomb_repulsion+0x572>
movapd %xmm2,0x50(%rsp)
call   10a0 <sqrt@plt>
movapd 0x50(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  0x10(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0x70(%rsp),%xmm0
xorpd  0x91c(%rip),%xmm0
mulsd  0x138(%rsp),%xmm0
mulsd  0xe0(%rsp),%xmm0
divsd  0xa0(%rsp),%xmm0
call   1080 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x178(%rsp),%xmm0
xorpd  0x8d8(%rip),%xmm0
mulsd  0x1b8(%rsp),%xmm0
mulsd  0xe8(%rsp),%xmm0
divsd  0xb0(%rsp),%xmm0
call   1080 <exp@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xf0(%rsp),%xmm0
mulsd  0x130(%rsp),%xmm0
mulsd  0x158(%rsp),%xmm0
mulsd  0x198(%rsp),%xmm0
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double @coulomb_repulsion(double %0, double %1, double %2, double %3, i32 %4, i32 %5, i32 %6, double %7, double %8, double %9, double %10, double %11, i32 %12, i32 %13, i32 %14, double %15, double %16, double %17, double %18, double %19, i32 %20, i32 %21, i32 %22, double %23, double %24, double %25, double %26, double %27, i32 %28, i32 %29, i32 %30, double %31) {
%33 = tail call double @dist2(double %0, double %1, double %2, double %8, double %9, double %10)
%34 = tail call double @dist2(double %16, double %17, double %18, double %24, double %25, double %26)
%35 = tail call double @product_center_1D(double %7, double %0, double %15, double %8)
%36 = tail call double @product_center_1D(double %7, double %1, double %15, double %9)
%37 = tail call double @product_center_1D(double %7, double %2, double %15, double %10)
%38 = tail call double @product_center_1D(double %23, double %16, double %31, double %24)
%39 = tail call double @product_center_1D(double %23, double %17, double %31, double %25)
%40 = tail call double @product_center_1D(double %23, double %18, double %31, double %26)
%41 = tail call double @dist2(double %35, double %36, double %37, double %38, double %39, double %40)
%42 = fadd double %7, %15
%43 = fadd double %23, %31
%44 = fdiv double 1.000000e+00, %42
%45 = fdiv double 1.000000e+00, %43
%46 = fadd double %44, %45
%47 = fmul double %46, 2.500000e-01
%48 = tail call double* @B_array(i32 %4, i32 %12, i32 %20, i32 %28, double %35, double %0, double %8, double %38, double %16, double %24, double %42, double %43, double %47)
%49 = tail call double* @B_array(i32 %5, i32 %13, i32 %21, i32 %29, double %36, double %1, double %9, double %39, double %17, double %25, double %42, double %43, double %47)
%50 = tail call double* @B_array(i32 %6, i32 %14, i32 %22, i32 %30, double %37, double %2, double %10, double %40, double %18, double %26, double %42, double %43, double %47)
%51 = add nsw i32 %12, %4
%52 = add nsw i32 %51, %20
%53 = add nsw i32 %52, %28
%54 = icmp slt i32 %53, 0
br i1 %54, label %115, label %55
55: ; preds = %32
%56 = add nsw i32 %13, %5
%57 = add nsw i32 %56, %21
%58 = add nsw i32 %57, %29
%59 = icmp slt i32 %58, 0
%60 = add nsw i32 %14, %6
%61 = add nsw i32 %60, %22
%62 = add nsw i32 %61, %30
%63 = icmp slt i32 %62, 0
%64 = fmul double %41, 2.500000e-01
%65 = fdiv double %64, %47
%66 = add i32 %30, %22
%67 = add i32 %66, %14
%68 = add i32 %67, %6
%69 = add i32 %68, 1
%70 = add i32 %29, %21
%71 = add i32 %70, %13
%72 = add i32 %71, %5
%73 = add i32 %72, 1
%74 = add i32 %28, %20
%75 = add i32 %74, %12
%76 = add i32 %75, %4
%77 = add i32 %76, 1
%78 = zext i32 %77 to i64
%79 = zext i32 %73 to i64
%80 = zext i32 %69 to i64
br label %81
81: ; preds = %55, %111
%82 = phi i64 [ 0, %55 ], [ %113, %111 ]
%83 = phi double [ 0.000000e+00, %55 ], [ %112, %111 ]
br i1 %59, label %111, label %84
84: ; preds = %81
%85 = getelementptr inbounds double, double* %48, i64 %82
br label %86
86: ; preds = %84, %107
%87 = phi i64 [ 0, %84 ], [ %109, %107 ]
%88 = phi double [ %83, %84 ], [ %108, %107 ]
br i1 %63, label %107, label %89
89: ; preds = %86
%90 = getelementptr inbounds double, double* %49, i64 %87
%91 = add nuw nsw i64 %87, %82
br label %92
92: ; preds = %89, %92
%93 = phi i64 [ 0, %89 ], [ %105, %92 ]
%94 = phi double [ %88, %89 ], [ %104, %92 ]
%95 = load double, double* %85
%96 = load double, double* %90
%97 = fmul double %95, %96
%98 = getelementptr inbounds double, double* %50, i64 %93
%99 = load double, double* %98
%100 = fmul double %97, %99
%101 = add nuw nsw i64 %91, %93
%102 = trunc i64 %101 to i32
%103 = tail call double @Fgamma(i32 %102, double %65)
%104 = tail call double @llvm.fmuladd.f64(double %100, double %103, double %94)
%105 = add nuw nsw i64 %93, 1
%106 = icmp eq i64 %105, %80
br i1 %106, label %107, label %92
107: ; preds = %92, %86
%108 = phi double [ %88, %86 ], [ %104, %92 ]
%109 = add nuw nsw i64 %87, 1
%110 = icmp eq i64 %109, %79
br i1 %110, label %111, label %86
111: ; preds = %107, %81
%112 = phi double [ %83, %81 ], [ %108, %107 ]
%113 = add nuw nsw i64 %82, 1
%114 = icmp eq i64 %113, %78
br i1 %114, label %115, label %81
115: ; preds = %111, %32
%116 = phi double [ 0.000000e+00, %32 ], [ %112, %111 ]
%117 = tail call i32 @free(double* %48)
%118 = tail call i32 @free(double* %49)
%119 = tail call i32 @free(double* %50)
%120 = tail call i32 @pow(double 0x400921FB54442D18, double 2.500000e+00)
%121 = sitofp i32 %120 to double
%122 = fmul double %121, 2.000000e+00
%123 = fmul double %42, %43
%124 = fadd double %42, %43
%125 = tail call double @sqrt(double %124)
%126 = fmul double %123, %125
%127 = fdiv double %122, %126
%128 = fneg double %7
%129 = fmul double %128, %15
%130 = fmul double %129, %33
%131 = fdiv double %130, %42
%132 = tail call i32 @exp(double %131)
%133 = sitofp i32 %132 to double
%134 = fmul double %127, %133
%135 = fneg double %23
%136 = fmul double %135, %31
%137 = fmul double %136, %34
%138 = fdiv double %137, %43
%139 = tail call i32 @exp(double %138)
%140 = sitofp i32 %139 to double
%141 = fmul double %134, %140
%142 = fmul double %116, %141
%143 = fmul double %142, %3
%144 = fmul double %143, %11
%145 = fmul double %144, %19
%146 = fmul double %145, %27
ret double %146
}