; LLVM IR from chensoft/libsocket :: lib/libchen/test/lib/googletest/googlemock/test (gmock_link2_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::internal::AnythingMatcher" = type { i8 }
%"class.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { ptr, %"class.testing::internal::linked_ptr" }
%"class.testing::internal::linked_ptr" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::linked_ptr_internal" = type { ptr }
%class.Mock = type { %class.Interface, %"class.testing::internal::FunctionMocker", %"class.testing::internal::FunctionMocker.8", %"class.testing::internal::FunctionMocker.11", %"class.testing::internal::FunctionMocker.14", %"class.testing::internal::FunctionMocker.17", %"class.testing::internal::FunctionMocker.26", %"class.testing::internal::FunctionMocker.35", %"class.testing::internal::FunctionMocker.44", %"class.testing::internal::FunctionMocker.53" }
%class.Interface = type { ptr }
%"class.testing::internal::FunctionMocker" = type { %"class.testing::internal::FunctionMockerBase" }
%"class.testing::internal::FunctionMockerBase" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec" }
%"class.testing::internal::UntypedFunctionMockerBase" = type { ptr, ptr, ptr, %"class.std::vector", %"class.std::vector.3" }
%"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" }
%"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" = type { %"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.testing::internal::MockSpec" = type { ptr, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.testing::Matcher" }
%"class.testing::internal::FunctionMocker.8" = type { %"class.testing::internal::FunctionMockerBase.9" }
%"class.testing::internal::FunctionMockerBase.9" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.10" }
%"class.testing::internal::MockSpec.10" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.11" = type { %"class.testing::internal::FunctionMockerBase.12" }
%"class.testing::internal::FunctionMockerBase.12" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.13" }
%"class.testing::internal::MockSpec.13" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.14" = type { %"class.testing::internal::FunctionMockerBase.15" }
%"class.testing::internal::FunctionMockerBase.15" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.16" }
%"class.testing::internal::MockSpec.16" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.17" = type { %"class.testing::internal::FunctionMockerBase.18" }
%"class.testing::internal::FunctionMockerBase.18" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.19" }
%"class.testing::internal::MockSpec.19" = type { ptr, %"class.std::tuple.20" }
%"class.std::tuple.20" = type { %"struct.std::_Tuple_impl.21" }
%"struct.std::_Tuple_impl.21" = type { %"struct.std::_Head_base.22" }
%"struct.std::_Head_base.22" = type { %"class.testing::Matcher.23" }
%"class.testing::Matcher.23" = type { %"class.testing::internal::MatcherBase.24" }
%"class.testing::internal::MatcherBase.24" = type { ptr, %"class.testing::internal::linked_ptr.25" }
%"class.testing::internal::linked_ptr.25" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.26" = type { %"class.testing::internal::FunctionMockerBase.27" }
%"class.testing::internal::FunctionMockerBase.27" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.28" }
%"class.testing::internal::MockSpec.28" = type { ptr, %"class.std::tuple.29" }
%"class.std::tuple.29" = type { %"struct.std::_Tuple_impl.30" }
%"struct.std::_Tuple_impl.30" = type { %"struct.std::_Head_base.31" }
%"struct.std::_Head_base.31" = type { %"class.testing::Matcher.32" }
%"class.testing::Matcher.32" = type { %"class.testing::internal::MatcherBase.33" }
%"class.testing::internal::MatcherBase.33" = type { ptr, %"class.testing::internal::linked_ptr.34" }
%"class.testing::internal::linked_ptr.34" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.35" = type { %"class.testing::internal::FunctionMockerBase.36" }
%"class.testing::internal::FunctionMockerBase.36" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.37" }
%"class.testing::internal::MockSpec.37" = type { ptr, %"class.std::tuple.38" }
%"class.std::tuple.38" = type { %"struct.std::_Tuple_impl.39" }
%"struct.std::_Tuple_impl.39" = type { %"struct.std::_Head_base.40" }
%"struct.std::_Head_base.40" = type { %"class.testing::Matcher.41" }
%"class.testing::Matcher.41" = type { %"class.testing::internal::MatcherBase.42" }
%"class.testing::internal::MatcherBase.42" = type { ptr, %"class.testing::internal::linked_ptr.43" }
%"class.testing::internal::linked_ptr.43" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.44" = type { %"class.testing::internal::FunctionMockerBase.45" }
%"class.testing::internal::FunctionMockerBase.45" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.46" }
%"class.testing::internal::MockSpec.46" = type { ptr, %"class.std::tuple.47" }
%"class.std::tuple.47" = type { %"struct.std::_Tuple_impl.48" }
%"struct.std::_Tuple_impl.48" = type { %"struct.std::_Head_base.49" }
%"struct.std::_Head_base.49" = type { %"class.testing::Matcher.50" }
%"class.testing::Matcher.50" = type { %"class.testing::internal::MatcherBase.51" }
%"class.testing::internal::MatcherBase.51" = type { ptr, %"class.testing::internal::linked_ptr.52" }
%"class.testing::internal::linked_ptr.52" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.53" = type { %"class.testing::internal::FunctionMockerBase.54" }
%"class.testing::internal::FunctionMockerBase.54" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.55" }
%"class.testing::internal::MockSpec.55" = type { ptr, %"class.std::tuple.56" }
%"class.std::tuple.56" = type { %"struct.std::_Tuple_impl.57" }
%"struct.std::_Tuple_impl.57" = type { %"struct.std::_Head_base.58" }
%"struct.std::_Head_base.58" = type { %"class.testing::Matcher.59" }
%"class.testing::Matcher.59" = type { %"class.testing::internal::MatcherBase.60" }
%"class.testing::internal::MatcherBase.60" = type { ptr, %"class.testing::internal::linked_ptr.61" }
%"class.testing::internal::linked_ptr.61" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::Action.87" = type { %"class.testing::internal::linked_ptr.88" }
%"class.testing::internal::linked_ptr.88" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::PolymorphicAction.89" = type { %"class.testing::internal::SetErrnoAndReturnAction" }
%"class.testing::internal::SetErrnoAndReturnAction" = type { i32, i32 }

@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1
@_ZN7testingL1_E = external hidden constant %"class.testing::internal::AnythingMatcher", align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [17 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 @_ZN4MockC2Ev(ptr noundef nonnull align 8 dereferenceable(944)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36LinkTest2_TestSetErrnoAndReturn_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 %class.Mock, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.testing::Matcher", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.testing::Action.87", align 8
  %9 = alloca %"class.testing::PolymorphicAction.89", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 944, ptr %3) #5
  call void @_ZN4MockC2Ev(ptr noundef nonnull align 8 dereferenceable(944) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %11 = call ptr @__errno_location() #6
  %12 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %12, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  invoke void @_ZNK7testing8internal15AnythingMatchercvNS_7MatcherIT_EEIPcEEv(ptr dead_on_unwind writable sret(%"class.testing::Matcher") align 8 %5, ptr noundef nonnull align 1 dereferenceable(1) @_ZN7testingL1_E)
          to label %13 unwind label %28

13:                                               ; preds = %1
  %14 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN4Mock19gmock_IntFromStringERKN7testing7MatcherIPcEE(ptr noundef nonnull align 8 dereferenceable(944) %3, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %15 unwind label %32

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal8MockSpecIFiPcEE18InternalExpectedAtEPKciS6_S6_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.3, i32 noundef 311, ptr noundef @.str.4, ptr noundef @.str.22)
          to label %17 unwind label %32

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %18 = invoke i64 @_ZN7testing17SetErrnoAndReturnIiEENS_17PolymorphicActionINS_8internal23SetErrnoAndReturnActionIT_EEEEiS4_(i32 noundef 1, i32 noundef -1)
          to label %19 unwind label %36

19:                                               ; preds = %17
  %20 = getelementptr inbounds %"class.testing::PolymorphicAction.89", ptr %9, i32 0, i32 0
  store i64 %18, ptr %20, align 4
  invoke void @_ZNK7testing17PolymorphicActionINS_8internal23SetErrnoAndReturnActionIiEEEcvNS_6ActionIT_EEIFiPcEEEv(ptr dead_on_unwind writable sret(%"class.testing::Action.87") align 8 %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %21 unwind label %36

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal16TypedExpectationIFiPcEE8WillOnceERKNS_6ActionIS3_EE(ptr noundef nonnull align 8 dereferenceable(304) %16, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %23 unwind label %40

23:                                               ; preds = %21
  call void @_ZN7testing6ActionIFiPcEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @_ZN7testing8internal11MatcherBaseIPcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  %24 = invoke noundef i32 @_ZN4Mock13IntFromStringEPc(ptr noundef nonnull align 8 dereferenceable(944) %3, ptr noundef null)
          to label %25 unwind label %47

25:                                               ; preds = %23
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = call ptr @__errno_location() #6
  store i32 %26, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @_ZN4MockD2Ev(ptr noundef nonnull align 8 dereferenceable(944) %3) #5
  call void @llvm.lifetime.end.p0(i64 944, ptr %3) #5
  ret void

28:                                               ; preds = %1
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %7, align 4
  br label %46

32:                                               ; preds = %15, %13
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  br label %45

36:                                               ; preds = %19, %17
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %44

40:                                               ; preds = %21
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  call void @_ZN7testing6ActionIFiPcEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %44

44:                                               ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %45

45:                                               ; preds = %44, %32
  call void @_ZN7testing8internal11MatcherBaseIPcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %46

46:                                               ; preds = %45, %28
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %51

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  br label %51

51:                                               ; preds = %47, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @_ZN4MockD2Ev(ptr noundef nonnull align 8 dereferenceable(944) %3) #5
  call void @llvm.lifetime.end.p0(i64 944, ptr %3) #5
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %6, align 8
  %54 = load i32, ptr %7, align 4
  %55 = insertvalue { ptr, i32 } poison, ptr %53, 0
  %56 = insertvalue { ptr, i32 } %55, i32 %54, 1
  resume { ptr, i32 } %56
}

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal16TypedExpectationIFiPcEE8WillOnceERKNS_6ActionIS3_EE(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN7testing17SetErrnoAndReturnIiEENS_17PolymorphicActionINS_8internal23SetErrnoAndReturnActionIT_EEEEiS4_(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Mock13IntFromStringEPc(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef) unnamed_addr #1 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 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 = { nounwind willreturn memory(none) "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 }
attributes #6 = { nounwind willreturn memory(none) }

!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}


; 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::internal::AnythingMatcher" = type { i8 }
%"class.testing::Matcher" = type { %"class.testing::internal::MatcherBase" }
%"class.testing::internal::MatcherBase" = type { ptr, %"class.testing::internal::linked_ptr" }
%"class.testing::internal::linked_ptr" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::linked_ptr_internal" = type { ptr }
%class.Mock = type { %class.Interface, %"class.testing::internal::FunctionMocker", %"class.testing::internal::FunctionMocker.8", %"class.testing::internal::FunctionMocker.11", %"class.testing::internal::FunctionMocker.14", %"class.testing::internal::FunctionMocker.17", %"class.testing::internal::FunctionMocker.26", %"class.testing::internal::FunctionMocker.35", %"class.testing::internal::FunctionMocker.44", %"class.testing::internal::FunctionMocker.53" }
%class.Interface = type { ptr }
%"class.testing::internal::FunctionMocker" = type { %"class.testing::internal::FunctionMockerBase" }
%"class.testing::internal::FunctionMockerBase" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec" }
%"class.testing::internal::UntypedFunctionMockerBase" = type { ptr, ptr, ptr, %"class.std::vector", %"class.std::vector.3" }
%"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" }
%"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl" = type { %"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<testing::internal::linked_ptr<testing::internal::ExpectationBase>, std::allocator<testing::internal::linked_ptr<testing::internal::ExpectationBase>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.testing::internal::MockSpec" = type { ptr, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.testing::Matcher" }
%"class.testing::internal::FunctionMocker.8" = type { %"class.testing::internal::FunctionMockerBase.9" }
%"class.testing::internal::FunctionMockerBase.9" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.10" }
%"class.testing::internal::MockSpec.10" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.11" = type { %"class.testing::internal::FunctionMockerBase.12" }
%"class.testing::internal::FunctionMockerBase.12" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.13" }
%"class.testing::internal::MockSpec.13" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.14" = type { %"class.testing::internal::FunctionMockerBase.15" }
%"class.testing::internal::FunctionMockerBase.15" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.16" }
%"class.testing::internal::MockSpec.16" = type { ptr, %"class.std::tuple" }
%"class.testing::internal::FunctionMocker.17" = type { %"class.testing::internal::FunctionMockerBase.18" }
%"class.testing::internal::FunctionMockerBase.18" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.19" }
%"class.testing::internal::MockSpec.19" = type { ptr, %"class.std::tuple.20" }
%"class.std::tuple.20" = type { %"struct.std::_Tuple_impl.21" }
%"struct.std::_Tuple_impl.21" = type { %"struct.std::_Head_base.22" }
%"struct.std::_Head_base.22" = type { %"class.testing::Matcher.23" }
%"class.testing::Matcher.23" = type { %"class.testing::internal::MatcherBase.24" }
%"class.testing::internal::MatcherBase.24" = type { ptr, %"class.testing::internal::linked_ptr.25" }
%"class.testing::internal::linked_ptr.25" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.26" = type { %"class.testing::internal::FunctionMockerBase.27" }
%"class.testing::internal::FunctionMockerBase.27" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.28" }
%"class.testing::internal::MockSpec.28" = type { ptr, %"class.std::tuple.29" }
%"class.std::tuple.29" = type { %"struct.std::_Tuple_impl.30" }
%"struct.std::_Tuple_impl.30" = type { %"struct.std::_Head_base.31" }
%"struct.std::_Head_base.31" = type { %"class.testing::Matcher.32" }
%"class.testing::Matcher.32" = type { %"class.testing::internal::MatcherBase.33" }
%"class.testing::internal::MatcherBase.33" = type { ptr, %"class.testing::internal::linked_ptr.34" }
%"class.testing::internal::linked_ptr.34" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.35" = type { %"class.testing::internal::FunctionMockerBase.36" }
%"class.testing::internal::FunctionMockerBase.36" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.37" }
%"class.testing::internal::MockSpec.37" = type { ptr, %"class.std::tuple.38" }
%"class.std::tuple.38" = type { %"struct.std::_Tuple_impl.39" }
%"struct.std::_Tuple_impl.39" = type { %"struct.std::_Head_base.40" }
%"struct.std::_Head_base.40" = type { %"class.testing::Matcher.41" }
%"class.testing::Matcher.41" = type { %"class.testing::internal::MatcherBase.42" }
%"class.testing::internal::MatcherBase.42" = type { ptr, %"class.testing::internal::linked_ptr.43" }
%"class.testing::internal::linked_ptr.43" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.44" = type { %"class.testing::internal::FunctionMockerBase.45" }
%"class.testing::internal::FunctionMockerBase.45" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.46" }
%"class.testing::internal::MockSpec.46" = type { ptr, %"class.std::tuple.47" }
%"class.std::tuple.47" = type { %"struct.std::_Tuple_impl.48" }
%"struct.std::_Tuple_impl.48" = type { %"struct.std::_Head_base.49" }
%"struct.std::_Head_base.49" = type { %"class.testing::Matcher.50" }
%"class.testing::Matcher.50" = type { %"class.testing::internal::MatcherBase.51" }
%"class.testing::internal::MatcherBase.51" = type { ptr, %"class.testing::internal::linked_ptr.52" }
%"class.testing::internal::linked_ptr.52" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::internal::FunctionMocker.53" = type { %"class.testing::internal::FunctionMockerBase.54" }
%"class.testing::internal::FunctionMockerBase.54" = type { %"class.testing::internal::UntypedFunctionMockerBase", %"class.testing::internal::MockSpec.55" }
%"class.testing::internal::MockSpec.55" = type { ptr, %"class.std::tuple.56" }
%"class.std::tuple.56" = type { %"struct.std::_Tuple_impl.57" }
%"struct.std::_Tuple_impl.57" = type { %"struct.std::_Head_base.58" }
%"struct.std::_Head_base.58" = type { %"class.testing::Matcher.59" }
%"class.testing::Matcher.59" = type { %"class.testing::internal::MatcherBase.60" }
%"class.testing::internal::MatcherBase.60" = type { ptr, %"class.testing::internal::linked_ptr.61" }
%"class.testing::internal::linked_ptr.61" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::Action.87" = type { %"class.testing::internal::linked_ptr.88" }
%"class.testing::internal::linked_ptr.88" = type { ptr, %"class.testing::internal::linked_ptr_internal" }
%"class.testing::PolymorphicAction.89" = type { %"class.testing::internal::SetErrnoAndReturnAction" }
%"class.testing::internal::SetErrnoAndReturnAction" = type { i32, i32 }

@.str.3 = external hidden unnamed_addr constant [118 x i8], align 1
@_ZN7testingL1_E = external hidden constant %"class.testing::internal::AnythingMatcher", align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [17 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 @_ZN4MockC2Ev(ptr noundef nonnull align 8 dereferenceable(944)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN36LinkTest2_TestSetErrnoAndReturn_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.Mock, align 8
  %3 = alloca %"class.testing::Matcher", align 8
  %4 = alloca %"class.testing::Action.87", align 8
  %5 = alloca %"class.testing::PolymorphicAction.89", align 8
  call void @llvm.lifetime.start.p0(i64 944, ptr nonnull %2) #5
  call void @_ZN4MockC2Ev(ptr noundef nonnull align 8 dereferenceable(944) %2)
  %6 = tail call ptr @__errno_location() #6
  %7 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  invoke void @_ZNK7testing8internal15AnythingMatchercvNS_7MatcherIT_EEIPcEEv(ptr dead_on_unwind nonnull writable sret(%"class.testing::Matcher") align 8 %3, ptr noundef nonnull align 1 dereferenceable(1) @_ZN7testingL1_E)
          to label %8 unwind label %20

8:                                                ; preds = %1
  %9 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN4Mock19gmock_IntFromStringERKN7testing7MatcherIPcEE(ptr noundef nonnull align 8 dereferenceable(944) %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %10 unwind label %22

10:                                               ; preds = %8
  %11 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal8MockSpecIFiPcEE18InternalExpectedAtEPKciS6_S6_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.3, i32 noundef 311, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.22)
          to label %12 unwind label %22

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %13 = invoke i64 @_ZN7testing17SetErrnoAndReturnIiEENS_17PolymorphicActionINS_8internal23SetErrnoAndReturnActionIT_EEEEiS4_(i32 noundef 1, i32 noundef -1)
          to label %14 unwind label %24

14:                                               ; preds = %12
  store i64 %13, ptr %5, align 8
  invoke void @_ZNK7testing17PolymorphicActionINS_8internal23SetErrnoAndReturnActionIiEEEcvNS_6ActionIT_EEIFiPcEEEv(ptr dead_on_unwind nonnull writable sret(%"class.testing::Action.87") align 8 %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %15 unwind label %24

15:                                               ; preds = %14
  %16 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal16TypedExpectationIFiPcEE8WillOnceERKNS_6ActionIS3_EE(ptr noundef nonnull align 8 dereferenceable(304) %11, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %17 unwind label %26

17:                                               ; preds = %15
  call void @_ZN7testing6ActionIFiPcEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @_ZN7testing8internal11MatcherBaseIPcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  %18 = invoke noundef i32 @_ZN4Mock13IntFromStringEPc(ptr noundef nonnull align 8 dereferenceable(944) %2, ptr noundef null)
          to label %19 unwind label %31

19:                                               ; preds = %17
  store i32 %7, ptr %6, align 4, !tbaa !5
  call void @_ZN4MockD2Ev(ptr noundef nonnull align 8 dereferenceable(944) %2) #5
  call void @llvm.lifetime.end.p0(i64 944, ptr nonnull %2) #5
  ret void

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

22:                                               ; preds = %10, %8
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %29

24:                                               ; preds = %14, %12
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing6ActionIFiPcEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %29

29:                                               ; preds = %28, %22
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %23, %22 ]
  call void @_ZN7testing8internal11MatcherBaseIPcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %30

30:                                               ; preds = %29, %20
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %29 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %33

31:                                               ; preds = %17
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %33

33:                                               ; preds = %31, %30
  %.pn10 = phi { ptr, i32 } [ %32, %31 ], [ %.pn.pn.pn, %30 ]
  call void @_ZN4MockD2Ev(ptr noundef nonnull align 8 dereferenceable(944) %2) #5
  call void @llvm.lifetime.end.p0(i64 944, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn10
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZN7testing8internal8MockSpecIFiPcEE18InternalExpectedAtEPKciS6_S6_(ptr noundef nonnull align 8 dereferenceable(32), 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(304) ptr @_ZN7testing8internal16TypedExpectationIFiPcEE8WillOnceERKNS_6ActionIS3_EE(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4Mock13IntFromStringEPc(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef) unnamed_addr #1 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 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 }
attributes #6 = { nounwind willreturn memory(none) }

!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"}


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