; LLVM IR from richgrov/simulo-engine :: src/test_main.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.7 }
%union.anon.7 = 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.9", %"class.std::vector.14", ptr, %"struct.doctest::detail::Timer", %"class.std::vector.19", i8, [7 x i8], %"class.std::vector.24", %"class.std::vector.24", %"class.std::unordered_set", i64, %"struct.std::atomic.34", [7 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.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = 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.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = 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.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = 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::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::atomic.34" = type { %"struct.std::__atomic_base.35" }
%"struct.std::__atomic_base.35" = 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

; Function Attrs: mustprogress nounwind 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)) #2 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 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.doctest::String", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  %10 = getelementptr inbounds %"struct.doctest::detail::MessageBuilder", ptr %9, i32 0, i32 2
  %11 = load i8, ptr %10, align 8, !tbaa !9, !range !16, !noundef !17
  %12 = trunc i8 %11 to i1
  br i1 %12, label %17, label %13

13:                                               ; 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)
  %14 = getelementptr inbounds %"struct.doctest::MessageData", ptr %9, i32 0, i32 0
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7doctest6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @_ZN7doctest6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  %16 = getelementptr inbounds %"struct.doctest::detail::MessageBuilder", ptr %9, i32 0, i32 2
  store i8 1, ptr %16, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %13, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %18 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.doctest::detail::ContextState", ptr %18, i32 0, i32 7
  store ptr %19, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %36, %17
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %38

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  store ptr %30, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = getelementptr inbounds ptr, ptr %33, i64 10
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(40) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %36

36:                                               ; preds = %29
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %26

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %39 = getelementptr inbounds %"struct.doctest::MessageData", ptr %9, i32 0, i32 3
  %40 = load i32, ptr %39, align 4, !tbaa !20
  %41 = and i32 %40, 1
  %42 = icmp ne i32 %41, 0
  %43 = zext i1 %42 to i8
  store i8 %43, ptr %8, align 1, !tbaa !21
  %44 = load i8, ptr %8, align 1, !tbaa !21, !range !16, !noundef !17
  %45 = trunc i8 %44 to i1
  br i1 %45, label %51, label %46

46:                                               ; preds = %38
  %47 = getelementptr inbounds %"struct.doctest::MessageData", ptr %9, i32 0, i32 3
  %48 = load i32, ptr %47, align 4, !tbaa !20
  call void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef %48)
  %49 = getelementptr inbounds %"struct.doctest::MessageData", ptr %9, i32 0, i32 3
  %50 = load i32, ptr %49, align 4, !tbaa !20
  call void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef %50)
  br label %51

51:                                               ; preds = %46, %38
  %52 = call noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv()
  br i1 %52, label %53, label %76

53:                                               ; preds = %51
  %54 = call noundef ptr @_ZN7doctest17getContextOptionsEv()
  %55 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %54, i32 0, i32 23
  %56 = load i8, ptr %55, align 1, !tbaa !22, !range !16, !noundef !17
  %57 = trunc i8 %56 to i1
  br i1 %57, label %76, label %58

58:                                               ; preds = %53
  %59 = load i8, ptr %8, align 1, !tbaa !21, !range !16, !noundef !17
  %60 = trunc i8 %59 to i1
  br i1 %60, label %76, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %65 = icmp eq ptr %64, null
  br i1 %65, label %74, label %66

66:                                               ; preds = %61
  %67 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.doctest::ContextOptions", ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  %70 = getelementptr inbounds %"struct.doctest::TestCaseData", ptr %69, i32 0, i32 6
  %71 = load i8, ptr %70, align 1, !tbaa !25, !range !16, !noundef !17
  %72 = trunc i8 %71 to i1
  %73 = xor i1 %72, true
  br label %74

74:                                               ; preds = %66, %61
  %75 = phi i1 [ true, %61 ], [ %73, %66 ]
  br label %76

76:                                               ; preds = %74, %58, %53, %51
  %77 = phi i1 [ false, %58 ], [ false, %53 ], [ false, %51 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  ret i1 %77
}

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.7 }
%union.anon.7 = 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

; Function Attrs: mustprogress nounwind 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 #2 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 {
  %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 %10, 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 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7doctest6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  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 %10

10:                                               ; preds = %8, %1
  %11 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !17
  %12 = getelementptr inbounds i8, ptr %11, i64 4304
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %13 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  store ptr %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %14 = call ptr @_ZNSt6vectorIPN7doctest9IReporterESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  store ptr %14, ptr %4, align 8
  %15 = 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 %15, label %.lr.ph, label %._crit_edge

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

.lr.ph:                                           ; preds = %10, %.lr.ph
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = load ptr, ptr %20, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %21, i64 80
  %23 = load ptr, ptr %22, align 8
  call void %23(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7doctest9IReporterESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %25 = 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 %25, label %.lr.ph, label %._crit_edge

26:                                               ; preds = %._crit_edge
  call void @_ZN7doctest12_GLOBAL__N_19addAssertENS_10assertType4EnumE(i32 noundef %17)
  %27 = load i32, ptr %16, align 4, !tbaa !18
  call void @_ZN7doctest12_GLOBAL__N_115addFailedAssertENS_10assertType4EnumE(i32 noundef %27)
  br label %28

28:                                               ; preds = %26, %._crit_edge
  %29 = call noundef zeroext i1 @_ZN7doctest6detail16isDebuggerActiveEv()
  br i1 %29, label %30, label %45

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

35:                                               ; preds = %30
  %36 = load ptr, ptr @_ZN7doctest6detail4g_csE, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %36, i64 32
  %38 = load ptr, ptr %37, align 8, !tbaa !23
  %39 = icmp eq ptr %38, null
  br i1 %39, label %45, label %40

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

45:                                               ; preds = %30, %35, %40, %28
  %46 = phi i1 [ false, %30 ], [ false, %28 ], [ true, %35 ], [ %44, %40 ]
  ret i1 %46
}

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