; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime (settings)

; 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.8" = type { ptr }
%"struct.hipsycl::rt::device_visibility_condition" = type { i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"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] }

; 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
define dso_local noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt6vectorINS0_27device_visibility_conditionESaIS2_EEiiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESE_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5) #1 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #3
  br i1 %22, label %23, label %24

23:                                               ; preds = %6
  store i1 true, ptr %7, align 1
  br label %112

24:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %25, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = call ptr @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #3
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %15, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = call ptr @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #3
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %16, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %107, %24
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  store i32 2, ptr %17, align 4
  br label %109

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %36 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  store ptr %36, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = icmp sge i32 %39, 0
  br i1 %40, label %45, label %41

41:                                               ; preds = %35
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %42, i32 0, i32 3
  %44 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %43) #3
  br i1 %44, label %47, label %45

45:                                               ; preds = %41, %35
  %46 = load i32, ptr %10, align 4, !tbaa !9
  br label %49

47:                                               ; preds = %41
  %48 = load i32, ptr %9, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %47, %45
  %50 = phi i32 [ %46, %45 ], [ %48, %47 ]
  store i32 %50, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #3
  store i8 1, ptr %20, align 1, !tbaa !16
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = icmp sge i32 %53, 0
  br i1 %54, label %55, label %62

55:                                               ; preds = %49
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = icmp ne i32 %56, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %55
  store i8 0, ptr %20, align 1, !tbaa !16
  br label %62

62:                                               ; preds = %61, %55, %49
  %63 = load ptr, ptr %18, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !18
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %67, label %74

67:                                               ; preds = %62
  %68 = load i32, ptr %19, align 4, !tbaa !9
  %69 = load ptr, ptr %18, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !18
  %72 = icmp ne i32 %68, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %67
  store i8 0, ptr %20, align 1, !tbaa !16
  br label %74

74:                                               ; preds = %73, %67, %62
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %75, i32 0, i32 2
  %77 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %76) #3
  br i1 %77, label %85, label %78

78:                                               ; preds = %74
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %18, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %80, i32 0, i32 2
  %82 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32) %79, ptr noundef nonnull align 8 dereferenceable(32) %81, i64 noundef 0) #3
  %83 = icmp eq i64 %82, -1
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  store i8 0, ptr %20, align 1, !tbaa !16
  br label %85

85:                                               ; preds = %84, %78, %74
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %86, i32 0, i32 3
  %88 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %87) #3
  br i1 %88, label %96, label %89

89:                                               ; preds = %85
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.hipsycl::rt::device_visibility_condition", ptr %91, i32 0, i32 3
  %93 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) %92, i64 noundef 0) #3
  %94 = icmp eq i64 %93, -1
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  store i8 0, ptr %20, align 1, !tbaa !16
  br label %96

96:                                               ; preds = %95, %89, %85
  %97 = load i8, ptr %20, align 1, !tbaa !16, !range !19, !noundef !20
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  store i1 true, ptr %7, align 1
  store i32 1, ptr %17, align 4
  br label %101

100:                                              ; preds = %96
  store i32 0, ptr %17, align 4
  br label %101

101:                                              ; preds = %100, %99
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  %102 = load i32, ptr %17, align 4
  switch i32 %102, label %104 [
    i32 0, label %103
  ]

103:                                              ; preds = %101
  store i32 0, ptr %17, align 4
  br label %104

104:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %105 = load i32, ptr %17, align 4
  switch i32 %105, label %109 [
    i32 0, label %106
  ]

106:                                              ; preds = %104
  br label %107

107:                                              ; preds = %106
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  br label %32

109:                                              ; preds = %104, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %110 = load i32, ptr %17, align 4
  switch i32 %110, label %114 [
    i32 2, label %111
    i32 1, label %112
  ]

111:                                              ; preds = %109
  store i1 false, ptr %7, align 1
  br label %112

112:                                              ; preds = %111, %109, %23
  %113 = load i1, ptr %7, align 1
  ret i1 %113

114:                                              ; preds = %109
  unreachable
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 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 = { 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 #3 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_ZTSN7hipsycl2rt27device_visibility_conditionE", !10, i64 0, !10, i64 4, !13, i64 8, !13, i64 40}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!12, !10, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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.8" = 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
define dso_local noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt6vectorINS0_27device_visibility_conditionESaIS2_EEiiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESE_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5) local_unnamed_addr #1 {
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %9 = tail call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br i1 %9, label %42, label %10

10:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %11 = tail call ptr @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  store ptr %11, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %12 = tail call ptr @_ZNKSt6vectorIN7hipsycl2rt27device_visibility_conditionESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  store ptr %12, ptr %8, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10, %39
  %14 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %15 = getelementptr inbounds i8, ptr %14, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, -1
  br i1 %17, label %21, label %18

18:                                               ; preds = %.lr.ph
  %19 = getelementptr inbounds i8, ptr %14, i64 40
  %20 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #3
  %spec.select37 = select i1 %20, i32 %1, i32 %2
  %.pre = load i32, ptr %15, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %18, %.lr.ph
  %22 = phi i32 [ %16, %.lr.ph ], [ %.pre, %18 ]
  %23 = phi i32 [ %2, %.lr.ph ], [ %spec.select37, %18 ]
  %24 = icmp slt i32 %22, 0
  %.not = icmp eq i32 %22, %3
  %or.cond = or i1 %24, %.not
  %25 = load i32, ptr %14, align 8, !tbaa !14
  %26 = icmp slt i32 %25, 0
  %.not33 = icmp eq i32 %23, %25
  %or.cond34 = or i1 %26, %.not33
  %narrow = select i1 %or.cond34, i1 %or.cond, i1 false
  %27 = getelementptr inbounds i8, ptr %14, i64 8
  %28 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %27) #3
  br i1 %28, label %32, label %29

29:                                               ; preds = %21
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %27, i64 noundef 0) #3
  %31 = icmp ne i64 %30, -1
  %spec.select = select i1 %31, i1 %narrow, i1 false
  br label %32

32:                                               ; preds = %29, %21
  %.2 = phi i1 [ %narrow, %21 ], [ %spec.select, %29 ]
  %33 = getelementptr inbounds i8, ptr %14, i64 40
  %34 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %33) #3
  br i1 %34, label %38, label %35

35:                                               ; preds = %32
  %36 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %33, i64 noundef 0) #3
  %37 = icmp ne i64 %36, -1
  %spec.select35 = select i1 %37, i1 %.2, i1 false
  br i1 %spec.select35, label %._crit_edge, label %39

38:                                               ; preds = %32
  br i1 %.2, label %._crit_edge, label %39

39:                                               ; preds = %35, %38
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %41, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %38, %39, %35, %10
  %.lcssa = phi i1 [ false, %10 ], [ true, %38 ], [ false, %39 ], [ true, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %42

42:                                               ; preds = %._crit_edge, %6
  %.328 = phi i1 [ true, %6 ], [ %.lcssa, %._crit_edge ]
  ret i1 %.328
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7hipsycl2rt27device_visibility_conditionESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 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 = { 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 #3 = { 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 4}
!6 = !{!"_ZTSN7hipsycl2rt27device_visibility_conditionE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !13, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!6, !7, i64 0}


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