; LLVM IR from ThePhysicsGuys/Physics3D :: tests/physicalStructureTests.ll (Z25testBasicMakeMainPhysicalv)

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

%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%class.TestInterface = type <{ i64, i8, [7 x i8] }>
%"class.P3D::Physical" = type { %"class.P3D::RigidBody", ptr, %"class.P3D::UnorderedVector.1" }
%"class.P3D::RigidBody" = type { ptr, %"class.P3D::UnorderedVector", double, %"struct.P3D::Vector", %"class.P3D::SymmetricMatrix" }
%"class.P3D::UnorderedVector" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::AttachedPart, std::allocator<P3D::AttachedPart>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::AttachedPart, std::allocator<P3D::AttachedPart>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::AttachedPart, std::allocator<P3D::AttachedPart>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::AttachedPart, std::allocator<P3D::AttachedPart>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::SymmetricMatrix" = type { [6 x double] }
%"class.P3D::UnorderedVector.1" = type { %"class.std::vector.2" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<P3D::ConnectedPhysical, std::allocator<P3D::ConnectedPhysical>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::ConnectedPhysical, std::allocator<P3D::ConnectedPhysical>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::ConnectedPhysical, std::allocator<P3D::ConnectedPhysical>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::ConnectedPhysical, std::allocator<P3D::ConnectedPhysical>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8
@.str.6 = external hidden unnamed_addr constant [5 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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10createPartv() #1

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL2cfv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::CFrameTemplate") align 8) #1

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() #2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) #4 align 2

declare noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z25testBasicMakeMainPhysicalv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.P3D::CFrameTemplate", align 8
  %4 = alloca %"struct.P3D::CFrameTemplate", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  %9 = call noundef ptr @_ZL10createPartv()
  store ptr %9, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %10 = call noundef ptr @_ZL10createPartv()
  store ptr %10, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #9
  call void @llvm.memset.p0.i64(ptr align 16 %13, i8 0, i64 16, i1 false)
  call void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9) %13) #8
  call void @llvm.lifetime.start.p0(i64 96, ptr %3) #8
  call void @_ZL2cfv(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %3)
  call void @llvm.lifetime.start.p0(i64 96, ptr %4) #8
  call void @_ZL2cfv(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %4)
  call void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200) %11, ptr noundef %12, ptr noundef %13, ptr noundef nonnull align 8 dereferenceable(96) %3, ptr noundef nonnull align 8 dereferenceable(96) %4)
  call void @llvm.lifetime.end.p0(i64 96, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %3) #8
  br label %14

14:                                               ; preds = %0
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %15)
  %17 = icmp ne ptr %16, null
  br i1 %17, label %31, label %18

18:                                               ; preds = %14
  %19 = call ptr @_ZTW15__testInterface()
  %20 = getelementptr inbounds %class.TestInterface, ptr %19, i32 0, i32 1
  %21 = load i8, ptr %20, align 8, !tbaa !9, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %24

23:                                               ; preds = %18
  br label %24

24:                                               ; preds = %23, %18
  %25 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %25, i32 noundef 125, ptr noundef @.str.5)
          to label %26 unwind label %27

26:                                               ; preds = %24
  call void @__cxa_throw(ptr %25, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

27:                                               ; preds = %24
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  call void @__cxa_free_exception(ptr %25) #8
  br label %278

31:                                               ; preds = %14
  %32 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %32)
  br label %33

33:                                               ; preds = %31
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %36)
  %38 = icmp ne ptr %37, null
  br i1 %38, label %52, label %39

39:                                               ; preds = %35
  %40 = call ptr @_ZTW15__testInterface()
  %41 = getelementptr inbounds %class.TestInterface, ptr %40, i32 0, i32 1
  %42 = load i8, ptr %41, align 8, !tbaa !9, !range !13, !noundef !14
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  br label %45

45:                                               ; preds = %44, %39
  %46 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %46, i32 noundef 126, ptr noundef @.str.5)
          to label %47 unwind label %48

47:                                               ; preds = %45
  call void @__cxa_throw(ptr %46, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

48:                                               ; preds = %45
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  call void @__cxa_free_exception(ptr %46) #8
  br label %278

52:                                               ; preds = %35
  %53 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %53)
  br label %54

54:                                               ; preds = %52
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %57)
  %59 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %58)
  br i1 %59, label %73, label %60

60:                                               ; preds = %56
  %61 = call ptr @_ZTW15__testInterface()
  %62 = getelementptr inbounds %class.TestInterface, ptr %61, i32 0, i32 1
  %63 = load i8, ptr %62, align 8, !tbaa !9, !range !13, !noundef !14
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %66

65:                                               ; preds = %60
  br label %66

66:                                               ; preds = %65, %60
  %67 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %67, i32 noundef 128, ptr noundef @.str.5)
          to label %68 unwind label %69

68:                                               ; preds = %66
  call void @__cxa_throw(ptr %67, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

69:                                               ; preds = %66
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %5, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %6, align 4
  call void @__cxa_free_exception(ptr %67) #8
  br label %278

73:                                               ; preds = %56
  %74 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %74)
  br label %75

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %78)
  %80 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %79)
  br i1 %80, label %81, label %94

81:                                               ; preds = %77
  %82 = call ptr @_ZTW15__testInterface()
  %83 = getelementptr inbounds %class.TestInterface, ptr %82, i32 0, i32 1
  %84 = load i8, ptr %83, align 8, !tbaa !9, !range !13, !noundef !14
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  br label %87

87:                                               ; preds = %86, %81
  %88 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %88, i32 noundef 129, ptr noundef @.str.6)
          to label %89 unwind label %90

89:                                               ; preds = %87
  call void @__cxa_throw(ptr %88, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

90:                                               ; preds = %87
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  call void @__cxa_free_exception(ptr %88) #8
  br label %278

94:                                               ; preds = %77
  %95 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %95)
  br label %96

96:                                               ; preds = %94
  br label %97

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = call noundef ptr @_ZNK3P3D4Part15getMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %98)
  store ptr %99, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %100)
  %102 = call noundef ptr @_ZN3P3D8Physical16makeMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %101)
  store ptr %102, ptr %8, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %97
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = icmp eq ptr %104, %105
  br i1 %106, label %120, label %107

107:                                              ; preds = %103
  %108 = call ptr @_ZTW15__testInterface()
  %109 = getelementptr inbounds %class.TestInterface, ptr %108, i32 0, i32 1
  %110 = load i8, ptr %109, align 8, !tbaa !9, !range !13, !noundef !14
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %113

112:                                              ; preds = %107
  br label %113

113:                                              ; preds = %112, %107
  %114 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %114, i32 noundef 133, ptr noundef @.str.5)
          to label %115 unwind label %116

115:                                              ; preds = %113
  call void @__cxa_throw(ptr %114, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

116:                                              ; preds = %113
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %5, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %6, align 4
  call void @__cxa_free_exception(ptr %114) #8
  br label %277

120:                                              ; preds = %103
  %121 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %121)
  br label %122

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %125)
  %127 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %126)
  br i1 %127, label %141, label %128

128:                                              ; preds = %124
  %129 = call ptr @_ZTW15__testInterface()
  %130 = getelementptr inbounds %class.TestInterface, ptr %129, i32 0, i32 1
  %131 = load i8, ptr %130, align 8, !tbaa !9, !range !13, !noundef !14
  %132 = trunc i8 %131 to i1
  br i1 %132, label %133, label %134

133:                                              ; preds = %128
  br label %134

134:                                              ; preds = %133, %128
  %135 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %135, i32 noundef 135, ptr noundef @.str.5)
          to label %136 unwind label %137

136:                                              ; preds = %134
  call void @__cxa_throw(ptr %135, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

137:                                              ; preds = %134
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %5, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %6, align 4
  call void @__cxa_free_exception(ptr %135) #8
  br label %277

141:                                              ; preds = %124
  %142 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %142)
  br label %143

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %1, align 8, !tbaa !5
  %147 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %146)
  %148 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %147)
  br i1 %148, label %149, label %162

149:                                              ; preds = %145
  %150 = call ptr @_ZTW15__testInterface()
  %151 = getelementptr inbounds %class.TestInterface, ptr %150, i32 0, i32 1
  %152 = load i8, ptr %151, align 8, !tbaa !9, !range !13, !noundef !14
  %153 = trunc i8 %152 to i1
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  br label %155

155:                                              ; preds = %154, %149
  %156 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %156, i32 noundef 136, ptr noundef @.str.6)
          to label %157 unwind label %158

157:                                              ; preds = %155
  call void @__cxa_throw(ptr %156, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

158:                                              ; preds = %155
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %5, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %6, align 4
  call void @__cxa_free_exception(ptr %156) #8
  br label %277

162:                                              ; preds = %145
  %163 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %163)
  br label %164

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %1, align 8, !tbaa !5
  %168 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %167)
  %169 = getelementptr inbounds %"class.P3D::Physical", ptr %168, i32 0, i32 2
  %170 = call noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %169) #8
  %171 = icmp eq i64 %170, 0
  br i1 %171, label %185, label %172

172:                                              ; preds = %166
  %173 = call ptr @_ZTW15__testInterface()
  %174 = getelementptr inbounds %class.TestInterface, ptr %173, i32 0, i32 1
  %175 = load i8, ptr %174, align 8, !tbaa !9, !range !13, !noundef !14
  %176 = trunc i8 %175 to i1
  br i1 %176, label %177, label %178

177:                                              ; preds = %172
  br label %178

178:                                              ; preds = %177, %172
  %179 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %179, i32 noundef 138, ptr noundef @.str.5)
          to label %180 unwind label %181

180:                                              ; preds = %178
  call void @__cxa_throw(ptr %179, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

181:                                              ; preds = %178
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %5, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %6, align 4
  call void @__cxa_free_exception(ptr %179) #8
  br label %277

185:                                              ; preds = %166
  %186 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %186)
  br label %187

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %190)
  %192 = getelementptr inbounds %"class.P3D::Physical", ptr %191, i32 0, i32 2
  %193 = call noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #8
  %194 = icmp eq i64 %193, 1
  br i1 %194, label %208, label %195

195:                                              ; preds = %189
  %196 = call ptr @_ZTW15__testInterface()
  %197 = getelementptr inbounds %class.TestInterface, ptr %196, i32 0, i32 1
  %198 = load i8, ptr %197, align 8, !tbaa !9, !range !13, !noundef !14
  %199 = trunc i8 %198 to i1
  br i1 %199, label %200, label %201

200:                                              ; preds = %195
  br label %201

201:                                              ; preds = %200, %195
  %202 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %202, i32 noundef 139, ptr noundef @.str.5)
          to label %203 unwind label %204

203:                                              ; preds = %201
  call void @__cxa_throw(ptr %202, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

204:                                              ; preds = %201
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %5, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %6, align 4
  call void @__cxa_free_exception(ptr %202) #8
  br label %277

208:                                              ; preds = %189
  %209 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %209)
  br label %210

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %2, align 8, !tbaa !5
  %214 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %213)
  %215 = getelementptr inbounds %"class.P3D::Physical", ptr %214, i32 0, i32 2
  %216 = call noundef nonnull align 8 dereferenceable(352) ptr @_ZNSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef 0) #8
  %217 = load ptr, ptr %1, align 8, !tbaa !5
  %218 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %217)
  %219 = icmp eq ptr %216, %218
  br i1 %219, label %233, label %220

220:                                              ; preds = %212
  %221 = call ptr @_ZTW15__testInterface()
  %222 = getelementptr inbounds %class.TestInterface, ptr %221, i32 0, i32 1
  %223 = load i8, ptr %222, align 8, !tbaa !9, !range !13, !noundef !14
  %224 = trunc i8 %223 to i1
  br i1 %224, label %225, label %226

225:                                              ; preds = %220
  br label %226

226:                                              ; preds = %225, %220
  %227 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %227, i32 noundef 140, ptr noundef @.str.5)
          to label %228 unwind label %229

228:                                              ; preds = %226
  call void @__cxa_throw(ptr %227, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

229:                                              ; preds = %226
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %5, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %6, align 4
  call void @__cxa_free_exception(ptr %227) #8
  br label %277

233:                                              ; preds = %212
  %234 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %234)
  br label %235

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %1, align 8, !tbaa !5
  %239 = call noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200) %238)
  br i1 %239, label %253, label %240

240:                                              ; preds = %237
  %241 = call ptr @_ZTW15__testInterface()
  %242 = getelementptr inbounds %class.TestInterface, ptr %241, i32 0, i32 1
  %243 = load i8, ptr %242, align 8, !tbaa !9, !range !13, !noundef !14
  %244 = trunc i8 %243 to i1
  br i1 %244, label %245, label %246

245:                                              ; preds = %240
  br label %246

246:                                              ; preds = %245, %240
  %247 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %247, i32 noundef 141, ptr noundef @.str.5)
          to label %248 unwind label %249

248:                                              ; preds = %246
  call void @__cxa_throw(ptr %247, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

249:                                              ; preds = %246
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %5, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %6, align 4
  call void @__cxa_free_exception(ptr %247) #8
  br label %277

253:                                              ; preds = %237
  %254 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %254)
  br label %255

255:                                              ; preds = %253
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  %258 = load ptr, ptr %2, align 8, !tbaa !5
  %259 = call noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200) %258)
  br i1 %259, label %273, label %260

260:                                              ; preds = %257
  %261 = call ptr @_ZTW15__testInterface()
  %262 = getelementptr inbounds %class.TestInterface, ptr %261, i32 0, i32 1
  %263 = load i8, ptr %262, align 8, !tbaa !9, !range !13, !noundef !14
  %264 = trunc i8 %263 to i1
  br i1 %264, label %265, label %266

265:                                              ; preds = %260
  br label %266

266:                                              ; preds = %265, %260
  %267 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %267, i32 noundef 142, ptr noundef @.str.5)
          to label %268 unwind label %269

268:                                              ; preds = %266
  call void @__cxa_throw(ptr %267, ptr @_ZTI14AssertionError, ptr null) #10
  unreachable

269:                                              ; preds = %266
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %5, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %6, align 4
  call void @__cxa_free_exception(ptr %267) #8
  br label %277

273:                                              ; preds = %257
  %274 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %274)
  br label %275

275:                                              ; preds = %273
  br label %276

276:                                              ; preds = %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  ret void

277:                                              ; preds = %269, %249, %229, %204, %181, %158, %137, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %278

278:                                              ; preds = %277, %90, %69, %48, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %5, align 8
  %281 = load i32, ptr %6, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283
}

declare void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144)) #3

declare noundef ptr @_ZNK3P3D4Part15getMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200)) #3

declare noundef ptr @_ZN3P3D8Physical16makeMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(352) ptr @_ZNSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

declare noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { uwtable "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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, !12, i64 8}
!10 = !{!"_ZTS13TestInterface", !11, i64 0, !12, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


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

%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }

@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8
@.str.6 = external hidden unnamed_addr constant [5 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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10createPartv() local_unnamed_addr #1

; 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 uwtable
declare hidden void @_ZL2cfv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::CFrameTemplate") align 8) local_unnamed_addr #1

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #4 align 2

declare noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z25testBasicMakeMainPhysicalv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::CFrameTemplate", align 8
  %2 = alloca %"struct.P3D::CFrameTemplate", align 8
  %3 = tail call noundef ptr @_ZL10createPartv()
  %4 = tail call noundef ptr @_ZL10createPartv()
  %5 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  tail call void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9) %5) #9
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %1) #9
  call void @_ZL2cfv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %1)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %2) #9
  call void @_ZL2cfv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %2)
  call void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200) %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %1) #9
  %6 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %.not = icmp eq ptr %6, null
  %7 = call ptr @_ZTW15__testInterface()
  br i1 %.not, label %8, label %13

8:                                                ; preds = %0
  %9 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef 125, ptr noundef nonnull @.str.5)
          to label %10 unwind label %11

10:                                               ; preds = %8
  call void @__cxa_throw(ptr nonnull %9, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

11:                                               ; preds = %8
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %119

13:                                               ; preds = %0
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %7)
  %14 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %.not21 = icmp eq ptr %14, null
  %15 = call ptr @_ZTW15__testInterface()
  br i1 %.not21, label %16, label %21

16:                                               ; preds = %13
  %17 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %17, i32 noundef 126, ptr noundef nonnull @.str.5)
          to label %18 unwind label %19

18:                                               ; preds = %16
  call void @__cxa_throw(ptr nonnull %17, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %119

21:                                               ; preds = %13
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %15)
  %22 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %23 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %22)
  %24 = call ptr @_ZTW15__testInterface()
  br i1 %23, label %30, label %25

25:                                               ; preds = %21
  %26 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %26, i32 noundef 128, ptr noundef nonnull @.str.5)
          to label %27 unwind label %28

27:                                               ; preds = %25
  call void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %119

30:                                               ; preds = %21
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %24)
  %31 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %32 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %31)
  %33 = call ptr @_ZTW15__testInterface()
  br i1 %32, label %34, label %39

34:                                               ; preds = %30
  %35 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %35, i32 noundef 129, ptr noundef nonnull @.str.6)
          to label %36 unwind label %37

36:                                               ; preds = %34
  call void @__cxa_throw(ptr nonnull %35, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %119

39:                                               ; preds = %30
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %33)
  %40 = call noundef ptr @_ZNK3P3D4Part15getMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %41 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %42 = call noundef ptr @_ZN3P3D8Physical16makeMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %41)
  %43 = icmp eq ptr %42, %40
  %44 = call ptr @_ZTW15__testInterface()
  br i1 %43, label %50, label %45

45:                                               ; preds = %39
  %46 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %46, i32 noundef 133, ptr noundef nonnull @.str.5)
          to label %47 unwind label %48

47:                                               ; preds = %45
  call void @__cxa_throw(ptr nonnull %46, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

48:                                               ; preds = %45
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %119

50:                                               ; preds = %39
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %44)
  %51 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %52 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %51)
  %53 = call ptr @_ZTW15__testInterface()
  br i1 %52, label %59, label %54

54:                                               ; preds = %50
  %55 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %55, i32 noundef 135, ptr noundef nonnull @.str.5)
          to label %56 unwind label %57

56:                                               ; preds = %54
  call void @__cxa_throw(ptr nonnull %55, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

57:                                               ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %119

59:                                               ; preds = %50
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %53)
  %60 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %61 = call noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144) %60)
  %62 = call ptr @_ZTW15__testInterface()
  br i1 %61, label %63, label %68

63:                                               ; preds = %59
  %64 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %64, i32 noundef 136, ptr noundef nonnull @.str.6)
          to label %65 unwind label %66

65:                                               ; preds = %63
  call void @__cxa_throw(ptr nonnull %64, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

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

68:                                               ; preds = %59
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %62)
  %69 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %70 = getelementptr inbounds i8, ptr %69, i64 120
  %71 = call noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #9
  %72 = icmp eq i64 %71, 0
  %73 = call ptr @_ZTW15__testInterface()
  br i1 %72, label %79, label %74

74:                                               ; preds = %68
  %75 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %75, i32 noundef 138, ptr noundef nonnull @.str.5)
          to label %76 unwind label %77

76:                                               ; preds = %74
  call void @__cxa_throw(ptr nonnull %75, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

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

79:                                               ; preds = %68
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %73)
  %80 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %81 = getelementptr inbounds i8, ptr %80, i64 120
  %82 = call noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #9
  %83 = icmp eq i64 %82, 1
  %84 = call ptr @_ZTW15__testInterface()
  br i1 %83, label %90, label %85

85:                                               ; preds = %79
  %86 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %86, i32 noundef 139, ptr noundef nonnull @.str.5)
          to label %87 unwind label %88

87:                                               ; preds = %85
  call void @__cxa_throw(ptr nonnull %86, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

88:                                               ; preds = %85
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %119

90:                                               ; preds = %79
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %84)
  %91 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %92 = getelementptr inbounds i8, ptr %91, i64 120
  %93 = call noundef nonnull align 8 dereferenceable(352) ptr @_ZNSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef 0) #9
  %94 = call noundef ptr @_ZNK3P3D4Part11getPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %95 = icmp eq ptr %93, %94
  %96 = call ptr @_ZTW15__testInterface()
  br i1 %95, label %102, label %97

97:                                               ; preds = %90
  %98 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %98, i32 noundef 140, ptr noundef nonnull @.str.5)
          to label %99 unwind label %100

99:                                               ; preds = %97
  call void @__cxa_throw(ptr nonnull %98, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

100:                                              ; preds = %97
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %119

102:                                              ; preds = %90
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %96)
  %103 = call noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200) %3)
  %104 = call ptr @_ZTW15__testInterface()
  br i1 %103, label %110, label %105

105:                                              ; preds = %102
  %106 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %106, i32 noundef 141, ptr noundef nonnull @.str.5)
          to label %107 unwind label %108

107:                                              ; preds = %105
  call void @__cxa_throw(ptr nonnull %106, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

108:                                              ; preds = %105
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %119

110:                                              ; preds = %102
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %104)
  %111 = call noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %112 = call ptr @_ZTW15__testInterface()
  br i1 %111, label %118, label %113

113:                                              ; preds = %110
  %114 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %114, i32 noundef 142, ptr noundef nonnull @.str.5)
          to label %115 unwind label %116

115:                                              ; preds = %113
  call void @__cxa_throw(ptr nonnull %114, ptr nonnull @_ZTI14AssertionError, ptr null) #10
  unreachable

116:                                              ; preds = %113
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %119

118:                                              ; preds = %110
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %112)
  ret void

119:                                              ; preds = %48, %57, %66, %77, %88, %100, %108, %116, %37, %28, %19, %11
  %.sink = phi ptr [ %46, %48 ], [ %55, %57 ], [ %64, %66 ], [ %75, %77 ], [ %86, %88 ], [ %98, %100 ], [ %106, %108 ], [ %114, %116 ], [ %35, %37 ], [ %26, %28 ], [ %17, %19 ], [ %9, %11 ]
  %.pn23 = phi { ptr, i32 } [ %49, %48 ], [ %58, %57 ], [ %67, %66 ], [ %78, %77 ], [ %89, %88 ], [ %101, %100 ], [ %109, %108 ], [ %117, %116 ], [ %38, %37 ], [ %29, %28 ], [ %20, %19 ], [ %12, %11 ]
  call void @__cxa_free_exception(ptr %.sink) #9
  resume { ptr, i32 } %.pn23
}

declare void @_ZN3P3D4Part6attachEPS0_PNS_14HardConstraintERKNS_14CFrameTemplateIdEES7_(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D15FixedConstraintC2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZNK3P3D8Physical14isMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3

declare noundef ptr @_ZNK3P3D4Part15getMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #3

declare noundef ptr @_ZN3P3D8Physical16makeMainPhysicalEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(352) ptr @_ZNSt6vectorIN3P3D17ConnectedPhysicalESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #7 align 2

declare noundef zeroext i1 @_ZNK3P3D4Part7isValidEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { uwtable "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { 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)"}


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