; LLVM IR from simbody/simbody :: SimTKmath/Optimizers/src/IpOpt/IpTNLPAdapter.ll (ZN10SimTKIpopt11TNLPAdapterD2Ev)

; 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::TNLPAdapter" = type { %"class.SimTKIpopt::NLP.base", %"class.SimTKIpopt::SmartPtr.6", %"class.SimTKIpopt::SmartPtr.7", double, double, i32, i32, double, double, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.8", ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, %"class.SimTKIpopt::SmartPtr.9", %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.9", %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.9", %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.9", %"class.SimTKIpopt::SmartPtr.10", %"class.SimTKIpopt::SmartPtr.9", ptr, ptr, ptr }
%"class.SimTKIpopt::NLP.base" = type { %"class.SimTKIpopt::ReferencedObject.base" }
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>
%"class.SimTKIpopt::SmartPtr.6" = type { ptr }
%"class.SimTKIpopt::SmartPtr.7" = type { ptr }
%"class.SimTKIpopt::SmartPtr" = type { ptr }
%"class.SimTKIpopt::SmartPtr.5" = type { ptr }
%"class.SimTKIpopt::SmartPtr.8" = type { ptr }
%"class.SimTKIpopt::SmartPtr.10" = type { ptr }
%"class.SimTKIpopt::SmartPtr.9" = type { ptr }

@_ZTVN10SimTKIpopt11TNLPAdapterE = external dso_local unnamed_addr constant { [20 x ptr] }, align 8

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN10SimTKIpopt11TNLPAdapterD2Ev(ptr noundef nonnull align 8 dereferenceable(400) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 144) ({ [20 x ptr] }, ptr @_ZTVN10SimTKIpopt11TNLPAdapterE, i32 0, i32 0, i32 2), ptr %3, align 8, !tbaa !9
  %4 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 36
  %5 = load ptr, ptr %4, align 8, !tbaa !11
  %6 = icmp eq ptr %5, null
  br i1 %6, label %8, label %7

7:                                                ; preds = %1
  call void @_ZdaPv(ptr noundef %5) #2
  br label %8

8:                                                ; preds = %7, %1
  %9 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 37
  %10 = load ptr, ptr %9, align 8, !tbaa !29
  %11 = icmp eq ptr %10, null
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  call void @_ZdaPv(ptr noundef %10) #2
  br label %13

13:                                               ; preds = %12, %8
  %14 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 38
  %15 = load ptr, ptr %14, align 8, !tbaa !30
  %16 = icmp eq ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @_ZdaPv(ptr noundef %15) #2
  br label %18

18:                                               ; preds = %17, %13
  %19 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 39
  %20 = load ptr, ptr %19, align 8, !tbaa !31
  %21 = icmp eq ptr %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @_ZdaPv(ptr noundef %20) #2
  br label %23

23:                                               ; preds = %22, %18
  %24 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 40
  %25 = load ptr, ptr %24, align 8, !tbaa !32
  %26 = icmp eq ptr %25, null
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @_ZdaPv(ptr noundef %25) #2
  br label %28

28:                                               ; preds = %27, %23
  %29 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 56
  %30 = load ptr, ptr %29, align 8, !tbaa !33
  %31 = icmp eq ptr %30, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @_ZdaPv(ptr noundef %30) #2
  br label %33

33:                                               ; preds = %32, %28
  %34 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 57
  %35 = load ptr, ptr %34, align 8, !tbaa !34
  %36 = icmp eq ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @_ZdaPv(ptr noundef %35) #2
  br label %38

38:                                               ; preds = %37, %33
  %39 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 58
  %40 = load ptr, ptr %39, align 8, !tbaa !35
  %41 = icmp eq ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @_ZdaPv(ptr noundef %40) #2
  br label %43

43:                                               ; preds = %42, %38
  %44 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 55
  call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %44) #3
  %45 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 54
  call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %45) #3
  %46 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 53
  call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %46) #3
  %47 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 52
  call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %47) #3
  %48 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 51
  call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48) #3
  %49 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 50
  call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %49) #3
  %50 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 49
  call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %50) #3
  %51 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 48
  call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %51) #3
  %52 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 47
  call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %52) #3
  %53 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 46
  call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #3
  %54 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 35
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %54) #3
  %55 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 34
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %55) #3
  %56 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 33
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %56) #3
  %57 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 32
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %57) #3
  %58 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 31
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %58) #3
  %59 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 30
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %59) #3
  %60 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 29
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %60) #3
  %61 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 28
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %61) #3
  %62 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 27
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %62) #3
  %63 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 26
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %63) #3
  %64 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 25
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %64) #3
  %65 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 24
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %65) #3
  %66 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 23
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %66) #3
  %67 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 22
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %67) #3
  %68 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 2
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_10JournalistEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %68) #3
  %69 = getelementptr inbounds %"class.SimTKIpopt::TNLPAdapter", ptr %3, i32 0, i32 1
  call void @_ZN10SimTKIpopt8SmartPtrINS_4TNLPEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %69) #3
  call void @_ZN10SimTKIpopt16ReferencedObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #3
  ret void
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #1

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

attributes #0 = { 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 #1 = { nobuiltin nounwind "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 = { builtin nounwind }
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, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 232}
!12 = !{!"_ZTSN10SimTKIpopt11TNLPAdapterE", !13, i64 0, !16, i64 16, !17, i64 24, !18, i64 32, !18, i64 40, !19, i64 48, !20, i64 52, !18, i64 56, !18, i64 64, !21, i64 72, !21, i64 73, !22, i64 76, !15, i64 80, !15, i64 84, !15, i64 88, !15, i64 92, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !23, i64 116, !24, i64 120, !24, i64 128, !24, i64 136, !24, i64 144, !25, i64 152, !24, i64 160, !25, i64 168, !24, i64 176, !25, i64 184, !24, i64 192, !25, i64 200, !25, i64 208, !25, i64 216, !26, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !15, i64 272, !15, i64 276, !15, i64 280, !15, i64 284, !15, i64 288, !27, i64 296, !28, i64 304, !27, i64 312, !28, i64 320, !27, i64 328, !28, i64 336, !28, i64 344, !27, i64 352, !28, i64 360, !27, i64 368, !6, i64 376, !6, i64 384, !6, i64 392}
!13 = !{!"_ZTSN10SimTKIpopt3NLPE", !14, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !15, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_4TNLPEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt11TNLPAdapter26FixedVariableTreatmentEnumE", !7, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt11TNLPAdapter18DerivativeTestEnumE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!23 = !{!"_ZTSN10SimTKIpopt4TNLP14IndexStyleEnumE", !7, i64 0}
!24 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !6, i64 0}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !6, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !6, i64 0}
!27 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEEE", !6, i64 0}
!28 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEEE", !6, i64 0}
!29 = !{!12, !6, i64 240}
!30 = !{!12, !6, i64 248}
!31 = !{!12, !6, i64 256}
!32 = !{!12, !6, i64 264}
!33 = !{!12, !6, i64 376}
!34 = !{!12, !6, i64 384}
!35 = !{!12, !6, i64 392}


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

@_ZTVN10SimTKIpopt11TNLPAdapterE = external dso_local unnamed_addr constant { [20 x ptr] }, align 8

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN10SimTKIpopt11TNLPAdapterD2Ev(ptr noundef nonnull align 8 dereferenceable(400) %0) unnamed_addr #0 align 2 {
  store ptr getelementptr inbounds inrange(-16, 144) (i8, ptr @_ZTVN10SimTKIpopt11TNLPAdapterE, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 232
  %3 = load ptr, ptr %2, align 8, !tbaa !8
  %4 = icmp eq ptr %3, null
  br i1 %4, label %6, label %5

5:                                                ; preds = %1
  tail call void @_ZdaPv(ptr noundef nonnull %3) #2
  br label %6

6:                                                ; preds = %5, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 240
  %8 = load ptr, ptr %7, align 8, !tbaa !28
  %9 = icmp eq ptr %8, null
  br i1 %9, label %11, label %10

10:                                               ; preds = %6
  tail call void @_ZdaPv(ptr noundef nonnull %8) #2
  br label %11

11:                                               ; preds = %10, %6
  %12 = getelementptr inbounds i8, ptr %0, i64 248
  %13 = load ptr, ptr %12, align 8, !tbaa !29
  %14 = icmp eq ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  tail call void @_ZdaPv(ptr noundef nonnull %13) #2
  br label %16

16:                                               ; preds = %15, %11
  %17 = getelementptr inbounds i8, ptr %0, i64 256
  %18 = load ptr, ptr %17, align 8, !tbaa !30
  %19 = icmp eq ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  tail call void @_ZdaPv(ptr noundef nonnull %18) #2
  br label %21

21:                                               ; preds = %20, %16
  %22 = getelementptr inbounds i8, ptr %0, i64 264
  %23 = load ptr, ptr %22, align 8, !tbaa !31
  %24 = icmp eq ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  tail call void @_ZdaPv(ptr noundef nonnull %23) #2
  br label %26

26:                                               ; preds = %25, %21
  %27 = getelementptr inbounds i8, ptr %0, i64 376
  %28 = load ptr, ptr %27, align 8, !tbaa !32
  %29 = icmp eq ptr %28, null
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  tail call void @_ZdaPv(ptr noundef nonnull %28) #2
  br label %31

31:                                               ; preds = %30, %26
  %32 = getelementptr inbounds i8, ptr %0, i64 384
  %33 = load ptr, ptr %32, align 8, !tbaa !33
  %34 = icmp eq ptr %33, null
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  tail call void @_ZdaPv(ptr noundef nonnull %33) #2
  br label %36

36:                                               ; preds = %35, %31
  %37 = getelementptr inbounds i8, ptr %0, i64 392
  %38 = load ptr, ptr %37, align 8, !tbaa !34
  %39 = icmp eq ptr %38, null
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  tail call void @_ZdaPv(ptr noundef nonnull %38) #2
  br label %41

41:                                               ; preds = %40, %36
  %42 = getelementptr inbounds i8, ptr %0, i64 368
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42) #3
  %43 = getelementptr inbounds i8, ptr %0, i64 360
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %43) #3
  %44 = getelementptr inbounds i8, ptr %0, i64 352
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %44) #3
  %45 = getelementptr inbounds i8, ptr %0, i64 344
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %45) #3
  %46 = getelementptr inbounds i8, ptr %0, i64 336
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %46) #3
  %47 = getelementptr inbounds i8, ptr %0, i64 328
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %47) #3
  %48 = getelementptr inbounds i8, ptr %0, i64 320
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48) #3
  %49 = getelementptr inbounds i8, ptr %0, i64 312
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %49) #3
  %50 = getelementptr inbounds i8, ptr %0, i64 304
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %50) #3
  %51 = getelementptr inbounds i8, ptr %0, i64 296
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %51) #3
  %52 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %52) #3
  %53 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #3
  %54 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %54) #3
  %55 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %55) #3
  %56 = getelementptr inbounds i8, ptr %0, i64 192
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %56) #3
  %57 = getelementptr inbounds i8, ptr %0, i64 184
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %57) #3
  %58 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %58) #3
  %59 = getelementptr inbounds i8, ptr %0, i64 168
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %59) #3
  %60 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %60) #3
  %61 = getelementptr inbounds i8, ptr %0, i64 152
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %61) #3
  %62 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %62) #3
  %63 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %63) #3
  %64 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %64) #3
  %65 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %65) #3
  %66 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_10JournalistEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %66) #3
  %67 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN10SimTKIpopt8SmartPtrINS_4TNLPEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %67) #3
  tail call void @_ZN10SimTKIpopt16ReferencedObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %0) #3
  ret void
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { nobuiltin nounwind "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 = { builtin nounwind }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 232}
!9 = !{!"_ZTSN10SimTKIpopt11TNLPAdapterE", !10, i64 0, !14, i64 16, !16, i64 24, !17, i64 32, !17, i64 40, !18, i64 48, !19, i64 52, !17, i64 56, !17, i64 64, !20, i64 72, !20, i64 73, !21, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !22, i64 116, !23, i64 120, !23, i64 128, !23, i64 136, !23, i64 144, !24, i64 152, !23, i64 160, !24, i64 168, !23, i64 176, !24, i64 184, !23, i64 192, !24, i64 200, !24, i64 208, !24, i64 216, !25, i64 224, !15, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !15, i64 264, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !26, i64 296, !27, i64 304, !26, i64 312, !27, i64 320, !26, i64 328, !27, i64 336, !27, i64 344, !26, i64 352, !27, i64 360, !26, i64 368, !15, i64 376, !15, i64 384, !15, i64 392}
!10 = !{!"_ZTSN10SimTKIpopt3NLPE", !11, i64 0}
!11 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !12, i64 8}
!12 = !{!"int", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_4TNLPEEE", !15, i64 0}
!15 = !{!"any pointer", !13, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !15, i64 0}
!17 = !{!"double", !13, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt11TNLPAdapter26FixedVariableTreatmentEnumE", !13, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt11TNLPAdapter18DerivativeTestEnumE", !13, i64 0}
!20 = !{!"bool", !13, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !13, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt4TNLP14IndexStyleEnumE", !13, i64 0}
!23 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !15, i64 0}
!24 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !15, i64 0}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !15, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_15ExpansionMatrixEEE", !15, i64 0}
!27 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_20ExpansionMatrixSpaceEEE", !15, i64 0}
!28 = !{!9, !15, i64 240}
!29 = !{!9, !15, i64 248}
!30 = !{!9, !15, i64 256}
!31 = !{!9, !15, i64 264}
!32 = !{!9, !15, i64 376}
!33 = !{!9, !15, i64 384}
!34 = !{!9, !15, i64 392}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InstCombinePass,SROAPass,TailCallElimPass