#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 M_PI;
double exp(double);
double overlap_1d(int, int, double, double, double);
double sqrt(double);
double overlap(double alpha1, int l1, int m1, int n1, double xa, double ya,
               double za, double alpha2, int l2, int m2, int n2, double xb,
               double yb, double zb) {
  double rab2, eta, xp, yp, zp, pre, wx, wy, wz;
  rab2 =
      ((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb) + (za - zb) * (za - zb));
  eta = 1.0 / (alpha1 + alpha2);
  xp = (alpha1 * xa + alpha2 * xb) * eta;
  yp = (alpha1 * ya + alpha2 * yb) * eta;
  zp = (alpha1 * za + alpha2 * zb) * eta;
  wx = overlap_1d(l1, l2, xp - xa, xp - xb, eta);
  wy = overlap_1d(m1, m2, yp - ya, yp - yb, eta);
  wz = overlap_1d(n1, n2, zp - za, zp - zb, eta);
  pre = M_PI * eta * sqrt(M_PI * eta) * exp(-alpha1 * alpha2 * rab2 * eta);
  return pre * wx * wy * wz;
}


x86 assembly (clang, -O0):
<overlap>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
mov    %ecx,-0x3c(%rbp)
mov    %r8d,-0x40(%rbp)
mov    %r9d,-0x44(%rbp)
movsd  %xmm5,-0x50(%rbp)
movsd  %xmm6,-0x58(%rbp)
movsd  %xmm7,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
subsd  -0x50(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm3
subsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
subsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xe22(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0xc(%rbp),%edi
mov    -0x3c(%rbp),%esi
movsd  -0x78(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1050 <overlap_1d@plt>
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x10(%rbp),%edi
mov    -0x40(%rbp),%esi
movsd  -0x80(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1050 <overlap_1d@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x14(%rbp),%edi
mov    -0x44(%rbp),%esi
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x30(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1050 <overlap_1d@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x2cfb(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x2ce3(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<overlap>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r14d
mov    %r8d,%ebx
mov    %edx,%r15d
mov    %esi,%ebp
movapd %xmm0,%xmm8
addsd  %xmm4,%xmm0
movsd  0xea9(%rip),%xmm11
divsd  %xmm0,%xmm11
movapd %xmm4,%xmm0
mulsd  %xmm5,%xmm0
movapd %xmm8,%xmm9
mulsd  %xmm1,%xmm9
addsd  %xmm0,%xmm9
mulsd  %xmm11,%xmm9
movapd %xmm9,%xmm0
subsd  %xmm1,%xmm0
subsd  %xmm5,%xmm1
movapd %xmm2,%xmm10
movsd  %xmm2,0x20(%rsp)
movsd  %xmm6,0x18(%rsp)
subsd  %xmm6,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm3,0x10(%rsp)
movapd %xmm3,%xmm2
movsd  %xmm7,(%rsp)
subsd  %xmm7,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x30(%rsp)
movapd %xmm4,%xmm1
mulsd  %xmm6,%xmm1
movapd %xmm8,%xmm6
mulsd  %xmm10,%xmm6
addsd  %xmm1,%xmm6
movapd %xmm11,%xmm2
movsd  %xmm11,0x8(%rsp)
mulsd  %xmm11,%xmm6
movapd %xmm6,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movapd %xmm4,%xmm1
mulsd  %xmm7,%xmm1
movapd %xmm8,0x60(%rsp)
mulsd  %xmm3,%xmm8
addsd  %xmm1,%xmm8
mulsd  %xmm11,%xmm8
movapd %xmm8,0x50(%rsp)
subsd  %xmm5,%xmm9
mov    %ecx,%esi
movapd %xmm9,%xmm1
call   1050 <overlap_1d@plt>
movsd  %xmm0,0x28(%rsp)
movapd 0x40(%rsp),%xmm1
movapd %xmm1,%xmm0
subsd  0x20(%rsp),%xmm0
subsd  0x18(%rsp),%xmm1
mov    %ebp,%edi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm2
call   1050 <overlap_1d@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x50(%rsp),%xmm1
movapd %xmm1,%xmm0
subsd  0x10(%rsp),%xmm0
subsd  (%rsp),%xmm1
mov    %r15d,%edi
mov    %r14d,%esi
movsd  0x8(%rsp),%xmm2
call   1050 <overlap_1d@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x2d54(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,(%rsp)
jb     12b3 <overlap+0x183>
sqrtsd %xmm0,%xmm0
jmp    12b8 <overlap+0x188>
call   1040 <sqrt@plt>
movapd 0x60(%rsp),%xmm1
xorpd  0xd4a(%rip),%xmm1
movsd  (%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
mulsd  0x38(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
mulsd  0x28(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @overlap(double %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6, double %7, i32 %8, i32 %9, i32 %10, double %11, double %12, double %13) {
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
store double %0, double* %15
store i32 %1, i32* %16
store i32 %2, i32* %17
store i32 %3, i32* %18
store double %4, double* %19
store double %5, double* %20
store double %6, double* %21
store double %7, double* %22
store i32 %8, i32* %23
store i32 %9, i32* %24
store i32 %10, i32* %25
store double %11, double* %26
store double %12, double* %27
store double %13, double* %28
%38 = load double, double* %19
%39 = load double, double* %26
%40 = fsub double %38, %39
%41 = load double, double* %19
%42 = load double, double* %26
%43 = fsub double %41, %42
%44 = load double, double* %20
%45 = load double, double* %27
%46 = fsub double %44, %45
%47 = load double, double* %20
%48 = load double, double* %27
%49 = fsub double %47, %48
%50 = fmul double %46, %49
%51 = call double @llvm.fmuladd.f64(double %40, double %43, double %50)
%52 = load double, double* %21
%53 = load double, double* %28
%54 = fsub double %52, %53
%55 = load double, double* %21
%56 = load double, double* %28
%57 = fsub double %55, %56
%58 = call double @llvm.fmuladd.f64(double %54, double %57, double %51)
store double %58, double* %29
%59 = load double, double* %15
%60 = load double, double* %22
%61 = fadd double %59, %60
%62 = fdiv double 1.000000e+00, %61
store double %62, double* %30
%63 = load double, double* %15
%64 = load double, double* %19
%65 = load double, double* %22
%66 = load double, double* %26
%67 = fmul double %65, %66
%68 = call double @llvm.fmuladd.f64(double %63, double %64, double %67)
%69 = load double, double* %30
%70 = fmul double %68, %69
store double %70, double* %31
%71 = load double, double* %15
%72 = load double, double* %20
%73 = load double, double* %22
%74 = load double, double* %27
%75 = fmul double %73, %74
%76 = call double @llvm.fmuladd.f64(double %71, double %72, double %75)
%77 = load double, double* %30
%78 = fmul double %76, %77
store double %78, double* %32
%79 = load double, double* %15
%80 = load double, double* %21
%81 = load double, double* %22
%82 = load double, double* %28
%83 = fmul double %81, %82
%84 = call double @llvm.fmuladd.f64(double %79, double %80, double %83)
%85 = load double, double* %30
%86 = fmul double %84, %85
store double %86, double* %33
%87 = load i32, i32* %16
%88 = load i32, i32* %23
%89 = load double, double* %31
%90 = load double, double* %19
%91 = fsub double %89, %90
%92 = load double, double* %31
%93 = load double, double* %26
%94 = fsub double %92, %93
%95 = load double, double* %30
%96 = call double @overlap_1d(i32 %87, i32 %88, double %91, double %94, double %95)
store double %96, double* %35
%97 = load i32, i32* %17
%98 = load i32, i32* %24
%99 = load double, double* %32
%100 = load double, double* %20
%101 = fsub double %99, %100
%102 = load double, double* %32
%103 = load double, double* %27
%104 = fsub double %102, %103
%105 = load double, double* %30
%106 = call double @overlap_1d(i32 %97, i32 %98, double %101, double %104, double %105)
store double %106, double* %36
%107 = load i32, i32* %18
%108 = load i32, i32* %25
%109 = load double, double* %33
%110 = load double, double* %21
%111 = fsub double %109, %110
%112 = load double, double* %33
%113 = load double, double* %28
%114 = fsub double %112, %113
%115 = load double, double* %30
%116 = call double @overlap_1d(i32 %107, i32 %108, double %111, double %114, double %115)
store double %116, double* %37
%117 = load double, double* @M_PI
%118 = load double, double* %30
%119 = fmul double %117, %118
%120 = load double, double* @M_PI
%121 = load double, double* %30
%122 = fmul double %120, %121
%123 = call double @sqrt(double %122)
%124 = fmul double %119, %123
%125 = load double, double* %15
%126 = fneg double %125
%127 = load double, double* %22
%128 = fmul double %126, %127
%129 = load double, double* %29
%130 = fmul double %128, %129
%131 = load double, double* %30
%132 = fmul double %130, %131
%133 = call double @exp(double %132)
%134 = fmul double %124, %133
store double %134, double* %34
%135 = load double, double* %34
%136 = load double, double* %35
%137 = fmul double %135, %136
%138 = load double, double* %36
%139 = fmul double %137, %138
%140 = load double, double* %37
%141 = fmul double %139, %140
ret double %141
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @overlap(double %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6, double %7, i32 %8, i32 %9, i32 %10, double %11, double %12, double %13) {
%15 = fsub double %4, %11
%16 = fsub double %5, %12
%17 = fmul double %16, %16
%18 = tail call double @llvm.fmuladd.f64(double %15, double %15, double %17)
%19 = fsub double %6, %13
%20 = tail call double @llvm.fmuladd.f64(double %19, double %19, double %18)
%21 = fadd double %0, %7
%22 = fdiv double 1.000000e+00, %21
%23 = fmul double %7, %11
%24 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %23)
%25 = fmul double %22, %24
%26 = fmul double %7, %12
%27 = tail call double @llvm.fmuladd.f64(double %0, double %5, double %26)
%28 = fmul double %22, %27
%29 = fmul double %7, %13
%30 = tail call double @llvm.fmuladd.f64(double %0, double %6, double %29)
%31 = fmul double %22, %30
%32 = fsub double %25, %4
%33 = fsub double %25, %11
%34 = tail call double @overlap_1d(i32 %1, i32 %8, double %32, double %33, double %22)
%35 = fsub double %28, %5
%36 = fsub double %28, %12
%37 = tail call double @overlap_1d(i32 %2, i32 %9, double %35, double %36, double %22)
%38 = fsub double %31, %6
%39 = fsub double %31, %13
%40 = tail call double @overlap_1d(i32 %3, i32 %10, double %38, double %39, double %22)
%41 = load double, double* @M_PI
%42 = fmul double %22, %41
%43 = tail call double @sqrt(double %42)
%44 = fmul double %42, %43
%45 = fneg double %0
%46 = fmul double %45, %7
%47 = fmul double %46, %20
%48 = fmul double %22, %47
%49 = tail call double @exp(double %48)
%50 = fmul double %44, %49
%51 = fmul double %34, %50
%52 = fmul double %37, %51
%53 = fmul double %40, %52
ret double %53
}