; LLVM IR from simbody/simbody :: SimTKmath/Optimizers/src/IpOpt (IpAdaptiveMuUpdate)

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

%"class.SimTKIpopt::SmartPtr.20" = type { ptr }
%"class.SimTKIpopt::SmartPtr.47" = type { ptr }
%"class.SimTKIpopt::AdaptiveMuUpdate" = type { %"class.SimTKIpopt::MuUpdate.base", double, double, double, i8, double, double, double, double, double, double, i32, i32, i32, i32, double, double, double, %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.11", %"class.SimTKIpopt::SmartPtr.11", double, double, i32, %"class.std::__cxx11::list", double, %"class.SimTKIpopt::Filter", i8, i8, i8, %"class.SimTKIpopt::SmartPtr.20" }
%"class.SimTKIpopt::MuUpdate.base" = type { %"class.SimTKIpopt::AlgorithmStrategyObject.base" }
%"class.SimTKIpopt::AlgorithmStrategyObject.base" = type <{ %"class.SimTKIpopt::ReferencedObject.base", [4 x i8], %"class.SimTKIpopt::SmartPtr.6", %"class.SimTKIpopt::SmartPtr.7", %"class.SimTKIpopt::SmartPtr.8", %"class.SimTKIpopt::SmartPtr.9", i8 }>
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>
%"class.SimTKIpopt::SmartPtr.6" = type { ptr }
%"class.SimTKIpopt::SmartPtr.7" = type { ptr }
%"class.SimTKIpopt::SmartPtr.8" = type { ptr }
%"class.SimTKIpopt::SmartPtr.9" = type { ptr }
%"class.SimTKIpopt::SmartPtr.10" = type { ptr }
%"class.SimTKIpopt::SmartPtr.11" = type { ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<double, std::allocator<double>>::_List_impl" }
%"struct.std::__cxx11::_List_base<double, std::allocator<double>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.SimTKIpopt::Filter" = type { i32, %"class.std::__cxx11::list.15" }
%"class.std::__cxx11::list.15" = type { %"class.std::__cxx11::_List_base.16" }
%"class.std::__cxx11::_List_base.16" = type { %"struct.std::__cxx11::_List_base<SimTKIpopt::FilterEntry *, std::allocator<SimTKIpopt::FilterEntry *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SimTKIpopt::FilterEntry *, std::allocator<SimTKIpopt::FilterEntry *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MinEdd(double noundef, double noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8, ptr noundef nonnull align 8 dereferenceable(864)) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate18lower_mu_safeguardEv(ptr noundef nonnull align 8 dereferenceable(304) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %8 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %12 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %15 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %16 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %17 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 6
  %21 = load double, ptr %20, align 8, !tbaa !9
  %22 = fcmp oeq double %21, 0.000000e+00
  br i1 %22, label %23, label %24

23:                                               ; preds = %1
  store double 0.000000e+00, ptr %2, align 8
  br label %168

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %25 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %26 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities23curr_dual_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025) %25, i32 noundef 0)
  store double %26, ptr %4, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %27 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %28 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities25curr_primal_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025) %27, i32 noundef 0)
  store double %28, ptr %5, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %29 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  call void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %8, ptr noundef nonnull align 8 dereferenceable(864) %29)
  %30 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %31 unwind label %78

31:                                               ; preds = %24
  invoke void @_ZNK10SimTKIpopt14IteratesVector1xEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %7, ptr noundef nonnull align 8 dereferenceable(280) %30)
          to label %32 unwind label %78

32:                                               ; preds = %31
  %33 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %34 unwind label %82

34:                                               ; preds = %32
  %35 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %33)
          to label %36 unwind label %82

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %37 = invoke noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
          to label %38 unwind label %86

38:                                               ; preds = %36
  invoke void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %12, ptr noundef nonnull align 8 dereferenceable(864) %37)
          to label %39 unwind label %86

39:                                               ; preds = %38
  %40 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %41 unwind label %90

41:                                               ; preds = %39
  invoke void @_ZNK10SimTKIpopt14IteratesVector1sEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %11, ptr noundef nonnull align 8 dereferenceable(280) %40)
          to label %42 unwind label %90

42:                                               ; preds = %41
  %43 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %44 unwind label %94

44:                                               ; preds = %42
  %45 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %43)
          to label %46 unwind label %94

46:                                               ; preds = %44
  %47 = add nsw i32 %35, %45
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  store i32 %47, ptr %6, align 4, !tbaa !39
  %48 = load i32, ptr %6, align 4, !tbaa !39
  %49 = sitofp i32 %48 to double
  %50 = load double, ptr %4, align 8, !tbaa !38
  %51 = fdiv double %50, %49
  store double %51, ptr %4, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %52 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  call void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %15, ptr noundef nonnull align 8 dereferenceable(864) %52)
  %53 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %54 unwind label %102

54:                                               ; preds = %46
  invoke void @_ZNK10SimTKIpopt14IteratesVector3y_cEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %14, ptr noundef nonnull align 8 dereferenceable(280) %53)
          to label %55 unwind label %102

55:                                               ; preds = %54
  %56 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %57 unwind label %106

57:                                               ; preds = %55
  %58 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %56)
          to label %59 unwind label %106

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %60 = invoke noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
          to label %61 unwind label %110

61:                                               ; preds = %59
  invoke void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %17, ptr noundef nonnull align 8 dereferenceable(864) %60)
          to label %62 unwind label %110

62:                                               ; preds = %61
  %63 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %64 unwind label %114

64:                                               ; preds = %62
  invoke void @_ZNK10SimTKIpopt14IteratesVector3y_dEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %16, ptr noundef nonnull align 8 dereferenceable(280) %63)
          to label %65 unwind label %114

65:                                               ; preds = %64
  %66 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %67 unwind label %118

67:                                               ; preds = %65
  %68 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %66)
          to label %69 unwind label %118

69:                                               ; preds = %67
  %70 = add nsw i32 %58, %68
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #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 @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  store i32 %70, ptr %13, align 4, !tbaa !39
  %71 = load i32, ptr %13, align 4, !tbaa !39
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %126

73:                                               ; preds = %69
  %74 = load i32, ptr %13, align 4, !tbaa !39
  %75 = sitofp i32 %74 to double
  %76 = load double, ptr %5, align 8, !tbaa !38
  %77 = fdiv double %76, %75
  store double %77, ptr %5, align 8, !tbaa !38
  br label %126

78:                                               ; preds = %31, %24
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  br label %101

82:                                               ; preds = %34, %32
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  br label %100

86:                                               ; preds = %38, %36
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  br label %99

90:                                               ; preds = %41, %39
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  br label %98

94:                                               ; preds = %44, %42
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br label %98

98:                                               ; preds = %94, %90
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %99

99:                                               ; preds = %98, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %100

100:                                              ; preds = %99, %82
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %101

101:                                              ; preds = %100, %78
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %167

102:                                              ; preds = %54, %46
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %10, align 4
  br label %125

106:                                              ; preds = %57, %55
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %9, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %10, align 4
  br label %124

110:                                              ; preds = %61, %59
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  br label %123

114:                                              ; preds = %64, %62
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %9, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %10, align 4
  br label %122

118:                                              ; preds = %67, %65
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %9, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %10, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %122

122:                                              ; preds = %118, %114
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br label %123

123:                                              ; preds = %122, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %124

124:                                              ; preds = %123, %106
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %125

125:                                              ; preds = %124, %102
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #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 4, ptr %13) #6
  br label %167

126:                                              ; preds = %73, %69
  %127 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 21
  %128 = load double, ptr %127, align 8, !tbaa !40
  %129 = fcmp olt double %128, 0.000000e+00
  br i1 %129, label %130, label %134

130:                                              ; preds = %126
  %131 = load double, ptr %4, align 8, !tbaa !38
  %132 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef 1.000000e+00, double noundef %131)
  %133 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 21
  store double %132, ptr %133, align 8, !tbaa !40
  br label %134

134:                                              ; preds = %130, %126
  %135 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 22
  %136 = load double, ptr %135, align 8, !tbaa !41
  %137 = fcmp olt double %136, 0.000000e+00
  br i1 %137, label %138, label %142

138:                                              ; preds = %134
  %139 = load double, ptr %5, align 8, !tbaa !38
  %140 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef 1.000000e+00, double noundef %139)
  %141 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 22
  store double %140, ptr %141, align 8, !tbaa !41
  br label %142

142:                                              ; preds = %138, %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %143 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 6
  %144 = load double, ptr %143, align 8, !tbaa !9
  %145 = load double, ptr %4, align 8, !tbaa !38
  %146 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 21
  %147 = load double, ptr %146, align 8, !tbaa !40
  %148 = fdiv double %145, %147
  %149 = fmul double %144, %148
  %150 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 6
  %151 = load double, ptr %150, align 8, !tbaa !9
  %152 = load double, ptr %5, align 8, !tbaa !38
  %153 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 22
  %154 = load double, ptr %153, align 8, !tbaa !41
  %155 = fdiv double %152, %154
  %156 = fmul double %151, %155
  %157 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %149, double noundef %156)
  store double %157, ptr %18, align 8, !tbaa !38
  %158 = getelementptr inbounds %"class.SimTKIpopt::AdaptiveMuUpdate", ptr %19, i32 0, i32 14
  %159 = load i32, ptr %158, align 4, !tbaa !42
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %165

161:                                              ; preds = %142
  %162 = load double, ptr %18, align 8, !tbaa !38
  %163 = call noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate11min_ref_valEv(ptr noundef nonnull align 8 dereferenceable(304) %19)
  %164 = call noundef double @_ZN10SimTKIpopt3MinEdd(double noundef %162, double noundef %163)
  store double %164, ptr %18, align 8, !tbaa !38
  br label %165

165:                                              ; preds = %161, %142
  %166 = load double, ptr %18, align 8, !tbaa !38
  store double %166, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %168

167:                                              ; preds = %125, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %170

168:                                              ; preds = %165, %23
  %169 = load double, ptr %2, align 8
  ret double %169

170:                                              ; preds = %167
  %171 = load ptr, ptr %9, align 8
  %172 = load i32, ptr %10, align 4
  %173 = insertvalue { ptr, i32 } poison, ptr %171, 0
  %174 = insertvalue { ptr, i32 } %173, i32 %172, 1
  resume { ptr, i32 } %174
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate11min_ref_valEv(ptr noundef nonnull align 8 dereferenceable(304)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector1xEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector1sEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector3y_cEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector3y_dEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) #2 align 2

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities23curr_dual_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025), i32 noundef) #5

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities25curr_primal_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025), i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { 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 #4 = { 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 #5 = { "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, !20, i64 96}
!10 = !{!"_ZTSN10SimTKIpopt16AdaptiveMuUpdateE", !11, i64 0, !20, i64 56, !20, i64 64, !20, i64 72, !19, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !20, i64 128, !21, i64 136, !22, i64 140, !23, i64 144, !24, i64 148, !20, i64 152, !20, i64 160, !20, i64 168, !25, i64 176, !26, i64 184, !26, i64 192, !20, i64 200, !20, i64 208, !14, i64 216, !27, i64 224, !20, i64 248, !33, i64 256, !19, i64 288, !19, i64 289, !19, i64 290, !37, i64 296}
!11 = !{!"_ZTSN10SimTKIpopt8MuUpdateE", !12, i64 0}
!12 = !{!"_ZTSN10SimTKIpopt23AlgorithmStrategyObjectE", !13, i64 0, !15, i64 16, !16, i64 24, !17, i64 32, !18, i64 40, !19, i64 48}
!13 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8IpoptNLPEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_9IpoptDataEEE", !6, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_25IpoptCalculatedQuantitiesEEE", !6, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle8NormEnumE", !7, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle14CentralityEnumE", !7, i64 0}
!23 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle17BalancingTermEnumE", !7, i64 0}
!24 = !{!"_ZTSN10SimTKIpopt16AdaptiveMuUpdate27AdaptiveMuGlobalizationEnumE", !7, i64 0}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_10LineSearchEEE", !6, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8MuOracleEEE", !6, i64 0}
!27 = !{!"_ZTSNSt7__cxx114listIdSaIdEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIdSaIdEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIdSaIdEE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !32, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!32 = !{!"long", !7, i64 0}
!33 = !{!"_ZTSN10SimTKIpopt6FilterE", !14, i64 0, !34, i64 8}
!34 = !{!"_ZTSNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EEE", !35, i64 0}
!35 = !{!"_ZTSNSt7__cxx1110_List_baseIPN10SimTKIpopt11FilterEntryESaIS3_EEE", !36, i64 0}
!36 = !{!"_ZTSNSt7__cxx1110_List_baseIPN10SimTKIpopt11FilterEntryESaIS3_EE10_List_implE", !30, i64 0}
!37 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEE", !6, i64 0}
!38 = !{!20, !20, i64 0}
!39 = !{!14, !14, i64 0}
!40 = !{!10, !20, i64 200}
!41 = !{!10, !20, i64 208}
!42 = !{!10, !24, i64 148}


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

%"class.SimTKIpopt::SmartPtr.20" = type { ptr }
%"class.SimTKIpopt::SmartPtr.47" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MinEdd(double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8, ptr noundef nonnull align 8 dereferenceable(864)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate18lower_mu_safeguardEv(ptr noundef nonnull align 8 dereferenceable(304) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %3 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %4 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %5 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %6 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %7 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %8 = alloca %"class.SimTKIpopt::SmartPtr.47", align 8
  %9 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  %11 = load double, ptr %10, align 8, !tbaa !5
  %12 = fcmp oeq double %11, 0.000000e+00
  br i1 %12, label %109, label %13

13:                                               ; preds = %1
  %14 = tail call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %15 = tail call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities23curr_dual_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025) %14, i32 noundef 0)
  %16 = tail call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %17 = tail call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities25curr_primal_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025) %16, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %18 = tail call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %3, ptr noundef nonnull align 8 dereferenceable(864) %18)
  %19 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  invoke void @_ZNK10SimTKIpopt14IteratesVector1xEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %2, ptr noundef nonnull align 8 dereferenceable(280) %19)
          to label %20 unwind label %56

20:                                               ; preds = %13
  %21 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %22 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %21)
          to label %23 unwind label %58

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %24 = invoke noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
          to label %25 unwind label %60

25:                                               ; preds = %23
  invoke void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %5, ptr noundef nonnull align 8 dereferenceable(864) %24)
          to label %26 unwind label %60

26:                                               ; preds = %25
  %27 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @_ZNK10SimTKIpopt14IteratesVector1sEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %4, ptr noundef nonnull align 8 dereferenceable(280) %27)
          to label %28 unwind label %62

28:                                               ; preds = %26
  %29 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %30 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %29)
          to label %31 unwind label %64

31:                                               ; preds = %28
  %32 = add nsw i32 %30, %22
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %33 = sitofp i32 %32 to double
  %34 = fdiv double %15, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %35 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %7, ptr noundef nonnull align 8 dereferenceable(864) %35)
  %36 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  invoke void @_ZNK10SimTKIpopt14IteratesVector3y_cEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %6, ptr noundef nonnull align 8 dereferenceable(280) %36)
          to label %37 unwind label %70

37:                                               ; preds = %31
  %38 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %39 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %38)
          to label %40 unwind label %72

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %41 = invoke noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
          to label %42 unwind label %74

42:                                               ; preds = %40
  invoke void @_ZNK10SimTKIpopt9IpoptData4currEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.20") align 8 %9, ptr noundef nonnull align 8 dereferenceable(864) %41)
          to label %43 unwind label %74

43:                                               ; preds = %42
  %44 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZNK10SimTKIpopt14IteratesVector3y_dEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8 %8, ptr noundef nonnull align 8 dereferenceable(280) %44)
          to label %45 unwind label %76

45:                                               ; preds = %43
  %46 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %47 = invoke noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %46)
          to label %48 unwind label %78

48:                                               ; preds = %45
  %49 = add nsw i32 %47, %39
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %50 = icmp sgt i32 %49, 0
  %51 = uitofp nneg i32 %49 to double
  %52 = fdiv double %17, %51
  %.025 = select i1 %50, double %52, double %17
  %53 = getelementptr inbounds i8, ptr %0, i64 200
  %54 = load double, ptr %53, align 8, !tbaa !37
  %55 = fcmp olt double %54, 0.000000e+00
  br i1 %55, label %84, label %86

56:                                               ; preds = %13
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %69

58:                                               ; preds = %20
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %68

60:                                               ; preds = %25, %23
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %67

62:                                               ; preds = %26
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %28
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br label %66

66:                                               ; preds = %64, %62
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %67

67:                                               ; preds = %66, %60
  %.pn.pn = phi { ptr, i32 } [ %.pn, %66 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %68

68:                                               ; preds = %67, %58
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %67 ], [ %59, %58 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  br label %69

69:                                               ; preds = %68, %56
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %68 ], [ %57, %56 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %108

70:                                               ; preds = %31
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %83

72:                                               ; preds = %37
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %82

74:                                               ; preds = %42, %40
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %81

76:                                               ; preds = %43
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

78:                                               ; preds = %45
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %80

80:                                               ; preds = %78, %76
  %.pn31 = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %81

81:                                               ; preds = %80, %74
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %80 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %82

82:                                               ; preds = %81, %72
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %81 ], [ %73, %72 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %83

83:                                               ; preds = %82, %70
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn, %82 ], [ %71, %70 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %108

84:                                               ; preds = %48
  %85 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef 1.000000e+00, double noundef %34)
  store double %85, ptr %53, align 8, !tbaa !37
  br label %86

86:                                               ; preds = %84, %48
  %87 = phi double [ %85, %84 ], [ %54, %48 ]
  %88 = getelementptr inbounds i8, ptr %0, i64 208
  %89 = load double, ptr %88, align 8, !tbaa !38
  %90 = fcmp olt double %89, 0.000000e+00
  br i1 %90, label %91, label %93

91:                                               ; preds = %86
  %92 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef 1.000000e+00, double noundef %.025)
  store double %92, ptr %88, align 8, !tbaa !38
  %.pre = load double, ptr %53, align 8, !tbaa !37
  br label %93

93:                                               ; preds = %91, %86
  %94 = phi double [ %92, %91 ], [ %89, %86 ]
  %95 = phi double [ %.pre, %91 ], [ %87, %86 ]
  %96 = load double, ptr %10, align 8, !tbaa !5
  %97 = fdiv double %34, %95
  %98 = fmul double %96, %97
  %99 = fdiv double %.025, %94
  %100 = fmul double %96, %99
  %101 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %98, double noundef %100)
  %102 = getelementptr inbounds i8, ptr %0, i64 148
  %103 = load i32, ptr %102, align 4, !tbaa !39
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %109

105:                                              ; preds = %93
  %106 = call noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate11min_ref_valEv(ptr noundef nonnull align 8 dereferenceable(304) %0)
  %107 = call noundef double @_ZN10SimTKIpopt3MinEdd(double noundef %101, double noundef %106)
  br label %109

108:                                              ; preds = %83, %69
  %.pn31.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn, %83 ], [ %.pn.pn.pn.pn, %69 ]
  resume { ptr, i32 } %.pn31.pn.pn.pn.pn

109:                                              ; preds = %93, %105, %1
  %.014 = phi double [ 0.000000e+00, %1 ], [ %107, %105 ], [ %101, %93 ]
  ret double %.014
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN10SimTKIpopt16AdaptiveMuUpdate11min_ref_valEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector1xEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector1sEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector3y_cEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt14IteratesVector3y_dEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.47") align 8, ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #2 align 2

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities23curr_dual_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025), i32 noundef) local_unnamed_addr #5

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities25curr_primal_infeasibilityENS_9ENormTypeE(ptr noundef nonnull align 8 dereferenceable(2025), i32 noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { 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 #4 = { 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 #5 = { "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, !19, i64 96}
!6 = !{!"_ZTSN10SimTKIpopt16AdaptiveMuUpdateE", !7, i64 0, !19, i64 56, !19, i64 64, !19, i64 72, !18, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !19, i64 120, !19, i64 128, !20, i64 136, !21, i64 140, !22, i64 144, !23, i64 148, !19, i64 152, !19, i64 160, !19, i64 168, !24, i64 176, !25, i64 184, !25, i64 192, !19, i64 200, !19, i64 208, !10, i64 216, !26, i64 224, !19, i64 248, !32, i64 256, !18, i64 288, !18, i64 289, !18, i64 290, !36, i64 296}
!7 = !{!"_ZTSN10SimTKIpopt8MuUpdateE", !8, i64 0}
!8 = !{!"_ZTSN10SimTKIpopt23AlgorithmStrategyObjectE", !9, i64 0, !13, i64 16, !15, i64 24, !16, i64 32, !17, i64 40, !18, i64 48}
!9 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !10, i64 8}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !14, i64 0}
!14 = !{!"any pointer", !11, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8IpoptNLPEEE", !14, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_9IpoptDataEEE", !14, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_25IpoptCalculatedQuantitiesEEE", !14, i64 0}
!18 = !{!"bool", !11, i64 0}
!19 = !{!"double", !11, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle8NormEnumE", !11, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle14CentralityEnumE", !11, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt23QualityFunctionMuOracle17BalancingTermEnumE", !11, i64 0}
!23 = !{!"_ZTSN10SimTKIpopt16AdaptiveMuUpdate27AdaptiveMuGlobalizationEnumE", !11, i64 0}
!24 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_10LineSearchEEE", !14, i64 0}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8MuOracleEEE", !14, i64 0}
!26 = !{!"_ZTSNSt7__cxx114listIdSaIdEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIdSaIdEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIdSaIdEE10_List_implE", !29, i64 0}
!29 = !{!"_ZTSNSt8__detail17_List_node_headerE", !30, i64 0, !31, i64 16}
!30 = !{!"_ZTSNSt8__detail15_List_node_baseE", !14, i64 0, !14, i64 8}
!31 = !{!"long", !11, i64 0}
!32 = !{!"_ZTSN10SimTKIpopt6FilterE", !10, i64 0, !33, i64 8}
!33 = !{!"_ZTSNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EEE", !34, i64 0}
!34 = !{!"_ZTSNSt7__cxx1110_List_baseIPN10SimTKIpopt11FilterEntryESaIS3_EEE", !35, i64 0}
!35 = !{!"_ZTSNSt7__cxx1110_List_baseIPN10SimTKIpopt11FilterEntryESaIS3_EE10_List_implE", !29, i64 0}
!36 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14IteratesVectorEEE", !14, i64 0}
!37 = !{!6, !19, i64 200}
!38 = !{!6, !19, i64 208}
!39 = !{!6, !23, i64 148}


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