; LLVM IR from WayneLin92/SSeqCpp :: thirdparty/fmt/test (ostream-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"

%struct.test_buffer = type { %"class.fmt::v10::detail::buffer" }
%"class.fmt::v10::detail::buffer" = type { ptr, ptr, i64, i64 }
%struct.mock_streambuf = type { %"class.std::basic_streambuf", %"class.testing::internal::FunctionMocker" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.testing::internal::FunctionMocker" = type { %"class.testing::internal::UntypedFunctionMockerBase" }
%"class.testing::internal::UntypedFunctionMockerBase" = type { ptr, ptr, ptr, %"class.std::vector", %"class.std::vector.29" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl" }
%"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.test_ostream = type { %"class.std::basic_ostream.base", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.testing::InSequence" = type { i8 }
%"class.testing::internal::MockSpec" = type { ptr, %"class.std::tuple.34" }
%"class.std::tuple.34" = type { %"struct.std::_Tuple_impl.35" }
%"struct.std::_Tuple_impl.35" = type { %"struct.std::_Tuple_impl.36", %"struct.std::_Head_base.38" }
%"struct.std::_Tuple_impl.36" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { %"class.testing::Matcher" }
%"class.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<long>::Buffer" }
%"class.testing::MatcherDescriberInterface" = type { ptr }
%"union.testing::internal::MatcherBase<long>::Buffer" = type { ptr }
%"struct.std::_Head_base.38" = type { %"class.testing::Matcher.39" }
%"class.testing::Matcher.39" = type { %"class.testing::internal::MatcherBase.40" }
%"class.testing::internal::MatcherBase.40" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<const void *>::Buffer" }
%"union.testing::internal::MatcherBase<const void *>::Buffer" = type { ptr }
%"class.testing::internal::WithoutMatchers" = type { i8 }
%"class.testing::Action" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.testing::internal::ReturnAction" = type { %"class.std::shared_ptr.46" }
%"class.std::shared_ptr.46" = type { %"class.std::__shared_ptr.47" }
%"class.std::__shared_ptr.47" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [46 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: 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 @_ZN3fmt3v106detail12write_bufferIcEEvRSt13basic_ostreamIT_St11char_traitsIS4_EERNS1_6bufferIS4_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.test_buffer, align 8
  %7 = alloca %struct.mock_streambuf, align 8
  %8 = alloca %struct.test_ostream, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.testing::InSequence", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.testing::internal::MockSpec", align 8
  %17 = alloca %"class.testing::Matcher.39", align 8
  %18 = alloca %"class.testing::Matcher", align 8
  %19 = alloca %"class.testing::internal::WithoutMatchers", align 1
  %20 = alloca %"class.testing::internal::WithoutMatchers", align 1
  %21 = alloca %"class.testing::Action", align 8
  %22 = alloca %"class.testing::internal::ReturnAction", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %24 = call noundef i64 @_ZN3fmt3v106detail9max_valueImEET_v()
  store i64 %24, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %25 = call noundef i64 @_ZN3fmt3v106detail9max_valueIlEET_v()
  store i64 %25, ptr %4, align 8, !tbaa !9
  %26 = load i64, ptr %3, align 8, !tbaa !9
  %27 = load i64, ptr %4, align 8, !tbaa !9
  %28 = call noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef %27)
  %29 = icmp ule i64 %26, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %1
  store i32 1, ptr %5, align 4
  br label %69

31:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  %32 = load i64, ptr %3, align 8, !tbaa !9
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN11test_bufferC2Em(ptr noundef nonnull align 8 dereferenceable(32) %6, i64 noundef %32)
  call void @llvm.lifetime.start.p0(i64 136, ptr %7) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %7)
  call void @llvm.lifetime.start.p0(i64 272, ptr %8) #7
  invoke void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamC1ERZNS_8TestBodyEvE14mock_streambuf(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(136) %7)
          to label %33 unwind label %72

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  invoke void @_ZN7testing10InSequenceC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %34 unwind label %76

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %35 = load i64, ptr %3, align 8, !tbaa !9
  store i64 %35, ptr %13, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %64, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %37 = load i64, ptr %4, align 8, !tbaa !9
  %38 = invoke noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef %37)
          to label %39 unwind label %80

39:                                               ; preds = %36
  store i64 %38, ptr %15, align 8, !tbaa !9
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %41 unwind label %80

41:                                               ; preds = %39
  %42 = load i64, ptr %40, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  store i64 %42, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN7testing7MatcherIPKvEC2ES2_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef %43)
          to label %44 unwind label %84

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  %45 = load i64, ptr %14, align 8, !tbaa !9
  invoke void @_ZN7testing7MatcherIlEC2El(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %45)
          to label %46 unwind label %88

46:                                               ; preds = %44
  invoke void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambuf12gmock_xsputnERKN7testing7MatcherIPKvEERKNS2_IlEE(ptr dead_on_unwind writable sret(%"class.testing::internal::MockSpec") align 8 %16, ptr noundef nonnull align 8 dereferenceable(136) %7, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %47 unwind label %92

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  invoke void @_ZN7testing8internal18GetWithoutMatchersEv()
          to label %48 unwind label %96

48:                                               ; preds = %47
  %49 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7testing8internal8MockSpecIFlPKvlEEclERKNS0_15WithoutMatchersEPv(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 1 dereferenceable(1) %19, ptr noundef null)
          to label %50 unwind label %96

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal8MockSpecIFlPKvlEE18InternalExpectedAtEPKciS7_S7_(ptr noundef nonnull align 8 dereferenceable(56) %49, ptr noundef @.str.5, i32 noundef 161, ptr noundef @.str.98, ptr noundef @.str.99)
          to label %52 unwind label %96

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %53 = load i64, ptr %4, align 8, !tbaa !9
  invoke void @_ZN7testing6ReturnIlEENS_8internal12ReturnActionIT_EES3_(ptr dead_on_unwind writable sret(%"class.testing::internal::ReturnAction") align 8 %22, i64 noundef %53)
          to label %54 unwind label %100

54:                                               ; preds = %52
  invoke void @_ZNK7testing8internal12ReturnActionIlEcvNS_6ActionIT_EEIFlPKvlEEEv(ptr dead_on_unwind writable sret(%"class.testing::Action") align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %55 unwind label %104

55:                                               ; preds = %54
  %56 = invoke noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal16TypedExpectationIFlPKvlEE8WillOnceERKNS_6ActionIS4_EE(ptr noundef nonnull align 8 dereferenceable(344) %51, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %57 unwind label %108

57:                                               ; preds = %55
  call void @_ZN7testing6ActionIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZN7testing8internal12ReturnActionIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @_ZN7testing8internal8MockSpecIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #7
  call void @_ZN7testing8internal11MatcherBaseIlED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @_ZN7testing8internal11MatcherBaseIPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #7
  %58 = load i64, ptr %14, align 8, !tbaa !9
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 %58
  store ptr %60, ptr %12, align 8, !tbaa !5
  %61 = load i64, ptr %14, align 8, !tbaa !9
  %62 = load i64, ptr %13, align 8, !tbaa !9
  %63 = sub i64 %62, %61
  store i64 %63, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %64

64:                                               ; preds = %57
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %36, label %67, !llvm.loop !11

67:                                               ; preds = %64
  invoke void @_ZN3fmt3v106detail12write_bufferIcEEvRSt13basic_ostreamIT_St11char_traitsIS4_EERNS1_6bufferIS4_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %68 unwind label %119

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr %8) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %7) #7
  call void @llvm.lifetime.end.p0(i64 136, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  store i32 0, ptr %5, align 4
  br label %69

69:                                               ; preds = %68, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %70 = load i32, ptr %5, align 4
  switch i32 %70, label %131 [
    i32 0, label %71
    i32 1, label %71
  ]

71:                                               ; preds = %69, %69
  ret void

72:                                               ; preds = %31
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  br label %125

76:                                               ; preds = %33
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  br label %124

80:                                               ; preds = %39, %36
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %118

84:                                               ; preds = %41
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  br label %117

88:                                               ; preds = %44
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %9, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %10, align 4
  br label %116

92:                                               ; preds = %46
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  br label %115

96:                                               ; preds = %50, %48, %47
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %114

100:                                              ; preds = %52
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %113

104:                                              ; preds = %54
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  br label %112

108:                                              ; preds = %55
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  call void @_ZN7testing6ActionIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %112

112:                                              ; preds = %108, %104
  call void @_ZN7testing8internal12ReturnActionIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  br label %113

113:                                              ; preds = %112, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %114

114:                                              ; preds = %113, %96
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @_ZN7testing8internal8MockSpecIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #7
  br label %115

115:                                              ; preds = %114, %92
  call void @_ZN7testing8internal11MatcherBaseIlED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  br label %116

116:                                              ; preds = %115, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @_ZN7testing8internal11MatcherBaseIPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  br label %117

117:                                              ; preds = %116, %84
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #7
  br label %118

118:                                              ; preds = %117, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %123

119:                                              ; preds = %67
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %9, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %10, align 4
  br label %123

123:                                              ; preds = %119, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  br label %124

124:                                              ; preds = %123, %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %125

125:                                              ; preds = %124, %72
  call void @llvm.lifetime.end.p0(i64 272, ptr %8) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %7) #7
  call void @llvm.lifetime.end.p0(i64 136, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %9, align 8
  %128 = load i32, ptr %10, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130

131:                                              ; preds = %69
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail9max_valueImEET_v() #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail9max_valueIlEET_v() #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN11test_bufferC2Em(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufC2Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamC1ERZNS_8TestBodyEvE14mock_streambuf(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #1 align 2

declare void @_ZN7testing10InSequenceC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambuf12gmock_xsputnERKN7testing7MatcherIPKvEERKNS2_IlEE(ptr dead_on_unwind noalias writable sret(%"class.testing::internal::MockSpec") align 8, ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

declare void @_ZN7testing8internal18GetWithoutMatchersEv() #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal8MockSpecIFlPKvlEE18InternalExpectedAtEPKciS7_S7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal16TypedExpectationIFlPKvlEE8WillOnceERKNS_6ActionIS4_EE(ptr noundef nonnull align 8 dereferenceable(344), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing6ReturnIlEENS_8internal12ReturnActionIT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.testing::internal::ReturnAction") align 8, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7testing8internal12ReturnActionIlEcvNS_6ActionIT_EEIFlPKvlEEEv(ptr dead_on_unwind noalias writable sret(%"class.testing::Action") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #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 = { 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 = { 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 #7 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

%struct.test_buffer = type { %"class.fmt::v10::detail::buffer" }
%"class.fmt::v10::detail::buffer" = type { ptr, ptr, i64, i64 }
%struct.mock_streambuf = type { %"class.std::basic_streambuf", %"class.testing::internal::FunctionMocker" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.testing::internal::FunctionMocker" = type { %"class.testing::internal::UntypedFunctionMockerBase" }
%"class.testing::internal::UntypedFunctionMockerBase" = type { ptr, ptr, ptr, %"class.std::vector", %"class.std::vector.29" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl" }
%"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const void *, std::allocator<const void *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<testing::internal::ExpectationBase>, std::allocator<std::shared_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.test_ostream = type { %"class.std::basic_ostream.base", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.testing::InSequence" = type { i8 }
%"class.testing::internal::MockSpec" = type { ptr, %"class.std::tuple.34" }
%"class.std::tuple.34" = type { %"struct.std::_Tuple_impl.35" }
%"struct.std::_Tuple_impl.35" = type { %"struct.std::_Tuple_impl.36", %"struct.std::_Head_base.38" }
%"struct.std::_Tuple_impl.36" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { %"class.testing::Matcher" }
%"class.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<long>::Buffer" }
%"class.testing::MatcherDescriberInterface" = type { ptr }
%"union.testing::internal::MatcherBase<long>::Buffer" = type { ptr }
%"struct.std::_Head_base.38" = type { %"class.testing::Matcher.39" }
%"class.testing::Matcher.39" = type { %"class.testing::internal::MatcherBase.40" }
%"class.testing::internal::MatcherBase.40" = type { %"class.testing::MatcherDescriberInterface", ptr, %"union.testing::internal::MatcherBase<const void *>::Buffer" }
%"union.testing::internal::MatcherBase<const void *>::Buffer" = type { ptr }
%"class.testing::internal::WithoutMatchers" = type { i8 }
%"class.testing::Action" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.testing::internal::ReturnAction" = type { %"class.std::shared_ptr.46" }
%"class.std::shared_ptr.46" = type { %"class.std::__shared_ptr.47" }
%"class.std::__shared_ptr.47" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [46 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 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 @_ZN3fmt3v106detail12write_bufferIcEEvRSt13basic_ostreamIT_St11char_traitsIS4_EERNS1_6bufferIS4_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.test_buffer, align 8
  %3 = alloca %struct.mock_streambuf, align 8
  %4 = alloca %struct.test_ostream, align 8
  %5 = alloca %"class.testing::InSequence", align 1
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.testing::internal::MockSpec", align 8
  %9 = alloca %"class.testing::Matcher.39", align 8
  %10 = alloca %"class.testing::Matcher", align 8
  %11 = alloca %"class.testing::internal::WithoutMatchers", align 1
  %12 = alloca %"class.testing::Action", align 8
  %13 = alloca %"class.testing::internal::ReturnAction", align 8
  %14 = tail call noundef i64 @_ZN3fmt3v106detail9max_valueImEET_v()
  %15 = tail call noundef i64 @_ZN3fmt3v106detail9max_valueIlEET_v()
  %16 = tail call noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef %15)
  %.not = icmp ugt i64 %14, %16
  br i1 %.not, label %17, label %41

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN11test_bufferC2Em(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %14)
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %3) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %3)
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %4) #7
  invoke void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamC1ERZNS_8TestBodyEvE14mock_streambuf(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(136) %3)
          to label %18 unwind label %42

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  invoke void @_ZN7testing10InSequenceC1Ev(ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %19 unwind label %44

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 %14, ptr %6, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %35, %19
  %.0 = phi ptr [ null, %19 ], [ %36, %35 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %21 = invoke noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef %15)
          to label %22 unwind label %46

22:                                               ; preds = %20
  store i64 %21, ptr %7, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %24 = load i64, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  invoke void @_ZN7testing7MatcherIPKvEC2ES2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %.0)
          to label %25 unwind label %48

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  invoke void @_ZN7testing7MatcherIlEC2El(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %24)
          to label %26 unwind label %50

26:                                               ; preds = %25
  invoke void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambuf12gmock_xsputnERKN7testing7MatcherIPKvEERKNS2_IlEE(ptr dead_on_unwind nonnull writable sret(%"class.testing::internal::MockSpec") align 8 %8, ptr noundef nonnull align 8 dereferenceable(136) %3, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %27 unwind label %52

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  invoke void @_ZN7testing8internal18GetWithoutMatchersEv()
          to label %28 unwind label %54

28:                                               ; preds = %27
  %29 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZN7testing8internal8MockSpecIFlPKvlEEclERKNS0_15WithoutMatchersEPv(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef null)
  %30 = invoke noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal8MockSpecIFlPKvlEE18InternalExpectedAtEPKciS7_S7_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull @.str.5, i32 noundef 161, ptr noundef nonnull @.str.98, ptr noundef nonnull @.str.99)
          to label %31 unwind label %54

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  invoke void @_ZN7testing6ReturnIlEENS_8internal12ReturnActionIT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.testing::internal::ReturnAction") align 8 %13, i64 noundef %15)
          to label %32 unwind label %56

32:                                               ; preds = %31
  invoke void @_ZNK7testing8internal12ReturnActionIlEcvNS_6ActionIT_EEIFlPKvlEEEv(ptr dead_on_unwind nonnull writable sret(%"class.testing::Action") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %33 unwind label %58

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal16TypedExpectationIFlPKvlEE8WillOnceERKNS_6ActionIS4_EE(ptr noundef nonnull align 8 dereferenceable(344) %30, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %35 unwind label %60

35:                                               ; preds = %33
  call void @_ZN7testing6ActionIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZN7testing8internal12ReturnActionIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @_ZN7testing8internal8MockSpecIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @_ZN7testing8internal11MatcherBaseIlED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @_ZN7testing8internal11MatcherBaseIPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #7
  %36 = getelementptr inbounds i8, ptr %.0, i64 %24
  %37 = load i64, ptr %6, align 8, !tbaa !5
  %38 = sub i64 %37, %24
  store i64 %38, ptr %6, align 8, !tbaa !5
  %.not32 = icmp eq i64 %37, %24
  br i1 %.not32, label %39, label %20, !llvm.loop !9

39:                                               ; preds = %35
  invoke void @_ZN3fmt3v106detail12write_bufferIcEEvRSt13basic_ostreamIT_St11char_traitsIS4_EERNS1_6bufferIS4_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %40 unwind label %68

40:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %3) #7
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %41

41:                                               ; preds = %1, %40
  ret void

42:                                               ; preds = %17
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %72

44:                                               ; preds = %18
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %71

46:                                               ; preds = %20
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %70

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

50:                                               ; preds = %25
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %66

52:                                               ; preds = %26
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %65

54:                                               ; preds = %28, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %64

56:                                               ; preds = %31
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %32
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %33
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing6ActionIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %62

62:                                               ; preds = %60, %58
  %.pn = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @_ZN7testing8internal12ReturnActionIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %63

63:                                               ; preds = %62, %56
  %.pn.pn = phi { ptr, i32 } [ %.pn, %62 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %64

64:                                               ; preds = %63, %54
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %63 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @_ZN7testing8internal8MockSpecIFlPKvlEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  br label %65

65:                                               ; preds = %64, %52
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %64 ], [ %53, %52 ]
  call void @_ZN7testing8internal11MatcherBaseIlED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %66

66:                                               ; preds = %65, %50
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %65 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @_ZN7testing8internal11MatcherBaseIPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %67

67:                                               ; preds = %66, %48
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %66 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #7
  br label %70

68:                                               ; preds = %39
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %70

70:                                               ; preds = %46, %67, %68
  %.pn33 = phi { ptr, i32 } [ %69, %68 ], [ %.pn.pn.pn.pn.pn.pn, %67 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  br label %71

71:                                               ; preds = %70, %44
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %70 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %72

72:                                               ; preds = %71, %42
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %71 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #7
  call void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufD2Ev(ptr noundef nonnull align 8 dereferenceable(136) %3) #7
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn33.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail9max_valueImEET_v() local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail9max_valueIlEET_v() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN11test_bufferC2Em(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambufC2Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN12test_ostreamC1ERZNS_8TestBodyEvE14mock_streambuf(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #1 align 2

declare void @_ZN7testing10InSequenceC1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN43ostream_test_write_to_ostream_max_size_Test8TestBodyEvEN14mock_streambuf12gmock_xsputnERKN7testing7MatcherIPKvEERKNS2_IlEE(ptr dead_on_unwind noalias writable sret(%"class.testing::internal::MockSpec") align 8, ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZN7testing8internal8MockSpecIFlPKvlEEclERKNS0_15WithoutMatchersEPv(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) local_unnamed_addr #2 align 2

declare void @_ZN7testing8internal18GetWithoutMatchersEv() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal8MockSpecIFlPKvlEE18InternalExpectedAtEPKciS7_S7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(344) ptr @_ZN7testing8internal16TypedExpectationIFlPKvlEE8WillOnceERKNS_6ActionIS4_EE(ptr noundef nonnull align 8 dereferenceable(344), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing6ReturnIlEENS_8internal12ReturnActionIT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.testing::internal::ReturnAction") align 8, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7testing8internal12ReturnActionIlEcvNS_6ActionIT_EEIFlPKvlEEEv(ptr dead_on_unwind noalias writable sret(%"class.testing::Action") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN7testing10InSequenceD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #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 = { 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 = { 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 #7 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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