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

; 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::DenseVector" = type { %"class.SimTKIpopt::Vector.base", ptr, ptr, i8, i8, double }
%"class.SimTKIpopt::Vector.base" = type <{ %"class.SimTKIpopt::TaggedObject", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::CachedResults", i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, i32, i8 }>
%"class.SimTKIpopt::TaggedObject" = type { %"class.SimTKIpopt::ReferencedObject.base", %"class.SimTKIpopt::Subject", i32, i32 }
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>
%"class.SimTKIpopt::Subject" = type { ptr, %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<SimTKIpopt::Observer *, std::allocator<SimTKIpopt::Observer *>>::_Vector_impl" }
%"struct.std::_Vector_base<SimTKIpopt::Observer *, std::allocator<SimTKIpopt::Observer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<SimTKIpopt::Observer *, std::allocator<SimTKIpopt::Observer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SimTKIpopt::Observer *, std::allocator<SimTKIpopt::Observer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.SimTKIpopt::SmartPtr" = type { ptr }
%"class.SimTKIpopt::CachedResults" = type { ptr, i32, ptr }

@_ZTIN10SimTKIpopt6VectorE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN10SimTKIpopt11DenseVectorE = 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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt11DenseVector23ElementWiseMultiplyImplERKNS_6VectorE(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(205) %1) unnamed_addr #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %16, label %14

14:                                               ; preds = %2
  %15 = call ptr @__dynamic_cast(ptr %12, ptr @_ZTIN10SimTKIpopt6VectorE, ptr @_ZTIN10SimTKIpopt11DenseVectorE, i64 0) #4
  br label %17

16:                                               ; preds = %2
  br label %17

17:                                               ; preds = %16, %14
  %18 = phi ptr [ %15, %14 ], [ null, %16 ]
  store ptr %18, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %123

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  store ptr %24, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 4
  %26 = load i8, ptr %25, align 1, !tbaa !24, !range !25, !noundef !26
  %27 = trunc i8 %26 to i1
  br i1 %27, label %28, label %66

28:                                               ; preds = %21
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %29, i32 0, i32 4
  %31 = load i8, ptr %30, align 1, !tbaa !24, !range !25, !noundef !26
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %40

33:                                               ; preds = %28
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %34, i32 0, i32 5
  %36 = load double, ptr %35, align 8, !tbaa !27
  %37 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 5
  %38 = load double, ptr %37, align 8, !tbaa !27
  %39 = fmul double %38, %36
  store double %39, ptr %37, align 8, !tbaa !27
  br label %65

40:                                               ; preds = %28
  %41 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 4
  store i8 0, ptr %41, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %42 = call noundef ptr @_ZN10SimTKIpopt11DenseVector16values_allocatedEv(ptr noundef nonnull align 8 dereferenceable(240) %11)
  store ptr %42, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !28
  br label %43

43:                                               ; preds = %61, %40
  %44 = load i32, ptr %8, align 4, !tbaa !28
  %45 = call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %11)
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %64

48:                                               ; preds = %43
  %49 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 5
  %50 = load double, ptr %49, align 8, !tbaa !27
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !28
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %51, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !29
  %56 = fmul double %50, %55
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i32, ptr %8, align 4, !tbaa !28
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  store double %56, ptr %60, align 8, !tbaa !29
  br label %61

61:                                               ; preds = %48
  %62 = load i32, ptr %8, align 4, !tbaa !28
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %8, align 4, !tbaa !28
  br label %43, !llvm.loop !30

64:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %65

65:                                               ; preds = %64, %33
  br label %122

66:                                               ; preds = %21
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %67, i32 0, i32 4
  %69 = load i8, ptr %68, align 1, !tbaa !24, !range !25, !noundef !26
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %98

71:                                               ; preds = %66
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %72, i32 0, i32 5
  %74 = load double, ptr %73, align 8, !tbaa !27
  %75 = fcmp une double %74, 1.000000e+00
  br i1 %75, label %76, label %97

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !28
  br label %77

77:                                               ; preds = %93, %76
  %78 = load i32, ptr %9, align 4, !tbaa !28
  %79 = call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %11)
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %96

82:                                               ; preds = %77
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %83, i32 0, i32 5
  %85 = load double, ptr %84, align 8, !tbaa !27
  %86 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = load i32, ptr %9, align 4, !tbaa !28
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !29
  %92 = fmul double %91, %85
  store double %92, ptr %90, align 8, !tbaa !29
  br label %93

93:                                               ; preds = %82
  %94 = load i32, ptr %9, align 4, !tbaa !28
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %9, align 4, !tbaa !28
  br label %77, !llvm.loop !32

96:                                               ; preds = %81
  br label %97

97:                                               ; preds = %96, %71
  br label %121

98:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !28
  br label %99

99:                                               ; preds = %117, %98
  %100 = load i32, ptr %10, align 4, !tbaa !28
  %101 = call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %11)
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %120

104:                                              ; preds = %99
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = load i32, ptr %10, align 4, !tbaa !28
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !29
  %110 = getelementptr inbounds %"class.SimTKIpopt::DenseVector", ptr %11, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = load i32, ptr %10, align 4, !tbaa !28
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !29
  %116 = fmul double %115, %109
  store double %116, ptr %114, align 8, !tbaa !29
  br label %117

117:                                              ; preds = %104
  %118 = load i32, ptr %10, align 4, !tbaa !28
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %10, align 4, !tbaa !28
  br label %99, !llvm.loop !33

120:                                              ; preds = %103
  br label %121

121:                                              ; preds = %120, %97
  br label %122

122:                                              ; preds = %121, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %123

123:                                              ; preds = %122, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind willreturn memory(read) }
attributes #3 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 216}
!10 = !{!"_ZTSN10SimTKIpopt11DenseVectorE", !11, i64 0, !6, i64 208, !6, i64 216, !23, i64 224, !23, i64 225, !22, i64 232}
!11 = !{!"_ZTSN10SimTKIpopt6VectorE", !12, i64 0, !20, i64 56, !21, i64 64, !14, i64 88, !22, i64 96, !14, i64 104, !22, i64 112, !14, i64 120, !22, i64 128, !14, i64 136, !22, i64 144, !14, i64 152, !22, i64 160, !14, i64 168, !22, i64 176, !14, i64 184, !22, i64 192, !14, i64 200, !23, i64 204}
!12 = !{!"_ZTSN10SimTKIpopt12TaggedObjectE", !13, i64 0, !15, i64 16, !14, i64 48, !14, i64 52}
!13 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt7SubjectE", !16, i64 8}
!16 = !{!"_ZTSSt6vectorIPN10SimTKIpopt8ObserverESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !6, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !14, i64 8, !6, i64 16}
!22 = !{!"double", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!10, !23, i64 225}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!10, !22, i64 232}
!28 = !{!14, !14, i64 0}
!29 = !{!22, !22, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}


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

@_ZTIN10SimTKIpopt6VectorE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN10SimTKIpopt11DenseVectorE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN10SimTKIpopt11DenseVector16values_allocatedEv(ptr noundef nonnull align 8 dereferenceable(240)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt11DenseVector23ElementWiseMultiplyImplERKNS_6VectorE(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull readonly align 8 dereferenceable(205) %1) unnamed_addr #2 align 2 {
  %3 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6VectorE, ptr nonnull @_ZTIN10SimTKIpopt11DenseVectorE, i64 0) #3
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %.loopexit, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %3, i64 216
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 225
  %8 = load i8, ptr %7, align 1, !tbaa !23, !range !24, !noundef !25
  %9 = trunc nuw i8 %8 to i1
  %10 = getelementptr inbounds i8, ptr %3, i64 225
  %11 = load i8, ptr %10, align 1, !tbaa !23, !range !24, !noundef !25
  %12 = trunc nuw i8 %11 to i1
  br i1 %9, label %13, label %34

13:                                               ; preds = %4
  br i1 %12, label %14, label %20

14:                                               ; preds = %13
  %15 = getelementptr inbounds i8, ptr %3, i64 232
  %16 = load double, ptr %15, align 8, !tbaa !26
  %17 = getelementptr inbounds i8, ptr %0, i64 232
  %18 = load double, ptr %17, align 8, !tbaa !26
  %19 = fmul double %16, %18
  store double %19, ptr %17, align 8, !tbaa !26
  br label %.loopexit

20:                                               ; preds = %13
  store i8 0, ptr %7, align 1, !tbaa !23
  %21 = tail call noundef ptr @_ZN10SimTKIpopt11DenseVector16values_allocatedEv(ptr noundef nonnull align 8 dereferenceable(240) %0)
  %22 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph32, label %.loopexit

.lr.ph32:                                         ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 232
  br label %25

25:                                               ; preds = %.lr.ph32, %25
  %indvars.iv39 = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next40, %25 ]
  %26 = load double, ptr %24, align 8, !tbaa !26
  %27 = getelementptr inbounds double, ptr %6, i64 %indvars.iv39
  %28 = load double, ptr %27, align 8, !tbaa !27
  %29 = fmul double %26, %28
  %30 = getelementptr inbounds double, ptr %21, i64 %indvars.iv39
  store double %29, ptr %30, align 8, !tbaa !27
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %31 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next40, %32
  br i1 %33, label %25, label %.loopexit, !llvm.loop !28

34:                                               ; preds = %4
  br i1 %12, label %38, label %.preheader26

.preheader26:                                     ; preds = %34
  %35 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader26
  %37 = getelementptr inbounds i8, ptr %0, i64 216
  br label %54

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %3, i64 232
  %40 = load double, ptr %39, align 8, !tbaa !26
  %41 = fcmp une double %40, 1.000000e+00
  br i1 %41, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %38
  %42 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph30, label %.loopexit

.lr.ph30:                                         ; preds = %.preheader
  %44 = getelementptr inbounds i8, ptr %0, i64 216
  br label %45

45:                                               ; preds = %.lr.ph30, %45
  %indvars.iv36 = phi i64 [ 0, %.lr.ph30 ], [ %indvars.iv.next37, %45 ]
  %46 = load double, ptr %39, align 8, !tbaa !26
  %47 = load ptr, ptr %44, align 8, !tbaa !5
  %48 = getelementptr inbounds double, ptr %47, i64 %indvars.iv36
  %49 = load double, ptr %48, align 8, !tbaa !27
  %50 = fmul double %46, %49
  store double %50, ptr %48, align 8, !tbaa !27
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %51 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next37, %52
  br i1 %53, label %45, label %.loopexit, !llvm.loop !30

54:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %55 = getelementptr inbounds double, ptr %6, i64 %indvars.iv
  %56 = load double, ptr %55, align 8, !tbaa !27
  %57 = load ptr, ptr %37, align 8, !tbaa !5
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  %59 = load double, ptr %58, align 8, !tbaa !27
  %60 = fmul double %56, %59
  store double %60, ptr %58, align 8, !tbaa !27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = tail call noundef i32 @_ZNK10SimTKIpopt6Vector3DimEv(ptr noundef nonnull align 8 dereferenceable(205) %0)
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next, %62
  br i1 %63, label %54, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %54, %45, %25, %.preheader26, %.preheader, %20, %14, %38, %2
  ret void
}

attributes #0 = { 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 #1 = { mustprogress nofree nounwind willreturn memory(read) }
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, !18, i64 216}
!6 = !{!"_ZTSN10SimTKIpopt11DenseVectorE", !7, i64 0, !18, i64 208, !18, i64 216, !22, i64 224, !22, i64 225, !21, i64 232}
!7 = !{!"_ZTSN10SimTKIpopt6VectorE", !8, i64 0, !19, i64 56, !20, i64 64, !10, i64 88, !21, i64 96, !10, i64 104, !21, i64 112, !10, i64 120, !21, i64 128, !10, i64 136, !21, i64 144, !10, i64 152, !21, i64 160, !10, i64 168, !21, i64 176, !10, i64 184, !21, i64 192, !10, i64 200, !22, i64 204}
!8 = !{!"_ZTSN10SimTKIpopt12TaggedObjectE", !9, i64 0, !13, i64 16, !10, i64 48, !10, i64 52}
!9 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !10, i64 8}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSN10SimTKIpopt7SubjectE", !14, i64 8}
!14 = !{!"_ZTSSt6vectorIPN10SimTKIpopt8ObserverESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN10SimTKIpopt8ObserverESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !11, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !18, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !10, i64 8, !18, i64 16}
!21 = !{!"double", !11, i64 0}
!22 = !{!"bool", !11, i64 0}
!23 = !{!6, !22, i64 225}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!6, !21, i64 232}
!27 = !{!21, !21, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


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