; LLVM IR from CLASS-SZ/class_sz :: class-sz/hyrec (helium)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare double @sqrt(double noundef) #1

; Function Attrs: nounwind
declare double @exp(double noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local double @rec_sahaHeI(double noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local double @rec_helium_dxedt(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nounwind uwtable
define dso_local double @xe_PostSahaHe(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr noundef %5) #2 {
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  store double %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !5
  store double %3, ptr %10, align 8, !tbaa !5
  store double %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %21 = load double, ptr %8, align 8, !tbaa !5
  %22 = load double, ptr %11, align 8, !tbaa !5
  %23 = fadd double 1.000000e+00, %22
  store double %23, ptr %20, align 8, !tbaa !5
  %24 = fmul double %21, %23
  store double %24, ptr %13, align 8, !tbaa !5
  %25 = load double, ptr %7, align 8, !tbaa !5
  %26 = load double, ptr %20, align 8, !tbaa !5
  %27 = fmul double %25, %26
  %28 = load double, ptr %20, align 8, !tbaa !5
  %29 = fmul double %27, %28
  %30 = load double, ptr %20, align 8, !tbaa !5
  %31 = fmul double %29, %30
  store double %31, ptr %14, align 8, !tbaa !5
  %32 = load double, ptr %13, align 8, !tbaa !5
  %33 = fmul double 0x44605BF58181A9ED, %32
  %34 = load double, ptr %13, align 8, !tbaa !5
  %35 = call double @sqrt(double noundef %34) #4
  %36 = fmul double %33, %35
  %37 = load double, ptr %13, align 8, !tbaa !5
  %38 = fdiv double -2.853250e+05, %37
  %39 = call double @exp(double noundef %38) #4
  %40 = fmul double %36, %39
  %41 = load double, ptr %14, align 8, !tbaa !5
  %42 = fdiv double %40, %41
  %43 = fmul double %42, 4.000000e+00
  store double %43, ptr %15, align 8, !tbaa !5
  %44 = load double, ptr %7, align 8, !tbaa !5
  %45 = load double, ptr %8, align 8, !tbaa !5
  %46 = load double, ptr %9, align 8, !tbaa !5
  %47 = load double, ptr %11, align 8, !tbaa !5
  %48 = call double @rec_sahaHeI(double noundef %44, double noundef %45, double noundef %46, double noundef %47)
  store double %48, ptr %16, align 8, !tbaa !5
  %49 = load double, ptr %16, align 8, !tbaa !5
  %50 = fneg double %49
  %51 = load double, ptr %16, align 8, !tbaa !5
  %52 = fsub double %51, 1.000000e+00
  %53 = fmul double %50, %52
  %54 = load double, ptr %16, align 8, !tbaa !5
  %55 = load double, ptr %15, align 8, !tbaa !5
  %56 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %54, double %55)
  %57 = fsub double %56, 1.000000e+00
  %58 = fdiv double %53, %57
  %59 = load double, ptr %13, align 8, !tbaa !5
  %60 = fdiv double 2.853250e+05, %59
  %61 = fsub double %60, 1.500000e+00
  %62 = fmul double %58, %61
  %63 = load double, ptr %10, align 8, !tbaa !5
  %64 = fmul double %62, %63
  store double %64, ptr %17, align 8, !tbaa !5
  %65 = load double, ptr %9, align 8, !tbaa !5
  %66 = fadd double 1.000000e+00, %65
  %67 = load double, ptr %16, align 8, !tbaa !5
  %68 = fsub double %66, %67
  %69 = fmul double 1.000000e-02, %68
  store double %69, ptr %18, align 8, !tbaa !5
  %70 = load double, ptr %16, align 8, !tbaa !5
  %71 = load double, ptr %18, align 8, !tbaa !5
  %72 = fadd double %70, %71
  %73 = load double, ptr %7, align 8, !tbaa !5
  %74 = load double, ptr %8, align 8, !tbaa !5
  %75 = load double, ptr %9, align 8, !tbaa !5
  %76 = load double, ptr %10, align 8, !tbaa !5
  %77 = load double, ptr %11, align 8, !tbaa !5
  %78 = call double @rec_helium_dxedt(double noundef %72, double noundef %73, double noundef %74, double noundef %75, double noundef %76, double noundef %77)
  %79 = load double, ptr %16, align 8, !tbaa !5
  %80 = load double, ptr %18, align 8, !tbaa !5
  %81 = fsub double %79, %80
  %82 = load double, ptr %7, align 8, !tbaa !5
  %83 = load double, ptr %8, align 8, !tbaa !5
  %84 = load double, ptr %9, align 8, !tbaa !5
  %85 = load double, ptr %10, align 8, !tbaa !5
  %86 = load double, ptr %11, align 8, !tbaa !5
  %87 = call double @rec_helium_dxedt(double noundef %81, double noundef %82, double noundef %83, double noundef %84, double noundef %85, double noundef %86)
  %88 = fsub double %78, %87
  %89 = fdiv double %88, 2.000000e+00
  %90 = load double, ptr %18, align 8, !tbaa !5
  %91 = fdiv double %89, %90
  store double %91, ptr %19, align 8, !tbaa !5
  %92 = load double, ptr %17, align 8, !tbaa !5
  %93 = load double, ptr %19, align 8, !tbaa !5
  %94 = fdiv double %92, %93
  %95 = load ptr, ptr %12, align 8, !tbaa !9
  store double %94, ptr %95, align 8, !tbaa !5
  %96 = load double, ptr %16, align 8, !tbaa !5
  %97 = load ptr, ptr %12, align 8, !tbaa !9
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = fadd double %96, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret double %99
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local double @rec_sahaHeI(double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @rec_helium_dxedt(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
define dso_local double @xe_PostSahaHe(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #1 {
  %7 = fadd double %4, 1.000000e+00
  %8 = fmul double %7, %1
  %9 = tail call double @sqrt(double noundef %8) #3
  %10 = fdiv double -2.853250e+05, %8
  %11 = tail call double @exp(double noundef %10) #3
  %12 = insertelement <2 x double> poison, double %8, i64 0
  %13 = insertelement <2 x double> %12, double %7, i64 1
  %14 = insertelement <2 x double> <double 0x44605BF58181A9ED, double poison>, double %0, i64 1
  %15 = fmul <2 x double> %13, %14
  %16 = insertelement <2 x double> %13, double %9, i64 0
  %17 = fmul <2 x double> %15, %16
  %18 = insertelement <2 x double> %13, double %11, i64 0
  %19 = fmul <2 x double> %17, %18
  %20 = extractelement <2 x double> %19, i64 0
  %21 = extractelement <2 x double> %19, i64 1
  %22 = fdiv double %20, %21
  %23 = fmul double %22, 4.000000e+00
  %24 = tail call double @rec_sahaHeI(double noundef %0, double noundef %1, double noundef %2, double noundef %4)
  %25 = fneg double %24
  %26 = fadd double %24, -1.000000e+00
  %27 = fmul double %26, %25
  %28 = tail call double @llvm.fmuladd.f64(double %24, double 2.000000e+00, double %23)
  %29 = fadd double %28, -1.000000e+00
  %30 = fdiv double %27, %29
  %31 = fdiv double 2.853250e+05, %8
  %32 = fadd double %31, -1.500000e+00
  %33 = fmul double %32, %30
  %34 = fmul double %33, %3
  %35 = fadd double %2, 1.000000e+00
  %36 = fsub double %35, %24
  %37 = fmul double %36, 1.000000e-02
  %38 = fadd double %24, %37
  %39 = tail call double @rec_helium_dxedt(double noundef %38, double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4)
  %40 = fsub double %24, %37
  %41 = tail call double @rec_helium_dxedt(double noundef %40, double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4)
  %42 = fsub double %39, %41
  %43 = fmul double %42, 5.000000e-01
  %44 = fdiv double %43, %37
  %45 = fdiv double %34, %44
  store double %45, ptr %5, align 8, !tbaa !5
  %46 = fadd double %24, %45
  ret double %46
}

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass