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

; 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] }>

@.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: nounwind
declare void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; 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
define dso_local void @_Z19testManyAttachBasicv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.P3D::CFrameTemplate", align 8
  %6 = alloca %"struct.P3D::CFrameTemplate", align 8
  %7 = alloca %"struct.P3D::CFrameTemplate", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  %10 = call noundef ptr @_ZL10createPartv()
  store ptr %10, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %11 = call noundef ptr @_ZL10createPartv()
  store ptr %11, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %12 = call noundef ptr @_ZL10createPartv()
  store ptr %12, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %13 = call noundef ptr @_ZL10createPartv()
  store ptr %13, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %5) #7
  call void @_ZL2cfv(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %5)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %14, ptr noundef %15, ptr noundef nonnull align 8 dereferenceable(96) %5)
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #7
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %6) #7
  call void @_ZL2cfv(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %6)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %16, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(96) %6)
  call void @llvm.lifetime.end.p0(i64 96, ptr %6) #7
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #7
  call void @_ZL2cfv(ptr dead_on_unwind writable sret(%"struct.P3D::CFrameTemplate") align 8 %7)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %18, ptr noundef %19, ptr noundef nonnull align 8 dereferenceable(96) %7)
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #7
  br label %20

20:                                               ; preds = %0
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %21)
  br i1 %22, label %36, label %23

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

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28, %23
  %30 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %30, i32 noundef 43, ptr noundef @.str.5)
          to label %31 unwind label %32

31:                                               ; preds = %29
  call void @__cxa_throw(ptr %30, ptr @_ZTI14AssertionError, ptr null) #8
  unreachable

32:                                               ; preds = %29
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  call void @__cxa_free_exception(ptr %30) #7
  br label %116

36:                                               ; preds = %20
  %37 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %37)
  br label %38

38:                                               ; preds = %36
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %41)
  br i1 %42, label %43, label %56

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

48:                                               ; preds = %43
  br label %49

49:                                               ; preds = %48, %43
  %50 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %50, i32 noundef 44, ptr noundef @.str.6)
          to label %51 unwind label %52

51:                                               ; preds = %49
  call void @__cxa_throw(ptr %50, ptr @_ZTI14AssertionError, ptr null) #8
  unreachable

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  call void @__cxa_free_exception(ptr %50) #7
  br label %116

56:                                               ; preds = %40
  %57 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %57)
  br label %58

58:                                               ; preds = %56
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %61)
  br i1 %62, label %63, label %76

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

68:                                               ; preds = %63
  br label %69

69:                                               ; preds = %68, %63
  %70 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %70, i32 noundef 45, ptr noundef @.str.6)
          to label %71 unwind label %72

71:                                               ; preds = %69
  call void @__cxa_throw(ptr %70, ptr @_ZTI14AssertionError, ptr null) #8
  unreachable

72:                                               ; preds = %69
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  call void @__cxa_free_exception(ptr %70) #7
  br label %116

76:                                               ; preds = %60
  %77 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %77)
  br label %78

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %81)
  br i1 %82, label %83, label %96

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

88:                                               ; preds = %83
  br label %89

89:                                               ; preds = %88, %83
  %90 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %90, i32 noundef 46, ptr noundef @.str.6)
          to label %91 unwind label %92

91:                                               ; preds = %89
  call void @__cxa_throw(ptr %90, ptr @_ZTI14AssertionError, ptr null) #8
  unreachable

92:                                               ; preds = %89
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %8, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %9, align 4
  call void @__cxa_free_exception(ptr %90) #7
  br label %116

96:                                               ; preds = %80
  %97 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %97)
  br label %98

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = icmp eq ptr %100, null
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %100) #7
  call void @_ZdlPvm(ptr noundef %100, i64 noundef 200) #9
  br label %103

103:                                              ; preds = %102, %99
  %104 = load ptr, ptr %1, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %107, label %106

106:                                              ; preds = %103
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %104) #7
  call void @_ZdlPvm(ptr noundef %104, i64 noundef 200) #9
  br label %107

107:                                              ; preds = %106, %103
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = icmp eq ptr %108, null
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %108) #7
  call void @_ZdlPvm(ptr noundef %108, i64 noundef 200) #9
  br label %111

111:                                              ; preds = %110, %107
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = icmp eq ptr %112, null
  br i1 %113, label %115, label %114

114:                                              ; preds = %111
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %112) #7
  call void @_ZdlPvm(ptr noundef %112, i64 noundef 200) #9
  br label %115

115:                                              ; preds = %114, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void

116:                                              ; preds = %92, %72, %52, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %8, align 8
  %119 = load i32, ptr %9, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

declare void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef, ptr noundef nonnull align 8 dereferenceable(96)) #4

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

declare noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200)) #4

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

declare ptr @__cxa_allocate_exception(i64)

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

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)) #6 align 2

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 = { 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 #3 = { 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 #4 = { "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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { builtin 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, !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: nounwind
declare void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; 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
define dso_local void @_Z19testManyAttachBasicv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::CFrameTemplate", align 8
  %2 = alloca %"struct.P3D::CFrameTemplate", align 8
  %3 = alloca %"struct.P3D::CFrameTemplate", align 8
  %4 = tail call noundef ptr @_ZL10createPartv()
  %5 = tail call noundef ptr @_ZL10createPartv()
  %6 = tail call noundef ptr @_ZL10createPartv()
  %7 = tail call noundef ptr @_ZL10createPartv()
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %1) #7
  call void @_ZL2cfv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %1)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(96) %1)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %2) #7
  call void @_ZL2cfv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %2)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %4, ptr noundef %6, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #7
  call void @_ZL2cfv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::CFrameTemplate") align 8 %3)
  call void @_ZN3P3D4Part6attachEPS0_RKNS_14CFrameTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(200) %6, ptr noundef %7, ptr noundef nonnull align 8 dereferenceable(96) %3)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #7
  %8 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %4)
  %9 = call ptr @_ZTW15__testInterface()
  br i1 %8, label %15, label %10

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

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

13:                                               ; preds = %10
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %40

15:                                               ; preds = %0
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %9)
  %16 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %5)
  %17 = call ptr @_ZTW15__testInterface()
  br i1 %16, label %18, label %23

18:                                               ; preds = %15
  %19 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %19, i32 noundef 44, ptr noundef nonnull @.str.6)
          to label %20 unwind label %21

20:                                               ; preds = %18
  call void @__cxa_throw(ptr nonnull %19, ptr nonnull @_ZTI14AssertionError, ptr null) #8
  unreachable

21:                                               ; preds = %18
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %40

23:                                               ; preds = %15
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %17)
  %24 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %6)
  %25 = call ptr @_ZTW15__testInterface()
  br i1 %24, label %26, label %31

26:                                               ; preds = %23
  %27 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %27, i32 noundef 45, ptr noundef nonnull @.str.6)
          to label %28 unwind label %29

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

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %40

31:                                               ; preds = %23
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %25)
  %32 = call noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200) %7)
  %33 = call ptr @_ZTW15__testInterface()
  br i1 %32, label %34, label %39

34:                                               ; preds = %31
  %35 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %35, i32 noundef 46, 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) #8
  unreachable

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

39:                                               ; preds = %31
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %33)
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %5) #7
  call void @_ZdlPvm(ptr noundef %5, i64 noundef 200) #9
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %4) #7
  call void @_ZdlPvm(ptr noundef %4, i64 noundef 200) #9
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %6) #7
  call void @_ZdlPvm(ptr noundef %6, i64 noundef 200) #9
  call void @_ZN3P3D4PartD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %7) #7
  call void @_ZdlPvm(ptr noundef %7, i64 noundef 200) #9
  ret void

40:                                               ; preds = %37, %29, %21, %13
  %.sink = phi ptr [ %35, %37 ], [ %27, %29 ], [ %19, %21 ], [ %11, %13 ]
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %30, %29 ], [ %22, %21 ], [ %14, %13 ]
  call void @__cxa_free_exception(ptr %.sink) #7
  resume { ptr, i32 } %.pn
}

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

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

declare noundef zeroext i1 @_ZNK3P3D4Part10isMainPartEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #4

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

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 #4

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 #6 align 2

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 = { 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 #3 = { 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 #4 = { "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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { builtin 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)"}


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