#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 moment_1d(int, int, int, double, double, double, double);
double sqrt(double);
double moment(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, int mx, int my, int mz, double xc,
              double yc, double zc) {
  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 = moment_1d(l1, l2, mx, xp - xa, xp - xb, xp - xc, eta);
  wy = moment_1d(m1, m2, my, yp - ya, yp - yb, yp - yc, eta);
  wz = moment_1d(n1, n2, mz, zp - za, zp - zb, zp - zc, eta);
  pre = M_PI * eta * sqrt(M_PI * eta) * exp(-alpha1 * alpha2 * rab2 * eta);
  return pre * wx * wy * wz;
}


x86 assembly (clang, -O0):
<moment>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
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  0xe07(%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
mov    0x10(%rbp),%edx
movsd  -0x78(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
subsd  0x28(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1040 <moment_1d@plt>
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x10(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    0x18(%rbp),%edx
movsd  -0x80(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
subsd  0x30(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1040 <moment_1d@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x14(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    0x20(%rbp),%edx
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x30(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x60(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
subsd  0x38(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1040 <moment_1d@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x2cb6(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x2c9e(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1050 <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):
<moment>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r15d
mov    %r8d,%ebx
movapd %xmm2,%xmm9
mov    %edx,%r12d
mov    %esi,%ebp
movapd %xmm0,%xmm8
mov    0xc0(%rsp),%r14d
mov    0xb8(%rsp),%r13d
mov    0xb0(%rsp),%edx
addsd  %xmm4,%xmm0
movsd  0xe89(%rip),%xmm10
divsd  %xmm0,%xmm10
movapd %xmm4,%xmm0
mulsd  %xmm5,%xmm0
movapd %xmm8,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm10,%xmm2
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
subsd  %xmm5,%xmm1
movapd %xmm9,%xmm11
movsd  %xmm9,0x20(%rsp)
movsd  %xmm6,0x18(%rsp)
subsd  %xmm6,%xmm9
mulsd  %xmm9,%xmm9
mulsd  %xmm1,%xmm1
addsd  %xmm9,%xmm1
movapd %xmm3,%xmm9
movsd  %xmm3,0x10(%rsp)
movsd  %xmm7,(%rsp)
subsd  %xmm7,%xmm3
mulsd  %xmm3,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x30(%rsp)
movapd %xmm4,%xmm1
mulsd  %xmm6,%xmm1
movapd %xmm8,%xmm6
mulsd  %xmm11,%xmm6
addsd  %xmm1,%xmm6
movapd %xmm10,%xmm3
movsd  %xmm10,0x8(%rsp)
mulsd  %xmm10,%xmm6
movapd %xmm6,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movapd %xmm4,%xmm1
mulsd  %xmm7,%xmm1
movapd %xmm8,0x60(%rsp)
mulsd  %xmm9,%xmm8
addsd  %xmm1,%xmm8
mulsd  %xmm10,%xmm8
movapd %xmm8,0x50(%rsp)
movapd %xmm2,%xmm1
subsd  %xmm5,%xmm1
subsd  0xc8(%rsp),%xmm2
mov    %ecx,%esi
call   1040 <moment_1d@plt>
movsd  %xmm0,0x28(%rsp)
movapd 0x40(%rsp),%xmm2
movapd %xmm2,%xmm0
subsd  0x20(%rsp),%xmm0
movapd %xmm2,%xmm1
subsd  0x18(%rsp),%xmm1
subsd  0xd0(%rsp),%xmm2
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r13d,%edx
movsd  0x8(%rsp),%xmm3
call   1040 <moment_1d@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x50(%rsp),%xmm2
movapd %xmm2,%xmm0
subsd  0x10(%rsp),%xmm0
movapd %xmm2,%xmm1
subsd  (%rsp),%xmm1
subsd  0xd8(%rsp),%xmm2
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
movsd  0x8(%rsp),%xmm3
call   1040 <moment_1d@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x2d0b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,(%rsp)
jb     12fc <moment+0x1cc>
sqrtsd %xmm0,%xmm0
jmp    1301 <moment+0x1d1>
call   1050 <sqrt@plt>
movapd 0x60(%rsp),%xmm1
xorpd  0xd01(%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    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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