; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime/pcuda (pcuda_thread_state)

; 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.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.39" }
%"struct.std::_Head_base.39" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.20" = 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.hipsycl::rt::pcuda::thread_local_state" = type { ptr, i32, i32, i32, %"class.std::vector", %"class.std::optional" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>, std::allocator<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>, std::allocator<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>, std::allocator<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>, std::allocator<std::vector<std::vector<hipsycl::rt::pcuda::thread_local_state::per_device_data>>>>::_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.base", [7 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<hipsycl::rt::pcuda::thread_local_state::kernel_call_configuration>::_Storage", i8 }>
%"union.std::_Optional_payload_base<hipsycl::rt::pcuda::thread_local_state::kernel_call_configuration>::_Storage" = type { %"struct.hipsycl::rt::pcuda::thread_local_state::kernel_call_configuration" }
%"struct.hipsycl::rt::pcuda::thread_local_state::kernel_call_configuration" = type { %struct.dim3, %struct.dim3, i64, ptr }
%struct.dim3 = type { i32, i32, i32 }
%"struct.hipsycl::rt::pcuda::device_topology::backend" = type { i32, i32, ptr, %"class.std::vector.28" }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::platform, std::allocator<hipsycl::rt::pcuda::device_topology::platform>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::platform, std::allocator<hipsycl::rt::pcuda::device_topology::platform>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::platform, std::allocator<hipsycl::rt::pcuda::device_topology::platform>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::platform, std::allocator<hipsycl::rt::pcuda::device_topology::platform>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.hipsycl::rt::pcuda::device_topology::platform" = type { i32, %"class.std::vector.33" }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::device, std::allocator<hipsycl::rt::pcuda::device_topology::device>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::device, std::allocator<hipsycl::rt::pcuda::device_topology::device>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::device, std::allocator<hipsycl::rt::pcuda::device_topology::device>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::device, std::allocator<hipsycl::rt::pcuda::device_topology::device>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.hipsycl::rt::pcuda::device_topology::device" = type { i32, %"class.hipsycl::rt::device_id", ptr }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@__func__._ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [126 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.hipsycl::rt::device_id", align 4
  %19 = alloca %"class.hipsycl::rt::result", align 8
  %20 = alloca %"class.hipsycl::rt::source_location", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.20", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.20", align 1
  %25 = alloca %"class.hipsycl::rt::error_info", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator.20", align 1
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %3, align 8
  %31 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %32, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 1
  store i32 0, ptr %33, align 8, !tbaa !21
  %34 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 2
  store i32 0, ptr %34, align 4, !tbaa !22
  %35 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 3
  store i32 0, ptr %35, align 8, !tbaa !23
  %36 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  call void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %37 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 5
  call void @_ZNSt8optionalIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %37) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda13pcuda_runtime12get_topologyEv(ptr noundef nonnull align 8 dereferenceable(40) %38)
          to label %40 unwind label %50

40:                                               ; preds = %2
  store ptr %39, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 -1, ptr %10, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !24
  br label %41

41:                                               ; preds = %206, %40
  %42 = load i32, ptr %11, align 4, !tbaa !24
  %43 = sext i32 %42 to i64
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda15device_topology12all_backendsEv(ptr noundef nonnull align 8 dereferenceable(24) %44)
          to label %46 unwind label %54

46:                                               ; preds = %41
  %47 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %48 = icmp ult i64 %43, %47
  br i1 %48, label %58, label %49

49:                                               ; preds = %46
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %211

50:                                               ; preds = %2
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  br label %364

54:                                               ; preds = %41
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  br label %210

58:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !24
  %61 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %59, i32 noundef %60)
          to label %62 unwind label %89

62:                                               ; preds = %58
  %63 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %61, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !25
  store ptr %64, ptr %13, align 8, !tbaa !5
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !32
  %67 = getelementptr inbounds ptr, ptr %66, i64 3
  %68 = load ptr, ptr %67, align 8
  %69 = invoke noundef ptr %68(ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %70 unwind label %89

70:                                               ; preds = %62
  %71 = load ptr, ptr %69, align 8, !tbaa !32
  %72 = getelementptr inbounds ptr, ptr %71, i64 0
  %73 = load ptr, ptr %72, align 8
  %74 = invoke noundef i64 %73(ptr noundef nonnull align 8 dereferenceable(8) %69)
          to label %75 unwind label %89

75:                                               ; preds = %70
  %76 = icmp ugt i64 %74, 0
  br i1 %76, label %77, label %205

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !24
  br label %78

78:                                               ; preds = %200, %77
  %79 = load i32, ptr %14, align 4, !tbaa !24
  %80 = sext i32 %79 to i64
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !24
  %83 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %81, i32 noundef %82)
          to label %84 unwind label %93

84:                                               ; preds = %78
  %85 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %83, i32 0, i32 3
  %86 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #7
  %87 = icmp ult i64 %80, %86
  br i1 %87, label %97, label %88

88:                                               ; preds = %84
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %204

89:                                               ; preds = %70, %62, %58
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %209

93:                                               ; preds = %78
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  br label %203

97:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !24
  br label %98

98:                                               ; preds = %186, %97
  %99 = load i32, ptr %16, align 4, !tbaa !24
  %100 = sext i32 %99 to i64
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = load i32, ptr %11, align 4, !tbaa !24
  %103 = load i32, ptr %14, align 4, !tbaa !24
  %104 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24) %101, i32 noundef %102, i32 noundef %103)
          to label %105 unwind label %110

105:                                              ; preds = %98
  %106 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::platform", ptr %104, i32 0, i32 1
  %107 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #7
  %108 = icmp ult i64 %100, %107
  br i1 %108, label %114, label %109

109:                                              ; preds = %105
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %191

110:                                              ; preds = %98
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %6, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %7, align 4
  br label %190

114:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load i32, ptr %11, align 4, !tbaa !24
  %117 = load i32, ptr %14, align 4, !tbaa !24
  %118 = load i32, ptr %16, align 4, !tbaa !24
  %119 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24) %115, i32 noundef %116, i32 noundef %117, i32 noundef %118)
          to label %120 unwind label %143

120:                                              ; preds = %114
  %121 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::device", ptr %119, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !34
  store ptr %122, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !24
  %125 = load i32, ptr %14, align 4, !tbaa !24
  %126 = load i32, ptr %16, align 4, !tbaa !24
  %127 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24) %123, i32 noundef %124, i32 noundef %125, i32 noundef %126)
          to label %128 unwind label %147

128:                                              ; preds = %120
  %129 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::device", ptr %127, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %129, i64 16, i1 false), !tbaa.struct !40
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = load ptr, ptr %130, align 8, !tbaa !32
  %132 = getelementptr inbounds ptr, ptr %131, i64 0
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef zeroext i1 %133(ptr noundef nonnull align 8 dereferenceable(8) %130)
          to label %135 unwind label %147

135:                                              ; preds = %128
  br i1 %134, label %136, label %155

136:                                              ; preds = %135
  %137 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %138 unwind label %147

138:                                              ; preds = %136
  %139 = icmp eq i32 %137, 4
  br i1 %139, label %140, label %151

140:                                              ; preds = %138
  %141 = load i32, ptr %15, align 4, !tbaa !24
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %15, align 4, !tbaa !24
  br label %154

143:                                              ; preds = %114
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %6, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %7, align 4
  br label %189

147:                                              ; preds = %169, %162, %155, %136, %128, %120
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %6, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %189

151:                                              ; preds = %138
  %152 = load i32, ptr %15, align 4, !tbaa !24
  %153 = add nsw i32 %152, 2
  store i32 %153, ptr %15, align 4, !tbaa !24
  br label %154

154:                                              ; preds = %151, %140
  br label %185

155:                                              ; preds = %135
  %156 = load ptr, ptr %17, align 8, !tbaa !5
  %157 = load ptr, ptr %156, align 8, !tbaa !32
  %158 = getelementptr inbounds ptr, ptr %157, i64 1
  %159 = load ptr, ptr %158, align 8
  %160 = invoke noundef zeroext i1 %159(ptr noundef nonnull align 8 dereferenceable(8) %156)
          to label %161 unwind label %147

161:                                              ; preds = %155
  br i1 %160, label %162, label %181

162:                                              ; preds = %161
  %163 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %164 unwind label %147

164:                                              ; preds = %162
  %165 = icmp eq i32 %163, 0
  br i1 %165, label %166, label %169

166:                                              ; preds = %164
  %167 = load i32, ptr %15, align 4, !tbaa !24
  %168 = add nsw i32 %167, 6
  store i32 %168, ptr %15, align 4, !tbaa !24
  br label %180

169:                                              ; preds = %164
  %170 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %171 unwind label %147

171:                                              ; preds = %169
  %172 = icmp eq i32 %170, 1
  br i1 %172, label %173, label %176

173:                                              ; preds = %171
  %174 = load i32, ptr %15, align 4, !tbaa !24
  %175 = add nsw i32 %174, 5
  store i32 %175, ptr %15, align 4, !tbaa !24
  br label %179

176:                                              ; preds = %171
  %177 = load i32, ptr %15, align 4, !tbaa !24
  %178 = add nsw i32 %177, 4
  store i32 %178, ptr %15, align 4, !tbaa !24
  br label %179

179:                                              ; preds = %176, %173
  br label %180

180:                                              ; preds = %179, %166
  br label %184

181:                                              ; preds = %161
  %182 = load i32, ptr %15, align 4, !tbaa !24
  %183 = add nsw i32 %182, 0
  store i32 %183, ptr %15, align 4, !tbaa !24
  br label %184

184:                                              ; preds = %181, %180
  br label %185

185:                                              ; preds = %184, %154
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %16, align 4, !tbaa !24
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %16, align 4, !tbaa !24
  br label %98, !llvm.loop !44

189:                                              ; preds = %147, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %190

190:                                              ; preds = %189, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %203

191:                                              ; preds = %109
  %192 = load i32, ptr %15, align 4, !tbaa !24
  %193 = load i32, ptr %10, align 4, !tbaa !24
  %194 = icmp sgt i32 %192, %193
  br i1 %194, label %195, label %199

195:                                              ; preds = %191
  %196 = load i32, ptr %11, align 4, !tbaa !24
  store i32 %196, ptr %8, align 4, !tbaa !24
  %197 = load i32, ptr %14, align 4, !tbaa !24
  store i32 %197, ptr %9, align 4, !tbaa !24
  %198 = load i32, ptr %15, align 4, !tbaa !24
  store i32 %198, ptr %10, align 4, !tbaa !24
  br label %199

199:                                              ; preds = %195, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %14, align 4, !tbaa !24
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %14, align 4, !tbaa !24
  br label %78, !llvm.loop !46

203:                                              ; preds = %190, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %209

204:                                              ; preds = %88
  br label %205

205:                                              ; preds = %204, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %11, align 4, !tbaa !24
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %11, align 4, !tbaa !24
  br label %41, !llvm.loop !47

209:                                              ; preds = %203, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %210

210:                                              ; preds = %209, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %363

211:                                              ; preds = %49
  %212 = load i32, ptr %10, align 4, !tbaa !24
  %213 = icmp slt i32 %212, 0
  br i1 %213, label %214, label %250

214:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 72, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @__func__._ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %215 unwind label %221

215:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %216 unwind label %225

216:                                              ; preds = %215
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %20, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef 105)
          to label %217 unwind label %229

217:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 80, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %218 unwind label %233

218:                                              ; preds = %217
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %25, ptr noundef nonnull align 8 dereferenceable(32) %26, i32 noundef 1)
          to label %219 unwind label %237

219:                                              ; preds = %218
  invoke void @_ZN7hipsycl2rt13print_warningERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %19, ptr noundef nonnull align 8 dereferenceable(68) %20, ptr noundef nonnull align 8 dereferenceable(76) %25)
          to label %220 unwind label %241

220:                                              ; preds = %219
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %25) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %25) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #7
  br label %256

221:                                              ; preds = %214
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %6, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %7, align 4
  br label %249

225:                                              ; preds = %215
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %6, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %7, align 4
  br label %248

229:                                              ; preds = %216
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %6, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %7, align 4
  br label %247

233:                                              ; preds = %217
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %6, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %7, align 4
  br label %246

237:                                              ; preds = %218
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %6, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %7, align 4
  br label %245

241:                                              ; preds = %219
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %6, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %7, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %25) #7
  br label %245

245:                                              ; preds = %241, %237
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %246

246:                                              ; preds = %245, %233
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %25) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %20) #7
  br label %247

247:                                              ; preds = %246, %229
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %248

248:                                              ; preds = %247, %225
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %249

249:                                              ; preds = %248, %221
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #7
  br label %363

250:                                              ; preds = %211
  %251 = load i32, ptr %8, align 4, !tbaa !24
  %252 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 3
  store i32 %251, ptr %252, align 8, !tbaa !23
  %253 = load i32, ptr %9, align 4, !tbaa !24
  %254 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 2
  store i32 %253, ptr %254, align 4, !tbaa !22
  %255 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 1
  store i32 0, ptr %255, align 8, !tbaa !21
  br label %256

256:                                              ; preds = %250, %220
  %257 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %258 unwind label %263

258:                                              ; preds = %256
  %259 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %257)
          to label %260 unwind label %263

260:                                              ; preds = %258
  %261 = icmp sgt i32 3, %259
  br i1 %261, label %262, label %267

262:                                              ; preds = %260
  br label %294

263:                                              ; preds = %298, %294, %291, %287, %285, %281, %279, %275, %273, %271, %269, %267, %258, %256
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %6, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %7, align 4
  br label %363

267:                                              ; preds = %260
  %268 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %269 unwind label %263

269:                                              ; preds = %267
  %270 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %268)
          to label %271 unwind label %263

271:                                              ; preds = %269
  %272 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %270, ptr noundef @.str.3)
          to label %273 unwind label %263

273:                                              ; preds = %271
  %274 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @.str.4)
          to label %275 unwind label %263

275:                                              ; preds = %273
  %276 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 3
  %277 = load i32, ptr %276, align 8, !tbaa !23
  %278 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %274, i32 noundef %277)
          to label %279 unwind label %263

279:                                              ; preds = %275
  %280 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef @.str.5)
          to label %281 unwind label %263

281:                                              ; preds = %279
  %282 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 2
  %283 = load i32, ptr %282, align 4, !tbaa !22
  %284 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %280, i32 noundef %283)
          to label %285 unwind label %263

285:                                              ; preds = %281
  %286 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %284, ptr noundef @.str.6)
          to label %287 unwind label %263

287:                                              ; preds = %285
  %288 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 1
  %289 = load i32, ptr %288, align 8, !tbaa !21
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %286, i32 noundef %289)
          to label %291 unwind label %263

291:                                              ; preds = %287
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %290, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %293 unwind label %263

293:                                              ; preds = %291
  br label %294

294:                                              ; preds = %293, %262
  %295 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda15device_topology12all_backendsEv(ptr noundef nonnull align 8 dereferenceable(24) %296)
          to label %298 unwind label %263

298:                                              ; preds = %294
  %299 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %297) #7
  invoke void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %295, i64 noundef %299)
          to label %300 unwind label %263

300:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !24
  br label %301

301:                                              ; preds = %358, %300
  %302 = load i32, ptr %28, align 4, !tbaa !24
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  %305 = call noundef i64 @_ZNKSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %304) #7
  %306 = icmp ult i64 %303, %305
  br i1 %306, label %308, label %307

307:                                              ; preds = %301
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %362

308:                                              ; preds = %301
  %309 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  %310 = load i32, ptr %28, align 4, !tbaa !24
  %311 = sext i32 %310 to i64
  %312 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %309, i64 noundef %311) #7
  %313 = load ptr, ptr %5, align 8, !tbaa !5
  %314 = load i32, ptr %28, align 4, !tbaa !24
  %315 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %313, i32 noundef %314)
          to label %316 unwind label %330

316:                                              ; preds = %308
  %317 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %315, i32 0, i32 3
  %318 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %317) #7
  invoke void @_ZNSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %312, i64 noundef %318)
          to label %319 unwind label %330

319:                                              ; preds = %316
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !24
  br label %320

320:                                              ; preds = %350, %319
  %321 = load i32, ptr %29, align 4, !tbaa !24
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  %324 = load i32, ptr %28, align 4, !tbaa !24
  %325 = sext i32 %324 to i64
  %326 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %323, i64 noundef %325) #7
  %327 = call noundef i64 @_ZNKSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %326) #7
  %328 = icmp ult i64 %322, %327
  br i1 %328, label %334, label %329

329:                                              ; preds = %320
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %357

330:                                              ; preds = %316, %308
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %6, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %7, align 4
  br label %361

334:                                              ; preds = %320
  %335 = getelementptr inbounds %"class.hipsycl::rt::pcuda::thread_local_state", ptr %30, i32 0, i32 4
  %336 = load i32, ptr %28, align 4, !tbaa !24
  %337 = sext i32 %336 to i64
  %338 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %335, i64 noundef %337) #7
  %339 = load i32, ptr %29, align 4, !tbaa !24
  %340 = sext i32 %339 to i64
  %341 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %338, i64 noundef %340) #7
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = load i32, ptr %28, align 4, !tbaa !24
  %344 = load i32, ptr %29, align 4, !tbaa !24
  %345 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24) %342, i32 noundef %343, i32 noundef %344)
          to label %346 unwind label %353

346:                                              ; preds = %334
  %347 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::platform", ptr %345, i32 0, i32 1
  %348 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %347) #7
  invoke void @_ZNSt6vectorIN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %341, i64 noundef %348)
          to label %349 unwind label %353

349:                                              ; preds = %346
  br label %350

350:                                              ; preds = %349
  %351 = load i32, ptr %29, align 4, !tbaa !24
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %29, align 4, !tbaa !24
  br label %320, !llvm.loop !48

353:                                              ; preds = %346, %334
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %6, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %361

357:                                              ; preds = %329
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %28, align 4, !tbaa !24
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %28, align 4, !tbaa !24
  br label %301, !llvm.loop !49

361:                                              ; preds = %353, %330
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %363

362:                                              ; preds = %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

363:                                              ; preds = %361, %263, %249, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %364

364:                                              ; preds = %363, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  br label %365

365:                                              ; preds = %364
  %366 = load ptr, ptr %6, align 8
  %367 = load i32, ptr %7, align 4
  %368 = insertvalue { ptr, i32 } poison, ptr %366, 0
  %369 = insertvalue { ptr, i32 } %368, i32 %367, 1
  resume { ptr, i32 } %369
}

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

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

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

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

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #4

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16)) #4

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #3 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) #6

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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, !6, i64 0}
!10 = !{!"_ZTSN7hipsycl2rt5pcuda18thread_local_stateE", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 24, !16, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt8optionalIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEE", !17, i64 0}
!17 = !{!"_ZTSSt14_Optional_baseIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt17_Optional_payloadIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationELb1ELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt22_Optional_payload_baseIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEE", !7, i64 0, !20, i64 40}
!20 = !{!"bool", !7, i64 0}
!21 = !{!10, !11, i64 8}
!22 = !{!10, !11, i64 12}
!23 = !{!10, !11, i64 16}
!24 = !{!11, !11, i64 0}
!25 = !{!26, !6, i64 8}
!26 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology7backendE", !11, i64 0, !27, i64 4, !6, i64 8, !28, i64 16}
!27 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!28 = !{!"_ZTSSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!33, !33, i64 0}
!33 = !{!"vtable pointer", !8, i64 0}
!34 = !{!35, !6, i64 24}
!35 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology6deviceE", !11, i64 0, !36, i64 4, !6, i64 24}
!36 = !{!"_ZTSN7hipsycl2rt9device_idE", !37, i64 0, !11, i64 12}
!37 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !27, i64 0, !38, i64 4, !39, i64 8}
!38 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!39 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!40 = !{i64 0, i64 4, !41, i64 4, i64 4, !42, i64 8, i64 4, !43, i64 12, i64 4, !24}
!41 = !{!27, !27, i64 0}
!42 = !{!38, !38, i64 0}
!43 = !{!39, !39, i64 0}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = distinct !{!46, !45}
!47 = distinct !{!47, !45}
!48 = distinct !{!48, !45}
!49 = distinct !{!49, !45}


; 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.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.39" }
%"struct.std::_Head_base.39" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.20" = 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 }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@__func__._ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [126 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.hipsycl::rt::device_id", align 4
  %4 = alloca %"class.hipsycl::rt::result", align 8
  %5 = alloca %"class.hipsycl::rt::source_location", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.20", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.20", align 1
  %10 = alloca %"class.hipsycl::rt::error_info", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.20", align 1
  store ptr %1, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %14, align 4, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 0, ptr %15, align 8, !tbaa !22
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %17 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZNSt8optionalIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #8
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda13pcuda_runtime12get_topologyEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %19 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda15device_topology12all_backendsEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %20 = tail call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  %.not147 = icmp eq i64 %20, 0
  br i1 %.not147, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.loopexit
  %21 = icmp slt i32 %.378, 0
  br i1 %21, label %._crit_edge.thread, label %127

.lr.ph:                                           ; preds = %2, %.loopexit
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %.loopexit ], [ 0, %2 ]
  %.075137 = phi i32 [ %.378, %.loopexit ], [ -1, %2 ]
  %.079136 = phi i32 [ %.382, %.loopexit ], [ 0, %2 ]
  %.083135 = phi i32 [ %.386, %.loopexit ], [ 0, %2 ]
  %22 = trunc nuw nsw i64 %indvars.iv169 to i32
  %23 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %22)
          to label %24 unwind label %42

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !23
  %27 = load ptr, ptr %26, align 8, !tbaa !30
  %28 = getelementptr inbounds i8, ptr %27, i64 24
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef ptr %29(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %31 unwind label %42

31:                                               ; preds = %24
  %32 = load ptr, ptr %30, align 8, !tbaa !30
  %33 = load ptr, ptr %32, align 8
  %34 = invoke noundef i64 %33(ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %35 unwind label %42

35:                                               ; preds = %31
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %.loopexit, label %.preheader104

.preheader104:                                    ; preds = %35, %51
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %51 ], [ 0, %35 ]
  %.184 = phi i32 [ %.285, %51 ], [ %.083135, %35 ]
  %.180 = phi i32 [ %.281, %51 ], [ %.079136, %35 ]
  %.176 = phi i32 [ %.277, %51 ], [ %.075137, %35 ]
  %36 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %22)
          to label %37 unwind label %44

37:                                               ; preds = %.preheader104
  %38 = getelementptr inbounds i8, ptr %36, i64 16
  %39 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #8
  %40 = icmp ugt i64 %39, %indvars.iv166
  br i1 %40, label %.preheader103.preheader, label %.loopexit

.preheader103.preheader:                          ; preds = %37
  %41 = trunc nuw nsw i64 %indvars.iv166 to i32
  br label %.preheader103

42:                                               ; preds = %31, %24, %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %186

44:                                               ; preds = %.preheader104
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %186

.preheader103:                                    ; preds = %.preheader103.preheader, %100
  %indvars.iv = phi i64 [ 0, %.preheader103.preheader ], [ %indvars.iv.next, %100 ]
  %.060 = phi i32 [ 0, %.preheader103.preheader ], [ %.161, %100 ]
  %46 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %22, i32 noundef %41)
          to label %47 unwind label %53

47:                                               ; preds = %.preheader103
  %48 = getelementptr inbounds i8, ptr %46, i64 8
  %49 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #8
  %50 = icmp ugt i64 %49, %indvars.iv
  br i1 %50, label %55, label %51

51:                                               ; preds = %47
  %52 = icmp sgt i32 %.060, %.176
  %.285 = select i1 %52, i32 %22, i32 %.184
  %.281 = select i1 %52, i32 %41, i32 %.180
  %.277 = call i32 @llvm.smax.i32(i32 %.060, i32 %.176)
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  br label %.preheader104, !llvm.loop !32

53:                                               ; preds = %.preheader103
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %186

55:                                               ; preds = %47
  %56 = trunc nuw nsw i64 %indvars.iv to i32
  %57 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %22, i32 noundef %41, i32 noundef %56)
          to label %58 unwind label %74

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %57, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %61 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %22, i32 noundef %41, i32 noundef %56)
          to label %62 unwind label %76

62:                                               ; preds = %58
  %63 = getelementptr inbounds i8, ptr %61, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %63, i64 16, i1 false), !tbaa.struct !40
  %64 = load ptr, ptr %60, align 8, !tbaa !30
  %65 = load ptr, ptr %64, align 8
  %66 = invoke noundef zeroext i1 %65(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %67 unwind label %76

67:                                               ; preds = %62
  br i1 %66, label %68, label %80

68:                                               ; preds = %67
  %69 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %70 unwind label %76

70:                                               ; preds = %68
  %71 = icmp eq i32 %69, 4
  br i1 %71, label %72, label %78

72:                                               ; preds = %70
  %73 = add nsw i32 %.060, 1
  br label %100

74:                                               ; preds = %55
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %186

76:                                               ; preds = %92, %86, %80, %68, %62, %58
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %186

78:                                               ; preds = %70
  %79 = add nsw i32 %.060, 2
  br label %100

80:                                               ; preds = %67
  %81 = load ptr, ptr %60, align 8, !tbaa !30
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load ptr, ptr %82, align 8
  %84 = invoke noundef zeroext i1 %83(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %85 unwind label %76

85:                                               ; preds = %80
  br i1 %84, label %86, label %100

86:                                               ; preds = %85
  %87 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %88 unwind label %76

88:                                               ; preds = %86
  %89 = icmp eq i32 %87, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %88
  %91 = add nsw i32 %.060, 6
  br label %100

92:                                               ; preds = %88
  %93 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %3)
          to label %94 unwind label %76

94:                                               ; preds = %92
  %95 = icmp eq i32 %93, 1
  br i1 %95, label %96, label %98

96:                                               ; preds = %94
  %97 = add nsw i32 %.060, 5
  br label %100

98:                                               ; preds = %94
  %99 = add nsw i32 %.060, 4
  br label %100

100:                                              ; preds = %85, %96, %98, %90, %72, %78
  %.161 = phi i32 [ %73, %72 ], [ %79, %78 ], [ %91, %90 ], [ %97, %96 ], [ %99, %98 ], [ %.060, %85 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br label %.preheader103, !llvm.loop !45

.loopexit:                                        ; preds = %37, %35
  %.386 = phi i32 [ %.083135, %35 ], [ %.184, %37 ]
  %.382 = phi i32 [ %.079136, %35 ], [ %.180, %37 ]
  %.378 = phi i32 [ %.075137, %35 ], [ %.176, %37 ]
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda15device_topology12all_backendsEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %102 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #8
  %103 = icmp ugt i64 %102, %indvars.iv.next170
  br i1 %103, label %.lr.ph, label %._crit_edge, !llvm.loop !46

._crit_edge.thread:                               ; preds = %2, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @__func__._ZN7hipsycl2rt5pcuda18thread_local_stateC2EPNS1_13pcuda_runtimeE, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %104 unwind label %110

104:                                              ; preds = %._crit_edge.thread
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %105 unwind label %112

105:                                              ; preds = %104
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 105)
          to label %106 unwind label %114

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %107 unwind label %116

107:                                              ; preds = %106
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 1)
          to label %108 unwind label %118

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

109:                                              ; preds = %108
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %10) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #8
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #8
  br label %128

110:                                              ; preds = %._crit_edge.thread
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %126

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

114:                                              ; preds = %105
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %124

116:                                              ; preds = %106
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %123

118:                                              ; preds = %107
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %122

120:                                              ; preds = %108
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %10) #8
  br label %122

122:                                              ; preds = %120, %118
  %.pn = phi { ptr, i32 } [ %121, %120 ], [ %119, %118 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %123

123:                                              ; preds = %122, %116
  %.pn.pn = phi { ptr, i32 } [ %.pn, %122 ], [ %117, %116 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #8
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %5) #8
  br label %124

124:                                              ; preds = %123, %114
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %123 ], [ %115, %114 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %125

125:                                              ; preds = %124, %112
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %124 ], [ %113, %112 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %126

126:                                              ; preds = %125, %110
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %125 ], [ %111, %110 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #8
  br label %186

127:                                              ; preds = %._crit_edge
  store i32 %.386, ptr %15, align 8, !tbaa !22
  store i32 %.382, ptr %14, align 4, !tbaa !21
  store i32 0, ptr %13, align 8, !tbaa !20
  br label %128

128:                                              ; preds = %127, %109
  %129 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %130 unwind label %133

130:                                              ; preds = %128
  %131 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %129)
  %132 = icmp slt i32 %131, 3
  br i1 %132, label %157, label %135

133:                                              ; preds = %157, %155, %152, %150, %147, %145, %142, %140, %137, %135, %128
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %186

135:                                              ; preds = %130
  %136 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %137 unwind label %133

137:                                              ; preds = %135
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %136)
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull @.str.3)
          to label %140 unwind label %133

140:                                              ; preds = %137
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef nonnull @.str.4)
          to label %142 unwind label %133

142:                                              ; preds = %140
  %143 = load i32, ptr %15, align 8, !tbaa !22
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %141, i32 noundef %143)
          to label %145 unwind label %133

145:                                              ; preds = %142
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull @.str.5)
          to label %147 unwind label %133

147:                                              ; preds = %145
  %148 = load i32, ptr %14, align 4, !tbaa !21
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %146, i32 noundef %148)
          to label %150 unwind label %133

150:                                              ; preds = %147
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %149, ptr noundef nonnull @.str.6)
          to label %152 unwind label %133

152:                                              ; preds = %150
  %153 = load i32, ptr %13, align 8, !tbaa !20
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %153)
          to label %155 unwind label %133

155:                                              ; preds = %152
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %157 unwind label %133

157:                                              ; preds = %155, %130
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5pcuda15device_topology12all_backendsEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %159 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %158) #8
  invoke void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %159)
          to label %.preheader102 unwind label %133

.preheader102:                                    ; preds = %157
  %160 = call noundef i64 @_ZNKSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %.not148 = icmp eq i64 %160, 0
  br i1 %.not148, label %._crit_edge146, label %.lr.ph145

._crit_edge146:                                   ; preds = %._crit_edge143, %.preheader102
  ret void

.lr.ph145:                                        ; preds = %.preheader102, %._crit_edge143
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %._crit_edge143 ], [ 0, %.preheader102 ]
  %161 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv175) #8
  %162 = trunc nuw nsw i64 %indvars.iv175 to i32
  %163 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %162)
          to label %164 unwind label %171

164:                                              ; preds = %.lr.ph145
  %165 = getelementptr inbounds i8, ptr %163, i64 16
  %166 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #8
  invoke void @_ZNSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %166)
          to label %.preheader unwind label %171

.preheader:                                       ; preds = %164
  %167 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv175) #8
  %168 = call noundef i64 @_ZNKSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %167) #8
  %.not149 = icmp eq i64 %168, 0
  br i1 %.not149, label %._crit_edge143, label %.lr.ph142

._crit_edge143:                                   ; preds = %180, %.preheader
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %169 = call noundef i64 @_ZNKSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %170 = icmp ugt i64 %169, %indvars.iv.next176
  br i1 %170, label %.lr.ph145, label %._crit_edge146, !llvm.loop !47

171:                                              ; preds = %164, %.lr.ph145
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %186

.lr.ph142:                                        ; preds = %.preheader, %180
  %indvars.iv172 = phi i64 [ %indvars.iv.next173, %180 ], [ 0, %.preheader ]
  %173 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv175) #8
  %174 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %indvars.iv172) #8
  %175 = trunc nuw nsw i64 %indvars.iv172 to i32
  %176 = invoke noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %162, i32 noundef %175)
          to label %177 unwind label %184

177:                                              ; preds = %.lr.ph142
  %178 = getelementptr inbounds i8, ptr %176, i64 8
  %179 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %178) #8
  invoke void @_ZNSt6vectorIN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef %179)
          to label %180 unwind label %184

180:                                              ; preds = %177
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %181 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv175) #8
  %182 = call noundef i64 @_ZNKSt6vectorIS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #8
  %183 = icmp ugt i64 %182, %indvars.iv.next173
  br i1 %183, label %.lr.ph142, label %._crit_edge143, !llvm.loop !48

184:                                              ; preds = %177, %.lr.ph142
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %186

186:                                              ; preds = %171, %184, %42, %53, %76, %74, %44, %133, %126
  %.pn96.pn.pn.pn.pn = phi { ptr, i32 } [ %134, %133 ], [ %.pn.pn.pn.pn.pn, %126 ], [ %43, %42 ], [ %45, %44 ], [ %54, %53 ], [ %77, %76 ], [ %75, %74 ], [ %185, %184 ], [ %172, %171 ]
  call void @_ZNSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  resume { ptr, i32 } %.pn96.pn.pn.pn.pn
}

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

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

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

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

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology11get_backendEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology12get_platformEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #4

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

declare noundef ptr @_ZNK7hipsycl2rt5pcuda15device_topology10get_deviceEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #3 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 #6

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN7hipsycl2rt5pcuda18thread_local_stateE", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 24, !15, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIS_IS_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS4_EESaIS6_EESaIS8_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IN7hipsycl2rt5pcuda18thread_local_state15per_device_dataESaIS5_EESaIS7_EESaIS9_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSSt8optionalIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEE", !16, i64 0}
!16 = !{!"_ZTSSt14_Optional_baseIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt17_Optional_payloadIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationELb1ELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt22_Optional_payload_baseIN7hipsycl2rt5pcuda18thread_local_state25kernel_call_configurationEE", !8, i64 0, !19, i64 40}
!19 = !{!"bool", !8, i64 0}
!20 = !{!6, !10, i64 8}
!21 = !{!6, !10, i64 12}
!22 = !{!6, !10, i64 16}
!23 = !{!24, !7, i64 8}
!24 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology7backendE", !10, i64 0, !25, i64 4, !7, i64 8, !26, i64 16}
!25 = !{!"_ZTSN7hipsycl2rt10backend_idE", !8, i64 0}
!26 = !{!"_ZTSSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !9, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !7, i64 24}
!35 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology6deviceE", !10, i64 0, !36, i64 4, !7, i64 24}
!36 = !{!"_ZTSN7hipsycl2rt9device_idE", !37, i64 0, !10, i64 12}
!37 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !25, i64 0, !38, i64 4, !39, i64 8}
!38 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !8, i64 0}
!39 = !{!"_ZTSN7hipsycl2rt12api_platformE", !8, i64 0}
!40 = !{i64 0, i64 4, !41, i64 4, i64 4, !42, i64 8, i64 4, !43, i64 12, i64 4, !44}
!41 = !{!25, !25, i64 0}
!42 = !{!38, !38, i64 0}
!43 = !{!39, !39, i64 0}
!44 = !{!10, !10, i64 0}
!45 = distinct !{!45, !33}
!46 = distinct !{!46, !33}
!47 = distinct !{!47, !33}
!48 = distinct !{!48, !33}


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