; LLVM IR from cfd-rg-solver/FVM-RG-Solver :: src/numeric.ll (ZN6Newton7solveEqEP10EnergyCalc10macroParamd)

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

%struct.macroParam = type { %struct.Mixture, %"class.std::vector.0", %"class.std::vector.0", double, double, double, double, double, double, double, double, %"class.std::__cxx11::basic_string" }
%struct.Mixture = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.anon = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Newton7solveEqEP10EnergyCalc10macroParamd(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, ptr noundef %2, double noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca %struct.macroParam, align 8
  %10 = alloca %struct.macroParam, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca %class.anon, 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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 176, ptr %9) #6
  call void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176) %9, ptr noundef nonnull align 8 dereferenceable(176) %2)
  call void @llvm.lifetime.start.p0(i64 176, ptr %10) #6
  invoke void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176) %10, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %21 unwind label %89

21:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store double 1.000000e-04, ptr %13, align 8, !tbaa !9
  %22 = load double, ptr %13, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.macroParam, ptr %9, i32 0, i32 8
  %24 = load double, ptr %23, align 8, !tbaa !11
  %25 = fadd double %24, %22
  store double %25, ptr %23, align 8, !tbaa !11
  %26 = load double, ptr %13, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.macroParam, ptr %10, i32 0, i32 8
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = fsub double %28, %26
  store double %29, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = invoke ptr @_ZN10EnergyCalc13getEnergyFuncEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %32 unwind label %93

32:                                               ; preds = %21
  %33 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 0
  store ptr %31, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %34 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %9)
          to label %35 unwind label %97

35:                                               ; preds = %32
  store double %34, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %36 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %37 unwind label %101

37:                                               ; preds = %35
  store double %36, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %38 = load double, ptr %15, align 8, !tbaa !9
  %39 = load double, ptr %16, align 8, !tbaa !9
  %40 = fsub double %38, %39
  %41 = load double, ptr %13, align 8, !tbaa !9
  %42 = fmul double 2.000000e+00, %41
  %43 = fdiv double %40, %42
  store double %43, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %44 = getelementptr inbounds %struct.macroParam, ptr %2, i32 0, i32 8
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %47 unwind label %105

47:                                               ; preds = %37
  %48 = load double, ptr %8, align 8, !tbaa !9
  %49 = fsub double %46, %48
  %50 = load double, ptr %17, align 8, !tbaa !9
  %51 = fdiv double %49, %50
  %52 = fsub double %45, %51
  store double %52, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %53 = load double, ptr %13, align 8, !tbaa !9
  %54 = fdiv double %53, 1.000000e+01
  store double %54, ptr %19, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %83, %47
  %56 = load double, ptr %18, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.macroParam, ptr %2, i32 0, i32 8
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fsub double %56, %58
  %60 = call double @llvm.fabs.f64(double %59)
  %61 = load double, ptr %19, align 8, !tbaa !9
  %62 = fcmp ogt double %60, %61
  br i1 %62, label %63, label %113

63:                                               ; preds = %55
  %64 = load double, ptr %18, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.macroParam, ptr %2, i32 0, i32 8
  store double %64, ptr %65, align 8, !tbaa !11
  %66 = load double, ptr %18, align 8, !tbaa !9
  %67 = fadd double %66, 1.000000e-05
  %68 = getelementptr inbounds %struct.macroParam, ptr %9, i32 0, i32 8
  store double %67, ptr %68, align 8, !tbaa !11
  %69 = load double, ptr %18, align 8, !tbaa !9
  %70 = fsub double %69, 1.000000e-05
  %71 = getelementptr inbounds %struct.macroParam, ptr %10, i32 0, i32 8
  store double %70, ptr %71, align 8, !tbaa !11
  %72 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %9)
          to label %73 unwind label %109

73:                                               ; preds = %63
  store double %72, ptr %15, align 8, !tbaa !9
  %74 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %75 unwind label %109

75:                                               ; preds = %73
  store double %74, ptr %16, align 8, !tbaa !9
  %76 = load double, ptr %15, align 8, !tbaa !9
  %77 = load double, ptr %16, align 8, !tbaa !9
  %78 = fsub double %76, %77
  %79 = fdiv double %78, 2.000000e-05
  store double %79, ptr %17, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.macroParam, ptr %2, i32 0, i32 8
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %83 unwind label %109

83:                                               ; preds = %75
  %84 = load double, ptr %8, align 8, !tbaa !9
  %85 = fsub double %82, %84
  %86 = load double, ptr %17, align 8, !tbaa !9
  %87 = fdiv double %85, %86
  %88 = fsub double %81, %87
  store double %88, ptr %18, align 8, !tbaa !9
  br label %55, !llvm.loop !26

89:                                               ; preds = %4
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %11, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %12, align 4
  br label %119

93:                                               ; preds = %21
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %11, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %12, align 4
  br label %118

97:                                               ; preds = %32
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %11, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %12, align 4
  br label %117

101:                                              ; preds = %35
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  br label %116

105:                                              ; preds = %37
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  br label %115

109:                                              ; preds = %75, %73, %63
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %115

113:                                              ; preds = %55
  %114 = load double, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %10) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr %10) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr %9) #6
  ret double %114

115:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %116

116:                                              ; preds = %115, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %117

117:                                              ; preds = %116, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %118

118:                                              ; preds = %117, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %10) #6
  br label %119

119:                                              ; preds = %118, %89
  call void @llvm.lifetime.end.p0(i64 176, ptr %10) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr %9) #6
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %11, align 8
  %122 = load i32, ptr %12, align 4
  %123 = insertvalue { ptr, i32 } poison, ptr %121, 0
  %124 = insertvalue { ptr, i32 } %123, i32 %122, 1
  resume { ptr, i32 } %124
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN10EnergyCalc13getEnergyFuncEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(176)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #5 align 2

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 = { mustprogress 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 120}
!12 = !{!"_ZTS10macroParam", !13, i64 0, !19, i64 32, !19, i64 56, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !23, i64 144}
!13 = !{!"_ZTS7Mixture", !14, i64 0, !18, i64 24}
!14 = !{!"_ZTSSt6vectorI16MixtureComponentSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI16MixtureComponentSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

%struct.macroParam = type { %struct.Mixture, %"class.std::vector.0", %"class.std::vector.0", double, double, double, double, double, double, double, double, %"class.std::__cxx11::basic_string" }
%struct.Mixture = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl" = type { %"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MixtureComponent, std::allocator<MixtureComponent>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.anon = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Newton7solveEqEP10EnergyCalc10macroParamd(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0, ptr noundef %1, ptr noundef nonnull %2, double noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.macroParam, align 8
  %6 = alloca %struct.macroParam, align 8
  %7 = alloca %class.anon, align 8
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %5) #6
  call void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176) %5, ptr noundef nonnull align 8 dereferenceable(176) %2)
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %6) #6
  invoke void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %8 unwind label %51

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %5, i64 120
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = fadd double %10, 1.000000e-04
  store double %11, ptr %9, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 120
  %13 = load double, ptr %12, align 8, !tbaa !5
  %14 = fadd double %13, -1.000000e-04
  store double %14, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %15 = call ptr @_ZN10EnergyCalc13getEnergyFuncEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %15, ptr %7, align 8
  %16 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %5)
          to label %17 unwind label %53

17:                                               ; preds = %8
  %18 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %6)
          to label %19 unwind label %55

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %2, i64 120
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %23 unwind label %57

23:                                               ; preds = %19
  %24 = fsub double %16, %18
  %25 = fdiv double %24, 2.000000e-04
  %26 = fsub double %22, %3
  %27 = fdiv double %26, %25
  %28 = fsub double %21, %27
  %29 = load double, ptr %20, align 8, !tbaa !5
  %30 = fsub double %28, %29
  %31 = call double @llvm.fabs.f64(double %30)
  %32 = fcmp ogt double %31, 1.000000e-05
  br i1 %32, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %41
  %.02131 = phi double [ %46, %41 ], [ %28, %23 ]
  store double %.02131, ptr %20, align 8, !tbaa !5
  %33 = fadd double %.02131, 1.000000e-05
  store double %33, ptr %9, align 8, !tbaa !5
  %34 = fadd double %.02131, -1.000000e-05
  store double %34, ptr %12, align 8, !tbaa !5
  %35 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %5)
          to label %36 unwind label %59

36:                                               ; preds = %.lr.ph
  %37 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %6)
          to label %38 unwind label %59

38:                                               ; preds = %36
  %39 = load double, ptr %20, align 8, !tbaa !5
  %40 = invoke noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(176) %2)
          to label %41 unwind label %59

41:                                               ; preds = %38
  %42 = fsub double %35, %37
  %43 = fdiv double %42, 2.000000e-05
  %44 = fsub double %40, %3
  %45 = fdiv double %44, %43
  %46 = fsub double %39, %45
  %47 = load double, ptr %20, align 8, !tbaa !5
  %48 = fsub double %46, %47
  %49 = call double @llvm.fabs.f64(double %48)
  %50 = fcmp ogt double %49, 1.000000e-05
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !24

51:                                               ; preds = %4
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %62

53:                                               ; preds = %8
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %61

55:                                               ; preds = %17
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %61

57:                                               ; preds = %19
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %38, %36, %.lr.ph
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %61

._crit_edge:                                      ; preds = %41, %23
  %.021.lcssa = phi double [ %28, %23 ], [ %46, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %6) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %6) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %5) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %5) #6
  ret double %.021.lcssa

61:                                               ; preds = %55, %59, %57, %53
  %.pn.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %56, %55 ], [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %6) #6
  br label %62

62:                                               ; preds = %61, %51
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %61 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %6) #6
  call void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %5) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10macroParamC2ERKS_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN10EnergyCalc13getEnergyFuncEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZZN10EnergyCalc13getEnergyFuncEvENKUlR10macroParamE_clES1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10macroParamD2Ev(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #5 align 2

attributes #0 = { mustprogress 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { mustprogress 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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, !20, i64 120}
!6 = !{!"_ZTS10macroParam", !7, i64 0, !16, i64 32, !16, i64 56, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !20, i64 128, !20, i64 136, !21, i64 144}
!7 = !{!"_ZTS7Mixture", !8, i64 0, !15, i64 24}
!8 = !{!"_ZTSSt6vectorI16MixtureComponentSaIS0_EE", !9, i64 0}
!9 = !{!"_ZTSSt12_Vector_baseI16MixtureComponentSaIS0_EE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE12_Vector_implE", !11, i64 0}
!11 = !{!"_ZTSNSt12_Vector_baseI16MixtureComponentSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"int", !13, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!20 = !{!"double", !13, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !13, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!23 = !{!"long", !13, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass