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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nounwind uwtable
define dso_local double @rec_dTmdlna(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6) #2 {
  %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
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  store double %0, ptr %8, align 8, !tbaa !5
  store double %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !5
  store double %3, ptr %11, align 8, !tbaa !5
  store double %4, ptr %12, align 8, !tbaa !5
  store double %5, ptr %13, align 8, !tbaa !5
  store double %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %16 = load double, ptr %8, align 8, !tbaa !5
  %17 = fcmp olt double %16, 1.000000e+00
  br i1 %17, label %18, label %29

18:                                               ; preds = %7
  %19 = load double, ptr %8, align 8, !tbaa !5
  %20 = call double @pow(double noundef %19, double noundef 3.001340e-01) #4
  %21 = fsub double 1.000000e+00, %20
  %22 = call double @pow(double noundef %21, double noundef 1.510350e+00) #4
  %23 = fsub double 1.000000e+00, %22
  %24 = fmul double 0x3FEFE640A6B93CCD, %23
  store double %24, ptr %15, align 8, !tbaa !5
  %25 = load double, ptr %15, align 8, !tbaa !5
  %26 = fcmp ogt double %25, 1.000000e+00
  br i1 %26, label %27, label %28

27:                                               ; preds = %18
  store double 1.000000e+00, ptr %15, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %27, %18
  br label %30

29:                                               ; preds = %7
  store double 1.000000e+00, ptr %15, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %29, %28
  %31 = load double, ptr %9, align 8, !tbaa !5
  %32 = load double, ptr %10, align 8, !tbaa !5
  %33 = fmul double 0x3B82912D18912EF2, %32
  %34 = load double, ptr %10, align 8, !tbaa !5
  %35 = fmul double %33, %34
  %36 = load double, ptr %10, align 8, !tbaa !5
  %37 = fmul double %35, %36
  %38 = load double, ptr %10, align 8, !tbaa !5
  %39 = fmul double %37, %38
  %40 = load double, ptr %8, align 8, !tbaa !5
  %41 = fmul double %39, %40
  %42 = load double, ptr %8, align 8, !tbaa !5
  %43 = fadd double 1.000000e+00, %42
  %44 = load double, ptr %12, align 8, !tbaa !5
  %45 = fadd double %43, %44
  %46 = fdiv double %41, %45
  %47 = load double, ptr %10, align 8, !tbaa !5
  %48 = load double, ptr %9, align 8, !tbaa !5
  %49 = fsub double %47, %48
  %50 = fmul double %46, %49
  %51 = load double, ptr %11, align 8, !tbaa !5
  %52 = fdiv double %50, %51
  %53 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %31, double %52)
  %54 = load double, ptr %15, align 8, !tbaa !5
  %55 = fmul double 0x40BE38563023F6AA, %54
  %56 = load double, ptr %13, align 8, !tbaa !5
  %57 = fdiv double %55, %56
  %58 = load double, ptr %14, align 8, !tbaa !5
  %59 = fmul double %57, %58
  %60 = load double, ptr %8, align 8, !tbaa !5
  %61 = fadd double 1.000000e+00, %60
  %62 = load double, ptr %12, align 8, !tbaa !5
  %63 = fadd double %61, %62
  %64 = fdiv double %59, %63
  %65 = load double, ptr %11, align 8, !tbaa !5
  %66 = fdiv double %64, %65
  %67 = fadd double %53, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  ret double %67
}

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

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


; 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 @pow(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write) uwtable
define dso_local double @rec_dTmdlna(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6) local_unnamed_addr #1 {
  %8 = fcmp olt double %0, 1.000000e+00
  br i1 %8, label %9, label %17

9:                                                ; preds = %7
  %10 = tail call double @pow(double noundef %0, double noundef 3.001340e-01) #3
  %11 = fsub double 1.000000e+00, %10
  %12 = tail call double @pow(double noundef %11, double noundef 1.510350e+00) #3
  %13 = fsub double 1.000000e+00, %12
  %14 = fmul double %13, 0x3FEFE640A6B93CCD
  %15 = fcmp ogt double %14, 1.000000e+00
  br i1 %15, label %16, label %17

16:                                               ; preds = %9
  br label %17

17:                                               ; preds = %7, %9, %16
  %.0 = phi double [ 1.000000e+00, %16 ], [ %14, %9 ], [ 1.000000e+00, %7 ]
  %18 = fmul double %2, 0x3B82912D18912EF2
  %19 = fmul double %18, %2
  %20 = fmul double %19, %2
  %21 = fmul double %20, %2
  %22 = fmul double %21, %0
  %23 = fadd double %0, 1.000000e+00
  %24 = fadd double %23, %4
  %25 = fdiv double %22, %24
  %26 = fsub double %2, %1
  %27 = fmul double %26, %25
  %28 = fdiv double %27, %3
  %29 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double %28)
  %30 = fmul double %.0, 0x40BE38563023F6AA
  %31 = fdiv double %30, %5
  %32 = fmul double %31, %6
  %33 = fdiv double %32, %24
  %34 = fdiv double %33, %3
  %35 = fadd double %29, %34
  ret double %35
}

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

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


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