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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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"}
!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) uwtable
define dso_local double @rec_sahaHeII(double noundef %0, double noundef %1, double noundef %2, double noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #0 {
  %6 = fadd double %3, 1.000000e+00
  %7 = fmul double %6, %1
  %8 = tail call double @sqrt(double noundef %7) #2
  %9 = fdiv double 0xC123454D66666666, %7
  %10 = tail call double @exp(double noundef %9) #2
  %11 = insertelement <2 x double> poison, double %7, i64 0
  %12 = insertelement <2 x double> %11, double %6, i64 1
  %13 = insertelement <2 x double> <double 0x44605BF58181A9ED, double poison>, double %0, i64 1
  %14 = fmul <2 x double> %12, %13
  %15 = insertelement <2 x double> %12, double %8, i64 0
  %16 = fmul <2 x double> %14, %15
  %17 = insertelement <2 x double> %12, double %10, i64 0
  %18 = fmul <2 x double> %16, %17
  %19 = extractelement <2 x double> %18, i64 0
  %20 = extractelement <2 x double> %18, i64 1
  %21 = fdiv double %19, %20
  %22 = fmul double %21, 2.000000e+00
  %23 = fmul double %22, %2
  %24 = fadd double %21, 1.000000e+00
  %25 = fadd double %24, %2
  %26 = fdiv double %23, %25
  %27 = fmul double %21, 4.000000e+00
  %28 = fmul double %27, %2
  %29 = fdiv double %28, %25
  %30 = fdiv double %29, %25
  %31 = fadd double %30, 1.000000e+00
  %32 = tail call double @sqrt(double noundef %31) #2
  %33 = fadd double %32, 1.000000e+00
  %34 = fdiv double %26, %33
  store double %34, ptr %4, align 8, !tbaa !5
  %35 = fadd double %2, 1.000000e+00
  %36 = fadd double %35, %34
  ret double %36
}

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

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

attributes #0 = { 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 #1 = { 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 #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)"}
!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