; LLVM IR from AdaptiveCpp/AdaptiveCpp :: tests/pcuda/pcuda_test_suite.ll (ZN5boost9unit_test15unit_test_log_tlsERKNS0_3log3endE)

; 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.__gnu_cxx::__normal_iterator.268" = type { ptr }
%"struct.boost::unit_test::(anonymous namespace)::unit_test_log_impl" = type { %"class.std::vector.255", %"class.std::vector.260", %"struct.boost::unit_test::log_entry_data", %"struct.boost::unit_test::log_checkpoint_data" }
%"class.std::vector.255" = type { %"struct.std::_Vector_base.256" }
%"struct.std::_Vector_base.256" = type { %"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.260" = type { %"struct.std::_Vector_base.261" }
%"struct.std::_Vector_base.261" = type { %"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *, std::allocator<boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.boost::unit_test::log_entry_data" = type <{ %"class.std::__cxx11::basic_string", i64, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.boost::unit_test::log_checkpoint_data" = type { %"class.boost::unit_test::basic_cstring", i64, %"class.std::__cxx11::basic_string" }
%"class.boost::unit_test::basic_cstring" = type { ptr, ptr }
%"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl" = type <{ i8, [3 x i8], i32, ptr, %"class.boost::shared_ptr.266", %"class.boost::shared_ptr.267", i8, [7 x i8] }>
%"class.boost::shared_ptr.266" = type { ptr, %"class.boost::detail::shared_count" }
%"class.boost::detail::shared_count" = type { ptr }
%"class.boost::shared_ptr.267" = type { ptr, %"class.boost::detail::shared_count" }

; 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
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test15unit_test_log_tlsERKNS0_3log3endE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 1 dereferenceable(1) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %12 = call noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152) %11)
  br i1 %12, label %13, label %59

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %14 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %15 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_impl", ptr %14, i32 0, i32 1
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %16 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %17 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_impl", ptr %16, i32 0, i32 2
  %18 = getelementptr inbounds %"struct.boost::unit_test::log_entry_data", ptr %17, i32 0, i32 2
  %19 = load i32, ptr %18, align 8, !tbaa !9
  store i32 %19, ptr %6, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.268", ptr %7, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.268", ptr %8, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %56, %13
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %32, i32 0, i32 6
  %34 = load i8, ptr %33, align 8, !tbaa !27, !range !34, !noundef !35
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %53

36:                                               ; preds = %29
  %37 = load i32, ptr %6, align 4, !tbaa !26
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %38)
  %40 = icmp sge i32 %37, %39
  br i1 %40, label %41, label %44

41:                                               ; preds = %36
  %42 = load i32, ptr %6, align 4, !tbaa !26
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef %42, ptr noundef nonnull align 8 dereferenceable(49) %43)
  br label %44

44:                                               ; preds = %41, %36
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %45, i32 0, i32 5
  %47 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl6streamEv(ptr noundef nonnull align 8 dereferenceable(49) %48)
  %50 = load ptr, ptr %47, align 8, !tbaa !36
  %51 = getelementptr inbounds ptr, ptr %50, i64 16
  %52 = load ptr, ptr %51, align 8
  call void %52(ptr noundef nonnull align 8 dereferenceable(12) %47, ptr noundef nonnull align 8 dereferenceable(8) %49)
  br label %53

53:                                               ; preds = %44, %29
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %54, i32 0, i32 6
  store i8 0, ptr %55, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %56

56:                                               ; preds = %53
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %26, !llvm.loop !38

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

59:                                               ; preds = %58, %2
  call void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv()
  ret ptr %10
}

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv() #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl6streamEv(ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(49)) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv() #1

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, !23, i64 88}
!10 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_118unit_test_log_implE", !11, i64 0, !15, i64 24, !19, i64 48, !24, i64 96}
!11 = !{!"_ZTSSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN5boost9unit_test14log_entry_dataE", !20, i64 0, !22, i64 32, !23, i64 40}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN5boost9unit_test9log_levelE", !7, i64 0}
!24 = !{!"_ZTSN5boost9unit_test19log_checkpoint_dataE", !25, i64 0, !22, i64 16, !20, i64 24}
!25 = !{!"_ZTSN5boost9unit_test13basic_cstringIKcEE", !6, i64 0, !6, i64 8}
!26 = !{!23, !23, i64 0}
!27 = !{!28, !29, i64 48}
!28 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implE", !29, i64 0, !30, i64 4, !6, i64 8, !31, i64 16, !33, i64 32, !29, i64 48}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSN5boost9unit_test13output_formatE", !7, i64 0}
!31 = !{!"_ZTSN5boost10shared_ptrINS_2io18ios_base_all_saverEEE", !6, i64 0, !32, i64 8}
!32 = !{!"_ZTSN5boost6detail12shared_countE", !6, i64 0}
!33 = !{!"_ZTSN5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEE", !6, i64 0, !32, i64 8}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!37, !37, i64 0}
!37 = !{!"vtable pointer", !8, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


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

%"class.__gnu_cxx::__normal_iterator.268" = type { ptr }

; 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
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test15unit_test_log_tlsERKNS0_3log3endE(ptr noundef nonnull readnone returned align 8 dereferenceable(8) %0, ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %5 = tail call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %6 = tail call noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152) %5)
  br i1 %6, label %7, label %34

7:                                                ; preds = %2
  %8 = tail call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %9 = getelementptr inbounds i8, ptr %8, i64 24
  %10 = tail call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %11 = getelementptr inbounds i8, ptr %10, i64 88
  %12 = load i32, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %13 = tail call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %14 = tail call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %14, ptr %4, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(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 = %31, %7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %34

.lr.ph:                                           ; preds = %7, %31
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %17 = load ptr, ptr %16, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %17, i64 48
  %19 = load i8, ptr %18, align 8, !tbaa !26, !range !33, !noundef !34
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %21, label %31

21:                                               ; preds = %.lr.ph
  %22 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %17)
  %.not = icmp slt i32 %12, %22
  br i1 %.not, label %24, label %23

23:                                               ; preds = %21
  call void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef %12, ptr noundef nonnull align 8 dereferenceable(49) %17)
  br label %24

24:                                               ; preds = %23, %21
  %25 = getelementptr inbounds i8, ptr %17, i64 32
  %26 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %25) #4
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl6streamEv(ptr noundef nonnull align 8 dereferenceable(49) %17)
  %28 = load ptr, ptr %26, align 8, !tbaa !35
  %29 = getelementptr inbounds i8, ptr %28, i64 128
  %30 = load ptr, ptr %29, align 8
  call void %30(ptr noundef nonnull align 8 dereferenceable(12) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
  br label %31

31:                                               ; preds = %24, %.lr.ph
  store i8 0, ptr %18, align 8, !tbaa !26
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !37

34:                                               ; preds = %._crit_edge, %2
  call void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv()
  ret ptr %0
}

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv() local_unnamed_addr #1

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, !22, i64 88}
!6 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_118unit_test_log_implE", !7, i64 0, !14, i64 24, !18, i64 48, !23, i64 96}
!7 = !{!"_ZTSSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"_ZTSN5boost9unit_test14log_entry_dataE", !19, i64 0, !21, i64 32, !22, i64 40}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !12, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!21 = !{!"long", !12, i64 0}
!22 = !{!"_ZTSN5boost9unit_test9log_levelE", !12, i64 0}
!23 = !{!"_ZTSN5boost9unit_test19log_checkpoint_dataE", !24, i64 0, !21, i64 16, !19, i64 24}
!24 = !{!"_ZTSN5boost9unit_test13basic_cstringIKcEE", !11, i64 0, !11, i64 8}
!25 = !{!11, !11, i64 0}
!26 = !{!27, !28, i64 48}
!27 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implE", !28, i64 0, !29, i64 4, !11, i64 8, !30, i64 16, !32, i64 32, !28, i64 48}
!28 = !{!"bool", !12, i64 0}
!29 = !{!"_ZTSN5boost9unit_test13output_formatE", !12, i64 0}
!30 = !{!"_ZTSN5boost10shared_ptrINS_2io18ios_base_all_saverEEE", !11, i64 0, !31, i64 8}
!31 = !{!"_ZTSN5boost6detail12shared_countE", !11, i64 0}
!32 = !{!"_ZTSN5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEE", !11, i64 0, !31, i64 8}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !13, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


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