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

; 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.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.std::allocator.12" = type { i8 }
%"class.SimTKIpopt::MonotoneMuUpdate" = type <{ %"class.SimTKIpopt::MuUpdate.base", [7 x i8], double, double, double, double, i8, [7 x i8], double, double, %"class.SimTKIpopt::SmartPtr.10", i8, i8, [6 x i8] }>
%"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 }

@.str.24 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [103 x i8], align 1
@_ZTIN10SimTKIpopt18TINY_STEP_DETECTEDE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt9IpoptData6Set_muEd(ptr noundef nonnull align 8 dereferenceable(864), double noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt9IpoptData7Set_tauEd(ptr noundef nonnull align 8 dereferenceable(864), double noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10SimTKIpopt16MonotoneMuUpdate22UpdateBarrierParameterEv(ptr noundef nonnull align 8 dereferenceable(122) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.12", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.12", align 1
  %18 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %20 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %21 = call noundef double @_ZNK10SimTKIpopt9IpoptData7curr_muEv(ptr noundef nonnull align 8 dereferenceable(864) %20)
  store double %21, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %22 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %23 = call noundef double @_ZNK10SimTKIpopt9IpoptData8curr_tauEv(ptr noundef nonnull align 8 dereferenceable(864) %22)
  store double %23, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %24 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %25 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025) %24)
  store double %25, ptr %5, align 8, !tbaa !9
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %27 = load double, ptr %5, align 8, !tbaa !9
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %26, i32 noundef 5, i32 noundef 4, ptr noundef @.str.24, double noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %28 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 3
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = load double, ptr %3, align 8, !tbaa !9
  %31 = fmul double %29, %30
  store double %31, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 0, ptr %7, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %32 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %33 = call noundef zeroext i1 @_ZN10SimTKIpopt9IpoptData14tiny_step_flagEv(ptr noundef nonnull align 8 dereferenceable(864) %32)
  %34 = zext i1 %33 to i8
  store i8 %34, ptr %8, align 1, !tbaa !23
  br label %35

35:                                               ; preds = %135, %1
  %36 = load double, ptr %5, align 8, !tbaa !9
  %37 = load double, ptr %6, align 8, !tbaa !9
  %38 = fcmp ole double %36, %37
  br i1 %38, label %42, label %39

39:                                               ; preds = %35
  %40 = load i8, ptr %8, align 1, !tbaa !23, !range !24, !noundef !25
  %41 = trunc i8 %40 to i1
  br i1 %41, label %42, label %50

42:                                               ; preds = %39, %35
  %43 = load i8, ptr %7, align 1, !tbaa !23, !range !24, !noundef !25
  %44 = trunc i8 %43 to i1
  br i1 %44, label %50, label %45

45:                                               ; preds = %42
  %46 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 12
  %47 = load i8, ptr %46, align 1, !tbaa !26, !range !24, !noundef !25
  %48 = trunc i8 %47 to i1
  %49 = xor i1 %48, true
  br label %50

50:                                               ; preds = %45, %42, %39
  %51 = phi i1 [ false, %42 ], [ false, %39 ], [ %49, %45 ]
  br i1 %51, label %52, label %136

52:                                               ; preds = %50
  %53 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %54 = load double, ptr %6, align 8, !tbaa !9
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %53, i32 noundef 5, i32 noundef 4, ptr noundef @.str.25, double noundef %54)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %55 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %56 = load double, ptr %3, align 8, !tbaa !9
  %57 = load double, ptr %4, align 8, !tbaa !9
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %55, i32 noundef 5, i32 noundef 4, ptr noundef @.str.26, double noundef %56, double noundef %57)
  call void @_ZN10SimTKIpopt16MonotoneMuUpdate15CalcNewMuAndTauERdS1_(ptr noundef nonnull align 8 dereferenceable(122) %19, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %58 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %59 = load double, ptr %9, align 8, !tbaa !9
  %60 = load double, ptr %10, align 8, !tbaa !9
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %58, i32 noundef 5, i32 noundef 4, ptr noundef @.str.27, double noundef %59, double noundef %60)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  %61 = load double, ptr %3, align 8, !tbaa !9
  %62 = load double, ptr %9, align 8, !tbaa !9
  %63 = fcmp une double %61, %62
  %64 = zext i1 %63 to i8
  store i8 %64, ptr %11, align 1, !tbaa !23
  %65 = load i8, ptr %11, align 1, !tbaa !23, !range !24, !noundef !25
  %66 = trunc i8 %65 to i1
  br i1 %66, label %92, label %67

67:                                               ; preds = %52
  %68 = load i8, ptr %8, align 1, !tbaa !23, !range !24, !noundef !25
  %69 = trunc i8 %68 to i1
  br i1 %69, label %70, label %92

70:                                               ; preds = %67
  store i1 true, ptr %18, align 1
  %71 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.28, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %72 unwind label %75

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.29, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %73 unwind label %79

73:                                               ; preds = %72
  invoke void @_ZN10SimTKIpopt18TINY_STEP_DETECTEDC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112) %71, ptr noundef %12, ptr noundef %16, i32 noundef 161)
          to label %74 unwind label %83

74:                                               ; preds = %73
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %71, ptr @_ZTIN10SimTKIpopt18TINY_STEP_DETECTEDE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %144 unwind label %83

75:                                               ; preds = %70
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %14, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %15, align 4
  br label %88

79:                                               ; preds = %72
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %14, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %15, align 4
  br label %87

83:                                               ; preds = %74, %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %14, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %87

87:                                               ; preds = %83, %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %88

88:                                               ; preds = %87, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  %89 = load i1, ptr %18, align 1
  br i1 %89, label %90, label %91

90:                                               ; preds = %88
  call void @__cxa_free_exception(ptr %71) #4
  br label %91

91:                                               ; preds = %90, %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %139

92:                                               ; preds = %67, %52
  %93 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %94 = load double, ptr %9, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt9IpoptData6Set_muEd(ptr noundef nonnull align 8 dereferenceable(864) %93, double noundef %94)
  %95 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %96 = load double, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt9IpoptData7Set_tauEd(ptr noundef nonnull align 8 dereferenceable(864) %95, double noundef %96)
  %97 = load double, ptr %9, align 8, !tbaa !9
  store double %97, ptr %3, align 8, !tbaa !9
  %98 = load double, ptr %10, align 8, !tbaa !9
  store double %98, ptr %4, align 8, !tbaa !9
  %99 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 11
  %100 = load i8, ptr %99, align 8, !tbaa !27, !range !24, !noundef !25
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %107

102:                                              ; preds = %92
  %103 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 6
  %104 = load i8, ptr %103, align 8, !tbaa !28, !range !24, !noundef !25
  %105 = trunc i8 %104 to i1
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i8 1, ptr %7, align 1, !tbaa !23
  br label %123

107:                                              ; preds = %102, %92
  %108 = load i8, ptr %11, align 1, !tbaa !23, !range !24, !noundef !25
  %109 = trunc i8 %108 to i1
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  store i8 1, ptr %7, align 1, !tbaa !23
  br label %122

111:                                              ; preds = %107
  %112 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %19)
  %113 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025) %112)
  store double %113, ptr %5, align 8, !tbaa !9
  %114 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 3
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = load double, ptr %3, align 8, !tbaa !9
  %117 = fmul double %115, %116
  store double %117, ptr %6, align 8, !tbaa !9
  %118 = load double, ptr %5, align 8, !tbaa !9
  %119 = load double, ptr %6, align 8, !tbaa !9
  %120 = fcmp ogt double %118, %119
  %121 = zext i1 %120 to i8
  store i8 %121, ptr %7, align 1, !tbaa !23
  br label %122

122:                                              ; preds = %111, %110
  br label %123

123:                                              ; preds = %122, %106
  %124 = load i8, ptr %7, align 1, !tbaa !23, !range !24, !noundef !25
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %135

126:                                              ; preds = %123
  %127 = load i8, ptr %11, align 1, !tbaa !23, !range !24, !noundef !25
  %128 = trunc i8 %127 to i1
  br i1 %128, label %129, label %135

129:                                              ; preds = %126
  %130 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 10
  %131 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_10LineSearchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %130)
  %132 = load ptr, ptr %131, align 8, !tbaa !29
  %133 = getelementptr inbounds ptr, ptr %132, i64 4
  %134 = load ptr, ptr %133, align 8
  call void %134(ptr noundef nonnull align 8 dereferenceable(49) %131)
  br label %135

135:                                              ; preds = %129, %126, %123
  store i8 0, ptr %8, align 1, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %35, !llvm.loop !31

136:                                              ; preds = %50
  %137 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 12
  store i8 0, ptr %137, align 1, !tbaa !26
  %138 = getelementptr inbounds %"class.SimTKIpopt::MonotoneMuUpdate", ptr %19, i32 0, i32 11
  store i8 1, ptr %138, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret i1 true

139:                                              ; preds = %91
  %140 = load ptr, ptr %14, align 8
  %141 = load i32, ptr %15, align 4
  %142 = insertvalue { ptr, i32 } poison, ptr %140, 0
  %143 = insertvalue { ptr, i32 } %142, i32 %141, 1
  resume { ptr, i32 } %143

144:                                              ; preds = %74
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10SimTKIpopt9IpoptData8curr_tauEv(ptr noundef nonnull align 8 dereferenceable(864)) #1 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

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025)) #3

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

declare void @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt16MonotoneMuUpdate15CalcNewMuAndTauERdS1_(ptr noundef nonnull align 8 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt18TINY_STEP_DETECTEDC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

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 = { "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 = { nounwind }
attributes #5 = { noreturn }

!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 64}
!12 = !{!"_ZTSN10SimTKIpopt16MonotoneMuUpdateE", !13, i64 0, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !21, i64 88, !10, i64 96, !10, i64 104, !22, i64 112, !21, i64 120, !21, i64 121}
!13 = !{!"_ZTSN10SimTKIpopt8MuUpdateE", !14, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt23AlgorithmStrategyObjectE", !15, i64 0, !17, i64 16, !18, i64 24, !19, i64 32, !20, i64 40, !21, i64 48}
!15 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !16, i64 8}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8IpoptNLPEEE", !6, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_9IpoptDataEEE", !6, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_25IpoptCalculatedQuantitiesEEE", !6, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_10LineSearchEEE", !6, i64 0}
!23 = !{!21, !21, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !21, i64 121}
!27 = !{!12, !21, i64 120}
!28 = !{!12, !21, i64 88}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"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"

%"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.std::allocator.12" = type { i8 }

@.str.24 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [103 x i8], align 1
@_ZTIN10SimTKIpopt18TINY_STEP_DETECTEDE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt9IpoptData6Set_muEd(ptr noundef nonnull align 8 dereferenceable(864), double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt9IpoptData7Set_tauEd(ptr noundef nonnull align 8 dereferenceable(864), double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10SimTKIpopt16MonotoneMuUpdate22UpdateBarrierParameterEv(ptr noundef nonnull align 8 dereferenceable(122) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.12", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.12", align 1
  %8 = tail call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %9 = tail call noundef double @_ZNK10SimTKIpopt9IpoptData7curr_muEv(ptr noundef nonnull align 8 dereferenceable(864) %8)
  %10 = tail call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %11 = tail call noundef double @_ZNK10SimTKIpopt9IpoptData8curr_tauEv(ptr noundef nonnull align 8 dereferenceable(864) %10)
  %12 = tail call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %13 = tail call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025) %12)
  %14 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  tail call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %14, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.24, double noundef %13)
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fmul double %9, %16
  %18 = tail call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %19 = tail call noundef zeroext i1 @_ZN10SimTKIpopt9IpoptData14tiny_step_flagEv(ptr noundef nonnull align 8 dereferenceable(864) %18)
  %20 = fcmp ole double %13, %17
  %brmerge57 = or i1 %20, %19
  br i1 %brmerge57, label %21, label %.critedge

21:                                               ; preds = %1
  %22 = getelementptr inbounds i8, ptr %0, i64 121
  %23 = getelementptr inbounds i8, ptr %0, i64 120
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = getelementptr inbounds i8, ptr %0, i64 112
  %26 = load i8, ptr %22, align 1, !tbaa !21, !range !22, !noundef !23
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %.critedge, label %28

28:                                               ; preds = %21
  %29 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  tail call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %29, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.25, double noundef %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %30 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  tail call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %30, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.26, double noundef %9, double noundef %11)
  call void @_ZN10SimTKIpopt16MonotoneMuUpdate15CalcNewMuAndTauERdS1_(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %31 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %32 = load double, ptr %2, align 8, !tbaa !24
  %33 = load double, ptr %3, align 8, !tbaa !24
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %31, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.27, double noundef %32, double noundef %33)
  %34 = load double, ptr %2, align 8, !tbaa !24
  %35 = fcmp oeq double %9, %34
  %brmerge36.not.peel = and i1 %19, %35
  br i1 %brmerge36.not.peel, label %68, label %36

36:                                               ; preds = %28
  %37 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %38 = load double, ptr %2, align 8, !tbaa !24
  call void @_ZN10SimTKIpopt9IpoptData6Set_muEd(ptr noundef nonnull align 8 dereferenceable(864) %37, double noundef %38)
  %39 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %40 = load double, ptr %3, align 8, !tbaa !24
  call void @_ZN10SimTKIpopt9IpoptData7Set_tauEd(ptr noundef nonnull align 8 dereferenceable(864) %39, double noundef %40)
  %41 = load double, ptr %2, align 8, !tbaa !24
  %42 = load double, ptr %3, align 8, !tbaa !24
  %43 = load i8, ptr %23, align 8, !tbaa !25, !range !22, !noundef !23
  %44 = trunc nuw i8 %43 to i1
  br i1 %44, label %46, label %45

45:                                               ; preds = %36
  br i1 %35, label %.thread47.peel, label %49

46:                                               ; preds = %36
  %47 = load i8, ptr %24, align 8, !tbaa !26, !range !22, !noundef !23
  %48 = trunc nuw i8 %47 to i1
  %.not40.peel = xor i1 %48, true
  %brmerge42.peel = or i1 %35, %.not40.peel
  br i1 %brmerge42.peel, label %56, label %49

49:                                               ; preds = %46, %45
  %50 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %51 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025) %50)
  %52 = load double, ptr %15, align 8, !tbaa !5
  %53 = fmul double %41, %52
  %54 = fcmp ogt double %51, %53
  %55 = zext i1 %54 to i8
  br label %56

56:                                               ; preds = %49, %46
  %.132.peel = phi double [ %51, %49 ], [ %13, %46 ]
  %.130.peel = phi double [ %53, %49 ], [ %17, %46 ]
  %.128.peel = phi i8 [ %55, %49 ], [ 1, %46 ]
  %57 = trunc nuw i8 %.128.peel to i1
  %.not37.peel = xor i1 %57, true
  %brmerge39.peel = or i1 %35, %.not37.peel
  br i1 %brmerge39.peel, label %.thread47.peel, label %58

58:                                               ; preds = %56
  %59 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_10LineSearchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %60 = load ptr, ptr %59, align 8, !tbaa !27
  %61 = getelementptr inbounds i8, ptr %60, i64 32
  %62 = load ptr, ptr %61, align 8
  call void %62(ptr noundef nonnull align 8 dereferenceable(49) %59)
  br label %.thread47.peel

.thread47.peel:                                   ; preds = %58, %56, %45
  %.12856.peel = phi i8 [ %.128.peel, %56 ], [ %.128.peel, %58 ], [ 1, %45 ]
  %.13055.peel = phi double [ %.130.peel, %56 ], [ %.130.peel, %58 ], [ %17, %45 ]
  %.13254.peel = phi double [ %.132.peel, %56 ], [ %.132.peel, %58 ], [ %13, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %63 = fcmp ugt double %.13254.peel, %.13055.peel
  br i1 %63, label %.critedge, label %.peel.next

.peel.next:                                       ; preds = %.thread47.peel, %.thread47
  %.02563 = phi double [ %93, %.thread47 ], [ %41, %.thread47.peel ]
  %.02761 = phi i8 [ %.12856, %.thread47 ], [ %.12856.peel, %.thread47.peel ]
  %.02960 = phi double [ %.13055, %.thread47 ], [ %.13055.peel, %.thread47.peel ]
  %.03159 = phi double [ %.13254, %.thread47 ], [ %.13254.peel, %.thread47.peel ]
  %.03358 = phi double [ %94, %.thread47 ], [ %42, %.thread47.peel ]
  %64 = trunc nuw i8 %.02761 to i1
  br i1 %64, label %.critedge, label %65

65:                                               ; preds = %.peel.next
  %66 = load i8, ptr %22, align 1, !tbaa !21, !range !22, !noundef !23
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %.critedge, label %81

68:                                               ; preds = %28
  %69 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.28, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %70 unwind label %.thread

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.29, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %71 unwind label %74

71:                                               ; preds = %70
  invoke void @_ZN10SimTKIpopt18TINY_STEP_DETECTEDC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112) %69, ptr noundef nonnull %4, ptr noundef nonnull %6, i32 noundef 161)
          to label %72 unwind label %76

72:                                               ; preds = %71
  invoke void @__cxa_throw(ptr nonnull %69, ptr nonnull @_ZTIN10SimTKIpopt18TINY_STEP_DETECTEDE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %118 unwind label %76

.thread:                                          ; preds = %68
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %79

74:                                               ; preds = %70
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %72, %71
  %.0 = phi i1 [ false, %72 ], [ true, %71 ]
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %78

78:                                               ; preds = %74, %76
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  %.1 = phi i1 [ %.0, %76 ], [ true, %74 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br i1 %.1, label %79, label %80

79:                                               ; preds = %.thread, %78
  %.pn.pn46 = phi { ptr, i32 } [ %73, %.thread ], [ %.pn, %78 ]
  call void @__cxa_free_exception(ptr %69) #4
  br label %80

80:                                               ; preds = %79, %78
  %.pn.pn45 = phi { ptr, i32 } [ %.pn.pn46, %79 ], [ %.pn, %78 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn.pn45

81:                                               ; preds = %65
  %82 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %82, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.25, double noundef %.02960)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %83 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %83, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.26, double noundef %.02563, double noundef %.03358)
  call void @_ZN10SimTKIpopt16MonotoneMuUpdate15CalcNewMuAndTauERdS1_(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %84 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %85 = load double, ptr %2, align 8, !tbaa !24
  %86 = load double, ptr %3, align 8, !tbaa !24
  call void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %84, i32 noundef 5, i32 noundef 4, ptr noundef nonnull @.str.27, double noundef %85, double noundef %86)
  %87 = load double, ptr %2, align 8, !tbaa !24
  %88 = fcmp oeq double %.02563, %87
  %89 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %90 = load double, ptr %2, align 8, !tbaa !24
  call void @_ZN10SimTKIpopt9IpoptData6Set_muEd(ptr noundef nonnull align 8 dereferenceable(864) %89, double noundef %90)
  %91 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %92 = load double, ptr %3, align 8, !tbaa !24
  call void @_ZN10SimTKIpopt9IpoptData7Set_tauEd(ptr noundef nonnull align 8 dereferenceable(864) %91, double noundef %92)
  %93 = load double, ptr %2, align 8, !tbaa !24
  %94 = load double, ptr %3, align 8, !tbaa !24
  %95 = load i8, ptr %23, align 8, !tbaa !25, !range !22, !noundef !23
  %96 = trunc nuw i8 %95 to i1
  br i1 %96, label %97, label %100

97:                                               ; preds = %81
  %98 = load i8, ptr %24, align 8, !tbaa !26, !range !22, !noundef !23
  %99 = trunc nuw i8 %98 to i1
  %.not40 = xor i1 %99, true
  %brmerge42 = or i1 %88, %.not40
  br i1 %brmerge42, label %108, label %101

100:                                              ; preds = %81
  br i1 %88, label %.thread47, label %101

101:                                              ; preds = %97, %100
  %102 = call noundef nonnull align 8 dereferenceable(2025) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject4IpCqEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %103 = call noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025) %102)
  %104 = load double, ptr %15, align 8, !tbaa !5
  %105 = fmul double %93, %104
  %106 = fcmp ogt double %103, %105
  %107 = zext i1 %106 to i8
  br label %108

108:                                              ; preds = %97, %101
  %.132 = phi double [ %103, %101 ], [ %.03159, %97 ]
  %.130 = phi double [ %105, %101 ], [ %.02960, %97 ]
  %.128 = phi i8 [ %107, %101 ], [ 1, %97 ]
  %109 = trunc nuw i8 %.128 to i1
  %.not37 = xor i1 %109, true
  %brmerge39 = or i1 %88, %.not37
  br i1 %brmerge39, label %.thread47, label %110

110:                                              ; preds = %108
  %111 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_10LineSearchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  %113 = getelementptr inbounds i8, ptr %112, i64 32
  %114 = load ptr, ptr %113, align 8
  call void %114(ptr noundef nonnull align 8 dereferenceable(49) %111)
  br label %.thread47

.thread47:                                        ; preds = %100, %108, %110
  %.12856 = phi i8 [ %.128, %108 ], [ %.128, %110 ], [ 1, %100 ]
  %.13055 = phi double [ %.130, %108 ], [ %.130, %110 ], [ %.02960, %100 ]
  %.13254 = phi double [ %.132, %108 ], [ %.132, %110 ], [ %.03159, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %115 = fcmp ugt double %.13254, %.13055
  br i1 %115, label %.critedge, label %.peel.next, !llvm.loop !29

.critedge:                                        ; preds = %65, %.peel.next, %.thread47, %21, %.thread47.peel, %1
  %116 = getelementptr inbounds i8, ptr %0, i64 121
  store i8 0, ptr %116, align 1, !tbaa !21
  %117 = getelementptr inbounds i8, ptr %0, i64 120
  store i8 1, ptr %117, align 8, !tbaa !25
  ret i1 true

118:                                              ; preds = %72
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10SimTKIpopt9IpoptData8curr_tauEv(ptr noundef nonnull align 8 dereferenceable(864)) local_unnamed_addr #1 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

declare noundef double @_ZN10SimTKIpopt25IpoptCalculatedQuantities18curr_barrier_errorEv(ptr noundef nonnull align 8 dereferenceable(2025)) local_unnamed_addr #3

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

declare void @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt16MonotoneMuUpdate15CalcNewMuAndTauERdS1_(ptr noundef nonnull align 8 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt18TINY_STEP_DETECTEDC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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 = { "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 = { nounwind }
attributes #5 = { noreturn }

!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 64}
!6 = !{!"_ZTSN10SimTKIpopt16MonotoneMuUpdateE", !7, i64 0, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !18, i64 88, !19, i64 96, !19, i64 104, !20, i64 112, !18, i64 120, !18, i64 121}
!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 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_10LineSearchEEE", !14, i64 0}
!21 = !{!6, !18, i64 121}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!19, !19, i64 0}
!25 = !{!6, !18, i64 120}
!26 = !{!6, !18, i64 88}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !12, i64 0}
!29 = distinct !{!29, !30, !31}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass