; LLVM IR from jrl-umi3218/tvm :: tests/DependencyGraph.ll (ZN7doctest6detail14MessageBuilder3logEv)

; 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.doctest::String" = type { %union.anon }
%union.anon = type { %"struct.doctest::String::view", [8 x i8] }
%"struct.doctest::String::view" = type { ptr, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.doctest::detail::MessageBuilder" = type <{ %"struct.doctest::MessageData", ptr, i8, [7 x i8] }>
%"struct.doctest::MessageData" = type { %"class.doctest::String", ptr, i32, i32 }
%"struct.doctest::detail::ContextState" = type <{ %"struct.doctest::ContextOptions.base", i8, %"struct.doctest::TestRunStats", %"struct.doctest::CurrentTestCaseStats", %"class.doctest::detail::MultiLaneAtomic", %"class.doctest::detail::MultiLaneAtomic", %"class.std::vector.4", %"class.std::vector.9", ptr, %"struct.doctest::detail::Timer", %"class.std::vector.14", %"class.std::vector.19", %"class.std::set", i32, i8, %"struct.std::atomic.27", [2 x i8] }>
%"struct.doctest::ContextOptions.base" = type <{ ptr, %"class.doctest::String", ptr, %"class.doctest::String", %"class.doctest::String", i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }>
%"struct.doctest::TestRunStats" = type { i32, i32, i32, i32, i32, i32 }
%"struct.doctest::CurrentTestCaseStats" = type { i32, i32, double, i32, i8 }
%"class.doctest::detail::MultiLaneAtomic" = type { [32 x %"struct.doctest::detail::MultiLaneAtomic<int>::CacheLineAlignedAtomic"] }
%"struct.doctest::detail::MultiLaneAtomic<int>::CacheLineAlignedAtomic" = type { %"struct.std::atomic", [60 x i8] }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::vector<doctest::String>, std::allocator<std::vector<doctest::String>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<doctest::String>, std::allocator<std::vector<doctest::String>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<doctest::String>, std::allocator<std::vector<doctest::String>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<doctest::String>, std::allocator<std::vector<doctest::String>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<doctest::IReporter *, std::allocator<doctest::IReporter *>>::_Vector_impl" }
%"struct.std::_Vector_base<doctest::IReporter *, std::allocator<doctest::IReporter *>>::_Vector_impl" = type { %"struct.std::_Vector_base<doctest::IReporter *, std::allocator<doctest::IReporter *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<doctest::IReporter *, std::allocator<doctest::IReporter *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.doctest::detail::Timer" = type { i64 }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<doctest::String, std::allocator<doctest::String>>::_Vector_impl" }
%"struct.std::_Vector_base<doctest::String, std::allocator<doctest::String>>::_Vector_impl" = type { %"struct.std::_Vector_base<doctest::String, std::allocator<doctest::String>>::_Vector_impl_data" }
%"struct.std::_Vector_base<doctest::String, std::allocator<doctest::String>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<doctest::SubcaseSignature, std::allocator<doctest::SubcaseSignature>>::_Vector_impl" }
%"struct.std::_Vector_base<doctest::SubcaseSignature, std::allocator<doctest::SubcaseSignature>>::_Vector_impl" = type { %"struct.std::_Vector_base<doctest::SubcaseSignature, std::allocator<doctest::SubcaseSignature>>::_Vector_impl_data" }
%"struct.std::_Vector_base<doctest::SubcaseSignature, std::allocator<doctest::SubcaseSignature>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::vector<doctest::SubcaseSignature>, std::vector<doctest::SubcaseSignature>, std::_Identity<std::vector<doctest::SubcaseSignature>>, std::less<std::vector<doctest::SubcaseSignature>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::vector<doctest::SubcaseSignature>, std::vector<doctest::SubcaseSignature>, std::_Identity<std::vector<doctest::SubcaseSignature>>, std::less<std::vector<doctest::SubcaseSignature>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::atomic.27" = type { %"struct.std::__atomic_base.28" }
%"struct.std::__atomic_base.28" = type { i8 }
%"struct.doctest::ContextOptions" = type <{ ptr, %"class.doctest::String", ptr, %"class.doctest::String", %"class.doctest::String", i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }>
%"struct.doctest::TestCaseData" = type { %"class.doctest::String", i32, ptr, ptr, ptr, i8, i8, i8, i8, i8, i32, double }

@_ZN7doctest6detail4g_csE = external dso_local global ptr, align 8

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

; 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 @_ZN7doctest6detail7tlssPopEv(ptr dead_on_unwind noalias writable sret(%"class.doctest::String") align 8) #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7doctest17getContextOptionsEv() #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv() #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7doctest6detail14MessageBuilder3logEv(ptr noundef nonnull align 8 dereferenceable(49) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.doctest::String", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %"struct.doctest::detail::MessageBuilder", ptr %11, i32 0, i32 2
  %13 = load i8, ptr %12, align 8, !tbaa !9, !range !16, !noundef !17
  %14 = trunc i8 %13 to i1
  br i1 %14, label %24, label %15

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  call void @_ZN7doctest6detail7tlssPopEv(ptr dead_on_unwind writable sret(%"class.doctest::String") align 8 %3)
  %16 = getelementptr inbounds %"struct.doctest::MessageData", ptr %11, i32 0, i32 0
  %17 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7doctest6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %18 unwind label %20

18:                                               ; preds = %15
  call void @_ZN7doctest6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  %19 = getelementptr inbounds %"struct.doctest::detail::MessageBuilder", ptr %11, i32 0, i32 2
  store i8 1, ptr %19, align 8, !tbaa !9
  br label %24

20:                                               ; preds = %15
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %4, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %5, align 4
  call void @_ZN7doctest6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  br label %85

24:                                               ; preds = %18, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %25 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.doctest::detail::ContextState", ptr %25, i32 0, i32 7
  store ptr %26, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  br label %33

33:                                               ; preds = %43, %24
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %34, label %36, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %45

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  store ptr %37, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = getelementptr inbounds ptr, ptr %40, i64 10
  %42 = load ptr, ptr %41, align 8
  call void %42(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(40) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %43

43:                                               ; preds = %36
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %33

45:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %46 = getelementptr inbounds %"struct.doctest::MessageData", ptr %11, i32 0, i32 3
  %47 = load i32, ptr %46, align 4, !tbaa !20
  %48 = and i32 %47, 1
  %49 = icmp ne i32 %48, 0
  %50 = zext i1 %49 to i8
  store i8 %50, ptr %10, align 1, !tbaa !21
  %51 = load i8, ptr %10, align 1, !tbaa !21, !range !16, !noundef !17
  %52 = trunc i8 %51 to i1
  br i1 %52, label %58, label %53

53:                                               ; preds = %45
  %54 = getelementptr inbounds %"struct.doctest::MessageData", ptr %11, i32 0, i32 3
  %55 = load i32, ptr %54, align 4, !tbaa !20
  call void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef %55)
  %56 = getelementptr inbounds %"struct.doctest::MessageData", ptr %11, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !20
  call void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef %57)
  br label %58

58:                                               ; preds = %53, %45
  %59 = call noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv()
  br i1 %59, label %60, label %83

60:                                               ; preds = %58
  %61 = call noundef ptr @_ZN7doctest17getContextOptionsEv()
  %62 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %61, i32 0, i32 23
  %63 = load i8, ptr %62, align 1, !tbaa !22, !range !16, !noundef !17
  %64 = trunc i8 %63 to i1
  br i1 %64, label %83, label %65

65:                                               ; preds = %60
  %66 = load i8, ptr %10, align 1, !tbaa !21, !range !16, !noundef !17
  %67 = trunc i8 %66 to i1
  br i1 %67, label %83, label %68

68:                                               ; preds = %65
  %69 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = icmp eq ptr %71, null
  br i1 %72, label %81, label %73

73:                                               ; preds = %68
  %74 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !24
  %77 = getelementptr inbounds %"struct.doctest::TestCaseData", ptr %76, i32 0, i32 6
  %78 = load i8, ptr %77, align 1, !tbaa !25, !range !16, !noundef !17
  %79 = trunc i8 %78 to i1
  %80 = xor i1 %79, true
  br label %81

81:                                               ; preds = %73, %68
  %82 = phi i1 [ true, %68 ], [ %80, %73 ]
  br label %83

83:                                               ; preds = %81, %65, %60, %58
  %84 = phi i1 [ false, %65 ], [ false, %60 ], [ false, %58 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  ret i1 %84

85:                                               ; preds = %20
  %86 = load ptr, ptr %4, align 8
  %87 = load i32, ptr %5, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

declare void @_ZN7doctest6StringD1Ev(ptr)

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 }

!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, !15, i64 48}
!10 = !{!"_ZTSN7doctest6detail14MessageBuilderE", !11, i64 0, !6, i64 40, !15, i64 48}
!11 = !{!"_ZTSN7doctest11MessageDataE", !12, i64 0, !6, i64 24, !13, i64 32, !14, i64 36}
!12 = !{!"_ZTSN7doctest6StringE", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN7doctest10assertType4EnumE", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!11, !14, i64 36}
!21 = !{!15, !15, i64 0}
!22 = !{!23, !15, i64 121}
!23 = !{!"_ZTSN7doctest14ContextOptionsE", !6, i64 0, !12, i64 8, !6, i64 32, !12, i64 40, !12, i64 64, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !15, i64 108, !15, i64 109, !15, i64 110, !15, i64 111, !15, i64 112, !15, i64 113, !15, i64 114, !15, i64 115, !15, i64 116, !15, i64 117, !15, i64 118, !15, i64 119, !15, i64 120, !15, i64 121, !15, i64 122, !15, i64 123, !15, i64 124, !15, i64 125, !15, i64 126, !15, i64 127, !15, i64 128, !15, i64 129, !15, i64 130, !15, i64 131, !15, i64 132, !15, i64 133, !15, i64 134}
!24 = !{!23, !6, i64 32}
!25 = !{!26, !15, i64 57}
!26 = !{!"_ZTSN7doctest12TestCaseDataE", !12, i64 0, !13, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !15, i64 56, !15, i64 57, !15, i64 58, !15, i64 59, !15, i64 60, !13, i64 64, !27, i64 72}
!27 = !{!"double", !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.doctest::String" = type { %union.anon }
%union.anon = type { %"struct.doctest::String::view", [8 x i8] }
%"struct.doctest::String::view" = type { ptr, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZN7doctest6detail4g_csE = external dso_local local_unnamed_addr global ptr, align 8

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

; 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 @_ZN7doctest6detail7tlssPopEv(ptr dead_on_unwind noalias writable sret(%"class.doctest::String") align 8) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7doctest6detail14MessageBuilder3logEv(ptr noundef nonnull align 8 dereferenceable(49) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.doctest::String", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  %6 = load i8, ptr %5, align 8, !tbaa !5, !range !15, !noundef !16
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %13, label %8

8:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZN7doctest6detail7tlssPopEv(ptr dead_on_unwind nonnull writable sret(%"class.doctest::String") align 8 %2)
  %9 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7doctest6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %10 unwind label %11

10:                                               ; preds = %8
  call void @_ZN7doctest6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  store i8 1, ptr %5, align 8, !tbaa !5
  br label %13

11:                                               ; preds = %8
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7doctest6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %12

13:                                               ; preds = %10, %1
  %14 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %14, i64 4304
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %16 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %16, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %17 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %17, ptr %4, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %19 = getelementptr inbounds i8, ptr %0, i64 36
  %20 = load i32, ptr %19, align 4, !tbaa !18
  %21 = and i32 %20, 1
  %.not = icmp ne i32 %21, 0
  br i1 %.not, label %31, label %29

.lr.ph:                                           ; preds = %13, %.lr.ph
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %25 = getelementptr inbounds i8, ptr %24, i64 80
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %28, label %.lr.ph, label %._crit_edge

29:                                               ; preds = %._crit_edge
  call void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef %20)
  %30 = load i32, ptr %19, align 4, !tbaa !18
  call void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef %30)
  br label %31

31:                                               ; preds = %29, %._crit_edge
  %32 = call noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv()
  br i1 %32, label %33, label %48

33:                                               ; preds = %31
  %34 = call noundef ptr @_ZN7doctest17getContextOptionsEv()
  %35 = getelementptr inbounds i8, ptr %34, i64 121
  %36 = load i8, ptr %35, align 1, !tbaa !21, !range !15, !noundef !16
  %37 = trunc nuw i8 %36 to i1
  %brmerge = or i1 %.not, %37
  br i1 %brmerge, label %48, label %38

38:                                               ; preds = %33
  %39 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !17
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  %42 = icmp eq ptr %41, null
  br i1 %42, label %48, label %43

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %41, i64 57
  %45 = load i8, ptr %44, align 1, !tbaa !24, !range !15, !noundef !16
  %46 = trunc nuw i8 %45 to i1
  %47 = xor i1 %46, true
  br label %48

48:                                               ; preds = %33, %38, %43, %31
  %49 = phi i1 [ false, %33 ], [ false, %31 ], [ true, %38 ], [ %47, %43 ]
  ret i1 %49
}

declare void @_ZN7doctest6StringD1Ev(ptr) local_unnamed_addr

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 = { 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, !14, i64 48}
!6 = !{!"_ZTSN7doctest6detail14MessageBuilderE", !7, i64 0, !11, i64 40, !14, i64 48}
!7 = !{!"_ZTSN7doctest11MessageDataE", !8, i64 0, !11, i64 24, !12, i64 32, !13, i64 36}
!8 = !{!"_ZTSN7doctest6StringE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTSN7doctest10assertType4EnumE", !9, i64 0}
!14 = !{!"bool", !9, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!11, !11, i64 0}
!18 = !{!7, !13, i64 36}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !10, i64 0}
!21 = !{!22, !14, i64 121}
!22 = !{!"_ZTSN7doctest14ContextOptionsE", !11, i64 0, !8, i64 8, !11, i64 32, !8, i64 40, !8, i64 64, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !14, i64 108, !14, i64 109, !14, i64 110, !14, i64 111, !14, i64 112, !14, i64 113, !14, i64 114, !14, i64 115, !14, i64 116, !14, i64 117, !14, i64 118, !14, i64 119, !14, i64 120, !14, i64 121, !14, i64 122, !14, i64 123, !14, i64 124, !14, i64 125, !14, i64 126, !14, i64 127, !14, i64 128, !14, i64 129, !14, i64 130, !14, i64 131, !14, i64 132, !14, i64 133, !14, i64 134}
!23 = !{!22, !11, i64 32}
!24 = !{!25, !14, i64 57}
!25 = !{!"_ZTSN7doctest12TestCaseDataE", !8, i64 0, !12, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !14, i64 56, !14, i64 57, !14, i64 58, !14, i64 59, !14, i64 60, !12, i64 64, !26, i64 72}
!26 = !{!"double", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass