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

; 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.11" = type { i8 }
%"class.SimTKIpopt::PDPerturbationHandler" = type { %"class.SimTKIpopt::AlgorithmStrategyObject.base", double, double, double, double, double, double, double, double, i8, i32, i32, i32, i32, double, double, double, double, double, double, double, double, i8, i32 }
%"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 }

@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 uwtable
define dso_local noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler17ConsiderNewSystemERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.11", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8
  call void @_ZN10SimTKIpopt21PDPerturbationHandler13finalize_testEv(ptr noundef nonnull align 8 dereferenceable(216) %18)
  %19 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 22
  %20 = load i8, ptr %19, align 8, !tbaa !9, !range !22, !noundef !23
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %35

22:                                               ; preds = %5
  %23 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 5
  %24 = load double, ptr %23, align 8, !tbaa !24
  %25 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 1
  store double %24, ptr %25, align 8, !tbaa !25
  %26 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 6
  %27 = load double, ptr %26, align 8, !tbaa !26
  %28 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 2
  store double %27, ptr %28, align 8, !tbaa !27
  %29 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  %30 = load double, ptr %29, align 8, !tbaa !28
  %31 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 3
  store double %30, ptr %31, align 8, !tbaa !29
  %32 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 8
  %33 = load double, ptr %32, align 8, !tbaa !30
  %34 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 4
  store double %33, ptr %34, align 8, !tbaa !31
  br label %68

35:                                               ; preds = %5
  %36 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 5
  %37 = load double, ptr %36, align 8, !tbaa !24
  %38 = fcmp ogt double %37, 0.000000e+00
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 5
  %41 = load double, ptr %40, align 8, !tbaa !24
  %42 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 1
  store double %41, ptr %42, align 8, !tbaa !25
  br label %43

43:                                               ; preds = %39, %35
  %44 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 6
  %45 = load double, ptr %44, align 8, !tbaa !26
  %46 = fcmp ogt double %45, 0.000000e+00
  br i1 %46, label %47, label %51

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 6
  %49 = load double, ptr %48, align 8, !tbaa !26
  %50 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 2
  store double %49, ptr %50, align 8, !tbaa !27
  br label %51

51:                                               ; preds = %47, %43
  %52 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  %53 = load double, ptr %52, align 8, !tbaa !28
  %54 = fcmp ogt double %53, 0.000000e+00
  br i1 %54, label %55, label %59

55:                                               ; preds = %51
  %56 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  %57 = load double, ptr %56, align 8, !tbaa !28
  %58 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 3
  store double %57, ptr %58, align 8, !tbaa !29
  br label %59

59:                                               ; preds = %55, %51
  %60 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 8
  %61 = load double, ptr %60, align 8, !tbaa !30
  %62 = fcmp ogt double %61, 0.000000e+00
  br i1 %62, label %63, label %67

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 8
  %65 = load double, ptr %64, align 8, !tbaa !30
  %66 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 4
  store double %65, ptr %66, align 8, !tbaa !31
  br label %67

67:                                               ; preds = %63, %59
  br label %68

68:                                               ; preds = %67, %22
  %69 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 10
  %70 = load i32, ptr %69, align 4, !tbaa !32
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %76, label %72

72:                                               ; preds = %68
  %73 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 11
  %74 = load i32, ptr %73, align 8, !tbaa !33
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %72, %68
  %77 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 13
  store i32 1, ptr %77, align 8, !tbaa !34
  br label %80

78:                                               ; preds = %72
  %79 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 13
  store i32 0, ptr %79, align 8, !tbaa !34
  br label %80

80:                                               ; preds = %78, %76
  %81 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 11
  %82 = load i32, ptr %81, align 8, !tbaa !33
  %83 = icmp eq i32 %82, 2
  br i1 %83, label %84, label %100

84:                                               ; preds = %80
  %85 = call noundef double @_ZN10SimTKIpopt21PDPerturbationHandler8delta_cdEv(ptr noundef nonnull align 8 dereferenceable(216) %18)
  %86 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  store double %85, ptr %86, align 8, !tbaa !28
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  store double %85, ptr %87, align 8, !tbaa !35
  %88 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %18)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.24, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %89 unwind label %91

89:                                               ; preds = %84
  invoke void @_ZN10SimTKIpopt9IpoptData18Append_info_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(864) %88, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %90 unwind label %95

90:                                               ; preds = %89
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  br label %103

91:                                               ; preds = %84
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %14, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %15, align 4
  br label %99

95:                                               ; preds = %89
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %14, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  br label %99

99:                                               ; preds = %95, %91
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  br label %151

100:                                              ; preds = %80
  %101 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  store double 0.000000e+00, ptr %101, align 8, !tbaa !28
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  store double 0.000000e+00, ptr %102, align 8, !tbaa !35
  br label %103

103:                                              ; preds = %100, %90
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load double, ptr %104, align 8, !tbaa !35
  %106 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 8
  store double %105, ptr %106, align 8, !tbaa !30
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  store double %105, ptr %107, align 8, !tbaa !35
  %108 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 10
  %109 = load i32, ptr %108, align 4, !tbaa !32
  %110 = icmp eq i32 %109, 2
  br i1 %110, label %111, label %127

111:                                              ; preds = %103
  %112 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 5
  store double 0.000000e+00, ptr %112, align 8, !tbaa !24
  %113 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 6
  store double 0.000000e+00, ptr %113, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = call noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler28get_deltas_for_wrong_inertiaERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216) %18, ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 8 dereferenceable(8) %117)
  %119 = zext i1 %118 to i8
  store i8 %119, ptr %16, align 1, !tbaa !36
  %120 = load i8, ptr %16, align 1, !tbaa !36, !range !22, !noundef !23
  %121 = trunc i8 %120 to i1
  br i1 %121, label %123, label %122

122:                                              ; preds = %111
  store i1 false, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %124

123:                                              ; preds = %111
  store i32 0, ptr %17, align 4
  br label %124

124:                                              ; preds = %123, %122
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  %125 = load i32, ptr %17, align 4
  switch i32 %125, label %156 [
    i32 0, label %126
    i32 1, label %149
  ]

126:                                              ; preds = %124
  br label %132

127:                                              ; preds = %103
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  store double 0.000000e+00, ptr %128, align 8, !tbaa !35
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load double, ptr %129, align 8, !tbaa !35
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  store double %130, ptr %131, align 8, !tbaa !35
  br label %132

132:                                              ; preds = %127, %126
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load double, ptr %133, align 8, !tbaa !35
  %135 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 5
  store double %134, ptr %135, align 8, !tbaa !24
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load double, ptr %136, align 8, !tbaa !35
  %138 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 6
  store double %137, ptr %138, align 8, !tbaa !26
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = load double, ptr %139, align 8, !tbaa !35
  %141 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 7
  store double %140, ptr %141, align 8, !tbaa !28
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load double, ptr %142, align 8, !tbaa !35
  %144 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 8
  store double %143, ptr %144, align 8, !tbaa !30
  %145 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %18)
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = load double, ptr %146, align 8, !tbaa !35
  call void @_ZN10SimTKIpopt9IpoptData15Set_info_regu_xEd(ptr noundef nonnull align 8 dereferenceable(864) %145, double noundef %147)
  %148 = getelementptr inbounds %"class.SimTKIpopt::PDPerturbationHandler", ptr %18, i32 0, i32 9
  store i8 0, ptr %148, align 8, !tbaa !37
  store i1 true, ptr %6, align 1
  br label %149

149:                                              ; preds = %132, %124
  %150 = load i1, ptr %6, align 1
  ret i1 %150

151:                                              ; preds = %99
  %152 = load ptr, ptr %14, align 8
  %153 = load i32, ptr %15, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155

156:                                              ; preds = %124
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN10SimTKIpopt21PDPerturbationHandler8delta_cdEv(ptr noundef nonnull align 8 dereferenceable(216)) #2 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 void @_ZN10SimTKIpopt9IpoptData18Append_info_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(864), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler28get_deltas_for_wrong_inertiaERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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 = { 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, !18, i64 208}
!10 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandlerE", !11, i64 0, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !18, i64 120, !20, i64 124, !20, i64 128, !13, i64 132, !21, i64 136, !19, i64 144, !19, i64 152, !19, i64 160, !19, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !19, i64 200, !18, i64 208, !13, i64 212}
!11 = !{!"_ZTSN10SimTKIpopt23AlgorithmStrategyObjectE", !12, i64 0, !14, i64 16, !15, i64 24, !16, i64 32, !17, i64 40, !18, i64 48}
!12 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8IpoptNLPEEE", !6, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_9IpoptDataEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_25IpoptCalculatedQuantitiesEEE", !6, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandler9DegenTypeE", !7, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandler11TrialStatusE", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!10, !19, i64 88}
!25 = !{!10, !19, i64 56}
!26 = !{!10, !19, i64 96}
!27 = !{!10, !19, i64 64}
!28 = !{!10, !19, i64 104}
!29 = !{!10, !19, i64 72}
!30 = !{!10, !19, i64 112}
!31 = !{!10, !19, i64 80}
!32 = !{!10, !20, i64 124}
!33 = !{!10, !20, i64 128}
!34 = !{!10, !21, i64 136}
!35 = !{!19, !19, i64 0}
!36 = !{!18, !18, i64 0}
!37 = !{!10, !18, i64 120}


; 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.11" = type { i8 }

@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 uwtable
define dso_local noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler17ConsiderNewSystemERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.11", align 1
  tail call void @_ZN10SimTKIpopt21PDPerturbationHandler13finalize_testEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
  %8 = getelementptr inbounds i8, ptr %0, i64 208
  %9 = load i8, ptr %8, align 8, !tbaa !5, !range !21, !noundef !22
  %10 = trunc nuw i8 %9 to i1
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = load double, ptr %11, align 8, !tbaa !23
  br i1 %10, label %13, label %20

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  store double %12, ptr %14, align 8, !tbaa !24
  %15 = getelementptr inbounds i8, ptr %0, i64 96
  %16 = getelementptr inbounds i8, ptr %0, i64 64
  %17 = load <2 x double>, ptr %15, align 8, !tbaa !25
  store <2 x double> %17, ptr %16, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  %19 = load double, ptr %18, align 8, !tbaa !26
  br label %.sink.split

20:                                               ; preds = %5
  %21 = fcmp ogt double %12, 0.000000e+00
  br i1 %21, label %22, label %24

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %0, i64 56
  store double %12, ptr %23, align 8, !tbaa !24
  br label %24

24:                                               ; preds = %22, %20
  %25 = getelementptr inbounds i8, ptr %0, i64 96
  %26 = load double, ptr %25, align 8, !tbaa !27
  %27 = fcmp ogt double %26, 0.000000e+00
  br i1 %27, label %28, label %30

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %0, i64 64
  store double %26, ptr %29, align 8, !tbaa !28
  br label %30

30:                                               ; preds = %28, %24
  %31 = getelementptr inbounds i8, ptr %0, i64 104
  %32 = load double, ptr %31, align 8, !tbaa !29
  %33 = fcmp ogt double %32, 0.000000e+00
  br i1 %33, label %34, label %36

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %0, i64 72
  store double %32, ptr %35, align 8, !tbaa !30
  br label %36

36:                                               ; preds = %34, %30
  %37 = getelementptr inbounds i8, ptr %0, i64 112
  %38 = load double, ptr %37, align 8, !tbaa !26
  %39 = fcmp ogt double %38, 0.000000e+00
  br i1 %39, label %.sink.split, label %41

.sink.split:                                      ; preds = %36, %13
  %.sink32 = phi double [ %19, %13 ], [ %38, %36 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 80
  store double %.sink32, ptr %40, align 8, !tbaa !31
  br label %41

41:                                               ; preds = %.sink.split, %36
  %42 = getelementptr inbounds i8, ptr %0, i64 124
  %43 = load i32, ptr %42, align 4, !tbaa !32
  %44 = icmp eq i32 %43, 0
  %45 = getelementptr inbounds i8, ptr %0, i64 128
  %46 = load i32, ptr %45, align 8
  %47 = icmp eq i32 %46, 0
  %or.cond = or i1 %44, %47
  %.sink = zext i1 %or.cond to i32
  %48 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 %.sink, ptr %48, align 8
  %49 = icmp eq i32 %46, 2
  br i1 %49, label %50, label %61

50:                                               ; preds = %41
  %51 = tail call noundef double @_ZN10SimTKIpopt21PDPerturbationHandler8delta_cdEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
  %52 = getelementptr inbounds i8, ptr %0, i64 104
  store double %51, ptr %52, align 8, !tbaa !29
  store double %51, ptr %3, align 8, !tbaa !25
  %53 = tail call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  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.24, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %54 unwind label %56

54:                                               ; preds = %50
  invoke void @_ZN10SimTKIpopt9IpoptData18Append_info_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(864) %53, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %55 unwind label %58

55:                                               ; preds = %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  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 @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  %.pre = load double, ptr %3, align 8, !tbaa !25
  %.pre31 = load i32, ptr %42, align 4, !tbaa !32
  br label %63

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

58:                                               ; preds = %54
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  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 @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn

61:                                               ; preds = %41
  %62 = getelementptr inbounds i8, ptr %0, i64 104
  store double 0.000000e+00, ptr %62, align 8, !tbaa !29
  store double 0.000000e+00, ptr %3, align 8, !tbaa !25
  br label %63

63:                                               ; preds = %61, %55
  %64 = phi i32 [ %43, %61 ], [ %.pre31, %55 ]
  %65 = phi double [ 0.000000e+00, %61 ], [ %.pre, %55 ]
  %66 = getelementptr inbounds i8, ptr %0, i64 112
  store double %65, ptr %66, align 8, !tbaa !26
  store double %65, ptr %4, align 8, !tbaa !25
  %67 = icmp eq i32 %64, 2
  br i1 %67, label %68, label %71

68:                                               ; preds = %63
  %69 = getelementptr inbounds i8, ptr %0, i64 88
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %69, i8 0, i64 16, i1 false)
  %70 = call noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler28get_deltas_for_wrong_inertiaERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br i1 %70, label %72, label %83

71:                                               ; preds = %63
  store double 0.000000e+00, ptr %1, align 8, !tbaa !25
  store double 0.000000e+00, ptr %2, align 8, !tbaa !25
  br label %72

72:                                               ; preds = %68, %71
  %73 = load double, ptr %1, align 8, !tbaa !25
  %74 = getelementptr inbounds i8, ptr %0, i64 88
  store double %73, ptr %74, align 8, !tbaa !23
  %75 = load double, ptr %2, align 8, !tbaa !25
  %76 = getelementptr inbounds i8, ptr %0, i64 96
  store double %75, ptr %76, align 8, !tbaa !27
  %77 = load double, ptr %3, align 8, !tbaa !25
  %78 = getelementptr inbounds i8, ptr %0, i64 104
  store double %77, ptr %78, align 8, !tbaa !29
  %79 = load double, ptr %4, align 8, !tbaa !25
  store double %79, ptr %66, align 8, !tbaa !26
  %80 = call noundef nonnull align 8 dereferenceable(864) ptr @_ZNK10SimTKIpopt23AlgorithmStrategyObject6IpDataEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  %81 = load double, ptr %1, align 8, !tbaa !25
  call void @_ZN10SimTKIpopt9IpoptData15Set_info_regu_xEd(ptr noundef nonnull align 8 dereferenceable(864) %80, double noundef %81)
  %82 = getelementptr inbounds i8, ptr %0, i64 120
  store i8 0, ptr %82, align 8, !tbaa !33
  br label %83

83:                                               ; preds = %68, %72
  %.1 = phi i1 [ false, %68 ], [ true, %72 ]
  ret i1 %.1
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt21PDPerturbationHandler28get_deltas_for_wrong_inertiaERdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt9IpoptData15Set_info_regu_xEd(ptr noundef nonnull align 8 dereferenceable(864), double noundef) local_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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !17, i64 208}
!6 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandlerE", !7, i64 0, !18, i64 56, !18, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !17, i64 120, !19, i64 124, !19, i64 128, !9, i64 132, !20, i64 136, !18, i64 144, !18, i64 152, !18, i64 160, !18, i64 168, !18, i64 176, !18, i64 184, !18, i64 192, !18, i64 200, !17, i64 208, !9, i64 212}
!7 = !{!"_ZTSN10SimTKIpopt23AlgorithmStrategyObjectE", !8, i64 0, !12, i64 16, !14, i64 24, !15, i64 32, !16, i64 40, !17, i64 48}
!8 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !9, i64 8}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !13, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_8IpoptNLPEEE", !13, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_9IpoptDataEEE", !13, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_25IpoptCalculatedQuantitiesEEE", !13, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{!"double", !10, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandler9DegenTypeE", !10, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt21PDPerturbationHandler11TrialStatusE", !10, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!6, !18, i64 88}
!24 = !{!6, !18, i64 56}
!25 = !{!18, !18, i64 0}
!26 = !{!6, !18, i64 112}
!27 = !{!6, !18, i64 96}
!28 = !{!6, !18, i64 64}
!29 = !{!6, !18, i64 104}
!30 = !{!6, !18, i64 72}
!31 = !{!6, !18, i64 80}
!32 = !{!6, !19, i64 124}
!33 = !{!6, !17, i64 120}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass