; 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
define dso_local double @rec_sahaHeI(double noundef %0, double noundef %1, double noundef %2, double noundef %3) #2 {
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %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 double, align 8
  %13 = alloca double, align 8
  store double %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %14 = load double, ptr %6, align 8, !tbaa !5
  %15 = load double, ptr %8, align 8, !tbaa !5
  %16 = fadd double 1.000000e+00, %15
  store double %16, ptr %11, align 8, !tbaa !5
  %17 = fmul double %14, %16
  store double %17, ptr %9, align 8, !tbaa !5
  %18 = load double, ptr %5, align 8, !tbaa !5
  %19 = load double, ptr %11, align 8, !tbaa !5
  %20 = fmul double %18, %19
  %21 = load double, ptr %11, align 8, !tbaa !5
  %22 = fmul double %20, %21
  %23 = load double, ptr %11, align 8, !tbaa !5
  %24 = fmul double %22, %23
  store double %24, ptr %10, align 8, !tbaa !5
  %25 = load double, ptr %9, align 8, !tbaa !5
  %26 = fmul double 0x44605BF58181A9ED, %25
  %27 = load double, ptr %9, align 8, !tbaa !5
  %28 = call double @sqrt(double noundef %27) #3
  %29 = fmul double %26, %28
  %30 = load double, ptr %9, align 8, !tbaa !5
  %31 = fdiv double -2.853250e+05, %30
  %32 = call double @exp(double noundef %31) #3
  %33 = fmul double %29, %32
  %34 = load double, ptr %10, align 8, !tbaa !5
  %35 = fdiv double %33, %34
  %36 = fmul double %35, 4.000000e+00
  store double %36, ptr %12, align 8, !tbaa !5
  %37 = load double, ptr %12, align 8, !tbaa !5
  %38 = fmul double 2.000000e+00, %37
  %39 = load double, ptr %7, align 8, !tbaa !5
  %40 = fmul double %38, %39
  %41 = load double, ptr %12, align 8, !tbaa !5
  %42 = fadd double 1.000000e+00, %41
  %43 = fdiv double %40, %42
  %44 = load double, ptr %12, align 8, !tbaa !5
  %45 = fmul double 4.000000e+00, %44
  %46 = load double, ptr %7, align 8, !tbaa !5
  %47 = fmul double %45, %46
  %48 = load double, ptr %12, align 8, !tbaa !5
  %49 = fadd double 1.000000e+00, %48
  %50 = fdiv double %47, %49
  %51 = load double, ptr %12, align 8, !tbaa !5
  %52 = fadd double 1.000000e+00, %51
  %53 = fdiv double %50, %52
  %54 = fadd double 1.000000e+00, %53
  %55 = call double @sqrt(double noundef %54) #3
  %56 = fadd double 1.000000e+00, %55
  %57 = fdiv double %43, %56
  store double %57, ptr %13, align 8, !tbaa !5
  %58 = load double, ptr %13, align 8, !tbaa !5
  %59 = fadd double 1.000000e+00, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret double %59
}

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 = { 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"}


; 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: mustprogress nofree nounwind willreturn memory(write) uwtable
define dso_local double @rec_sahaHeI(double noundef %0, double noundef %1, double noundef %2, double noundef %3) local_unnamed_addr #1 {
  %5 = fadd double %3, 1.000000e+00
  %6 = fmul double %5, %1
  %7 = tail call double @sqrt(double noundef %6) #2
  %8 = fdiv double -2.853250e+05, %6
  %9 = tail call double @exp(double noundef %8) #2
  %10 = insertelement <2 x double> poison, double %6, i64 0
  %11 = insertelement <2 x double> %10, double %5, i64 1
  %12 = insertelement <2 x double> <double 0x44605BF58181A9ED, double poison>, double %0, i64 1
  %13 = fmul <2 x double> %11, %12
  %14 = insertelement <2 x double> %11, double %7, i64 0
  %15 = fmul <2 x double> %13, %14
  %16 = insertelement <2 x double> %11, double %9, i64 0
  %17 = fmul <2 x double> %15, %16
  %18 = extractelement <2 x double> %17, i64 0
  %19 = extractelement <2 x double> %17, i64 1
  %20 = fdiv double %18, %19
  %21 = fmul double %20, 4.000000e+00
  %22 = fmul double %21, 2.000000e+00
  %23 = fmul double %22, %2
  %24 = fadd double %21, 1.000000e+00
  %25 = fdiv double %23, %24
  %26 = fmul double %21, 4.000000e+00
  %27 = fmul double %26, %2
  %28 = fdiv double %27, %24
  %29 = fdiv double %28, %24
  %30 = fadd double %29, 1.000000e+00
  %31 = tail call double @sqrt(double noundef %30) #2
  %32 = fadd double %31, 1.000000e+00
  %33 = fdiv double %25, %32
  %34 = fadd double %33, 1.000000e+00
  ret double %34
}

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 = { mustprogress nofree nounwind willreturn memory(write) 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 = { 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)"}


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