#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 fact2(int);
double pow(double, double);
double sqrt(double);
double norm_factor(double alpha1, int l1, int m1, int n1) {
  double numerator =
      pow(2.0, 1.5 + 2 * (l1 + m1 + n1)) * pow(alpha1, 1.5 + (l1 + m1 + n1));
  double denominator =
      pow(3.14159265358979323846, 1.5) *
      (fact2(2 * l1 - 1) * fact2(2 * m1 - 1) * fact2(2 * n1 - 1));
  return sqrt(numerator / denominator);
}


x86 assembly (clang, -O0):
<norm_factor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xeaa(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xea6(%rip),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm2
movsd  0xe7a(%rip),%xmm1
addsd  %xmm2,%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe50(%rip),%xmm0
movsd  0xe50(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <fact2@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <fact2@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x14(%rbp),%edi
shl    $0x1,%edi
sub    $0x1,%edi
call   1030 <fact2@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm_factor>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r12d
movsd  %xmm0,0x10(%rsp)
lea    (%r15,%r12,1),%ebx
add    %edx,%ebx
lea    (%rbx,%rbx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xe8e(%rip),%xmm0
call   1040 <exp2@plt>
movsd  %xmm0,0x8(%rsp)
cvtsi2sd %ebx,%xmm1
addsd  0xe77(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    (%r12,%r12,1),%edi
add    $0xffffffff,%edi
call   1030 <fact2@plt>
movsd  %xmm0,0x8(%rsp)
lea    (%r15,%r15,1),%edi
add    $0xffffffff,%edi
call   1030 <fact2@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    (%r14,%r14,1),%edi
add    $0xffffffff,%edi
call   1030 <fact2@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0xe24(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     120c <norm_factor+0xcc>
sqrtsd %xmm0,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1060 <sqrt@plt>

LLVM IR (-O0):
define double @norm_factor(double %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = mul nsw i32 2, %15
%17 = sitofp i32 %16 to double
%18 = fadd double 1.500000e+00, %17
%19 = call double @pow(double 2.000000e+00, double %18)
%20 = load double, double* %5
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %8
%25 = add nsw i32 %23, %24
%26 = sitofp i32 %25 to double
%27 = fadd double 1.500000e+00, %26
%28 = call double @pow(double %20, double %27)
%29 = fmul double %19, %28
store double %29, double* %9
%30 = call double @pow(double 0x400921FB54442D18, double 1.500000e+00)
%31 = load i32, i32* %6
%32 = mul nsw i32 2, %31
%33 = sub nsw i32 %32, 1
%34 = call double @fact2(i32 %33)
%35 = load i32, i32* %7
%36 = mul nsw i32 2, %35
%37 = sub nsw i32 %36, 1
%38 = call double @fact2(i32 %37)
%39 = fmul double %34, %38
%40 = load i32, i32* %8
%41 = mul nsw i32 2, %40
%42 = sub nsw i32 %41, 1
%43 = call double @fact2(i32 %42)
%44 = fmul double %39, %43
%45 = fmul double %30, %44
store double %45, double* %10
%46 = load double, double* %9
%47 = load double, double* %10
%48 = fdiv double %46, %47
%49 = call double @sqrt(double %48)
ret double %49
}

LLVM IR (-O2):
define double @norm_factor(double %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, %1
%6 = add nsw i32 %5, %3
%7 = shl nsw i32 %6, 1
%8 = sitofp i32 %7 to double
%9 = fadd double %8, 1.500000e+00
%10 = tail call double @exp2(double %9)
%11 = sitofp i32 %6 to double
%12 = fadd double %11, 1.500000e+00
%13 = tail call double @pow(double %0, double %12)
%14 = fmul double %10, %13
%15 = shl nsw i32 %1, 1
%16 = add nsw i32 %15, -1
%17 = tail call double @fact2(i32 %16)
%18 = shl nsw i32 %2, 1
%19 = add nsw i32 %18, -1
%20 = tail call double @fact2(i32 %19)
%21 = fmul double %17, %20
%22 = shl nsw i32 %3, 1
%23 = add nsw i32 %22, -1
%24 = tail call double @fact2(i32 %23)
%25 = fmul double %21, %24
%26 = fmul double %25, 0x401645F7C63F2C6B
%27 = fdiv double %14, %26
%28 = tail call double @sqrt(double %27)
ret double %28
}