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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.boost::unit_test::log::end" = type { i8 }
%"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 nounwind uwtable
declare dso_local noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64)) #1 align 2

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

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

; 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)) #2 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)) #1 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)) #1 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)) #1 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)) #1 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)) #1 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)) #1 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)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test15unit_test_log_t16exception_caughtERKNS_19execution_exceptionE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.boost::unit_test::log::end", align 1
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64) %12)
  %14 = icmp sle i32 %13, 205
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %22

16:                                               ; preds = %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64) %17)
  %19 = icmp sle i32 %18, 215
  %20 = zext i1 %19 to i64
  %21 = select i1 %19, i32 6, i32 7
  br label %22

22:                                               ; preds = %16, %15
  %23 = phi i32 [ 5, %15 ], [ %21, %16 ]
  store i32 %23, ptr %5, align 4, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %25 = call noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152) %24)
  br i1 %25, label %26, label %28

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unit_test15unit_test_log_tlsERKNS0_3log3endE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  br label %28

28:                                               ; preds = %26, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %29 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %30 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_impl", ptr %29, i32 0, i32 1
  store ptr %30, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.268", ptr %8, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #4
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.268", ptr %9, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  br label %37

37:                                               ; preds = %70, %28
  %38 = 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) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %38, label %40, label %39

39:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %72

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %41 = 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) %8) #4
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %42, ptr %10, align 8, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %44)
  %46 = icmp sge i32 %43, %45
  br i1 %46, label %47, label %69

47:                                               ; preds = %40
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %48, i32 0, i32 5
  %50 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %49) #4
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = 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) %51)
  %53 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %54 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_impl", ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load ptr, ptr %50, align 8, !tbaa !11
  %57 = getelementptr inbounds ptr, ptr %56, i64 11
  %58 = load ptr, ptr %57, align 8
  call void %58(ptr noundef nonnull align 8 dereferenceable(12) %50, ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(56) %54, ptr noundef nonnull align 8 dereferenceable(64) %55)
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef %59, ptr noundef nonnull align 8 dereferenceable(49) %60)
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %61, i32 0, i32 5
  %63 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %62) #4
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = 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) %64)
  %66 = load ptr, ptr %63, align 8, !tbaa !11
  %67 = getelementptr inbounds ptr, ptr %66, i64 12
  %68 = load ptr, ptr %67, align 8
  call void %68(ptr noundef nonnull align 8 dereferenceable(12) %63, ptr noundef nonnull align 8 dereferenceable(8) %65)
  br label %69

69:                                               ; preds = %47, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %70

70:                                               ; preds = %69
  %71 = 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) %8) #4
  br label %37, !llvm.loop !13

72:                                               ; preds = %39
  call void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv()
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

; 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)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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, !10, i64 0}
!10 = !{!"_ZTSN5boost9unit_test9log_levelE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

%"struct.boost::unit_test::log::end" = type { i8 }
%"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 nounwind uwtable
declare dso_local noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1 align 2

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

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

; 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 #2 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 #1 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 #1 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 #1 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 #1 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 #1 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 #1 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test15unit_test_log_t16exception_caughtERKNS_19execution_exceptionE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) unnamed_addr #2 align 2 {
  %3 = alloca %"struct.boost::unit_test::log::end", align 1
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.268", align 8
  %6 = tail call noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %7 = icmp slt i32 %6, 206
  br i1 %7, label %12, label %8

8:                                                ; preds = %2
  %9 = tail call noundef i32 @_ZNK5boost19execution_exception4codeEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %10 = icmp slt i32 %9, 216
  %11 = select i1 %10, i32 6, i32 7
  br label %12

12:                                               ; preds = %2, %8
  %13 = phi i32 [ %11, %8 ], [ 5, %2 ]
  %14 = tail call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %15 = tail call noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152) %14)
  br i1 %15, label %16, label %18

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  %17 = call 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) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  br label %18

18:                                               ; preds = %16, %12
  %19 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %21 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  store ptr %21, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %22 = call ptr @_ZNSt6vectorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  store ptr %22, ptr %5, align 8
  %23 = 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) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %41, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN5boost9unit_test12_GLOBAL__N_119clear_entry_contextEv()
  ret void

.lr.ph:                                           ; preds = %18, %41
  %24 = 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) %4) #4
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %25)
  %.not = icmp slt i32 %13, %26
  br i1 %.not, label %41, label %27

27:                                               ; preds = %.lr.ph
  %28 = getelementptr inbounds i8, ptr %25, i64 32
  %29 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %28) #4
  %30 = 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) %25)
  %31 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %32 = getelementptr inbounds i8, ptr %31, i64 96
  %33 = load ptr, ptr %29, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %33, i64 88
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(12) %29, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(56) %32, ptr noundef nonnull align 8 dereferenceable(64) %1)
  call void @_ZN5boost9unit_test12_GLOBAL__N_117log_entry_contextENS0_9log_levelERNS1_30unit_test_log_data_helper_implE(i32 noundef %13, ptr noundef nonnull align 8 dereferenceable(49) %25)
  %36 = call noundef ptr @_ZNK5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %28) #4
  %37 = 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) %25)
  %38 = load ptr, ptr %36, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %38, i64 96
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(12) %36, ptr noundef nonnull align 8 dereferenceable(8) %37)
  br label %41

41:                                               ; preds = %27, %.lr.ph
  %42 = 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) %4) #4
  %43 = 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) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !11
}

; 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 #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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