; LLVM IR from gem5/gem5 :: src/sim/port.test.ll (ZN39PortDeathTest_TakeOverDisconnected_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

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 @_ZN39PortDeathTest_TakeOverDisconnected_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 %26

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

19:                                               ; preds = %17
  br i1 %18, label %20, label %167

20:                                               ; preds = %19
  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 %21 unwind label %34

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

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

25:                                               ; preds = %23
  store i32 2, ptr %13, align 4
  br label %163

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %5, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %6, align 4
  br label %193

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

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

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

42:                                               ; preds = %23
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %162

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %46 = 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 %46) #9
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 2
  %50 = load ptr, ptr %49, align 8
  %51 = invoke noundef i32 %50(ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %52 unwind label %53

52:                                               ; preds = %45
  switch i32 %51, label %157 [
    i32 0, label %57
    i32 1, label %74
  ]

53:                                               ; preds = %66, %64, %57, %45
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  br label %161

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

64:                                               ; preds = %57
  %65 = invoke noundef zeroext i1 @_ZN7testing8internal20ExitedUnsuccessfullyEi(i32 noundef %63)
          to label %66 unwind label %53

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

71:                                               ; preds = %66
  br i1 %70, label %73, label %72

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

73:                                               ; preds = %71
  br label %157

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

76:                                               ; preds = %74
  %77 = invoke noundef zeroext i1 @_ZN7testing8internal10AlwaysTrueEv()
          to label %78 unwind label %85

78:                                               ; preds = %76
  br i1 %77, label %79, label %129

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

80:                                               ; preds = %79
  br label %130

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

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

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

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %94 = load ptr, ptr %5, align 8
  %95 = call ptr @__cxa_begin_catch(ptr %94) #9
  store ptr %95, ptr %11, align 8
  %96 = 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 150)
          to label %97 unwind label %140

97:                                               ; preds = %93
  %98 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds ptr, ptr %100, i64 2
  %102 = load ptr, ptr %101, align 8
  %103 = call noundef ptr %102(ptr noundef nonnull align 8 dereferenceable(8) %99) #9
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.29, ptr noundef %98, ptr noundef %103) #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
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = invoke i32 @fflush(ptr noundef %105)
          to label %107 unwind label %144

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

112:                                              ; preds = %107
  invoke void @__cxa_end_catch()
          to label %113 unwind label %148

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

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

119:                                              ; preds = %114
  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 %157

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

127:                                              ; preds = %120
  invoke void @__cxa_end_catch()
          to label %128 unwind label %135

128:                                              ; preds = %127
  br label %114

129:                                              ; preds = %78
  br label %130

130:                                              ; preds = %129, %80
  br label %114

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

135:                                              ; preds = %127, %114
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %5, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %6, align 4
  br label %155

139:                                              ; preds = %131
  br label %155

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

144:                                              ; preds = %107, %97
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %5, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %6, align 4
  br label %152

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

152:                                              ; preds = %144, %140
  invoke void @__cxa_end_catch()
          to label %153 unwind label %199

153:                                              ; preds = %152
  br label %154

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

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

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

157:                                              ; preds = %119, %73, %52
  store i32 0, ptr %13, align 4
  br label %158

158:                                              ; preds = %157, %72
  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
  %159 = load i32, ptr %13, align 4
  switch i32 %159, label %163 [
    i32 0, label %160
  ]

160:                                              ; preds = %158
  br label %162

161:                                              ; preds = %156, %53
  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 %166

162:                                              ; preds = %160, %42
  store i32 0, ptr %13, align 4
  br label %163

163:                                              ; preds = %162, %158, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  %164 = load i32, ptr %13, align 4
  switch i32 %164, label %189 [
    i32 0, label %165
    i32 2, label %168
  ]

165:                                              ; preds = %163
  br label %188

166:                                              ; preds = %161, %38, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %192

167:                                              ; preds = %19
  br label %168

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

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

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

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

173:                                              ; preds = %172
  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 %189

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

178:                                              ; preds = %171, %169
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %5, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %6, align 4
  br label %186

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

186:                                              ; preds = %182, %178
  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 %187

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

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

189:                                              ; preds = %188, %173, %163
  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
  %190 = load i32, ptr %13, align 4
  switch i32 %190, label %202 [
    i32 0, label %191
    i32 1, label %191
  ]

191:                                              ; preds = %189, %189
  ret void

192:                                              ; preds = %187, %166, %30
  call void @_ZN4gem54PortD2Ev(ptr noundef nonnull align 8 dereferenceable(57) %4) #9
  br label %193

193:                                              ; preds = %192, %26
  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 %194

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

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

202:                                              ; preds = %189
  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

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 @_ZN39PortDeathTest_TakeOverDisconnected_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
  %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 150, 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 150)
          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 150, 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