#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 exp(int);
int sqrt(int);
double rec_sahaHeI(double nH0, double Tr0, double fHe, double z) {
  double Tr, nH, ainv, s, q;
  Tr = Tr0 * (ainv = 1 + z);
  nH = nH0 * ainv * ainv * ainv;
  s = 2.414194e21 * Tr * sqrt(Tr) * exp(-285325. / Tr) / nH * 4.;
  q = 2. * s * fHe / (1. + s) /
      (1. + sqrt(1. + 4. * s * fHe / (1. + s) / (1. + s)));
  return (1. + q);
}


x86 assembly (clang, -O0):
<rec_sahaHeI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  %xmm1,-0x38(%rbp)
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xea3(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
cvttsd2si -0x28(%rbp),%edi
call   1040 <sqrt@plt>
movsd  -0x60(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe6d(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  0xe36(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe2d(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe0b(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdfd(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xde3(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdd2(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdc1(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  -0x50(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xda3(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xd8e(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec_sahaHeI>:
sub    $0x48,%rsp
movsd  %xmm2,0x28(%rsp)
addsd  0xece(%rip),%xmm3
movapd %xmm3,(%rsp)
mulsd  %xmm3,%xmm1
movapd %xmm1,0x30(%rsp)
movapd %xmm1,%xmm2
unpcklpd %xmm3,%xmm2
movapd 0xecf(%rip),%xmm3
unpcklpd %xmm0,%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,0x10(%rsp)
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
unpcklpd (%rsp),%xmm0
mulpd  0x10(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0xe80(%rip),%xmm0
divsd  0x30(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
unpcklpd (%rsp),%xmm0
mulpd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe5a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movapd %xmm0,%xmm5
addsd  %xmm0,%xmm5
movsd  0x28(%rsp),%xmm4
mulsd  %xmm4,%xmm5
movapd %xmm0,%xmm2
movsd  0xe28(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm5
movapd %xmm5,(%rsp)
mulsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xdef(%rip),%xmm2
addsd  %xmm2,%xmm1
movapd (%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @rec_sahaHeI(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%14 = load double, double* %6
%15 = load double, double* %8
%16 = fadd double 1.000000e+00, %15
store double %16, double* %11
%17 = fmul double %14, %16
store double %17, double* %9
%18 = load double, double* %5
%19 = load double, double* %11
%20 = fmul double %18, %19
%21 = load double, double* %11
%22 = fmul double %20, %21
%23 = load double, double* %11
%24 = fmul double %22, %23
store double %24, double* %10
%25 = load double, double* %9
%26 = fmul double 0x44605BF58181A9ED, %25
%27 = load double, double* %9
%28 = fptosi double %27 to i32
%29 = call i32 @sqrt(i32 %28)
%30 = sitofp i32 %29 to double
%31 = fmul double %26, %30
%32 = load double, double* %9
%33 = fdiv double -2.853250e+05, %32
%34 = fptosi double %33 to i32
%35 = call double @exp(i32 %34)
%36 = fmul double %31, %35
%37 = load double, double* %10
%38 = fdiv double %36, %37
%39 = fmul double %38, 4.000000e+00
store double %39, double* %12
%40 = load double, double* %12
%41 = fmul double 2.000000e+00, %40
%42 = load double, double* %7
%43 = fmul double %41, %42
%44 = load double, double* %12
%45 = fadd double 1.000000e+00, %44
%46 = fdiv double %43, %45
%47 = load double, double* %12
%48 = fmul double 4.000000e+00, %47
%49 = load double, double* %7
%50 = fmul double %48, %49
%51 = load double, double* %12
%52 = fadd double 1.000000e+00, %51
%53 = fdiv double %50, %52
%54 = load double, double* %12
%55 = fadd double 1.000000e+00, %54
%56 = fdiv double %53, %55
%57 = fadd double 1.000000e+00, %56
%58 = fptosi double %57 to i32
%59 = call i32 @sqrt(i32 %58)
%60 = sitofp i32 %59 to double
%61 = fadd double 1.000000e+00, %60
%62 = fdiv double %46, %61
store double %62, double* %13
%63 = load double, double* %13
%64 = fadd double 1.000000e+00, %63
ret double %64
}

LLVM IR (-O2):
define double @rec_sahaHeI(double %0, double %1, double %2, double %3) {
%5 = fadd double %3, 1.000000e+00
%6 = fmul double %5, %1
%7 = insertelement <2 x double> poison, double %6, i64 0
%8 = insertelement <2 x double> %7, double %5, i64 1
%9 = insertelement <2 x double> <double 0x44605BF58181A9ED, double poison>, double %0, i64 1
%10 = fmul <2 x double> %8, %9
%11 = fptosi double %6 to i32
%12 = tail call i32 @sqrt(i32 %11)
%13 = sitofp i32 %12 to double
%14 = insertelement <2 x double> poison, double %13, i64 0
%15 = insertelement <2 x double> %14, double %5, i64 1
%16 = fmul <2 x double> %10, %15
%17 = fdiv double -2.853250e+05, %6
%18 = fptosi double %17 to i32
%19 = tail call double @exp(i32 %18)
%20 = insertelement <2 x double> poison, double %19, i64 0
%21 = insertelement <2 x double> %20, double %5, i64 1
%22 = fmul <2 x double> %21, %16
%23 = extractelement <2 x double> %22, i64 0
%24 = extractelement <2 x double> %22, i64 1
%25 = fdiv double %23, %24
%26 = fmul double %25, 4.000000e+00
%27 = fmul double %26, 2.000000e+00
%28 = fmul double %27, %2
%29 = fadd double %26, 1.000000e+00
%30 = fdiv double %28, %29
%31 = fmul double %26, 4.000000e+00
%32 = fmul double %31, %2
%33 = fdiv double %32, %29
%34 = fdiv double %33, %29
%35 = fadd double %34, 1.000000e+00
%36 = fptosi double %35 to i32
%37 = tail call i32 @sqrt(i32 %36)
%38 = sitofp i32 %37 to double
%39 = fadd double %38, 1.000000e+00
%40 = fdiv double %30, %39
%41 = fadd double %40, 1.000000e+00
ret double %41
}