; 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"

%"class.__gnu_cxx::__normal_iterator.265" = 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
declare dso_local void @_ZN5boost9unit_test15unit_test_log_t10set_formatENS0_13output_formatE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 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)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 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 dso_local void @_ZN5boost9unit_test15unit_test_log_t13add_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test15unit_test_log_t13set_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.265", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.265", 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
  %12 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  %13 = call noundef zeroext i1 @_ZNK5boost9unit_test12_GLOBAL__N_118unit_test_log_impl21has_entry_in_progressEv(ptr noundef nonnull align 8 dereferenceable(152) %12)
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  br label %67

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 -1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #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 0
  store ptr %17, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = call ptr @_ZNSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.265", ptr %9, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call ptr @_ZNSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #4
  %23 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.265", ptr %10, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  br label %24

24:                                               ; preds = %56, %15
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %24
  %28 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %29 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %28, i32 0, i32 0
  %30 = load i8, ptr %29, align 8, !tbaa !13, !range !19, !noundef !20
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %55

32:                                               ; preds = %27
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %46, label %35

35:                                               ; preds = %32
  %36 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %37 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 4, !tbaa !21
  %39 = load i32, ptr %7, align 4, !tbaa !11
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %35
  %42 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %43 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !21
  %45 = icmp eq i32 %44, 4
  br i1 %45, label %46, label %54

46:                                               ; preds = %41, %35, %32
  %47 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %48 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %47)
  store i32 %48, ptr %5, align 4, !tbaa !9
  %49 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %50 = 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) %49)
  store ptr %50, ptr %6, align 8, !tbaa !5
  %51 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %52 = getelementptr inbounds %"struct.boost::unit_test::(anonymous namespace)::unit_test_log_data_helper_impl", ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 4, !tbaa !21
  store i32 %53, ptr %7, align 4, !tbaa !11
  br label %54

54:                                               ; preds = %46, %41
  br label %55

55:                                               ; preds = %54, %27
  br label %56

56:                                               ; preds = %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %24, !llvm.loop !22

58:                                               ; preds = %26
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %66

61:                                               ; preds = %58
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN5boost9unit_test15unit_test_log_t13add_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %62)
  call void @_ZN5boost9unit_test15unit_test_log_t10set_formatENS0_13output_formatE(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 4)
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = call noundef i32 @_ZN5boost9unit_test15unit_test_log_t19set_threshold_levelENS0_13output_formatENS0_9log_levelE(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 4, i32 noundef %63)
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN5boost9unit_test15unit_test_log_t10set_streamENS0_13output_formatERSo(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(8) %65)
  br label %66

66:                                               ; preds = %61, %58
  call void @_ZN5boost9unit_test15unit_test_log_t9configureEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %67

67:                                               ; preds = %66, %14
  ret void
}

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, !10, i64 0}
!10 = !{!"_ZTSN5boost9unit_test9log_levelE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN5boost9unit_test13output_formatE", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implE", !15, i64 0, !12, i64 4, !6, i64 8, !16, i64 16, !18, i64 32, !15, i64 48}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN5boost10shared_ptrINS_2io18ios_base_all_saverEEE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSN5boost6detail12shared_countE", !6, i64 0}
!18 = !{!"_ZTSN5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEE", !6, i64 0, !17, i64 8}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!14, !12, i64 4}
!22 = distinct !{!22, !23}
!23 = !{!"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.265" = 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
declare dso_local void @_ZN5boost9unit_test15unit_test_log_t10set_formatENS0_13output_formatE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost9unit_test15unit_test_log_t10set_streamENS0_13output_formatERSo(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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 #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden ptr @_ZNSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_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_cxxltIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(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 ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 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 #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) 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 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 dso_local void @_ZN5boost9unit_test15unit_test_log_t13add_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test15unit_test_log_t13set_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.265", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.265", 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 %41, label %7

7:                                                ; preds = %2
  %8 = tail call noundef nonnull align 8 dereferenceable(152) ptr @_ZN5boost9unit_test12_GLOBAL__N_110s_log_implEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = tail call ptr @_ZNSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %10 = tail call ptr @_ZNSt6vectorIN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  store ptr %10, ptr %4, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %35, %7
  %.010.lcssa = phi ptr [ null, %7 ], [ %.111, %35 ]
  %.0.lcssa = phi i32 [ -1, %7 ], [ %.1, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %40, label %38

.lr.ph:                                           ; preds = %7, %35
  %.015 = phi i32 [ %.1, %35 ], [ -1, %7 ]
  %.0814 = phi i32 [ %.19, %35 ], [ 0, %7 ]
  %.01013 = phi ptr [ %.111, %35 ], [ null, %7 ]
  %12 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %13 = load i8, ptr %12, align 8, !tbaa !5, !range !15, !noundef !16
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %15, label %35

15:                                               ; preds = %.lr.ph
  %16 = icmp eq i32 %.015, -1
  br i1 %16, label %27, label %17

17:                                               ; preds = %15
  %18 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !17
  %21 = icmp slt i32 %20, %.0814
  br i1 %21, label %27, label %22

22:                                               ; preds = %17
  %23 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 4
  %25 = load i32, ptr %24, align 4, !tbaa !17
  %26 = icmp eq i32 %25, 4
  br i1 %26, label %27, label %35

27:                                               ; preds = %22, %17, %15
  %28 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %29 = call noundef i32 @_ZNK5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_impl13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(49) %28)
  %30 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %31 = 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) %30)
  %32 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !17
  br label %35

35:                                               ; preds = %.lr.ph, %27, %22
  %.111 = phi ptr [ %31, %27 ], [ %.01013, %22 ], [ %.01013, %.lr.ph ]
  %.19 = phi i32 [ %34, %27 ], [ %.0814, %22 ], [ %.0814, %.lr.ph ]
  %.1 = phi i32 [ %29, %27 ], [ %.015, %22 ], [ %.015, %.lr.ph ]
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxltIPN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !18

38:                                               ; preds = %._crit_edge
  call void @_ZN5boost9unit_test15unit_test_log_t13add_formatterEPNS0_23unit_test_log_formatterE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %1)
  call void @_ZN5boost9unit_test15unit_test_log_t10set_formatENS0_13output_formatE(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 4)
  %39 = call noundef i32 @_ZN5boost9unit_test15unit_test_log_t19set_threshold_levelENS0_13output_formatENS0_9log_levelE(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 4, i32 noundef %.0.lcssa)
  call void @_ZN5boost9unit_test15unit_test_log_t10set_streamENS0_13output_formatERSo(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(8) %.010.lcssa)
  br label %40

40:                                               ; preds = %38, %._crit_edge
  call void @_ZN5boost9unit_test15unit_test_log_t9configureEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br label %41

41:                                               ; preds = %2, %40
  ret void
}

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, !7, i64 0}
!6 = !{!"_ZTSN5boost9unit_test12_GLOBAL__N_130unit_test_log_data_helper_implE", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 16, !14, i64 32, !7, i64 48}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5boost9unit_test13output_formatE", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN5boost10shared_ptrINS_2io18ios_base_all_saverEEE", !11, i64 0, !13, i64 8}
!13 = !{!"_ZTSN5boost6detail12shared_countE", !11, i64 0}
!14 = !{!"_ZTSN5boost10shared_ptrINS_9unit_test23unit_test_log_formatterEEE", !11, i64 0, !13, i64 8}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !10, i64 4}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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