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

; 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.anon = type { ptr, ptr }
%"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.hipsycl::rt::pcuda::device_topology" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::backend, std::allocator<hipsycl::rt::pcuda::device_topology::backend>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::backend, std::allocator<hipsycl::rt::pcuda::device_topology::backend>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::backend, std::allocator<hipsycl::rt::pcuda::device_topology::backend>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::pcuda::device_topology::backend, std::allocator<hipsycl::rt::pcuda::device_topology::backend>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.hipsycl::rt::pcuda::device_topology::backend" = type { i32, i32, ptr, %"class.std::vector.36" }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = 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.41" }
%"class.std::vector.41" = type { %"struct.std::_Vector_base.42" }
%"struct.std::_Vector_base.42" = 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 }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt5pcuda15device_topologyC2EPNS0_7runtimeE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.anon, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  %16 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  call void @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608) %17)
          to label %19 unwind label %34

19:                                               ; preds = %2
  %20 = getelementptr inbounds %class.anon, ptr %8, i32 0, i32 0
  store ptr %15, ptr %20, align 8, !tbaa !11
  %21 = getelementptr inbounds %class.anon, ptr %8, i32 0, i32 1
  store ptr %5, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8
  %24 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8
  invoke void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_5pcuda15device_topologyC1EPNS0_7runtimeEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72) %18, ptr %23, ptr %25)
          to label %26 unwind label %34

26:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %206, %26
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  %31 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %32 = icmp ult i64 %29, %31
  br i1 %32, label %38, label %33

33:                                               ; preds = %27
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %210

34:                                               ; preds = %19, %2
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %6, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %7, align 4
  br label %211

38:                                               ; preds = %27
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %40 unwind label %45

40:                                               ; preds = %38
  %41 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
          to label %42 unwind label %45

42:                                               ; preds = %40
  %43 = icmp sgt i32 3, %41
  br i1 %43, label %44, label %49

44:                                               ; preds = %42
  br label %86

45:                                               ; preds = %60, %57, %55, %53, %51, %49, %40, %38
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %6, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %7, align 4
  br label %209

49:                                               ; preds = %42
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %51 unwind label %45

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %50)
          to label %53 unwind label %45

53:                                               ; preds = %51
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @.str)
          to label %55 unwind label %45

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef @.str.1)
          to label %57 unwind label %45

57:                                               ; preds = %55
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %56, i32 noundef %58)
          to label %60 unwind label %45

60:                                               ; preds = %57
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef @.str.2)
          to label %62 unwind label %45

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %63 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #5
  %67 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = load ptr, ptr %68, align 8, !tbaa !20
  %70 = getelementptr inbounds ptr, ptr %69, i64 6
  %71 = load ptr, ptr %70, align 8
  invoke void %71(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %72 unwind label %77

72:                                               ; preds = %62
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %74 unwind label %81

74:                                               ; preds = %72
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef @.str.3)
          to label %76 unwind label %81

76:                                               ; preds = %74
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %86

77:                                               ; preds = %62
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  br label %85

81:                                               ; preds = %74, %72
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %209

86:                                               ; preds = %76, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %201, %86
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %92) #5
  %94 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %93, i32 0, i32 3
  %95 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #5
  %96 = icmp ult i64 %89, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %87
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %205

98:                                               ; preds = %87
  %99 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %100 unwind label %105

100:                                              ; preds = %98
  %101 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %99)
          to label %102 unwind label %105

102:                                              ; preds = %100
  %103 = icmp sgt i32 3, %101
  br i1 %103, label %104, label %109

104:                                              ; preds = %102
  br label %123

105:                                              ; preds = %120, %117, %115, %113, %111, %109, %100, %98
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  br label %204

109:                                              ; preds = %102
  %110 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %111 unwind label %105

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
          to label %113 unwind label %105

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str)
          to label %115 unwind label %105

115:                                              ; preds = %113
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef @.str.4)
          to label %117 unwind label %105

117:                                              ; preds = %115
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %116, i32 noundef %118)
          to label %120 unwind label %105

120:                                              ; preds = %117
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @.str.5)
          to label %122 unwind label %105

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122, %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %196, %123
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  %128 = load i32, ptr %9, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %129) #5
  %131 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %130, i32 0, i32 3
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %133) #5
  %135 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::platform", ptr %134, i32 0, i32 1
  %136 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #5
  %137 = icmp ult i64 %126, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %124
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %200

139:                                              ; preds = %124
  %140 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %141 unwind label %146

141:                                              ; preds = %139
  %142 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %140)
          to label %143 unwind label %146

143:                                              ; preds = %141
  %144 = icmp sgt i32 3, %142
  br i1 %144, label %145, label %150

145:                                              ; preds = %143
  br label %195

146:                                              ; preds = %161, %158, %156, %154, %152, %150, %141, %139
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %6, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %7, align 4
  br label %199

150:                                              ; preds = %143
  %151 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %152 unwind label %146

152:                                              ; preds = %150
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %151)
          to label %154 unwind label %146

154:                                              ; preds = %152
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @.str)
          to label %156 unwind label %146

156:                                              ; preds = %154
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef @.str.6)
          to label %158 unwind label %146

158:                                              ; preds = %156
  %159 = load i32, ptr %13, align 4, !tbaa !9
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %157, i32 noundef %159)
          to label %161 unwind label %146

161:                                              ; preds = %158
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @.str.7)
          to label %163 unwind label %146

163:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  %164 = getelementptr inbounds %"class.hipsycl::rt::pcuda::device_topology", ptr %15, i32 0, i32 0
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166) #5
  %168 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::backend", ptr %167, i32 0, i32 3
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %170) #5
  %172 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::platform", ptr %171, i32 0, i32 1
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %174) #5
  %176 = getelementptr inbounds %"struct.hipsycl::rt::pcuda::device_topology::device", ptr %175, i32 0, i32 2
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = load ptr, ptr %177, align 8, !tbaa !20
  %179 = getelementptr inbounds ptr, ptr %178, i64 4
  %180 = load ptr, ptr %179, align 8
  invoke void %180(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %177)
          to label %181 unwind label %186

181:                                              ; preds = %163
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %183 unwind label %190

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str.5)
          to label %185 unwind label %190

185:                                              ; preds = %183
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %195

186:                                              ; preds = %163
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %6, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %7, align 4
  br label %194

190:                                              ; preds = %183, %181
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %6, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %194

194:                                              ; preds = %190, %186
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %199

195:                                              ; preds = %185, %145
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %13, align 4, !tbaa !9
  br label %124, !llvm.loop !28

199:                                              ; preds = %194, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %204

200:                                              ; preds = %138
  br label %201

201:                                              ; preds = %200
  %202 = load i32, ptr %12, align 4, !tbaa !9
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %12, align 4, !tbaa !9
  br label %87, !llvm.loop !30

204:                                              ; preds = %199, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %209

205:                                              ; preds = %97
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %9, align 4, !tbaa !9
  br label %27, !llvm.loop !31

209:                                              ; preds = %204, %85, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %211

210:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void

211:                                              ; preds = %209, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %6, align 8
  %214 = load i32, ptr %7, align 4
  %215 = insertvalue { ptr, i32 } poison, ptr %213, 0
  %216 = insertvalue { ptr, i32 } %215, i32 %214, 1
  resume { ptr, i32 } %216
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_5pcuda15device_topologyC1EPNS0_7runtimeEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72), ptr, ptr) #0 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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSZN7hipsycl2rt5pcuda15device_topologyC1EPNS0_7runtimeEE3$_0", !6, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology7backendE", !10, i64 0, !15, i64 4, !6, i64 8, !16, i64 16}
!15 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = !{!23, !6, i64 24}
!23 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology6deviceE", !10, i64 0, !24, i64 4, !6, i64 24}
!24 = !{!"_ZTSN7hipsycl2rt9device_idE", !25, i64 0, !10, i64 12}
!25 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !15, i64 0, !26, i64 4, !27, i64 8}
!26 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!27 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt5pcuda15device_topologyC2EPNS0_7runtimeE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  %6 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608) %1)
  invoke void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_5pcuda15device_topologyC1EPNS0_7runtimeEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72) %6, ptr nonnull %0, ptr nonnull %3)
          to label %.preheader unwind label %8

.preheader:                                       ; preds = %2
  %7 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %._crit_edge45, label %.lr.ph44

._crit_edge45:                                    ; preds = %._crit_edge42, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void

8:                                                ; preds = %2
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %125

.lr.ph44:                                         ; preds = %.preheader, %._crit_edge42
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %._crit_edge42 ], [ 0, %.preheader ]
  %10 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %11 unwind label %14

11:                                               ; preds = %.lr.ph44
  %12 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %13 = icmp slt i32 %12, 3
  br i1 %13, label %45, label %16

14:                                               ; preds = %26, %23, %21, %18, %16, %.lr.ph44
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %125

16:                                               ; preds = %11
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %18 unwind label %14

18:                                               ; preds = %16
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str)
          to label %21 unwind label %14

21:                                               ; preds = %18
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.1)
          to label %23 unwind label %14

23:                                               ; preds = %21
  %24 = trunc nuw nsw i64 %indvars.iv52 to i32
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef %24)
          to label %26 unwind label %14

26:                                               ; preds = %23
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.2)
          to label %28 unwind label %14

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %29 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %32, i64 48
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %35 unwind label %40

35:                                               ; preds = %28
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %37 unwind label %42

37:                                               ; preds = %35
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.3)
          to label %39 unwind label %42

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %45

40:                                               ; preds = %28
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %37, %35
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %125

45:                                               ; preds = %11, %39
  %46 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #5
  %.not46 = icmp eq i64 %48, 0
  br i1 %.not46, label %._crit_edge42, label %.lr.ph41

._crit_edge42:                                    ; preds = %._crit_edge, %45
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %49 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %50 = icmp ugt i64 %49, %indvars.iv.next53
  br i1 %50, label %.lr.ph44, label %._crit_edge45, !llvm.loop !19

.lr.ph41:                                         ; preds = %45, %._crit_edge
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %._crit_edge ], [ 0, %45 ]
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %52 unwind label %55

52:                                               ; preds = %.lr.ph41
  %53 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
  %54 = icmp slt i32 %53, 3
  br i1 %54, label %69, label %57

55:                                               ; preds = %67, %64, %62, %59, %57, %.lr.ph41
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %125

57:                                               ; preds = %52
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %59 unwind label %55

59:                                               ; preds = %57
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %58)
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str)
          to label %62 unwind label %55

62:                                               ; preds = %59
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.4)
          to label %64 unwind label %55

64:                                               ; preds = %62
  %65 = trunc nuw nsw i64 %indvars.iv49 to i32
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %65)
          to label %67 unwind label %55

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @.str.5)
          to label %69 unwind label %55

69:                                               ; preds = %67, %52
  %70 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %indvars.iv49) #5
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #5
  %.not47 = icmp eq i64 %74, 0
  br i1 %.not47, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %118, %69
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %75 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %77 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #5
  %78 = icmp ugt i64 %77, %indvars.iv.next50
  br i1 %78, label %.lr.ph41, label %._crit_edge42, !llvm.loop !21

.lr.ph:                                           ; preds = %69, %118
  %indvars.iv = phi i64 [ %indvars.iv.next, %118 ], [ 0, %69 ]
  %79 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %80 unwind label %83

80:                                               ; preds = %.lr.ph
  %81 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %79)
  %82 = icmp slt i32 %81, 3
  br i1 %82, label %118, label %85

83:                                               ; preds = %95, %92, %90, %87, %85, %.lr.ph
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %125

85:                                               ; preds = %80
  %86 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %87 unwind label %83

87:                                               ; preds = %85
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %86)
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull @.str)
          to label %90 unwind label %83

90:                                               ; preds = %87
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @.str.6)
          to label %92 unwind label %83

92:                                               ; preds = %90
  %93 = trunc nuw nsw i64 %indvars.iv to i32
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %91, i32 noundef %93)
          to label %95 unwind label %83

95:                                               ; preds = %92
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull @.str.7)
          to label %97 unwind label %83

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  %98 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  %100 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %indvars.iv49) #5
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %indvars.iv) #5
  %103 = getelementptr inbounds i8, ptr %102, i64 24
  %104 = load ptr, ptr %103, align 8, !tbaa !22
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = getelementptr inbounds i8, ptr %105, i64 32
  %107 = load ptr, ptr %106, align 8
  invoke void %107(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %108 unwind label %113

108:                                              ; preds = %97
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %110 unwind label %115

110:                                              ; preds = %108
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @.str.5)
          to label %112 unwind label %115

112:                                              ; preds = %110
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %118

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

115:                                              ; preds = %110, %108
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %117

117:                                              ; preds = %115, %113
  %.pn32 = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %125

118:                                              ; preds = %112, %80
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %119 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv52) #5
  %120 = getelementptr inbounds i8, ptr %119, i64 16
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %indvars.iv49) #5
  %122 = getelementptr inbounds i8, ptr %121, i64 8
  %123 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt5pcuda15device_topology6deviceESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #5
  %124 = icmp ugt i64 %123, %indvars.iv.next
  br i1 %124, label %.lr.ph, label %._crit_edge, !llvm.loop !28

125:                                              ; preds = %14, %44, %83, %117, %55, %8
  %.pn32.pn.pn.pn.pn = phi { ptr, i32 } [ %9, %8 ], [ %.pn, %44 ], [ %15, %14 ], [ %56, %55 ], [ %.pn32, %117 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn32.pn.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_5pcuda15device_topologyC1EPNS0_7runtimeEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72), ptr, ptr) local_unnamed_addr #0 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

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

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

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

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

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

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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN7hipsycl2rt5pcuda15device_topology7backendESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; 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

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

; 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

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

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

attributes #0 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology7backendE", !6, i64 0, !11, i64 4, !12, i64 8, !13, i64 16}
!11 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt5pcuda15device_topology8platformESaIS4_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !12, i64 24}
!23 = !{!"_ZTSN7hipsycl2rt5pcuda15device_topology6deviceE", !6, i64 0, !24, i64 4, !12, i64 24}
!24 = !{!"_ZTSN7hipsycl2rt9device_idE", !25, i64 0, !6, i64 12}
!25 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !11, i64 0, !26, i64 4, !27, i64 8}
!26 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!27 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!28 = distinct !{!28, !20}


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