; LLVM IR from gem5/gem5 :: src/sim/port.test.ll (ZN36PortDeathTest_TakeOverConnected_Test8TestBodyEv)

; 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.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<const std::__cxx11::basic_string<char> &>::Buffer" }
%"class.testing::MatcherDescriberInterface" = type { ptr }
%"union.testing::internal::MatcherBase<const std::__cxx11::basic_string<char> &>::Buffer" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.TestPort = type { %"class.gem5::Port.base", [7 x i8] }
%"class.gem5::Port.base" = type <{ ptr, %"class.std::__cxx11::basic_string", i16, [6 x i8], ptr, i8 }>
%"class.std::unique_ptr.14" = type { %"struct.std::__uniq_ptr_data.15" }
%"struct.std::__uniq_ptr_data.15" = type { %"class.std::__uniq_ptr_impl.16" }
%"class.std::__uniq_ptr_impl.16" = type { %"class.std::tuple.17" }
%"class.std::tuple.17" = type { %"struct.std::_Tuple_impl.18" }
%"struct.std::_Tuple_impl.18" = type { %"struct.std::_Head_base.21" }
%"struct.std::_Head_base.21" = type { ptr }
%"class.testing::internal::DeathTest::ReturnSentinel" = type { ptr }
%"class.testing::Message" = type { %"class.std::unique_ptr.2" }
%"class.std::unique_ptr.2" = type { %"struct.std::__uniq_ptr_data.3" }
%"struct.std::__uniq_ptr_data.3" = type { %"class.std::__uniq_ptr_impl.4" }
%"class.std::__uniq_ptr_impl.4" = type { %"class.std::tuple.5" }
%"class.std::tuple.5" = type { %"struct.std::_Tuple_impl.6" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt9exception = external constant ptr
@stderr = external global ptr, align 8
@.str.29 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 dso_local void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57), i16 noundef signext) unnamed_addr #2 align 2

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4gem54Port4bindERS0_(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv() #3

declare noundef zeroext i1 @_ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7testing8internal20MakeDeathTestMatcherB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.testing::Matcher") align 8, ptr noundef) #6

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

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

declare noundef zeroext i1 @_ZN7testing8internal20ExitedUnsuccessfullyEi(i32 noundef) #3

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #8

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare void @_ZN7testing8internal18FormatFileLocationB5cxx11EPKci(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, i32 noundef) #3

declare i32 @fflush(ptr noundef) #3

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

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

declare noundef ptr @_ZN7testing8internal9DeathTest11LastMessageEv() #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36PortDeathTest_TakeOverConnected_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.TestPort, align 8
  %4 = alloca %class.TestPort, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.testing::Matcher", align 8
  %9 = alloca %"class.std::unique_ptr.14", align 8
  %10 = alloca %"class.testing::internal::DeathTest::ReturnSentinel", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.testing::Message", align 8
  %15 = alloca %"class.testing::internal::AssertHelper", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %3) #9
  call void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57) %3, i16 noundef signext 0)
  call void @llvm.lifetime.start.p0(i64 64, ptr %4) #9
  invoke void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57) %4, i16 noundef signext 2)
          to label %17 unwind label %27

17:                                               ; preds = %1
  invoke void @_ZN4gem54Port4bindERS0_(ptr noundef nonnull align 8 dereferenceable(57) %3, ptr noundef nonnull align 8 dereferenceable(57) %4)
          to label %18 unwind label %31

18:                                               ; preds = %17
  %19 = invoke noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv()
          to label %20 unwind label %31

20:                                               ; preds = %18
  br i1 %19, label %21, label %168

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  invoke void @_ZN7testing8internal20MakeDeathTestMatcherB5cxx11EPKc(ptr dead_on_unwind writable sret(%"class.testing::Matcher") align 8 %8, ptr noundef @.str.28)
          to label %22 unwind label %35

22:                                               ; preds = %21
  %23 = invoke noundef zeroext i1 @_ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_(ptr noundef @.str.32, ptr noundef %8, ptr noundef @.str.3, i32 noundef 166, ptr noundef %7)
          to label %24 unwind label %39

24:                                               ; preds = %22
  %25 = xor i1 %23, true
  call void @_ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br i1 %25, label %26, label %43

26:                                               ; preds = %24
  store i32 2, ptr %13, align 4
  br label %164

27:                                               ; preds = %1
  %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
  br label %194

31:                                               ; preds = %18, %17
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %5, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %6, align 4
  br label %193

35:                                               ; preds = %21
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %5, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %6, align 4
  br label %167

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  call void @_ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %167

43:                                               ; preds = %24
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %163

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EEC2IS4_vEEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %47) #9
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 2
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %53 unwind label %54

53:                                               ; preds = %46
  switch i32 %52, label %158 [
    i32 0, label %58
    i32 1, label %75
  ]

54:                                               ; preds = %67, %65, %58, %46
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  br label %162

58:                                               ; preds = %53
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds ptr, ptr %61, i64 3
  %63 = load ptr, ptr %62, align 8
  %64 = invoke noundef i32 %63(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %65 unwind label %54

65:                                               ; preds = %58
  %66 = invoke noundef zeroext i1 @_ZN7testing8internal20ExitedUnsuccessfullyEi(i32 noundef %64)
          to label %67 unwind label %54

67:                                               ; preds = %65
  %68 = load ptr, ptr %59, align 8, !tbaa !9
  %69 = getelementptr inbounds ptr, ptr %68, i64 4
  %70 = load ptr, ptr %69, align 8
  %71 = invoke noundef zeroext i1 %70(ptr noundef nonnull align 8 dereferenceable(8) %59, i1 noundef zeroext %66)
          to label %72 unwind label %54

72:                                               ; preds = %67
  br i1 %71, label %74, label %73

73:                                               ; preds = %72
  store i32 2, ptr %13, align 4
  br label %159

74:                                               ; preds = %72
  br label %158

75:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7testing8internal9DeathTest14ReturnSentinelC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %76)
          to label %77 unwind label %82

77:                                               ; preds = %75
  %78 = invoke noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv()
          to label %79 unwind label %86

79:                                               ; preds = %77
  br i1 %78, label %80, label %130

80:                                               ; preds = %79
  invoke void @_ZN4gem54Port12takeOverFromEPS0_(ptr noundef nonnull align 8 dereferenceable(57) %3, ptr noundef %4)
          to label %81 unwind label %86

81:                                               ; preds = %80
  br label %131

82:                                               ; preds = %75
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %5, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %6, align 4
  br label %157

86:                                               ; preds = %80, %77
  %87 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %5, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %6, align 4
  br label %90

90:                                               ; preds = %86
  %91 = load i32, ptr %6, align 4
  %92 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #9
  %93 = icmp eq i32 %91, %92
  br i1 %93, label %94, label %121

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %95 = load ptr, ptr %5, align 8
  %96 = call ptr @__cxa_begin_catch(ptr %95) #9
  store ptr %96, ptr %11, align 8
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  invoke void @_ZN7testing8internal18FormatFileLocationB5cxx11EPKci(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef @.str.3, i32 noundef 166)
          to label %98 unwind label %141

98:                                               ; preds = %94
  %99 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds ptr, ptr %101, i64 2
  %103 = load ptr, ptr %102, align 8
  %104 = call noundef ptr %103(ptr noundef nonnull align 8 dereferenceable(8) %100) #9
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.29, ptr noundef %99, ptr noundef %104) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = invoke i32 @fflush(ptr noundef %106)
          to label %108 unwind label %145

108:                                              ; preds = %98
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds ptr, ptr %110, i64 5
  %112 = load ptr, ptr %111, align 8
  invoke void %112(ptr noundef nonnull align 8 dereferenceable(8) %109, i32 noundef 1)
          to label %113 unwind label %145

113:                                              ; preds = %108
  invoke void @__cxa_end_catch()
          to label %114 unwind label %149

114:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %115

115:                                              ; preds = %131, %129, %114
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i64 5
  %119 = load ptr, ptr %118, align 8
  invoke void %119(ptr noundef nonnull align 8 dereferenceable(8) %116, i32 noundef 2)
          to label %120 unwind label %136

120:                                              ; preds = %115
  call void @_ZN7testing8internal9DeathTest14ReturnSentinelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %158

121:                                              ; preds = %90
  %122 = load ptr, ptr %5, align 8
  %123 = call ptr @__cxa_begin_catch(ptr %122) #9
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = getelementptr inbounds ptr, ptr %125, i64 5
  %127 = load ptr, ptr %126, align 8
  invoke void %127(ptr noundef nonnull align 8 dereferenceable(8) %124, i32 noundef 1)
          to label %128 unwind label %132

128:                                              ; preds = %121
  invoke void @__cxa_end_catch()
          to label %129 unwind label %136

129:                                              ; preds = %128
  br label %115

130:                                              ; preds = %79
  br label %131

131:                                              ; preds = %130, %81
  br label %115

132:                                              ; preds = %121
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %5, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %6, align 4
  invoke void @__cxa_end_catch()
          to label %140 unwind label %200

136:                                              ; preds = %128, %115
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %5, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %6, align 4
  br label %156

140:                                              ; preds = %132
  br label %156

141:                                              ; preds = %94
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  br label %153

145:                                              ; preds = %108, %98
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %5, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %6, align 4
  br label %153

149:                                              ; preds = %113
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %5, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %6, align 4
  br label %155

153:                                              ; preds = %145, %141
  invoke void @__cxa_end_catch()
          to label %154 unwind label %200

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %156

156:                                              ; preds = %155, %140, %136
  call void @_ZN7testing8internal9DeathTest14ReturnSentinelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  br label %157

157:                                              ; preds = %156, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %162

158:                                              ; preds = %120, %74, %53
  store i32 0, ptr %13, align 4
  br label %159

159:                                              ; preds = %158, %73
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  %160 = load i32, ptr %13, align 4
  switch i32 %160, label %164 [
    i32 0, label %161
  ]

161:                                              ; preds = %159
  br label %163

162:                                              ; preds = %157, %54
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %167

163:                                              ; preds = %161, %43
  store i32 0, ptr %13, align 4
  br label %164

164:                                              ; preds = %163, %159, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  %165 = load i32, ptr %13, align 4
  switch i32 %165, label %190 [
    i32 0, label %166
    i32 2, label %169
  ]

166:                                              ; preds = %164
  br label %189

167:                                              ; preds = %162, %39, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %193

168:                                              ; preds = %20
  br label %169

169:                                              ; preds = %168, %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %170 unwind label %175

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %171 = invoke noundef ptr @_ZN7testing8internal9DeathTest11LastMessageEv()
          to label %172 unwind label %179

172:                                              ; preds = %170
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 2, ptr noundef @.str.3, i32 noundef 166, ptr noundef %171)
          to label %173 unwind label %179

173:                                              ; preds = %172
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %174 unwind label %183

174:                                              ; preds = %173
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  store i32 1, ptr %13, align 4
  br label %190

175:                                              ; preds = %169
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %5, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %6, align 4
  br label %188

179:                                              ; preds = %172, %170
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %5, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %6, align 4
  br label %187

183:                                              ; preds = %173
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %5, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %6, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  br label %187

187:                                              ; preds = %183, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br label %188

188:                                              ; preds = %187, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %193

189:                                              ; preds = %166
  store i32 0, ptr %13, align 4
  br label %190

190:                                              ; preds = %189, %174, %164
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %4) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #9
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %3) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %3) #9
  %191 = load i32, ptr %13, align 4
  switch i32 %191, label %203 [
    i32 0, label %192
    i32 1, label %192
  ]

192:                                              ; preds = %190, %190
  ret void

193:                                              ; preds = %188, %167, %31
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %4) #9
  br label %194

194:                                              ; preds = %193, %27
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #9
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %3) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %3) #9
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %5, align 8
  %197 = load i32, ptr %6, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199

200:                                              ; preds = %153, %132
  %201 = landingpad { ptr, i32 }
          catch ptr null
  %202 = extractvalue { ptr, i32 } %201, 0
  call void @__clang_call_terminate(ptr %202) #10
  unreachable

203:                                              ; preds = %190
  unreachable
}

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<const std::__cxx11::basic_string<char> &>::Buffer" }
%"class.testing::MatcherDescriberInterface" = type { ptr }
%"union.testing::internal::MatcherBase<const std::__cxx11::basic_string<char> &>::Buffer" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.TestPort = type { %"class.gem5::Port.base", [7 x i8] }
%"class.gem5::Port.base" = type <{ ptr, %"class.std::__cxx11::basic_string", i16, [6 x i8], ptr, i8 }>
%"class.std::unique_ptr.14" = type { %"struct.std::__uniq_ptr_data.15" }
%"struct.std::__uniq_ptr_data.15" = type { %"class.std::__uniq_ptr_impl.16" }
%"class.std::__uniq_ptr_impl.16" = type { %"class.std::tuple.17" }
%"class.std::tuple.17" = type { %"struct.std::_Tuple_impl.18" }
%"struct.std::_Tuple_impl.18" = type { %"struct.std::_Head_base.21" }
%"struct.std::_Head_base.21" = type { ptr }
%"class.testing::internal::DeathTest::ReturnSentinel" = type { ptr }
%"class.testing::Message" = type { %"class.std::unique_ptr.2" }
%"class.std::unique_ptr.2" = type { %"struct.std::__uniq_ptr_data.3" }
%"struct.std::__uniq_ptr_data.3" = type { %"class.std::__uniq_ptr_impl.4" }
%"class.std::__uniq_ptr_impl.4" = type { %"class.std::tuple.5" }
%"class.std::tuple.5" = type { %"struct.std::_Tuple_impl.6" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt9exception = external constant ptr
@stderr = external local_unnamed_addr global ptr, align 8
@.str.29 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 dso_local void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57), i16 noundef signext) unnamed_addr #2 align 2

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4gem54Port4bindERS0_(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv() local_unnamed_addr #3

declare noundef zeroext i1 @_ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7testing8internal20MakeDeathTestMatcherB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.testing::Matcher") align 8, ptr noundef) local_unnamed_addr #6

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

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

declare noundef zeroext i1 @_ZN7testing8internal20ExitedUnsuccessfullyEi(i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #9

declare void @_ZN7testing8internal18FormatFileLocationB5cxx11EPKci(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #9

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

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

declare noundef ptr @_ZN7testing8internal9DeathTest11LastMessageEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36PortDeathTest_TakeOverConnected_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.TestPort, align 8
  %3 = alloca %class.TestPort, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.testing::Matcher", align 8
  %6 = alloca %"class.std::unique_ptr.14", align 8
  %7 = alloca %"class.testing::internal::DeathTest::ReturnSentinel", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.testing::Message", align 8
  %10 = alloca %"class.testing::internal::AssertHelper", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #10
  call void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57) %2, i16 noundef signext 0)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #10
  invoke void @_ZN8TestPortC2Es(ptr noundef nonnull align 8 dereferenceable(57) %3, i16 noundef signext 2)
          to label %11 unwind label %18

11:                                               ; preds = %1
  call void @_ZN4gem54Port4bindERS0_(ptr noundef nonnull align 8 dereferenceable(57) %2, ptr noundef nonnull align 8 dereferenceable(57) %3)
  %12 = invoke noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv()
          to label %13 unwind label %20

13:                                               ; preds = %11
  br i1 %12, label %14, label %107

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  invoke void @_ZN7testing8internal20MakeDeathTestMatcherB5cxx11EPKc(ptr dead_on_unwind nonnull writable sret(%"class.testing::Matcher") align 8 %5, ptr noundef nonnull @.str.28)
          to label %15 unwind label %22

15:                                               ; preds = %14
  %16 = invoke noundef zeroext i1 @_ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_(ptr noundef nonnull @.str.32, ptr noundef nonnull %5, ptr noundef nonnull @.str.3, i32 noundef 166, ptr noundef nonnull %4)
          to label %17 unwind label %24

17:                                               ; preds = %15
  call void @_ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  br i1 %16, label %26, label %.thread34

18:                                               ; preds = %1
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %123

20:                                               ; preds = %11
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %122

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %106

24:                                               ; preds = %15
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  br label %106

26:                                               ; preds = %17
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %105, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EEC2IS4_vEEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %27) #10
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load ptr, ptr %31, align 8
  %33 = invoke noundef i32 %32(ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %34 unwind label %35

34:                                               ; preds = %28
  switch i32 %33, label %.thread [
    i32 0, label %37
    i32 1, label %51
  ]

35:                                               ; preds = %45, %43, %37, %28
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %104

37:                                               ; preds = %34
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %39, i64 24
  %41 = load ptr, ptr %40, align 8
  %42 = invoke noundef i32 %41(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %43 unwind label %35

43:                                               ; preds = %37
  %44 = invoke noundef zeroext i1 @_ZN7testing8internal20ExitedUnsuccessfullyEi(i32 noundef %42)
          to label %45 unwind label %35

45:                                               ; preds = %43
  %46 = load ptr, ptr %38, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 32
  %48 = load ptr, ptr %47, align 8
  %49 = invoke noundef zeroext i1 %48(ptr noundef nonnull align 8 dereferenceable(8) %38, i1 noundef zeroext %44)
          to label %50 unwind label %35

50:                                               ; preds = %45
  br i1 %49, label %.thread, label %103

51:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7testing8internal9DeathTest14ReturnSentinelC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %52)
  %53 = invoke noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv()
          to label %54 unwind label %56

54:                                               ; preds = %51
  br i1 %53, label %55, label %79

55:                                               ; preds = %54
  invoke void @_ZN4gem54Port12takeOverFromEPS0_(ptr noundef nonnull align 8 dereferenceable(57) %2, ptr noundef nonnull %3)
          to label %79 unwind label %56

56:                                               ; preds = %55, %51
  %57 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %58 = extractvalue { ptr, i32 } %57, 0
  %59 = extractvalue { ptr, i32 } %57, 1
  %60 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %61 = icmp eq i32 %59, %60
  %62 = call ptr @__cxa_begin_catch(ptr %58) #10
  br i1 %61, label %63, label %85

63:                                               ; preds = %56
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  invoke void @_ZN7testing8internal18FormatFileLocationB5cxx11EPKci(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull @.str.3, i32 noundef 166)
          to label %65 unwind label %95

65:                                               ; preds = %63
  %66 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  %67 = load ptr, ptr %62, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %69 = load ptr, ptr %68, align 8
  %70 = call noundef ptr %69(ptr noundef nonnull align 8 dereferenceable(8) %62) #10
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.29, ptr noundef %66, ptr noundef %70) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 @fflush(ptr noundef %72)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %75, i64 40
  %77 = load ptr, ptr %76, align 8
  invoke void %77(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef 1)
          to label %78 unwind label %97

78:                                               ; preds = %65
  invoke void @__cxa_end_catch()
          to label %79 unwind label %99

79:                                               ; preds = %78, %55, %54, %90
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = getelementptr inbounds i8, ptr %81, i64 40
  %83 = load ptr, ptr %82, align 8
  invoke void %83(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 noundef 2)
          to label %84 unwind label %93

84:                                               ; preds = %79
  call void @_ZN7testing8internal9DeathTest14ReturnSentinelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %.thread

85:                                               ; preds = %56
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 40
  %89 = load ptr, ptr %88, align 8
  invoke void %89(ptr noundef nonnull align 8 dereferenceable(8) %86, i32 noundef 1)
          to label %90 unwind label %91

90:                                               ; preds = %85
  invoke void @__cxa_end_catch()
          to label %79 unwind label %93

91:                                               ; preds = %85
  %92 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %102 unwind label %124

93:                                               ; preds = %90, %79
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %102

95:                                               ; preds = %63
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %101

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

99:                                               ; preds = %78
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %102

101:                                              ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  invoke void @__cxa_end_catch()
          to label %102 unwind label %124

102:                                              ; preds = %99, %101, %91, %93
  %.pn22 = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ], [ %100, %99 ], [ %.pn, %101 ]
  call void @_ZN7testing8internal9DeathTest14ReturnSentinelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %104

.thread:                                          ; preds = %34, %84, %50
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %105

103:                                              ; preds = %50
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %.thread34

104:                                              ; preds = %102, %35
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %102 ], [ %36, %35 ]
  call void @_ZNSt10unique_ptrIN7testing8internal9DeathTestESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %106

.thread34:                                        ; preds = %103, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %107

105:                                              ; preds = %26, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %121

106:                                              ; preds = %104, %24, %22
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %104 ], [ %25, %24 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %122

107:                                              ; preds = %.thread34, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %108 unwind label %113

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %109 = invoke noundef ptr @_ZN7testing8internal9DeathTest11LastMessageEv()
          to label %110 unwind label %115

110:                                              ; preds = %108
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 2, ptr noundef nonnull @.str.3, i32 noundef 166, ptr noundef %109)
          to label %111 unwind label %115

111:                                              ; preds = %110
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %112 unwind label %117

112:                                              ; preds = %111
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br label %121

113:                                              ; preds = %107
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %120

115:                                              ; preds = %110, %108
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %111
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  br label %119

119:                                              ; preds = %117, %115
  %.pn26 = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br label %120

120:                                              ; preds = %119, %113
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %119 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br label %122

121:                                              ; preds = %105, %112
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %3) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #10
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %2) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #10
  ret void

122:                                              ; preds = %120, %106, %20
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %120 ], [ %.pn22.pn.pn, %106 ], [ %21, %20 ]
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %3) #10
  br label %123

123:                                              ; preds = %122, %18
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %122 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #10
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %2) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn26.pn.pn.pn

124:                                              ; preds = %101, %91
  %125 = landingpad { ptr, i32 }
          catch ptr null
  %126 = extractvalue { ptr, i32 } %125, 0
  call void @__clang_call_terminate(ptr %126) #12
  unreachable
}

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass