; LLVM IR from chensoft/libsocket :: lib/libchen/test/lib/googletest/googletest/test (gtest-port_test)

; 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::AssertionResult" = type { i8, %"class.testing::internal::scoped_ptr" }
%"class.testing::internal::scoped_ptr" = type { ptr }
%"class.testing::internal::Mutex" = type { %"class.testing::internal::MutexBase" }
%"class.testing::internal::MutexBase" = type { %union.pthread_mutex_t, i8, i64 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.testing::internal::AtomicCounterWithMutex" = type <{ i32, [4 x i8], ptr, %"class.testing::internal::Random", [4 x i8] }>
%"class.testing::internal::Random" = type { i32 }
%"class.testing::internal::scoped_ptr.51" = type { ptr }
%"class.testing::internal::Notification" = type <{ %union.pthread_mutex_t, i8, [7 x i8] }>
%"struct.std::pair" = type <{ ptr, i32, [4 x i8] }>
%"class.testing::Message" = type { %"class.testing::internal::scoped_ptr.0" }
%"class.testing::internal::scoped_ptr.0" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.212 = external hidden unnamed_addr constant [23 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal5MutexC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #7 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE(ptr, i32) #7

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7testing8internal42MutexTest_OnlyOneThreadCanLockAtATime_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.testing::internal::Mutex", align 8
  %4 = alloca %"class.testing::internal::AtomicCounterWithMutex", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [7 x %"class.testing::internal::scoped_ptr.51"], align 16
  %10 = alloca %"class.testing::internal::Notification", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca ptr, align 8
  %14 = alloca { ptr, i32 }, align 8
  %15 = alloca i1, align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.testing::AssertionResult", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.testing::Message", align 8
  %21 = alloca %"class.testing::internal::AssertHelper", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #9
  call void @_ZN7testing8internal5MutexC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #9
  invoke void @_ZN7testing8internal22AtomicCounterWithMutexC2EPNS0_5MutexE(ptr noundef nonnull align 8 dereferenceable(20) %4, ptr noundef %3)
          to label %23 unwind label %37

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 20, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 7, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %9) #9
  %24 = getelementptr inbounds [7 x %"class.testing::internal::scoped_ptr.51"], ptr %9, i32 0, i32 0
  %25 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %24, i64 7
  br label %26

26:                                               ; preds = %28, %23
  %27 = phi ptr [ %24, %23 ], [ %29, %28 ]
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef null)
          to label %28 unwind label %41

28:                                               ; preds = %26
  %29 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %27, i64 1
  %30 = icmp eq ptr %29, %25
  br i1 %30, label %31, label %26

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #9
  invoke void @_ZN7testing8internal12NotificationC2Ev(ptr noundef nonnull align 8 dereferenceable(41) %10)
          to label %32 unwind label %51

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %69, %32
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 7
  br i1 %35, label %55, label %36

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %84

37:                                               ; preds = %1
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  br label %163

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %5, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %6, align 4
  %45 = icmp eq ptr %24, %27
  br i1 %45, label %50, label %46

46:                                               ; preds = %46, %41
  %47 = phi ptr [ %27, %41 ], [ %48, %46 ]
  %48 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %47, i64 -1
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48) #9
  %49 = icmp eq ptr %48, %24
  br i1 %49, label %50, label %46

50:                                               ; preds = %46, %41
  br label %162

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  br label %154

55:                                               ; preds = %33
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [7 x %"class.testing::internal::scoped_ptr.51"], ptr %9, i64 0, i64 %57
  %59 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #10
          to label %60 unwind label %72

60:                                               ; preds = %55
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  store ptr %4, ptr %13, align 8, !tbaa !5
  %61 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %62 unwind label %76

62:                                               ; preds = %60
  store { ptr, i32 } %61, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %14, i64 12, i1 false)
  %63 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 1
  %66 = load i32, ptr %65, align 8
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %59, ptr noundef @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %64, i32 %66, ptr noundef %10)
          to label %67 unwind label %76

67:                                               ; preds = %62
  store i1 false, ptr %15, align 1
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef %59)
          to label %68 unwind label %76

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %11, align 4, !tbaa !9
  br label %33, !llvm.loop !11

72:                                               ; preds = %55
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  br label %83

76:                                               ; preds = %67, %62, %60
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %5, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  %80 = load i1, ptr %15, align 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %76
  call void @_ZdlPvm(ptr noundef %59, i64 noundef 56) #11
  br label %82

82:                                               ; preds = %81, %76
  br label %83

83:                                               ; preds = %82, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %153

84:                                               ; preds = %36
  invoke void @_ZN7testing8internal12Notification6NotifyEv(ptr noundef nonnull align 8 dereferenceable(41) %10)
          to label %85 unwind label %90

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %101, %85
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = icmp slt i32 %87, 7
  br i1 %88, label %94, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %108

90:                                               ; preds = %84
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  br label %153

94:                                               ; preds = %86
  %95 = load i32, ptr %16, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [7 x %"class.testing::internal::scoped_ptr.51"], ptr %9, i64 0, i64 %96
  %98 = invoke noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %99 unwind label %104

99:                                               ; preds = %94
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %98)
          to label %100 unwind label %104

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %16, align 4, !tbaa !9
  br label %86, !llvm.loop !13

104:                                              ; preds = %99, %94
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %5, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %153

108:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 140, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %109 = invoke noundef i32 @_ZNK7testing8internal22AtomicCounterWithMutex5valueEv(ptr noundef nonnull align 8 dereferenceable(20) %4)
          to label %110 unwind label %115

110:                                              ; preds = %108
  store i32 %109, ptr %19, align 4, !tbaa !9
  invoke void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind writable sret(%"class.testing::AssertionResult") align 8 %17, ptr noundef @.str.211, ptr noundef @.str.212, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %111 unwind label %115

111:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  %112 = invoke noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %113 unwind label %119

113:                                              ; preds = %111
  br i1 %112, label %114, label %123

114:                                              ; preds = %113
  br label %143

115:                                              ; preds = %110, %108
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %5, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %152

119:                                              ; preds = %111
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %5, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %6, align 4
  br label %151

123:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %124 unwind label %129

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %125 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %126 unwind label %133

126:                                              ; preds = %124
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 1, ptr noundef @.str.3, i32 noundef 1127, ptr noundef %125)
          to label %127 unwind label %133

127:                                              ; preds = %126
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %128 unwind label %137

128:                                              ; preds = %127
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %143

129:                                              ; preds = %123
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %5, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %6, align 4
  br label %142

133:                                              ; preds = %126, %124
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %5, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %6, align 4
  br label %141

137:                                              ; preds = %127
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %5, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %6, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  br label %141

141:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br label %142

142:                                              ; preds = %141, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %151

143:                                              ; preds = %128, %114
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @_ZN7testing8internal12NotificationD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %10) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #9
  %144 = getelementptr inbounds [7 x %"class.testing::internal::scoped_ptr.51"], ptr %9, i32 0, i32 0
  %145 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %144, i64 7
  br label %146

146:                                              ; preds = %146, %143
  %147 = phi ptr [ %145, %143 ], [ %148, %146 ]
  %148 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %147, i64 -1
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %148) #9
  %149 = icmp eq ptr %148, %144
  br i1 %149, label %150, label %146

150:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @_ZN7testing8internal5MutexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #9
  ret void

151:                                              ; preds = %142, %119
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  br label %152

152:                                              ; preds = %151, %115
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %153

153:                                              ; preds = %152, %104, %90, %83
  call void @_ZN7testing8internal12NotificationD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %10) #9
  br label %154

154:                                              ; preds = %153, %51
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #9
  %155 = getelementptr inbounds [7 x %"class.testing::internal::scoped_ptr.51"], ptr %9, i32 0, i32 0
  %156 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %155, i64 7
  br label %157

157:                                              ; preds = %157, %154
  %158 = phi ptr [ %156, %154 ], [ %159, %157 ]
  %159 = getelementptr inbounds %"class.testing::internal::scoped_ptr.51", ptr %158, i64 -1
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %159) #9
  %160 = icmp eq ptr %159, %155
  br i1 %160, label %161, label %157

161:                                              ; preds = %157
  br label %162

162:                                              ; preds = %161, %50
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %163

163:                                              ; preds = %162, %37
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @_ZN7testing8internal5MutexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #9
  br label %164

164:                                              ; preds = %163
  %165 = load ptr, ptr %5, align 8
  %166 = load i32, ptr %6, align 4
  %167 = insertvalue { ptr, i32 } poison, ptr %165, 0
  %168 = insertvalue { ptr, i32 } %167, i32 %166, 1
  resume { ptr, i32 } %168
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal22AtomicCounterWithMutexC2EPNS0_5MutexE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) unnamed_addr #7 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal12NotificationC2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr, i32, ptr noundef) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7testing8internal12Notification6NotifyEv(ptr noundef nonnull align 8 dereferenceable(41)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7testing8internal22AtomicCounterWithMutex5valueEv(ptr noundef nonnull align 8 dereferenceable(20)) #3 align 2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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::AssertionResult" = type { i8, %"class.testing::internal::scoped_ptr" }
%"class.testing::internal::scoped_ptr" = type { ptr }
%"class.testing::internal::Mutex" = type { %"class.testing::internal::MutexBase" }
%"class.testing::internal::MutexBase" = type { %union.pthread_mutex_t, i8, i64 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.testing::internal::AtomicCounterWithMutex" = type <{ i32, [4 x i8], ptr, %"class.testing::internal::Random", [4 x i8] }>
%"class.testing::internal::Random" = type { i32 }
%"class.testing::internal::scoped_ptr.51" = type { ptr }
%"class.testing::internal::Notification" = type <{ %union.pthread_mutex_t, i8, [7 x i8] }>
%"class.testing::Message" = type { %"class.testing::internal::scoped_ptr.0" }
%"class.testing::internal::scoped_ptr.0" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.212 = external hidden unnamed_addr constant [23 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal5MutexC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE(ptr, i32) #7

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7testing8internal42MutexTest_OnlyOneThreadCanLockAtATime_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.testing::internal::Mutex", align 8
  %3 = alloca %"class.testing::internal::AtomicCounterWithMutex", align 8
  %4 = alloca i32, align 4
  %5 = alloca [7 x %"class.testing::internal::scoped_ptr.51"], align 16
  %6 = alloca %"class.testing::internal::Notification", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.testing::AssertionResult", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.testing::Message", align 8
  %12 = alloca %"class.testing::internal::AssertHelper", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #8
  call void @_ZN7testing8internal5MutexC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  invoke void @_ZN7testing8internal22AtomicCounterWithMutexC2EPNS0_5MutexE(ptr noundef nonnull align 8 dereferenceable(20) %3, ptr noundef nonnull %2)
          to label %13 unwind label %15

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 20, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef null)
  %.ptr.1 = getelementptr inbounds i8, ptr %5, i64 8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef null)
  %.ptr.2 = getelementptr inbounds i8, ptr %5, i64 16
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef null)
  %.ptr.3 = getelementptr inbounds i8, ptr %5, i64 24
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.3, ptr noundef null)
  %.ptr.4 = getelementptr inbounds i8, ptr %5, i64 32
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.4, ptr noundef null)
  %.ptr.5 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.5, ptr noundef null)
  %.ptr.6 = getelementptr inbounds i8, ptr %5, i64 48
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEC2EPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.6, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #8
  invoke void @_ZN7testing8internal12NotificationC2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %.preheader.preheader unwind label %17

.preheader.preheader:                             ; preds = %13
  %14 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %19 unwind label %55

15:                                               ; preds = %1
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %109

17:                                               ; preds = %13
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %102

19:                                               ; preds = %.preheader.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %20 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %21 unwind label %58

21:                                               ; preds = %19
  %.fca.0.extract = extractvalue { ptr, i32 } %20, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %20, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract, i32 %.fca.1.extract, ptr noundef nonnull %6)
          to label %22 unwind label %58

22:                                               ; preds = %21
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %14)
          to label %.preheader.1 unwind label %57

.preheader.1:                                     ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %23 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %24 unwind label %55

24:                                               ; preds = %.preheader.1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %25 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %26 unwind label %58

26:                                               ; preds = %24
  %.fca.0.extract.1 = extractvalue { ptr, i32 } %25, 0
  %.fca.1.extract.1 = extractvalue { ptr, i32 } %25, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.1, i32 %.fca.1.extract.1, ptr noundef nonnull %6)
          to label %27 unwind label %58

27:                                               ; preds = %26
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1, ptr noundef nonnull %23)
          to label %.preheader.2 unwind label %57

.preheader.2:                                     ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %28 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %29 unwind label %55

29:                                               ; preds = %.preheader.2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %30 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %31 unwind label %58

31:                                               ; preds = %29
  %.fca.0.extract.2 = extractvalue { ptr, i32 } %30, 0
  %.fca.1.extract.2 = extractvalue { ptr, i32 } %30, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.2, i32 %.fca.1.extract.2, ptr noundef nonnull %6)
          to label %32 unwind label %58

32:                                               ; preds = %31
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2, ptr noundef nonnull %28)
          to label %.preheader.3 unwind label %57

.preheader.3:                                     ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %33 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %34 unwind label %55

34:                                               ; preds = %.preheader.3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %35 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %36 unwind label %58

36:                                               ; preds = %34
  %.fca.0.extract.3 = extractvalue { ptr, i32 } %35, 0
  %.fca.1.extract.3 = extractvalue { ptr, i32 } %35, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.3, i32 %.fca.1.extract.3, ptr noundef nonnull %6)
          to label %37 unwind label %58

37:                                               ; preds = %36
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.3, ptr noundef nonnull %33)
          to label %.preheader.4 unwind label %57

.preheader.4:                                     ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %38 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %39 unwind label %55

39:                                               ; preds = %.preheader.4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %40 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %41 unwind label %58

41:                                               ; preds = %39
  %.fca.0.extract.4 = extractvalue { ptr, i32 } %40, 0
  %.fca.1.extract.4 = extractvalue { ptr, i32 } %40, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.4, i32 %.fca.1.extract.4, ptr noundef nonnull %6)
          to label %42 unwind label %58

42:                                               ; preds = %41
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.4, ptr noundef nonnull %38)
          to label %.preheader.5 unwind label %57

.preheader.5:                                     ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %43 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %44 unwind label %55

44:                                               ; preds = %.preheader.5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %45 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %46 unwind label %58

46:                                               ; preds = %44
  %.fca.0.extract.5 = extractvalue { ptr, i32 } %45, 0
  %.fca.1.extract.5 = extractvalue { ptr, i32 } %45, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.5, i32 %.fca.1.extract.5, ptr noundef nonnull %6)
          to label %47 unwind label %58

47:                                               ; preds = %46
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.5, ptr noundef nonnull %43)
          to label %.preheader.6 unwind label %57

.preheader.6:                                     ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %48 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %49 unwind label %55

49:                                               ; preds = %.preheader.6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %3, ptr %7, align 8, !tbaa !9
  %50 = invoke { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %51 unwind label %58

51:                                               ; preds = %49
  %.fca.0.extract.6 = extractvalue { ptr, i32 } %50, 0
  %.fca.1.extract.6 = extractvalue { ptr, i32 } %50, 1
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull @_ZN7testing8internal18CountingThreadFuncESt4pairIPNS0_22AtomicCounterWithMutexEiE, ptr %.fca.0.extract.6, i32 %.fca.1.extract.6, ptr noundef nonnull %6)
          to label %52 unwind label %58

52:                                               ; preds = %51
  invoke void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEE5resetEPS7_(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.6, ptr noundef nonnull %48)
          to label %53 unwind label %57

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN7testing8internal12Notification6NotifyEv(ptr noundef nonnull align 8 dereferenceable(41) %6)
  %54 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %54)
          to label %59 unwind label %73

55:                                               ; preds = %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %101

57:                                               ; preds = %52, %47, %42, %37, %32, %27, %22
  %lpad.thr_comm.split-lp = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %101

58:                                               ; preds = %51, %49, %46, %44, %41, %39, %36, %34, %31, %29, %26, %24, %21, %19
  %.lcssa = phi ptr [ %14, %21 ], [ %14, %19 ], [ %23, %24 ], [ %23, %26 ], [ %28, %29 ], [ %28, %31 ], [ %33, %34 ], [ %33, %36 ], [ %38, %39 ], [ %38, %41 ], [ %43, %44 ], [ %43, %46 ], [ %48, %49 ], [ %48, %51 ]
  %lpad.thr_comm = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZdlPvm(ptr noundef nonnull %.lcssa, i64 noundef 56) #10
  br label %101

59:                                               ; preds = %53
  %60 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %60)
          to label %61 unwind label %73

61:                                               ; preds = %59
  %62 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %62)
          to label %63 unwind label %73

63:                                               ; preds = %61
  %64 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.3)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %64)
          to label %65 unwind label %73

65:                                               ; preds = %63
  %66 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.4)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %66)
          to label %67 unwind label %73

67:                                               ; preds = %65
  %68 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.5)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %68)
          to label %69 unwind label %73

69:                                               ; preds = %67
  %70 = call noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.6)
  invoke void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56) %70)
          to label %71 unwind label %73

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 140, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %72 = call noundef i32 @_ZNK7testing8internal22AtomicCounterWithMutex5valueEv(ptr noundef nonnull align 8 dereferenceable(20) %3)
  store i32 %72, ptr %10, align 4, !tbaa !5
  invoke void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %8, ptr noundef nonnull @.str.211, ptr noundef nonnull @.str.212, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %75 unwind label %77

73:                                               ; preds = %69, %67, %65, %63, %61, %59, %53
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %101

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %76 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  br i1 %76, label %93, label %79

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %100

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %80 unwind label %85

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %81 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %82 unwind label %87

82:                                               ; preds = %80
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 1, ptr noundef nonnull @.str.3, i32 noundef 1127, ptr noundef %81)
          to label %83 unwind label %87

83:                                               ; preds = %82
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %84 unwind label %89

84:                                               ; preds = %83
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %93

85:                                               ; preds = %79
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %92

87:                                               ; preds = %82, %80
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %91

89:                                               ; preds = %83
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br label %91

91:                                               ; preds = %89, %87
  %.pn = phi { ptr, i32 } [ %90, %89 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %92

92:                                               ; preds = %91, %85
  %.pn.pn = phi { ptr, i32 } [ %.pn, %91 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  br label %100

93:                                               ; preds = %75, %84
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @_ZN7testing8internal12NotificationD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  %94 = getelementptr inbounds i8, ptr %5, i64 48
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %94) #8
  %95 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %95) #8
  %96 = getelementptr inbounds i8, ptr %5, i64 32
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %96) #8
  %97 = getelementptr inbounds i8, ptr %5, i64 24
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %97) #8
  %98 = getelementptr inbounds i8, ptr %5, i64 16
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %98) #8
  %99 = getelementptr inbounds i8, ptr %5, i64 8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %99) #8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZN7testing8internal5MutexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  ret void

100:                                              ; preds = %92, %77
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %92 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %101

101:                                              ; preds = %57, %55, %58, %100, %73
  %.pn28.pn = phi { ptr, i32 } [ %74, %73 ], [ %.pn.pn.pn, %100 ], [ %lpad.thr_comm, %58 ], [ %lpad.thr_comm.split-lp, %57 ], [ %56, %55 ]
  call void @_ZN7testing8internal12NotificationD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #8
  br label %102

102:                                              ; preds = %101, %17
  %.pn28.pn.pn = phi { ptr, i32 } [ %.pn28.pn, %101 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  %103 = getelementptr inbounds i8, ptr %5, i64 48
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %103) #8
  %104 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %104) #8
  %105 = getelementptr inbounds i8, ptr %5, i64 32
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %105) #8
  %106 = getelementptr inbounds i8, ptr %5, i64 24
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %106) #8
  %107 = getelementptr inbounds i8, ptr %5, i64 16
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %107) #8
  %108 = getelementptr inbounds i8, ptr %5, i64 8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %108) #8
  call void @_ZN7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %109

109:                                              ; preds = %102, %15
  %.pn28.pn.pn.pn = phi { ptr, i32 } [ %.pn28.pn.pn, %102 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZN7testing8internal5MutexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn28.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal22AtomicCounterWithMutexC2EPNS0_5MutexE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) unnamed_addr #7 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal12NotificationC2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZSt9make_pairIPN7testing8internal22AtomicCounterWithMutexERKiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEC2EPFvS5_ES5_PNS0_12NotificationE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr, i32, ptr noundef) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7testing8internal12Notification6NotifyEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7testing8internal10scoped_ptrINS0_15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal15ThreadWithParamISt4pairIPNS0_22AtomicCounterWithMutexEiEE4JoinEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7testing8internal22AtomicCounterWithMutex5valueEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #3 align 2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass