#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 */
int M_PI;
double doublefactorial(int);
double pow(double, double);
double ao_norm(int l, int m, int n, double alpha, int is_normalized) {
  double norm;
  if (is_normalized > 0)
    return 1.0;
  norm = pow((2. / M_PI), (3. / 4.)) *
         (pow(2., (l + m + n)) *
          pow(alpha, ((2. * l + 2. * m + 2. * n + 3.) / 4.))) /
         (pow((doublefactorial(2 * l - 1) * doublefactorial(2 * m - 1) *
               doublefactorial(2 * n - 1)),
              0.5));
  return norm;
}


x86 assembly (clang, -O0):
<ao_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    1155 <ao_norm+0x35>
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1278 <ao_norm+0x158>
mov    0x2e8c(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xeb0(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xe85(%rip),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
cvtsi2sdl -0x10(%rbp),%xmm3
movsd  0xe64(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
cvtsi2sdl -0x14(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe3b(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  0xe27(%rip),%xmm2
divsd  %xmm2,%xmm1
call   1040 <pow@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <doublefactorial@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <doublefactorial@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x14(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <doublefactorial@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xda8(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ao_norm>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
test   %ecx,%ecx
jle    114a <ao_norm+0x1a>
movsd  0xebb(%rip),%xmm0
jmp    1247 <ao_norm+0x117>
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
mov    0x2e8f(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  %xmm0,0x10(%rsp)
movsd  0xe9d(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,0x8(%rsp)
lea    (%r15,%rbx,1),%edi
add    %r14d,%edi
movsd  0xe6f(%rip),%xmm0
call   1030 <ldexp@plt>
cvtsi2sd %ebx,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
movsd  %xmm0,0x18(%rsp)
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %r14d,%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
addsd  0xe4c(%rip),%xmm1
mulsd  0xe4c(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1050 <pow@plt>
mulsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    (%rbx,%rbx,1),%edi
add    $0xffffffff,%edi
call   1040 <doublefactorial@plt>
movsd  %xmm0,0x8(%rsp)
lea    (%r15,%r15,1),%edi
add    $0xffffffff,%edi
call   1040 <doublefactorial@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    (%r14,%r14,1),%edi
add    $0xffffffff,%edi
call   1040 <doublefactorial@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0xdf4(%rip),%xmm1
call   1050 <pow@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @ao_norm(i32 %0, i32 %1, i32 %2, double %3, i32 %4) {
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca i32
%12 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double %3, double* %10
store i32 %4, i32* %11
%13 = load i32, i32* %11
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %5
store double 1.000000e+00, double* %6
br label %60
16: ; preds = %5
%17 = load i32, i32* @M_PI
%18 = sitofp i32 %17 to double
%19 = fdiv double 2.000000e+00, %18
%20 = call double @pow(double %19, double 7.500000e-01)
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %9
%25 = add nsw i32 %23, %24
%26 = sitofp i32 %25 to double
%27 = call double @pow(double 2.000000e+00, double %26)
%28 = load double, double* %10
%29 = load i32, i32* %7
%30 = sitofp i32 %29 to double
%31 = load i32, i32* %8
%32 = sitofp i32 %31 to double
%33 = fmul double 2.000000e+00, %32
%34 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %30, double %33)
%35 = load i32, i32* %9
%36 = sitofp i32 %35 to double
%37 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %36, double %34)
%38 = fadd double %37, 3.000000e+00
%39 = fdiv double %38, 4.000000e+00
%40 = call double @pow(double %28, double %39)
%41 = fmul double %27, %40
%42 = fmul double %20, %41
%43 = load i32, i32* %7
%44 = mul nsw i32 2, %43
%45 = sub nsw i32 %44, 1
%46 = call double @doublefactorial(i32 %45)
%47 = load i32, i32* %8
%48 = mul nsw i32 2, %47
%49 = sub nsw i32 %48, 1
%50 = call double @doublefactorial(i32 %49)
%51 = fmul double %46, %50
%52 = load i32, i32* %9
%53 = mul nsw i32 2, %52
%54 = sub nsw i32 %53, 1
%55 = call double @doublefactorial(i32 %54)
%56 = fmul double %51, %55
%57 = call double @pow(double %56, double 5.000000e-01)
%58 = fdiv double %42, %57
store double %58, double* %12
%59 = load double, double* %12
store double %59, double* %6
br label %60
60: ; preds = %16, %15
%61 = load double, double* %6
ret double %61
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @ao_norm(i32 %0, i32 %1, i32 %2, double %3, i32 %4) {
%6 = icmp sgt i32 %4, 0
br i1 %6, label %39, label %7
7: ; preds = %5
%8 = load i32, i32* @M_PI
%9 = sitofp i32 %8 to double
%10 = fdiv double 2.000000e+00, %9
%11 = tail call double @pow(double %10, double 7.500000e-01)
%12 = add nsw i32 %1, %0
%13 = add nsw i32 %12, %2
%14 = tail call double @ldexp(double 1.000000e+00, i32 %13)
%15 = sitofp i32 %0 to double
%16 = sitofp i32 %1 to double
%17 = fmul double %16, 2.000000e+00
%18 = tail call double @llvm.fmuladd.f64(double %15, double 2.000000e+00, double %17)
%19 = sitofp i32 %2 to double
%20 = tail call double @llvm.fmuladd.f64(double %19, double 2.000000e+00, double %18)
%21 = fadd double %20, 3.000000e+00
%22 = fmul double %21, 2.500000e-01
%23 = tail call double @pow(double %3, double %22)
%24 = fmul double %14, %23
%25 = fmul double %11, %24
%26 = shl nsw i32 %0, 1
%27 = add nsw i32 %26, -1
%28 = tail call double @doublefactorial(i32 %27)
%29 = shl nsw i32 %1, 1
%30 = add nsw i32 %29, -1
%31 = tail call double @doublefactorial(i32 %30)
%32 = fmul double %28, %31
%33 = shl nsw i32 %2, 1
%34 = add nsw i32 %33, -1
%35 = tail call double @doublefactorial(i32 %34)
%36 = fmul double %32, %35
%37 = tail call double @pow(double %36, double 5.000000e-01)
%38 = fdiv double %25, %37
br label %39
39: ; preds = %5, %7
%40 = phi double [ %38, %7 ], [ 1.000000e+00, %5 ]
ret double %40
}