; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime/ocl/ocl_hardware_manager.ll (ZN7hipsycl2rt20ocl_hardware_managerC2Ev)

; 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.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] }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl" }
%"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl" = type { %"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr.21" }
%"class.std::unique_ptr.21" = type { %"struct.std::__uniq_ptr_data.22" }
%"struct.std::__uniq_ptr_data.22" = type { %"class.std::__uniq_ptr_impl.23" }
%"class.std::__uniq_ptr_impl.23" = type { %"class.std::tuple.24" }
%"class.std::tuple.24" = type { %"struct.std::_Tuple_impl.25" }
%"struct.std::_Tuple_impl.25" = type { %"struct.std::_Head_base.28" }
%"struct.std::_Head_base.28" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::allocator" = type { i8 }
%"class.hipsycl::rt::error_info" = type <{ %"class.std::__cxx11::basic_string", %"class.hipsycl::rt::error_code", i32, [4 x i8] }>
%"class.hipsycl::rt::error_code" = type { %"class.std::__cxx11::basic_string", i8, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl" }
%"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl" = type { %"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<cl::Context>::_Storage", i8 }>
%"union.std::_Optional_payload_base<cl::Context>::_Storage" = type { %"class.cl::Context" }
%"class.cl::Context" = type { %"class.cl::detail::Wrapper" }
%"class.cl::detail::Wrapper" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.37" = type { ptr }
%"class.hipsycl::rt::ocl_hardware_context" = type <{ %"class.hipsycl::rt::hardware_context", i32, i32, %"class.cl::Context", %"class.cl::Device", %"class.std::shared_ptr", %"class.hipsycl::rt::ocl_allocator", i8, [7 x i8] }>
%"class.hipsycl::rt::hardware_context" = type { ptr }
%"class.cl::Device" = type { %"class.cl::detail::Wrapper.base", [7 x i8] }
%"class.cl::detail::Wrapper.base" = type <{ ptr, i8 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.hipsycl::rt::ocl_allocator" = type { %"class.hipsycl::rt::backend_allocator", ptr, %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::backend_allocator" = type { ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.hipsycl::rt::ocl_hardware_manager" = type <{ %"class.hipsycl::rt::backend_hardware_manager", %"class.std::vector.6", %"class.std::vector.11", i32, [4 x i8] }>
%"class.hipsycl::rt::backend_hardware_manager" = type { ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<hipsycl::rt::ocl_hardware_context, std::allocator<hipsycl::rt::ocl_hardware_context>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::ocl_hardware_context, std::allocator<hipsycl::rt::ocl_hardware_context>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::ocl_hardware_context, std::allocator<hipsycl::rt::ocl_hardware_context>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::ocl_hardware_context, std::allocator<hipsycl::rt::ocl_hardware_context>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [98 x i8], align 1
@_ZTVN7hipsycl2rt20ocl_hardware_managerE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8
@__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [184 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [142 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [57 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7hipsycl2rt20ocl_hardware_context15get_device_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(89)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_110info_queryILi4139ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET0_RKN2cl6DeviceE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9)) #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt20ocl_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(60) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::unordered_map", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::vector.11", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.hipsycl::rt::result", align 8
  %10 = alloca %"class.hipsycl::rt::source_location", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.hipsycl::rt::error_info", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.hipsycl::rt::error_code", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.hipsycl::rt::result", align 8
  %29 = alloca %"class.hipsycl::rt::source_location", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %"class.hipsycl::rt::error_info", align 8
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::allocator", align 1
  %37 = alloca %"class.hipsycl::rt::error_code", align 8
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca i32, align 4
  %41 = alloca %"class.std::vector.30", align 8
  %42 = alloca %"class.hipsycl::rt::result", align 8
  %43 = alloca %"class.hipsycl::rt::source_location", align 8
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca %"class.std::allocator", align 1
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::allocator", align 1
  %48 = alloca %"class.hipsycl::rt::error_info", align 8
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::allocator", align 1
  %51 = alloca %"class.hipsycl::rt::error_code", align 8
  %52 = alloca %"class.std::__cxx11::basic_string", align 8
  %53 = alloca %"class.std::allocator", align 1
  %54 = alloca ptr, align 8
  %55 = alloca %"class.std::optional", align 8
  %56 = alloca [3 x i64], align 16
  %57 = alloca %"class.cl::Context", align 8
  %58 = alloca %"class.hipsycl::rt::result", align 8
  %59 = alloca %"class.hipsycl::rt::source_location", align 8
  %60 = alloca %"class.std::__cxx11::basic_string", align 8
  %61 = alloca %"class.std::allocator", align 1
  %62 = alloca %"class.std::__cxx11::basic_string", align 8
  %63 = alloca %"class.std::allocator", align 1
  %64 = alloca %"class.hipsycl::rt::error_info", align 8
  %65 = alloca %"class.std::__cxx11::basic_string", align 8
  %66 = alloca %"class.std::allocator", align 1
  %67 = alloca %"class.hipsycl::rt::error_code", align 8
  %68 = alloca %"class.std::__cxx11::basic_string", align 8
  %69 = alloca %"class.std::allocator", align 1
  %70 = alloca %"class.hipsycl::rt::result", align 8
  %71 = alloca %"class.hipsycl::rt::source_location", align 8
  %72 = alloca %"class.std::__cxx11::basic_string", align 8
  %73 = alloca %"class.std::allocator", align 1
  %74 = alloca %"class.std::__cxx11::basic_string", align 8
  %75 = alloca %"class.std::allocator", align 1
  %76 = alloca %"class.hipsycl::rt::error_info", align 8
  %77 = alloca %"class.std::__cxx11::basic_string", align 8
  %78 = alloca %"class.std::allocator", align 1
  %79 = alloca i32, align 4
  %80 = alloca ptr, align 8
  %81 = alloca %"class.__gnu_cxx::__normal_iterator.37", align 8
  %82 = alloca %"class.__gnu_cxx::__normal_iterator.37", align 8
  %83 = alloca ptr, align 8
  %84 = alloca %"class.std::__cxx11::basic_string", align 8
  %85 = alloca %"class.std::optional", align 8
  %86 = alloca %"class.cl::Context", align 8
  %87 = alloca %"class.hipsycl::rt::result", align 8
  %88 = alloca %"class.hipsycl::rt::source_location", align 8
  %89 = alloca %"class.std::__cxx11::basic_string", align 8
  %90 = alloca %"class.std::allocator", align 1
  %91 = alloca %"class.std::__cxx11::basic_string", align 8
  %92 = alloca %"class.std::allocator", align 1
  %93 = alloca %"class.hipsycl::rt::error_info", align 8
  %94 = alloca %"class.std::__cxx11::basic_string", align 8
  %95 = alloca %"class.std::allocator", align 1
  %96 = alloca %"class.hipsycl::rt::error_code", align 8
  %97 = alloca %"class.std::__cxx11::basic_string", align 8
  %98 = alloca %"class.std::allocator", align 1
  %99 = alloca %"class.hipsycl::rt::ocl_hardware_context", align 8
  %100 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %101 = load ptr, ptr %2, align 8
  call void @_ZN7hipsycl2rt24backend_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %101) #6
  store ptr getelementptr inbounds inrange(-16, 48) ({ [8 x ptr] }, ptr @_ZTVN7hipsycl2rt20ocl_hardware_managerE, i32 0, i32 0, i32 2), ptr %101, align 8, !tbaa !9
  %102 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 1
  call void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %102) #6
  %103 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 2
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  %104 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 3
  store i32 3, ptr %104, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  %105 = invoke noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
          to label %106 unwind label %127

106:                                              ; preds = %1
  invoke void @_ZNK7hipsycl2rt8settings3getILNS0_7settingE2EEENS0_13setting_traitIXT_EE4typeEv(ptr dead_on_unwind writable sret(%"class.std::unordered_map") align 8 %3, ptr noundef nonnull align 8 dereferenceable(217) %105)
          to label %107 unwind label %127

107:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  %108 = invoke noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
          to label %109 unwind label %131

109:                                              ; preds = %107
  %110 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE12EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %108)
          to label %111 unwind label %131

111:                                              ; preds = %109
  %112 = zext i1 %110 to i8
  store i8 %112, ptr %6, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %113 = invoke noundef i32 @_ZN2cl8Platform3getEPSt6vectorIS0_SaIS0_EE(ptr noundef %7)
          to label %114 unwind label %135

114:                                              ; preds = %111
  store i32 %113, ptr %8, align 4, !tbaa !25
  %115 = load i32, ptr %8, align 4, !tbaa !25
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %178

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %118 unwind label %139

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %119 unwind label %143

119:                                              ; preds = %118
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef 596)
          to label %120 unwind label %147

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 80, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %121 unwind label %151

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %122 unwind label %155

122:                                              ; preds = %121
  %123 = load i32, ptr %8, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef %123)
          to label %124 unwind label %159

124:                                              ; preds = %122
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %18, i32 noundef 1)
          to label %125 unwind label %163

125:                                              ; preds = %124
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %9, ptr noundef nonnull align 8 dereferenceable(68) %10, ptr noundef nonnull align 8 dereferenceable(76) %15)
          to label %126 unwind label %167

126:                                              ; preds = %125
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %15) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %178

127:                                              ; preds = %106, %1
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %4, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %5, align 4
  br label %623

131:                                              ; preds = %109, %107
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %4, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %5, align 4
  br label %622

135:                                              ; preds = %111
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %4, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %5, align 4
  br label %621

139:                                              ; preds = %117
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %4, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %5, align 4
  br label %177

143:                                              ; preds = %118
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %4, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %5, align 4
  br label %176

147:                                              ; preds = %119
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %4, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %5, align 4
  br label %175

151:                                              ; preds = %120
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %4, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %5, align 4
  br label %174

155:                                              ; preds = %121
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %4, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %5, align 4
  br label %173

159:                                              ; preds = %122
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %4, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %5, align 4
  br label %172

163:                                              ; preds = %124
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %4, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %5, align 4
  br label %171

167:                                              ; preds = %125
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %4, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %15) #6
  br label %171

171:                                              ; preds = %167, %163
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  br label %172

172:                                              ; preds = %171, %159
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %173

173:                                              ; preds = %172, %155
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %174

174:                                              ; preds = %173, %151
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %10) #6
  br label %175

175:                                              ; preds = %174, %147
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %176

176:                                              ; preds = %175, %143
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %177

177:                                              ; preds = %176, %139
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  br label %621

178:                                              ; preds = %126, %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store ptr %7, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  %180 = call ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #6
  %181 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %180, ptr %181, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %182 = load ptr, ptr %22, align 8, !tbaa !5
  %183 = call ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %182) #6
  %184 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  br label %185

185:                                              ; preds = %617, %178
  %186 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  br i1 %186, label %188, label %187

187:                                              ; preds = %185
  store i32 2, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %620

188:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  store ptr %189, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  %190 = load ptr, ptr %26, align 8, !tbaa !5
  %191 = invoke noundef i32 @_ZNK2cl8Platform7getInfoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEijPT_(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef 2306, ptr noundef %27)
          to label %192 unwind label %205

192:                                              ; preds = %188
  store i32 %191, ptr %8, align 4, !tbaa !25
  %193 = load i32, ptr %8, align 4, !tbaa !25
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %248

195:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 72, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %196 unwind label %209

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %197 unwind label %213

197:                                              ; preds = %196
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %29, ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %32, i32 noundef 609)
          to label %198 unwind label %217

198:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 80, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %199 unwind label %221

199:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %200 unwind label %225

200:                                              ; preds = %199
  %201 = load i32, ptr %8, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %37, ptr noundef nonnull align 8 dereferenceable(32) %38, i32 noundef %201)
          to label %202 unwind label %229

202:                                              ; preds = %200
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %34, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef %37, i32 noundef 1)
          to label %203 unwind label %233

203:                                              ; preds = %202
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %28, ptr noundef nonnull align 8 dereferenceable(68) %29, ptr noundef nonnull align 8 dereferenceable(76) %34)
          to label %204 unwind label %237

204:                                              ; preds = %203
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %34) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %37) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %34) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %29) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %29) #6
  br label %248

205:                                              ; preds = %272, %269, %267, %265, %263, %261, %259, %254, %252, %248, %188
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %4, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %5, align 4
  br label %619

209:                                              ; preds = %195
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %4, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %5, align 4
  br label %247

213:                                              ; preds = %196
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %4, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %5, align 4
  br label %246

217:                                              ; preds = %197
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %4, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %5, align 4
  br label %245

221:                                              ; preds = %198
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %4, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %5, align 4
  br label %244

225:                                              ; preds = %199
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %4, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %5, align 4
  br label %243

229:                                              ; preds = %200
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %4, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %5, align 4
  br label %242

233:                                              ; preds = %202
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %4, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %5, align 4
  br label %241

237:                                              ; preds = %203
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %4, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %34) #6
  br label %241

241:                                              ; preds = %237, %233
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %37) #6
  br label %242

242:                                              ; preds = %241, %229
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #6
  br label %243

243:                                              ; preds = %242, %225
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  br label %244

244:                                              ; preds = %243, %221
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %34) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %29) #6
  br label %245

245:                                              ; preds = %244, %217
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #6
  br label %246

246:                                              ; preds = %245, %213
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %247

247:                                              ; preds = %246, %209
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %29) #6
  br label %619

248:                                              ; preds = %204, %192
  %249 = load ptr, ptr %26, align 8, !tbaa !5
  %250 = invoke noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_123should_include_platformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl8PlatformE(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(8) %249)
          to label %251 unwind label %205

251:                                              ; preds = %248
  br i1 %250, label %252, label %616

252:                                              ; preds = %251
  %253 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %254 unwind label %205

254:                                              ; preds = %252
  %255 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %253)
          to label %256 unwind label %205

256:                                              ; preds = %254
  %257 = icmp sgt i32 3, %255
  br i1 %257, label %258, label %259

258:                                              ; preds = %256
  br label %272

259:                                              ; preds = %256
  %260 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %261 unwind label %205

261:                                              ; preds = %259
  %262 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %260)
          to label %263 unwind label %205

263:                                              ; preds = %261
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %262, ptr noundef @.str.14)
          to label %265 unwind label %205

265:                                              ; preds = %263
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @.str.15)
          to label %267 unwind label %205

267:                                              ; preds = %265
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %269 unwind label %205

269:                                              ; preds = %267
  %270 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %268, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %271 unwind label %205

271:                                              ; preds = %269
  br label %272

272:                                              ; preds = %271, %258
  %273 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 2
  %274 = load ptr, ptr %26, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN2cl8PlatformESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %273, ptr noundef nonnull align 8 dereferenceable(8) %274)
          to label %275 unwind label %205

275:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  %276 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 2
  %277 = call noundef i64 @_ZNKSt6vectorIN2cl8PlatformESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %276) #6
  %278 = sub i64 %277, 1
  %279 = trunc i64 %278 to i32
  store i32 %279, ptr %40, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #6
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #6
  %280 = load ptr, ptr %26, align 8, !tbaa !5
  %281 = invoke noundef i32 @_ZNK2cl8Platform10getDevicesEmPSt6vectorINS_6DeviceESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(8) %280, i64 noundef 14, ptr noundef %41)
          to label %282 unwind label %295

282:                                              ; preds = %275
  store i32 %281, ptr %8, align 4, !tbaa !25
  %283 = load i32, ptr %8, align 4, !tbaa !25
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %285, label %338

285:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 72, ptr %43) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %45)
          to label %286 unwind label %299

286:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 32, ptr %46) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %47) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %47)
          to label %287 unwind label %303

287:                                              ; preds = %286
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %43, ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef nonnull align 8 dereferenceable(32) %46, i32 noundef 628)
          to label %288 unwind label %307

288:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 80, ptr %48) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %289 unwind label %311

289:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 32, ptr %52) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %53) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %53)
          to label %290 unwind label %315

290:                                              ; preds = %289
  %291 = load i32, ptr %8, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %51, ptr noundef nonnull align 8 dereferenceable(32) %52, i32 noundef %291)
          to label %292 unwind label %319

292:                                              ; preds = %290
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %48, ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef %51, i32 noundef 1)
          to label %293 unwind label %323

293:                                              ; preds = %292
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %42, ptr noundef nonnull align 8 dereferenceable(68) %43, ptr noundef nonnull align 8 dereferenceable(76) %48)
          to label %294 unwind label %327

294:                                              ; preds = %293
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %48) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %51) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %48) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %43) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %43) #6
  br label %614

295:                                              ; preds = %275
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %4, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %5, align 4
  br label %615

299:                                              ; preds = %285
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %4, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %5, align 4
  br label %337

303:                                              ; preds = %286
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %4, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %5, align 4
  br label %336

307:                                              ; preds = %287
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %4, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %5, align 4
  br label %335

311:                                              ; preds = %288
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %4, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %5, align 4
  br label %334

315:                                              ; preds = %289
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %4, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %5, align 4
  br label %333

319:                                              ; preds = %290
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %4, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %5, align 4
  br label %332

323:                                              ; preds = %292
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %4, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %5, align 4
  br label %331

327:                                              ; preds = %293
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %4, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %48) #6
  br label %331

331:                                              ; preds = %327, %323
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %51) #6
  br label %332

332:                                              ; preds = %331, %319
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #6
  br label %333

333:                                              ; preds = %332, %315
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #6
  br label %334

334:                                              ; preds = %333, %311
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %48) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %43) #6
  br label %335

335:                                              ; preds = %334, %307
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #6
  br label %336

336:                                              ; preds = %335, %303
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %46) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #6
  br label %337

337:                                              ; preds = %336, %299
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %43) #6
  br label %615

338:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #6
  %339 = load ptr, ptr %26, align 8, !tbaa !5
  %340 = invoke noundef ptr @_ZNK2cl6detail7WrapperIP15_cl_platform_idE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %339)
          to label %341 unwind label %356

341:                                              ; preds = %338
  store ptr %340, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #6
  call void @_ZNSt8optionalIN2cl7ContextEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #6
  %342 = load i8, ptr %6, align 1, !tbaa !23, !range !27, !noundef !28
  %343 = trunc i8 %342 to i1
  br i1 %343, label %420, label %344

344:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 24, ptr %56) #6
  store i64 4228, ptr %56, align 8, !tbaa !29
  %345 = getelementptr inbounds i64, ptr %56, i64 1
  %346 = load ptr, ptr %54, align 8, !tbaa !5
  %347 = ptrtoint ptr %346 to i64
  store i64 %347, ptr %345, align 8, !tbaa !29
  %348 = getelementptr inbounds i64, ptr %56, i64 2
  store i64 0, ptr %348, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #6
  %349 = getelementptr inbounds [3 x i64], ptr %56, i64 0, i64 0
  invoke void @_ZN2cl7ContextC2ERKSt6vectorINS_6DeviceESaIS2_EEPKlPFvPKcPKvmPvESD_Pi(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef %349, ptr noundef null, ptr noundef null, ptr noundef %8)
          to label %350 unwind label %360

350:                                              ; preds = %344
  %351 = load i32, ptr %8, align 4, !tbaa !25
  %352 = icmp eq i32 %351, 0
  br i1 %352, label %353, label %368

353:                                              ; preds = %350
  %354 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8optionalIN2cl7ContextEEaSIRS1_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS2_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS1_ES7_IS1_NSt5decayISA_E4typeEEEEESt16is_constructibleIS1_JSA_EESt13is_assignableIS4_SA_EEERS2_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(8) %57)
          to label %355 unwind label %364

355:                                              ; preds = %353
  br label %417

356:                                              ; preds = %338
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %4, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %5, align 4
  br label %613

360:                                              ; preds = %344
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %4, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %5, align 4
  br label %419

364:                                              ; preds = %353
  %365 = landingpad { ptr, i32 }
          cleanup
  %366 = extractvalue { ptr, i32 } %365, 0
  store ptr %366, ptr %4, align 8
  %367 = extractvalue { ptr, i32 } %365, 1
  store i32 %367, ptr %5, align 4
  br label %418

368:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 72, ptr %59) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %60) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %61) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %61)
          to label %369 unwind label %378

369:                                              ; preds = %368
  call void @llvm.lifetime.start.p0(i64 32, ptr %62) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %63) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %63)
          to label %370 unwind label %382

370:                                              ; preds = %369
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %59, ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %62, i32 noundef 646)
          to label %371 unwind label %386

371:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 80, ptr %64) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %65) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %66) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %66) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %65, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %66)
          to label %372 unwind label %390

372:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 32, ptr %68) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %69) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %68, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %69)
          to label %373 unwind label %394

373:                                              ; preds = %372
  %374 = load i32, ptr %8, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %67, ptr noundef nonnull align 8 dereferenceable(32) %68, i32 noundef %374)
          to label %375 unwind label %398

375:                                              ; preds = %373
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %64, ptr noundef nonnull align 8 dereferenceable(32) %65, ptr noundef %67, i32 noundef 1)
          to label %376 unwind label %402

376:                                              ; preds = %375
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %58, ptr noundef nonnull align 8 dereferenceable(68) %59, ptr noundef nonnull align 8 dereferenceable(76) %64)
          to label %377 unwind label %406

377:                                              ; preds = %376
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %58) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %64) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %67) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %68) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %68) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %65) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %66) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %65) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %64) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %59) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %61) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %59) #6
  br label %417

378:                                              ; preds = %368
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %4, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %5, align 4
  br label %416

382:                                              ; preds = %369
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %4, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %5, align 4
  br label %415

386:                                              ; preds = %370
  %387 = landingpad { ptr, i32 }
          cleanup
  %388 = extractvalue { ptr, i32 } %387, 0
  store ptr %388, ptr %4, align 8
  %389 = extractvalue { ptr, i32 } %387, 1
  store i32 %389, ptr %5, align 4
  br label %414

390:                                              ; preds = %371
  %391 = landingpad { ptr, i32 }
          cleanup
  %392 = extractvalue { ptr, i32 } %391, 0
  store ptr %392, ptr %4, align 8
  %393 = extractvalue { ptr, i32 } %391, 1
  store i32 %393, ptr %5, align 4
  br label %413

394:                                              ; preds = %372
  %395 = landingpad { ptr, i32 }
          cleanup
  %396 = extractvalue { ptr, i32 } %395, 0
  store ptr %396, ptr %4, align 8
  %397 = extractvalue { ptr, i32 } %395, 1
  store i32 %397, ptr %5, align 4
  br label %412

398:                                              ; preds = %373
  %399 = landingpad { ptr, i32 }
          cleanup
  %400 = extractvalue { ptr, i32 } %399, 0
  store ptr %400, ptr %4, align 8
  %401 = extractvalue { ptr, i32 } %399, 1
  store i32 %401, ptr %5, align 4
  br label %411

402:                                              ; preds = %375
  %403 = landingpad { ptr, i32 }
          cleanup
  %404 = extractvalue { ptr, i32 } %403, 0
  store ptr %404, ptr %4, align 8
  %405 = extractvalue { ptr, i32 } %403, 1
  store i32 %405, ptr %5, align 4
  br label %410

406:                                              ; preds = %376
  %407 = landingpad { ptr, i32 }
          cleanup
  %408 = extractvalue { ptr, i32 } %407, 0
  store ptr %408, ptr %4, align 8
  %409 = extractvalue { ptr, i32 } %407, 1
  store i32 %409, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %64) #6
  br label %410

410:                                              ; preds = %406, %402
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %67) #6
  br label %411

411:                                              ; preds = %410, %398
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %68) #6
  br label %412

412:                                              ; preds = %411, %394
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %69) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %68) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %65) #6
  br label %413

413:                                              ; preds = %412, %390
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %66) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %65) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %64) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %59) #6
  br label %414

414:                                              ; preds = %413, %386
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  br label %415

415:                                              ; preds = %414, %382
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #6
  br label %416

416:                                              ; preds = %415, %378
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %61) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %61) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %59) #6
  br label %418

417:                                              ; preds = %377, %355
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %57) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %56) #6
  br label %456

418:                                              ; preds = %416, %364
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %57) #6
  br label %419

419:                                              ; preds = %418, %360
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %56) #6
  br label %612

420:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 72, ptr %71) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %72) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %73) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %73)
          to label %421 unwind label %427

421:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 32, ptr %74) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %75) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %75) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %74, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %75)
          to label %422 unwind label %431

422:                                              ; preds = %421
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %71, ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef nonnull align 8 dereferenceable(32) %74, i32 noundef 655)
          to label %423 unwind label %435

423:                                              ; preds = %422
  call void @llvm.lifetime.start.p0(i64 80, ptr %76) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %77) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %78) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %77, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %78)
          to label %424 unwind label %439

424:                                              ; preds = %423
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %76, ptr noundef nonnull align 8 dereferenceable(32) %77, i32 noundef 1)
          to label %425 unwind label %443

425:                                              ; preds = %424
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %70, ptr noundef nonnull align 8 dereferenceable(68) %71, ptr noundef nonnull align 8 dereferenceable(76) %76)
          to label %426 unwind label %447

426:                                              ; preds = %425
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %70) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %76) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %76) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %71) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %74) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %75) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %75) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %74) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %72) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %71) #6
  br label %456

427:                                              ; preds = %420
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %4, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %5, align 4
  br label %455

431:                                              ; preds = %421
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %4, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %5, align 4
  br label %454

435:                                              ; preds = %422
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %4, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %5, align 4
  br label %453

439:                                              ; preds = %423
  %440 = landingpad { ptr, i32 }
          cleanup
  %441 = extractvalue { ptr, i32 } %440, 0
  store ptr %441, ptr %4, align 8
  %442 = extractvalue { ptr, i32 } %440, 1
  store i32 %442, ptr %5, align 4
  br label %452

443:                                              ; preds = %424
  %444 = landingpad { ptr, i32 }
          cleanup
  %445 = extractvalue { ptr, i32 } %444, 0
  store ptr %445, ptr %4, align 8
  %446 = extractvalue { ptr, i32 } %444, 1
  store i32 %446, ptr %5, align 4
  br label %451

447:                                              ; preds = %425
  %448 = landingpad { ptr, i32 }
          cleanup
  %449 = extractvalue { ptr, i32 } %448, 0
  store ptr %449, ptr %4, align 8
  %450 = extractvalue { ptr, i32 } %448, 1
  store i32 %450, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %76) #6
  br label %451

451:                                              ; preds = %447, %443
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #6
  br label %452

452:                                              ; preds = %451, %439
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %76) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %71) #6
  br label %453

453:                                              ; preds = %452, %435
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %74) #6
  br label %454

454:                                              ; preds = %453, %431
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %75) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %75) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %74) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #6
  br label %455

455:                                              ; preds = %454, %427
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %72) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %71) #6
  br label %612

456:                                              ; preds = %426, %417
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #6
  store i32 0, ptr %79, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #6
  store ptr %41, ptr %80, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #6
  %457 = load ptr, ptr %80, align 8, !tbaa !5
  %458 = call ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %457) #6
  %459 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.37", ptr %81, i32 0, i32 0
  store ptr %458, ptr %459, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %82) #6
  %460 = load ptr, ptr %80, align 8, !tbaa !5
  %461 = call ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %460) #6
  %462 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.37", ptr %82, i32 0, i32 0
  store ptr %461, ptr %462, align 8
  br label %463

463:                                              ; preds = %607, %456
  %464 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %82) #6
  br i1 %464, label %466, label %465

465:                                              ; preds = %463
  store i32 4, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #6
  br label %611

466:                                              ; preds = %463
  call void @llvm.lifetime.start.p0(i64 8, ptr %83) #6
  %467 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #6
  store ptr %467, ptr %83, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %84) #6
  %468 = load ptr, ptr %83, align 8, !tbaa !5
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_110info_queryILi4139ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET0_RKN2cl6DeviceE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %84, ptr noundef nonnull align 8 dereferenceable(9) %468)
          to label %469 unwind label %484

469:                                              ; preds = %466
  %470 = load ptr, ptr %83, align 8, !tbaa !5
  %471 = invoke noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_121should_include_deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl6DeviceE(ptr noundef nonnull align 8 dereferenceable(32) %84, ptr noundef nonnull align 8 dereferenceable(9) %470)
          to label %472 unwind label %488

472:                                              ; preds = %469
  br i1 %471, label %473, label %606

473:                                              ; preds = %472
  call void @llvm.lifetime.start.p0(i64 16, ptr %85) #6
  invoke void @_ZNSt8optionalIN2cl7ContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %55)
          to label %474 unwind label %492

474:                                              ; preds = %473
  %475 = call noundef zeroext i1 @_ZNKSt8optionalIN2cl7ContextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(16) %85) #6
  br i1 %475, label %556, label %476

476:                                              ; preds = %474
  call void @llvm.lifetime.start.p0(i64 8, ptr %86) #6
  %477 = load ptr, ptr %83, align 8, !tbaa !5
  invoke void @_ZN2cl7ContextC2ERKNS_6DeviceEPKlPFvPKcPKvmPvESA_Pi(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(9) %477, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %8)
          to label %478 unwind label %496

478:                                              ; preds = %476
  %479 = load i32, ptr %8, align 4, !tbaa !25
  %480 = icmp eq i32 %479, 0
  br i1 %480, label %481, label %504

481:                                              ; preds = %478
  %482 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8optionalIN2cl7ContextEEaSIRS1_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS2_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS1_ES7_IS1_NSt5decayISA_E4typeEEEEESt16is_constructibleIS1_JSA_EESt13is_assignableIS4_SA_EEERS2_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %483 unwind label %500

483:                                              ; preds = %481
  br label %553

484:                                              ; preds = %466
  %485 = landingpad { ptr, i32 }
          cleanup
  %486 = extractvalue { ptr, i32 } %485, 0
  store ptr %486, ptr %4, align 8
  %487 = extractvalue { ptr, i32 } %485, 1
  store i32 %487, ptr %5, align 4
  br label %610

488:                                              ; preds = %469
  %489 = landingpad { ptr, i32 }
          cleanup
  %490 = extractvalue { ptr, i32 } %489, 0
  store ptr %490, ptr %4, align 8
  %491 = extractvalue { ptr, i32 } %489, 1
  store i32 %491, ptr %5, align 4
  br label %609

492:                                              ; preds = %473
  %493 = landingpad { ptr, i32 }
          cleanup
  %494 = extractvalue { ptr, i32 } %493, 0
  store ptr %494, ptr %4, align 8
  %495 = extractvalue { ptr, i32 } %493, 1
  store i32 %495, ptr %5, align 4
  br label %605

496:                                              ; preds = %476
  %497 = landingpad { ptr, i32 }
          cleanup
  %498 = extractvalue { ptr, i32 } %497, 0
  store ptr %498, ptr %4, align 8
  %499 = extractvalue { ptr, i32 } %497, 1
  store i32 %499, ptr %5, align 4
  br label %555

500:                                              ; preds = %481
  %501 = landingpad { ptr, i32 }
          cleanup
  %502 = extractvalue { ptr, i32 } %501, 0
  store ptr %502, ptr %4, align 8
  %503 = extractvalue { ptr, i32 } %501, 1
  store i32 %503, ptr %5, align 4
  br label %554

504:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 72, ptr %88) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %89) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %90) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %90) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %89, ptr noundef @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %90)
          to label %505 unwind label %514

505:                                              ; preds = %504
  call void @llvm.lifetime.start.p0(i64 32, ptr %91) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %92) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %91, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %92)
          to label %506 unwind label %518

506:                                              ; preds = %505
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %88, ptr noundef nonnull align 8 dereferenceable(32) %89, ptr noundef nonnull align 8 dereferenceable(32) %91, i32 noundef 676)
          to label %507 unwind label %522

507:                                              ; preds = %506
  call void @llvm.lifetime.start.p0(i64 80, ptr %93) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %94) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %95) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %95)
          to label %508 unwind label %526

508:                                              ; preds = %507
  call void @llvm.lifetime.start.p0(i64 32, ptr %97) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %98) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %98) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %97, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %98)
          to label %509 unwind label %530

509:                                              ; preds = %508
  %510 = load i32, ptr %8, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %96, ptr noundef nonnull align 8 dereferenceable(32) %97, i32 noundef %510)
          to label %511 unwind label %534

511:                                              ; preds = %509
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %93, ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef %96, i32 noundef 1)
          to label %512 unwind label %538

512:                                              ; preds = %511
  invoke void @_ZN7hipsycl2rt11print_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %87, ptr noundef nonnull align 8 dereferenceable(68) %88, ptr noundef nonnull align 8 dereferenceable(76) %93)
          to label %513 unwind label %542

513:                                              ; preds = %512
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %87) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %93) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %96) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %97) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %98) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %98) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %97) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %94) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %95) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %94) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %93) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %88) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %91) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %92) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %91) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %89) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %90) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %90) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %89) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %88) #6
  br label %553

514:                                              ; preds = %504
  %515 = landingpad { ptr, i32 }
          cleanup
  %516 = extractvalue { ptr, i32 } %515, 0
  store ptr %516, ptr %4, align 8
  %517 = extractvalue { ptr, i32 } %515, 1
  store i32 %517, ptr %5, align 4
  br label %552

518:                                              ; preds = %505
  %519 = landingpad { ptr, i32 }
          cleanup
  %520 = extractvalue { ptr, i32 } %519, 0
  store ptr %520, ptr %4, align 8
  %521 = extractvalue { ptr, i32 } %519, 1
  store i32 %521, ptr %5, align 4
  br label %551

522:                                              ; preds = %506
  %523 = landingpad { ptr, i32 }
          cleanup
  %524 = extractvalue { ptr, i32 } %523, 0
  store ptr %524, ptr %4, align 8
  %525 = extractvalue { ptr, i32 } %523, 1
  store i32 %525, ptr %5, align 4
  br label %550

526:                                              ; preds = %507
  %527 = landingpad { ptr, i32 }
          cleanup
  %528 = extractvalue { ptr, i32 } %527, 0
  store ptr %528, ptr %4, align 8
  %529 = extractvalue { ptr, i32 } %527, 1
  store i32 %529, ptr %5, align 4
  br label %549

530:                                              ; preds = %508
  %531 = landingpad { ptr, i32 }
          cleanup
  %532 = extractvalue { ptr, i32 } %531, 0
  store ptr %532, ptr %4, align 8
  %533 = extractvalue { ptr, i32 } %531, 1
  store i32 %533, ptr %5, align 4
  br label %548

534:                                              ; preds = %509
  %535 = landingpad { ptr, i32 }
          cleanup
  %536 = extractvalue { ptr, i32 } %535, 0
  store ptr %536, ptr %4, align 8
  %537 = extractvalue { ptr, i32 } %535, 1
  store i32 %537, ptr %5, align 4
  br label %547

538:                                              ; preds = %511
  %539 = landingpad { ptr, i32 }
          cleanup
  %540 = extractvalue { ptr, i32 } %539, 0
  store ptr %540, ptr %4, align 8
  %541 = extractvalue { ptr, i32 } %539, 1
  store i32 %541, ptr %5, align 4
  br label %546

542:                                              ; preds = %512
  %543 = landingpad { ptr, i32 }
          cleanup
  %544 = extractvalue { ptr, i32 } %543, 0
  store ptr %544, ptr %4, align 8
  %545 = extractvalue { ptr, i32 } %543, 1
  store i32 %545, ptr %5, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %93) #6
  br label %546

546:                                              ; preds = %542, %538
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %96) #6
  br label %547

547:                                              ; preds = %546, %534
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %97) #6
  br label %548

548:                                              ; preds = %547, %530
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %98) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %98) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %97) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %94) #6
  br label %549

549:                                              ; preds = %548, %526
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %95) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %94) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %93) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %88) #6
  br label %550

550:                                              ; preds = %549, %522
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %91) #6
  br label %551

551:                                              ; preds = %550, %518
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %92) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %91) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %89) #6
  br label %552

552:                                              ; preds = %551, %514
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %90) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %90) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %89) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %88) #6
  br label %554

553:                                              ; preds = %513, %483
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %86) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #6
  br label %556

554:                                              ; preds = %552, %500
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %86) #6
  br label %555

555:                                              ; preds = %554, %496
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #6
  br label %604

556:                                              ; preds = %553, %474
  %557 = call noundef zeroext i1 @_ZNKSt8optionalIN2cl7ContextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(16) %85) #6
  br i1 %557, label %558, label %599

558:                                              ; preds = %556
  call void @llvm.lifetime.start.p0(i64 96, ptr %99) #6
  %559 = load ptr, ptr %83, align 8, !tbaa !5
  %560 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNRSt8optionalIN2cl7ContextEE5valueEv(ptr noundef nonnull align 8 dereferenceable(16) %85)
          to label %561 unwind label %579

561:                                              ; preds = %558
  %562 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 1
  %563 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %562) #6
  %564 = trunc i64 %563 to i32
  %565 = load i32, ptr %40, align 4, !tbaa !25
  invoke void @_ZN7hipsycl2rt20ocl_hardware_contextC1ERKN2cl6DeviceERKNS2_7ContextEii(ptr noundef nonnull align 8 dereferenceable(89) %99, ptr noundef nonnull align 8 dereferenceable(9) %559, ptr noundef nonnull align 8 dereferenceable(8) %560, i32 noundef %564, i32 noundef %565)
          to label %566 unwind label %579

566:                                              ; preds = %561
  %567 = load i32, ptr %21, align 4, !tbaa !25
  %568 = load i32, ptr %79, align 4, !tbaa !25
  %569 = load i32, ptr %40, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %100) #6
  invoke void @_ZNK7hipsycl2rt20ocl_hardware_context15get_device_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %100, ptr noundef nonnull align 8 dereferenceable(89) %99)
          to label %570 unwind label %583

570:                                              ; preds = %566
  %571 = invoke noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt13unordered_mapINS0_10backend_idESt6vectorINS0_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEES2_iiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESP_(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef 3, i32 noundef %567, i32 noundef %568, i32 noundef %569, ptr noundef nonnull align 8 dereferenceable(32) %100, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %572 unwind label %587

572:                                              ; preds = %570
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %100) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %100) #6
  br i1 %571, label %573, label %596

573:                                              ; preds = %572
  %574 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 1
  invoke void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %574, ptr noundef nonnull align 8 dereferenceable(89) %99)
          to label %575 unwind label %592

575:                                              ; preds = %573
  %576 = getelementptr inbounds %"class.hipsycl::rt::ocl_hardware_manager", ptr %101, i32 0, i32 1
  %577 = call noundef nonnull align 8 dereferenceable(89) ptr @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %576) #6
  invoke void @_ZN7hipsycl2rt20ocl_hardware_context14init_allocatorEPNS0_20ocl_hardware_managerE(ptr noundef nonnull align 8 dereferenceable(89) %577, ptr noundef %101)
          to label %578 unwind label %592

578:                                              ; preds = %575
  br label %596

579:                                              ; preds = %561, %558
  %580 = landingpad { ptr, i32 }
          cleanup
  %581 = extractvalue { ptr, i32 } %580, 0
  store ptr %581, ptr %4, align 8
  %582 = extractvalue { ptr, i32 } %580, 1
  store i32 %582, ptr %5, align 4
  br label %598

583:                                              ; preds = %566
  %584 = landingpad { ptr, i32 }
          cleanup
  %585 = extractvalue { ptr, i32 } %584, 0
  store ptr %585, ptr %4, align 8
  %586 = extractvalue { ptr, i32 } %584, 1
  store i32 %586, ptr %5, align 4
  br label %591

587:                                              ; preds = %570
  %588 = landingpad { ptr, i32 }
          cleanup
  %589 = extractvalue { ptr, i32 } %588, 0
  store ptr %589, ptr %4, align 8
  %590 = extractvalue { ptr, i32 } %588, 1
  store i32 %590, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %100) #6
  br label %591

591:                                              ; preds = %587, %583
  call void @llvm.lifetime.end.p0(i64 32, ptr %100) #6
  br label %597

592:                                              ; preds = %575, %573
  %593 = landingpad { ptr, i32 }
          cleanup
  %594 = extractvalue { ptr, i32 } %593, 0
  store ptr %594, ptr %4, align 8
  %595 = extractvalue { ptr, i32 } %593, 1
  store i32 %595, ptr %5, align 4
  br label %597

596:                                              ; preds = %578, %572
  call void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr noundef nonnull align 8 dereferenceable(89) %99) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %99) #6
  br label %599

597:                                              ; preds = %592, %591
  call void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr noundef nonnull align 8 dereferenceable(89) %99) #6
  br label %598

598:                                              ; preds = %597, %579
  call void @llvm.lifetime.end.p0(i64 96, ptr %99) #6
  br label %604

599:                                              ; preds = %596, %556
  %600 = load i32, ptr %21, align 4, !tbaa !25
  %601 = add nsw i32 %600, 1
  store i32 %601, ptr %21, align 4, !tbaa !25
  %602 = load i32, ptr %79, align 4, !tbaa !25
  %603 = add nsw i32 %602, 1
  store i32 %603, ptr %79, align 4, !tbaa !25
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %85) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #6
  br label %606

604:                                              ; preds = %598, %555
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %85) #6
  br label %605

605:                                              ; preds = %604, %492
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #6
  br label %609

606:                                              ; preds = %599, %472
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %84) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %84) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #6
  br label %607

607:                                              ; preds = %606
  %608 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #6
  br label %463

609:                                              ; preds = %605, %488
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %84) #6
  br label %610

610:                                              ; preds = %609, %484
  call void @llvm.lifetime.end.p0(i64 32, ptr %84) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #6
  br label %612

611:                                              ; preds = %465
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #6
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  br label %614

612:                                              ; preds = %610, %455, %419
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #6
  br label %613

613:                                              ; preds = %612, %356
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  br label %615

614:                                              ; preds = %611, %294
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %616

615:                                              ; preds = %613, %337, %295
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %619

616:                                              ; preds = %614, %251
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %617

617:                                              ; preds = %616
  %618 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br label %185

619:                                              ; preds = %615, %247, %205
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %621

620:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  ret void

621:                                              ; preds = %619, %177, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %622

622:                                              ; preds = %621, %131
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  br label %623

623:                                              ; preds = %622, %127
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  call void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %102) #6
  call void @_ZN7hipsycl2rt24backend_hardware_managerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %101) #6
  br label %624

624:                                              ; preds = %623
  %625 = load ptr, ptr %4, align 8
  %626 = load i32, ptr %5, align 4
  %627 = insertvalue { ptr, i32 } poison, ptr %625, 0
  %628 = insertvalue { ptr, i32 } %627, i32 %626, 1
  resume { ptr, i32 } %628
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt24backend_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

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

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

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7hipsycl2rt8settings3getILNS0_7settingE2EEENS0_13setting_traitIXT_EE4typeEv(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map") align 8, ptr noundef nonnull align 8 dereferenceable(217)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN2cl8Platform3getEPSt6vectorIS0_SaIS0_EE(ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_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_cxxneIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_123should_include_platformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl8PlatformE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cl7ContextC2ERKSt6vectorINS_6DeviceESaIS2_EEPKlPFvPKcPKvmPvESD_Pi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_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_cxxneIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_121should_include_deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl6DeviceE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(9)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN2cl7ContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cl7ContextC2ERKNS_6DeviceEPKlPFvPKcPKvmPvESA_Pi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(9), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt11print_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) #3

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

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

declare noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt13unordered_mapINS0_10backend_idESt6vectorINS0_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEES2_iiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESP_(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(89)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

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

declare void @_ZN7hipsycl2rt20ocl_hardware_contextC1ERKN2cl6DeviceERKNS2_7ContextEii(ptr, ptr, ptr, i32, i32)

declare void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr)

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 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 = { 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 #5 = { "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 #6 = { 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 = !{!12, !22, i64 56}
!12 = !{!"_ZTSN7hipsycl2rt20ocl_hardware_managerE", !13, i64 0, !14, i64 8, !18, i64 32, !22, i64 56}
!13 = !{!"_ZTSN7hipsycl2rt24backend_hardware_managerE"}
!14 = !{!"_ZTSSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIN2cl8PlatformESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN2cl8PlatformESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN2cl8PlatformESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN2cl8PlatformESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !7, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!30, !30, i64 0}
!30 = !{!"long", !7, i64 0}


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

%"class.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] }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl" }
%"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl" = type { %"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cl::Platform, std::allocator<cl::Platform>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr.21" }
%"class.std::unique_ptr.21" = type { %"struct.std::__uniq_ptr_data.22" }
%"struct.std::__uniq_ptr_data.22" = type { %"class.std::__uniq_ptr_impl.23" }
%"class.std::__uniq_ptr_impl.23" = type { %"class.std::tuple.24" }
%"class.std::tuple.24" = type { %"struct.std::_Tuple_impl.25" }
%"struct.std::_Tuple_impl.25" = type { %"struct.std::_Head_base.28" }
%"struct.std::_Head_base.28" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::allocator" = type { i8 }
%"class.hipsycl::rt::error_info" = type <{ %"class.std::__cxx11::basic_string", %"class.hipsycl::rt::error_code", i32, [4 x i8] }>
%"class.hipsycl::rt::error_code" = type { %"class.std::__cxx11::basic_string", i8, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl" }
%"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl" = type { %"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cl::Device, std::allocator<cl::Device>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<cl::Context>::_Storage", i8 }>
%"union.std::_Optional_payload_base<cl::Context>::_Storage" = type { %"class.cl::Context" }
%"class.cl::Context" = type { %"class.cl::detail::Wrapper" }
%"class.cl::detail::Wrapper" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.37" = type { ptr }
%"class.hipsycl::rt::ocl_hardware_context" = type <{ %"class.hipsycl::rt::hardware_context", i32, i32, %"class.cl::Context", %"class.cl::Device", %"class.std::shared_ptr", %"class.hipsycl::rt::ocl_allocator", i8, [7 x i8] }>
%"class.hipsycl::rt::hardware_context" = type { ptr }
%"class.cl::Device" = type { %"class.cl::detail::Wrapper.base", [7 x i8] }
%"class.cl::detail::Wrapper.base" = type <{ ptr, i8 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.hipsycl::rt::ocl_allocator" = type { %"class.hipsycl::rt::backend_allocator", ptr, %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::backend_allocator" = type { ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }

@.str.5 = external hidden unnamed_addr constant [98 x i8], align 1
@_ZTVN7hipsycl2rt20ocl_hardware_managerE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8
@__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [184 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [142 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [57 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7hipsycl2rt20ocl_hardware_context15get_device_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(89)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_110info_queryILi4139ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET0_RKN2cl6DeviceE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt20ocl_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(60) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unordered_map", align 8
  %3 = alloca %"class.std::vector.11", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.hipsycl::rt::result", align 8
  %6 = alloca %"class.hipsycl::rt::source_location", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.hipsycl::rt::error_info", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.hipsycl::rt::error_code", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.hipsycl::rt::result", align 8
  %21 = alloca %"class.hipsycl::rt::source_location", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.hipsycl::rt::error_info", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.hipsycl::rt::error_code", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.std::vector.30", align 8
  %33 = alloca %"class.hipsycl::rt::result", align 8
  %34 = alloca %"class.hipsycl::rt::source_location", align 8
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::allocator", align 1
  %37 = alloca %"class.std::__cxx11::basic_string", align 8
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca %"class.hipsycl::rt::error_info", align 8
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::allocator", align 1
  %42 = alloca %"class.hipsycl::rt::error_code", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca %"class.std::allocator", align 1
  %45 = alloca %"class.std::optional", align 8
  %46 = alloca [3 x i64], align 16
  %47 = alloca %"class.cl::Context", align 8
  %48 = alloca %"class.hipsycl::rt::result", align 8
  %49 = alloca %"class.hipsycl::rt::source_location", align 8
  %50 = alloca %"class.std::__cxx11::basic_string", align 8
  %51 = alloca %"class.std::allocator", align 1
  %52 = alloca %"class.std::__cxx11::basic_string", align 8
  %53 = alloca %"class.std::allocator", align 1
  %54 = alloca %"class.hipsycl::rt::error_info", align 8
  %55 = alloca %"class.std::__cxx11::basic_string", align 8
  %56 = alloca %"class.std::allocator", align 1
  %57 = alloca %"class.hipsycl::rt::error_code", align 8
  %58 = alloca %"class.std::__cxx11::basic_string", align 8
  %59 = alloca %"class.std::allocator", align 1
  %60 = alloca %"class.hipsycl::rt::result", align 8
  %61 = alloca %"class.hipsycl::rt::source_location", align 8
  %62 = alloca %"class.std::__cxx11::basic_string", align 8
  %63 = alloca %"class.std::allocator", align 1
  %64 = alloca %"class.std::__cxx11::basic_string", align 8
  %65 = alloca %"class.std::allocator", align 1
  %66 = alloca %"class.hipsycl::rt::error_info", align 8
  %67 = alloca %"class.std::__cxx11::basic_string", align 8
  %68 = alloca %"class.std::allocator", align 1
  %69 = alloca %"class.__gnu_cxx::__normal_iterator.37", align 8
  %70 = alloca %"class.__gnu_cxx::__normal_iterator.37", align 8
  %71 = alloca %"class.std::__cxx11::basic_string", align 8
  %72 = alloca %"class.std::optional", align 8
  %73 = alloca %"class.cl::Context", align 8
  %74 = alloca %"class.hipsycl::rt::result", align 8
  %75 = alloca %"class.hipsycl::rt::source_location", align 8
  %76 = alloca %"class.std::__cxx11::basic_string", align 8
  %77 = alloca %"class.std::allocator", align 1
  %78 = alloca %"class.std::__cxx11::basic_string", align 8
  %79 = alloca %"class.std::allocator", align 1
  %80 = alloca %"class.hipsycl::rt::error_info", align 8
  %81 = alloca %"class.std::__cxx11::basic_string", align 8
  %82 = alloca %"class.std::allocator", align 1
  %83 = alloca %"class.hipsycl::rt::error_code", align 8
  %84 = alloca %"class.std::__cxx11::basic_string", align 8
  %85 = alloca %"class.std::allocator", align 1
  %86 = alloca %"class.hipsycl::rt::ocl_hardware_context", align 8
  %87 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN7hipsycl2rt24backend_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  store ptr getelementptr inbounds inrange(-16, 48) (i8, ptr @_ZTVN7hipsycl2rt20ocl_hardware_managerE, i64 16), ptr %0, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  %89 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %89) #6
  %90 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 3, ptr %90, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #6
  %91 = invoke noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
          to label %92 unwind label %109

92:                                               ; preds = %1
  invoke void @_ZNK7hipsycl2rt8settings3getILNS0_7settingE2EEENS0_13setting_traitIXT_EE4typeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map") align 8 %2, ptr noundef nonnull align 8 dereferenceable(217) %91)
          to label %93 unwind label %109

93:                                               ; preds = %92
  %94 = invoke noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
          to label %95 unwind label %111

95:                                               ; preds = %93
  %96 = call noundef zeroext i1 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE12EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %94)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %97 = invoke noundef i32 @_ZN2cl8Platform3getEPSt6vectorIS0_SaIS0_EE(ptr noundef nonnull %3)
          to label %98 unwind label %113

98:                                               ; preds = %95
  store i32 %97, ptr %4, align 4, !tbaa !22
  %.not = icmp eq i32 %97, 0
  br i1 %.not, label %138, label %99

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %100 unwind label %115

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %101 unwind label %117

101:                                              ; preds = %100
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 596)
          to label %102 unwind label %119

102:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %103 unwind label %121

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %104 unwind label %123

104:                                              ; preds = %103
  %105 = load i32, ptr %4, align 4, !tbaa !22
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %105)
          to label %106 unwind label %125

106:                                              ; preds = %104
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %11, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull %14, i32 noundef 1)
          to label %107 unwind label %127

107:                                              ; preds = %106
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %5, ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(76) %11)
          to label %108 unwind label %129

108:                                              ; preds = %107
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %11) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %138

109:                                              ; preds = %92, %1
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %425

111:                                              ; preds = %93
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %424

113:                                              ; preds = %95
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %423

115:                                              ; preds = %99
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %137

117:                                              ; preds = %100
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %136

119:                                              ; preds = %101
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %135

121:                                              ; preds = %102
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %134

123:                                              ; preds = %103
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %133

125:                                              ; preds = %104
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %132

127:                                              ; preds = %106
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %131

129:                                              ; preds = %107
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %11) #6
  br label %131

131:                                              ; preds = %129, %127
  %.pn = phi { ptr, i32 } [ %130, %129 ], [ %128, %127 ]
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  br label %132

132:                                              ; preds = %131, %125
  %.pn.pn = phi { ptr, i32 } [ %.pn, %131 ], [ %126, %125 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %133

133:                                              ; preds = %132, %123
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %132 ], [ %124, %123 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %134

134:                                              ; preds = %133, %121
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %133 ], [ %122, %121 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %6) #6
  br label %135

135:                                              ; preds = %134, %119
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %134 ], [ %120, %119 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %136

136:                                              ; preds = %135, %117
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %135 ], [ %118, %117 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %137

137:                                              ; preds = %136, %115
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %136 ], [ %116, %115 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #6
  br label %423

138:                                              ; preds = %108, %98
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %139 = call ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  store ptr %139, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %140 = call ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  store ptr %140, ptr %18, align 8
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br i1 %141, label %.lr.ph176, label %._crit_edge177

.lr.ph176:                                        ; preds = %138
  %142 = getelementptr inbounds i8, ptr %46, i64 8
  %143 = getelementptr inbounds i8, ptr %46, i64 16
  br label %144

._crit_edge177:                                   ; preds = %419, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  ret void

144:                                              ; preds = %.lr.ph176, %419
  %.082174 = phi i32 [ 0, %.lr.ph176 ], [ %.486, %419 ]
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  %146 = invoke noundef i32 @_ZNK2cl8Platform7getInfoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEijPT_(ptr noundef nonnull align 8 dereferenceable(8) %145, i32 noundef 2306, ptr noundef nonnull %19)
          to label %147 unwind label %158

147:                                              ; preds = %144
  store i32 %146, ptr %4, align 4, !tbaa !22
  %.not94 = icmp eq i32 %146, 0
  br i1 %.not94, label %183, label %148

148:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %149 unwind label %160

149:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %150 unwind label %162

150:                                              ; preds = %149
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %21, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef 609)
          to label %151 unwind label %164

151:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %26) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %28) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %152 unwind label %166

152:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %153 unwind label %168

153:                                              ; preds = %152
  %154 = load i32, ptr %4, align 4, !tbaa !22
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %29, ptr noundef nonnull align 8 dereferenceable(32) %30, i32 noundef %154)
          to label %155 unwind label %170

155:                                              ; preds = %153
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %26, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull %29, i32 noundef 1)
          to label %156 unwind label %172

156:                                              ; preds = %155
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %20, ptr noundef nonnull align 8 dereferenceable(68) %21, ptr noundef nonnull align 8 dereferenceable(76) %26)
          to label %157 unwind label %174

157:                                              ; preds = %156
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %26) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %26) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #6
  br label %183

158:                                              ; preds = %202, %200, %198, %196, %193, %191, %186, %183, %144
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %422

160:                                              ; preds = %148
  %161 = landingpad { ptr, i32 }
          cleanup
  br label %182

162:                                              ; preds = %149
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %181

164:                                              ; preds = %150
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %180

166:                                              ; preds = %151
  %167 = landingpad { ptr, i32 }
          cleanup
  br label %179

168:                                              ; preds = %152
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %178

170:                                              ; preds = %153
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %177

172:                                              ; preds = %155
  %173 = landingpad { ptr, i32 }
          cleanup
  br label %176

174:                                              ; preds = %156
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %26) #6
  br label %176

176:                                              ; preds = %174, %172
  %.pn95 = phi { ptr, i32 } [ %175, %174 ], [ %173, %172 ]
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #6
  br label %177

177:                                              ; preds = %176, %170
  %.pn95.pn = phi { ptr, i32 } [ %.pn95, %176 ], [ %171, %170 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %178

178:                                              ; preds = %177, %168
  %.pn95.pn.pn = phi { ptr, i32 } [ %.pn95.pn, %177 ], [ %169, %168 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  br label %179

179:                                              ; preds = %178, %166
  %.pn95.pn.pn.pn = phi { ptr, i32 } [ %.pn95.pn.pn, %178 ], [ %167, %166 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %26) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %21) #6
  br label %180

180:                                              ; preds = %179, %164
  %.pn95.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn95.pn.pn.pn, %179 ], [ %165, %164 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %181

181:                                              ; preds = %180, %162
  %.pn95.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn95.pn.pn.pn.pn, %180 ], [ %163, %162 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %182

182:                                              ; preds = %181, %160
  %.pn95.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn95.pn.pn.pn.pn.pn, %181 ], [ %161, %160 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #6
  br label %422

183:                                              ; preds = %157, %147
  %184 = invoke noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_123should_include_platformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl8PlatformE(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %145)
          to label %185 unwind label %158

185:                                              ; preds = %183
  br i1 %184, label %186, label %419

186:                                              ; preds = %185
  %187 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %188 unwind label %158

188:                                              ; preds = %186
  %189 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %187)
  %190 = icmp slt i32 %189, 3
  br i1 %190, label %202, label %191

191:                                              ; preds = %188
  %192 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %193 unwind label %158

193:                                              ; preds = %191
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %192)
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef nonnull @.str.14)
          to label %196 unwind label %158

196:                                              ; preds = %193
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %195, ptr noundef nonnull @.str.15)
          to label %198 unwind label %158

198:                                              ; preds = %196
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %200 unwind label %158

200:                                              ; preds = %198
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %202 unwind label %158

202:                                              ; preds = %200, %188
  invoke void @_ZNSt6vectorIN2cl8PlatformESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 8 dereferenceable(8) %145)
          to label %203 unwind label %158

203:                                              ; preds = %202
  %204 = call noundef i64 @_ZNKSt6vectorIN2cl8PlatformESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #6
  %205 = trunc i64 %204 to i32
  %206 = add i32 %205, -1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %32) #6
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  %207 = invoke noundef i32 @_ZNK2cl8Platform10getDevicesEmPSt6vectorINS_6DeviceESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(8) %145, i64 noundef 14, ptr noundef nonnull %32)
          to label %208 unwind label %219

208:                                              ; preds = %203
  store i32 %207, ptr %4, align 4, !tbaa !22
  %.not103 = icmp eq i32 %207, 0
  br i1 %.not103, label %244, label %209

209:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %34) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %35) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %36) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %210 unwind label %221

210:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %37) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %38) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %211 unwind label %223

211:                                              ; preds = %210
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %34, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %37, i32 noundef 628)
          to label %212 unwind label %225

212:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %39) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %40) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %41) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %213 unwind label %227

213:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %43) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %44) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %214 unwind label %229

214:                                              ; preds = %213
  %215 = load i32, ptr %4, align 4, !tbaa !22
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %42, ptr noundef nonnull align 8 dereferenceable(32) %43, i32 noundef %215)
          to label %216 unwind label %231

216:                                              ; preds = %214
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %39, ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull %42, i32 noundef 1)
          to label %217 unwind label %233

217:                                              ; preds = %216
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %33, ptr noundef nonnull align 8 dereferenceable(68) %34, ptr noundef nonnull align 8 dereferenceable(76) %39)
          to label %218 unwind label %235

218:                                              ; preds = %217
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %39) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %42) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %44) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %41) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %40) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %39) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %34) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %37) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %34) #6
  br label %417

219:                                              ; preds = %203
  %220 = landingpad { ptr, i32 }
          cleanup
  br label %418

221:                                              ; preds = %209
  %222 = landingpad { ptr, i32 }
          cleanup
  br label %243

223:                                              ; preds = %210
  %224 = landingpad { ptr, i32 }
          cleanup
  br label %242

225:                                              ; preds = %211
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %241

227:                                              ; preds = %212
  %228 = landingpad { ptr, i32 }
          cleanup
  br label %240

229:                                              ; preds = %213
  %230 = landingpad { ptr, i32 }
          cleanup
  br label %239

231:                                              ; preds = %214
  %232 = landingpad { ptr, i32 }
          cleanup
  br label %238

233:                                              ; preds = %216
  %234 = landingpad { ptr, i32 }
          cleanup
  br label %237

235:                                              ; preds = %217
  %236 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %39) #6
  br label %237

237:                                              ; preds = %235, %233
  %.pn142 = phi { ptr, i32 } [ %236, %235 ], [ %234, %233 ]
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %42) #6
  br label %238

238:                                              ; preds = %237, %231
  %.pn142.pn = phi { ptr, i32 } [ %.pn142, %237 ], [ %232, %231 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #6
  br label %239

239:                                              ; preds = %238, %229
  %.pn142.pn.pn = phi { ptr, i32 } [ %.pn142.pn, %238 ], [ %230, %229 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %44) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #6
  br label %240

240:                                              ; preds = %239, %227
  %.pn142.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn, %239 ], [ %228, %227 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %41) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %40) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %39) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %34) #6
  br label %241

241:                                              ; preds = %240, %225
  %.pn142.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn, %240 ], [ %226, %225 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  br label %242

242:                                              ; preds = %241, %223
  %.pn142.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn, %241 ], [ %224, %223 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %37) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  br label %243

243:                                              ; preds = %242, %221
  %.pn142.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn, %242 ], [ %222, %221 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %34) #6
  br label %418

244:                                              ; preds = %208
  %245 = call noundef ptr @_ZNK2cl6detail7WrapperIP15_cl_platform_idE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %145)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #6
  call void @_ZNSt8optionalIN2cl7ContextEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #6
  br i1 %96, label %293, label %246

246:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %46) #6
  store i64 4228, ptr %46, align 16, !tbaa !24
  %247 = ptrtoint ptr %245 to i64
  store i64 %247, ptr %142, align 8, !tbaa !24
  store i64 0, ptr %143, align 16, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %47) #6
  invoke void @_ZN2cl7ContextC2ERKSt6vectorINS_6DeviceESaIS2_EEPKlPFvPKcPKvmPvESD_Pi(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull %46, ptr noundef null, ptr noundef null, ptr noundef nonnull %4)
          to label %248 unwind label %253

248:                                              ; preds = %246
  %249 = load i32, ptr %4, align 4, !tbaa !22
  %250 = icmp eq i32 %249, 0
  br i1 %250, label %251, label %257

251:                                              ; preds = %248
  %252 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8optionalIN2cl7ContextEEaSIRS1_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS2_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS1_ES7_IS1_NSt5decayISA_E4typeEEEEESt16is_constructibleIS1_JSA_EESt13is_assignableIS4_SA_EEERS2_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %290 unwind label %255

253:                                              ; preds = %246
  %254 = landingpad { ptr, i32 }
          cleanup
  br label %292

255:                                              ; preds = %251
  %256 = landingpad { ptr, i32 }
          cleanup
  br label %291

257:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %49) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %50) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %51) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %51)
          to label %258 unwind label %267

258:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %52) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %53) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %53)
          to label %259 unwind label %269

259:                                              ; preds = %258
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %49, ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(32) %52, i32 noundef 646)
          to label %260 unwind label %271

260:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %54) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %55) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %56) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %56)
          to label %261 unwind label %273

261:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %58) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %59) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %59)
          to label %262 unwind label %275

262:                                              ; preds = %261
  %263 = load i32, ptr %4, align 4, !tbaa !22
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %57, ptr noundef nonnull align 8 dereferenceable(32) %58, i32 noundef %263)
          to label %264 unwind label %277

264:                                              ; preds = %262
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %54, ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull %57, i32 noundef 1)
          to label %265 unwind label %279

265:                                              ; preds = %264
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %48, ptr noundef nonnull align 8 dereferenceable(68) %49, ptr noundef nonnull align 8 dereferenceable(76) %54)
          to label %266 unwind label %281

266:                                              ; preds = %265
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %54) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %57) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %59) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %58) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %56) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %55) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %54) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %49) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %53) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %52) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %51) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %50) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %49) #6
  br label %290

267:                                              ; preds = %257
  %268 = landingpad { ptr, i32 }
          cleanup
  br label %289

269:                                              ; preds = %258
  %270 = landingpad { ptr, i32 }
          cleanup
  br label %288

271:                                              ; preds = %259
  %272 = landingpad { ptr, i32 }
          cleanup
  br label %287

273:                                              ; preds = %260
  %274 = landingpad { ptr, i32 }
          cleanup
  br label %286

275:                                              ; preds = %261
  %276 = landingpad { ptr, i32 }
          cleanup
  br label %285

277:                                              ; preds = %262
  %278 = landingpad { ptr, i32 }
          cleanup
  br label %284

279:                                              ; preds = %264
  %280 = landingpad { ptr, i32 }
          cleanup
  br label %283

281:                                              ; preds = %265
  %282 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %54) #6
  br label %283

283:                                              ; preds = %281, %279
  %.pn104 = phi { ptr, i32 } [ %282, %281 ], [ %280, %279 ]
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %57) #6
  br label %284

284:                                              ; preds = %283, %277
  %.pn104.pn = phi { ptr, i32 } [ %.pn104, %283 ], [ %278, %277 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #6
  br label %285

285:                                              ; preds = %284, %275
  %.pn104.pn.pn = phi { ptr, i32 } [ %.pn104.pn, %284 ], [ %276, %275 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %59) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %59) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %58) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #6
  br label %286

286:                                              ; preds = %285, %273
  %.pn104.pn.pn.pn = phi { ptr, i32 } [ %.pn104.pn.pn, %285 ], [ %274, %273 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %56) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %56) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %55) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %54) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %49) #6
  br label %287

287:                                              ; preds = %286, %271
  %.pn104.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn104.pn.pn.pn, %286 ], [ %272, %271 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #6
  br label %288

288:                                              ; preds = %287, %269
  %.pn104.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn104.pn.pn.pn.pn, %287 ], [ %270, %269 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %53) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %52) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #6
  br label %289

289:                                              ; preds = %288, %267
  %.pn104.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn104.pn.pn.pn.pn.pn, %288 ], [ %268, %267 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %51) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %51) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %50) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %49) #6
  br label %291

290:                                              ; preds = %251, %266
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %47) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #6
  br label %317

291:                                              ; preds = %289, %255
  %.pn112 = phi { ptr, i32 } [ %256, %255 ], [ %.pn104.pn.pn.pn.pn.pn.pn, %289 ]
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  br label %292

292:                                              ; preds = %291, %253
  %.pn112.pn = phi { ptr, i32 } [ %.pn112, %291 ], [ %254, %253 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %47) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #6
  br label %416

293:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %61) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %62) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %63) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %63)
          to label %294 unwind label %300

294:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %64) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %65) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %64, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %65)
          to label %295 unwind label %302

295:                                              ; preds = %294
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %61, ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %64, i32 noundef 655)
          to label %296 unwind label %304

296:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %66) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %67) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %68) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %67, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %68)
          to label %297 unwind label %306

297:                                              ; preds = %296
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %66, ptr noundef nonnull align 8 dereferenceable(32) %67, i32 noundef 1)
          to label %298 unwind label %308

298:                                              ; preds = %297
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %60, ptr noundef nonnull align 8 dereferenceable(68) %61, ptr noundef nonnull align 8 dereferenceable(76) %66)
          to label %299 unwind label %310

299:                                              ; preds = %298
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %60) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %66) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %67) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %68) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %67) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %66) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %61) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %64) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %65) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %64) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %62) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %61) #6
  br label %317

300:                                              ; preds = %293
  %301 = landingpad { ptr, i32 }
          cleanup
  br label %316

302:                                              ; preds = %294
  %303 = landingpad { ptr, i32 }
          cleanup
  br label %315

304:                                              ; preds = %295
  %305 = landingpad { ptr, i32 }
          cleanup
  br label %314

306:                                              ; preds = %296
  %307 = landingpad { ptr, i32 }
          cleanup
  br label %313

308:                                              ; preds = %297
  %309 = landingpad { ptr, i32 }
          cleanup
  br label %312

310:                                              ; preds = %298
  %311 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %66) #6
  br label %312

312:                                              ; preds = %310, %308
  %.pn115 = phi { ptr, i32 } [ %311, %310 ], [ %309, %308 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %67) #6
  br label %313

313:                                              ; preds = %312, %306
  %.pn115.pn = phi { ptr, i32 } [ %.pn115, %312 ], [ %307, %306 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %68) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %67) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %66) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %61) #6
  br label %314

314:                                              ; preds = %313, %304
  %.pn115.pn.pn = phi { ptr, i32 } [ %.pn115.pn, %313 ], [ %305, %304 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %64) #6
  br label %315

315:                                              ; preds = %314, %302
  %.pn115.pn.pn.pn = phi { ptr, i32 } [ %.pn115.pn.pn, %314 ], [ %303, %302 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %65) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %64) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  br label %316

316:                                              ; preds = %315, %300
  %.pn115.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn115.pn.pn.pn, %315 ], [ %301, %300 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %62) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %61) #6
  br label %416

317:                                              ; preds = %299, %290
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %69) #6
  %318 = call ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  store ptr %318, ptr %69, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %70) #6
  %319 = call ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  store ptr %319, ptr %70, align 8
  %320 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %70) #6
  br i1 %320, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %411, %317
  %.183.lcssa = phi i32 [ %.082174, %317 ], [ %.284, %411 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %70) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %69) #6
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #6
  br label %417

.lr.ph:                                           ; preds = %317, %411
  %.080173 = phi i32 [ %.181, %411 ], [ 0, %317 ]
  %.183172 = phi i32 [ %.284, %411 ], [ %.082174, %317 ]
  %321 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %69) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %71) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_110info_queryILi4139ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET0_RKN2cl6DeviceE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %71, ptr noundef nonnull align 8 dereferenceable(9) %321)
          to label %322 unwind label %334

322:                                              ; preds = %.lr.ph
  %323 = invoke noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_121should_include_deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl6DeviceE(ptr noundef nonnull align 8 dereferenceable(32) %71, ptr noundef nonnull align 8 dereferenceable(9) %321)
          to label %324 unwind label %336

324:                                              ; preds = %322
  br i1 %323, label %325, label %411

325:                                              ; preds = %324
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %72) #6
  invoke void @_ZNSt8optionalIN2cl7ContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(16) %45)
          to label %326 unwind label %338

326:                                              ; preds = %325
  %327 = call noundef zeroext i1 @_ZNKSt8optionalIN2cl7ContextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(16) %72) #6
  br i1 %327, label %380, label %328

328:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %73) #6
  invoke void @_ZN2cl7ContextC2ERKNS_6DeviceEPKlPFvPKcPKvmPvESA_Pi(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(9) %321, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef nonnull %4)
          to label %329 unwind label %340

329:                                              ; preds = %328
  %330 = load i32, ptr %4, align 4, !tbaa !22
  %331 = icmp eq i32 %330, 0
  br i1 %331, label %332, label %344

332:                                              ; preds = %329
  %333 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8optionalIN2cl7ContextEEaSIRS1_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS2_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS1_ES7_IS1_NSt5decayISA_E4typeEEEEESt16is_constructibleIS1_JSA_EESt13is_assignableIS4_SA_EEERS2_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(8) %73)
          to label %377 unwind label %342

334:                                              ; preds = %.lr.ph
  %335 = landingpad { ptr, i32 }
          cleanup
  br label %415

336:                                              ; preds = %322
  %337 = landingpad { ptr, i32 }
          cleanup
  br label %414

338:                                              ; preds = %325
  %339 = landingpad { ptr, i32 }
          cleanup
  br label %410

340:                                              ; preds = %328
  %341 = landingpad { ptr, i32 }
          cleanup
  br label %379

342:                                              ; preds = %332
  %343 = landingpad { ptr, i32 }
          cleanup
  br label %378

344:                                              ; preds = %329
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %75) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %76) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %77) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %77) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %76, ptr noundef nonnull @__func__._ZN7hipsycl2rt20ocl_hardware_managerC2Ev, ptr noundef nonnull align 1 dereferenceable(1) %77)
          to label %345 unwind label %354

345:                                              ; preds = %344
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %78) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %79) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %79)
          to label %346 unwind label %356

346:                                              ; preds = %345
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %75, ptr noundef nonnull align 8 dereferenceable(32) %76, ptr noundef nonnull align 8 dereferenceable(32) %78, i32 noundef 676)
          to label %347 unwind label %358

347:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %80) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %81) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %82) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %81, ptr noundef nonnull @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %82)
          to label %348 unwind label %360

348:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %84) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %85) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %85) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %84, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %85)
          to label %349 unwind label %362

349:                                              ; preds = %348
  %350 = load i32, ptr %4, align 4, !tbaa !22
  invoke void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40) %83, ptr noundef nonnull align 8 dereferenceable(32) %84, i32 noundef %350)
          to label %351 unwind label %364

351:                                              ; preds = %349
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %80, ptr noundef nonnull align 8 dereferenceable(32) %81, ptr noundef nonnull %83, i32 noundef 1)
          to label %352 unwind label %366

352:                                              ; preds = %351
  invoke void @_ZN7hipsycl2rt11print_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %74, ptr noundef nonnull align 8 dereferenceable(68) %75, ptr noundef nonnull align 8 dereferenceable(76) %80)
          to label %353 unwind label %368

353:                                              ; preds = %352
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %74) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %80) #6
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %83) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %84) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %85) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %85) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %84) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %81) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %82) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %81) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %80) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %75) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %79) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %78) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %76) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %77) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %77) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %76) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %75) #6
  br label %377

354:                                              ; preds = %344
  %355 = landingpad { ptr, i32 }
          cleanup
  br label %376

356:                                              ; preds = %345
  %357 = landingpad { ptr, i32 }
          cleanup
  br label %375

358:                                              ; preds = %346
  %359 = landingpad { ptr, i32 }
          cleanup
  br label %374

360:                                              ; preds = %347
  %361 = landingpad { ptr, i32 }
          cleanup
  br label %373

362:                                              ; preds = %348
  %363 = landingpad { ptr, i32 }
          cleanup
  br label %372

364:                                              ; preds = %349
  %365 = landingpad { ptr, i32 }
          cleanup
  br label %371

366:                                              ; preds = %351
  %367 = landingpad { ptr, i32 }
          cleanup
  br label %370

368:                                              ; preds = %352
  %369 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %80) #6
  br label %370

370:                                              ; preds = %368, %366
  %.pn121 = phi { ptr, i32 } [ %369, %368 ], [ %367, %366 ]
  call void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %83) #6
  br label %371

371:                                              ; preds = %370, %364
  %.pn121.pn = phi { ptr, i32 } [ %.pn121, %370 ], [ %365, %364 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %84) #6
  br label %372

372:                                              ; preds = %371, %362
  %.pn121.pn.pn = phi { ptr, i32 } [ %.pn121.pn, %371 ], [ %363, %362 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %85) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %85) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %84) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %81) #6
  br label %373

373:                                              ; preds = %372, %360
  %.pn121.pn.pn.pn = phi { ptr, i32 } [ %.pn121.pn.pn, %372 ], [ %361, %360 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %82) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %82) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %81) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %80) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %75) #6
  br label %374

374:                                              ; preds = %373, %358
  %.pn121.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn121.pn.pn.pn, %373 ], [ %359, %358 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #6
  br label %375

375:                                              ; preds = %374, %356
  %.pn121.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn121.pn.pn.pn.pn, %374 ], [ %357, %356 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %79) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %78) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %76) #6
  br label %376

376:                                              ; preds = %375, %354
  %.pn121.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn121.pn.pn.pn.pn.pn, %375 ], [ %355, %354 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %77) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %77) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %76) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %75) #6
  br label %378

377:                                              ; preds = %332, %353
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %73) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %73) #6
  br label %380

378:                                              ; preds = %376, %342
  %.pn129 = phi { ptr, i32 } [ %343, %342 ], [ %.pn121.pn.pn.pn.pn.pn.pn, %376 ]
  call void @_ZN2cl6detail7WrapperIP11_cl_contextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %73) #6
  br label %379

379:                                              ; preds = %378, %340
  %.pn129.pn = phi { ptr, i32 } [ %.pn129, %378 ], [ %341, %340 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %73) #6
  br label %409

380:                                              ; preds = %377, %326
  %381 = call noundef zeroext i1 @_ZNKSt8optionalIN2cl7ContextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(16) %72) #6
  br i1 %381, label %382, label %406

382:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %86) #6
  %383 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNRSt8optionalIN2cl7ContextEE5valueEv(ptr noundef nonnull align 8 dereferenceable(16) %72)
          to label %384 unwind label %394

384:                                              ; preds = %382
  %385 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  %386 = trunc i64 %385 to i32
  invoke void @_ZN7hipsycl2rt20ocl_hardware_contextC1ERKN2cl6DeviceERKNS2_7ContextEii(ptr noundef nonnull align 8 dereferenceable(89) %86, ptr noundef nonnull align 8 dereferenceable(9) %321, ptr noundef nonnull align 8 dereferenceable(8) %383, i32 noundef %386, i32 noundef %206)
          to label %387 unwind label %394

387:                                              ; preds = %384
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %87) #6
  invoke void @_ZNK7hipsycl2rt20ocl_hardware_context15get_device_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %87, ptr noundef nonnull align 8 dereferenceable(89) %86)
          to label %388 unwind label %396

388:                                              ; preds = %387
  %389 = invoke noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt13unordered_mapINS0_10backend_idESt6vectorINS0_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEES2_iiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESP_(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 3, i32 noundef %.183172, i32 noundef %.080173, i32 noundef %206, ptr noundef nonnull align 8 dereferenceable(32) %87, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %390 unwind label %398

390:                                              ; preds = %388
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %87) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %87) #6
  br i1 %389, label %391, label %403

391:                                              ; preds = %390
  invoke void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 8 dereferenceable(89) %86)
          to label %392 unwind label %401

392:                                              ; preds = %391
  %393 = call noundef nonnull align 8 dereferenceable(89) ptr @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  invoke void @_ZN7hipsycl2rt20ocl_hardware_context14init_allocatorEPNS0_20ocl_hardware_managerE(ptr noundef nonnull align 8 dereferenceable(89) %393, ptr noundef nonnull %0)
          to label %403 unwind label %401

394:                                              ; preds = %384, %382
  %395 = landingpad { ptr, i32 }
          cleanup
  br label %405

396:                                              ; preds = %387
  %397 = landingpad { ptr, i32 }
          cleanup
  br label %400

398:                                              ; preds = %388
  %399 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %87) #6
  br label %400

400:                                              ; preds = %398, %396
  %.pn132 = phi { ptr, i32 } [ %399, %398 ], [ %397, %396 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %87) #6
  br label %404

401:                                              ; preds = %392, %391
  %402 = landingpad { ptr, i32 }
          cleanup
  br label %404

403:                                              ; preds = %392, %390
  call void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr noundef nonnull align 8 dereferenceable(89) %86) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %86) #6
  br label %406

404:                                              ; preds = %401, %400
  %.pn134 = phi { ptr, i32 } [ %402, %401 ], [ %.pn132, %400 ]
  call void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr noundef nonnull align 8 dereferenceable(89) %86) #6
  br label %405

405:                                              ; preds = %404, %394
  %.pn134.pn = phi { ptr, i32 } [ %.pn134, %404 ], [ %395, %394 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %86) #6
  br label %409

406:                                              ; preds = %403, %380
  %407 = add nsw i32 %.183172, 1
  %408 = add nsw i32 %.080173, 1
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %72) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %72) #6
  br label %411

409:                                              ; preds = %405, %379
  %.pn134.pn.pn = phi { ptr, i32 } [ %.pn134.pn, %405 ], [ %.pn129.pn, %379 ]
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %72) #6
  br label %410

410:                                              ; preds = %409, %338
  %.pn134.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn, %409 ], [ %339, %338 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %72) #6
  br label %414

411:                                              ; preds = %406, %324
  %.284 = phi i32 [ %407, %406 ], [ %.183172, %324 ]
  %.181 = phi i32 [ %408, %406 ], [ %.080173, %324 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %71) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %71) #6
  %412 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %69) #6
  %413 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %70) #6
  br i1 %413, label %.lr.ph, label %._crit_edge

414:                                              ; preds = %410, %336
  %.pn134.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn.pn, %410 ], [ %337, %336 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %71) #6
  br label %415

415:                                              ; preds = %414, %334
  %.pn134.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn.pn.pn, %414 ], [ %335, %334 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %71) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %70) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %69) #6
  br label %416

416:                                              ; preds = %415, %316, %292
  %.pn134.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn134.pn.pn.pn.pn.pn, %415 ], [ %.pn115.pn.pn.pn.pn, %316 ], [ %.pn112.pn, %292 ]
  call void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #6
  br label %418

417:                                              ; preds = %._crit_edge, %218
  %.385 = phi i32 [ %.082174, %218 ], [ %.183.lcssa, %._crit_edge ]
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %32) #6
  br label %419

418:                                              ; preds = %416, %243, %219
  %.pn142.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn.pn, %243 ], [ %.pn134.pn.pn.pn.pn.pn.pn, %416 ], [ %220, %219 ]
  call void @_ZNSt6vectorIN2cl6DeviceESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %32) #6
  br label %422

419:                                              ; preds = %417, %185
  %.486 = phi i32 [ %.385, %417 ], [ %.082174, %185 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #6
  %420 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  %421 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br i1 %421, label %144, label %._crit_edge177

422:                                              ; preds = %418, %182, %158
  %.pn142.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn.pn.pn, %418 ], [ %159, %158 ], [ %.pn95.pn.pn.pn.pn.pn.pn, %182 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %423

423:                                              ; preds = %422, %137, %113
  %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn.pn.pn.pn, %422 ], [ %.pn.pn.pn.pn.pn.pn.pn, %137 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %424

424:                                              ; preds = %423, %111
  %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn, %423 ], [ %112, %111 ]
  call void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  br label %425

425:                                              ; preds = %424, %109
  %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %424 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  call void @_ZNSt6vectorIN2cl8PlatformESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %89) #6
  call void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  call void @_ZN7hipsycl2rt24backend_hardware_managerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  resume { ptr, i32 } %.pn142.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt24backend_hardware_managerC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

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

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

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7hipsycl2rt8settings3getILNS0_7settingE2EEENS0_13setting_traitIXT_EE4typeEv(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map") align 8, ptr noundef nonnull align 8 dereferenceable(217)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN2cl8Platform3getEPSt6vectorIS0_SaIS0_EE(ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_codeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_codeENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_codeD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN2cl8PlatformESaIS1_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_cxxneIPN2cl8PlatformESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_123should_include_platformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl8PlatformE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cl7ContextC2ERKSt6vectorINS_6DeviceESaIS2_EEPKlPFvPKcPKvmPvESD_Pi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN2cl6DeviceESaIS1_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_cxxneIPN2cl6DeviceESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7hipsycl2rt12_GLOBAL__N_121should_include_deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN2cl6DeviceE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN2cl7ContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cl7ContextC2ERKNS_6DeviceEPKlPFvPKcPKvmPvESA_Pi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(9), ptr noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt11print_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #3

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

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

declare noundef zeroext i1 @_ZN7hipsycl2rt14device_matchesERKSt13unordered_mapINS0_10backend_idESt6vectorINS0_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEES2_iiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESP_(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(89)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Optional_baseIN2cl7ContextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIN7hipsycl2rt10backend_idESt6vectorINS1_27device_visibility_conditionESaIS4_EESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

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

declare void @_ZN7hipsycl2rt20ocl_hardware_contextC1ERKN2cl6DeviceERKNS2_7ContextEii(ptr, ptr, ptr, i32, i32) local_unnamed_addr

declare void @_ZN7hipsycl2rt20ocl_hardware_contextD1Ev(ptr) local_unnamed_addr

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 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 = { 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 #5 = { "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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !21, i64 56}
!9 = !{!"_ZTSN7hipsycl2rt20ocl_hardware_managerE", !10, i64 0, !11, i64 8, !17, i64 32, !21, i64 56}
!10 = !{!"_ZTSN7hipsycl2rt24backend_hardware_managerE"}
!11 = !{!"_ZTSSt6vectorIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt20ocl_hardware_contextESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !16, i64 0}
!16 = !{!"omnipotent char", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIN2cl8PlatformESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN2cl8PlatformESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN2cl8PlatformESaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN2cl8PlatformESaIS1_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!21 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !16, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"int", !16, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"long", !16, i64 0}


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