; LLVM IR from NVIDIA/DALI :: dali/operators/segmentation (random_object_bbox)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.87" }
%"class.std::_Hashtable.87" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.dali::RandomObjectBBox::ClassInfo" = type <{ %"class.dali::SmallVector", %"class.dali::SmallVector.75", %"class.dali::SmallVector.75", i32, [4 x i8] }>
%"class.dali::SmallVector" = type { %union.anon.73, i64 }
%union.anon.73 = type { %struct.anon.74, [112 x i8] }
%struct.anon.74 = type { ptr, i64 }
%"class.dali::SmallVector.75" = type { %union.anon.78, i64 }
%union.anon.78 = type { %struct.anon.79, [112 x i8] }
%struct.anon.79 = type { ptr, i64 }
%"struct.dali::TensorViewBase.219" = type { ptr, %"struct.dali::TensorShape.215" }
%"struct.dali::TensorShape.215" = type { %"struct.dali::TensorShapeBase.216" }
%"struct.dali::TensorShapeBase.216" = type { %"class.dali::DeviceArray" }
%"class.dali::DeviceArray" = type { [1 x i64] }
%"struct.dali::TensorViewBase.221" = type { ptr, %"struct.dali::TensorShape.215" }

@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.39 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [130 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [102 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

; 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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) #3

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali16RandomObjectBBox9ClassInfo4InitEPKiRKNS_10TensorViewINS_10StorageCPUES2_Li1EEERKNS4_IS5_KfLi1EEE(ptr noundef nonnull align 8 dereferenceable(412) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca i1, align 1
  %22 = alloca %"class.std::unordered_set", align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8
  call void @_ZN4dali16RandomObjectBBox9ClassInfo5ResetEv(ptr noundef nonnull align 8 dereferenceable(412) %32)
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load i32, ptr %36, align 4, !tbaa !9
  br label %39

38:                                               ; preds = %4
  br label %39

39:                                               ; preds = %38, %35
  %40 = phi i32 [ %37, %35 ], [ 0, %38 ]
  %41 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  store i32 %40, ptr %41, align 8, !tbaa !11
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.dali::TensorViewBase.219", ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %234

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.dali::TensorViewBase.219", ptr %47, i32 0, i32 1
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %48, i32 noundef 0)
  %50 = load i64, ptr %49, align 8, !tbaa !21
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %9, align 4, !tbaa !9
  %52 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  call void @_ZN4dali11SmallVectorIiLm32ESaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %52, i64 noundef %54)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.dali::TensorViewBase.221", ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = icmp ne ptr %57, null
  br i1 %58, label %64, label %59

59:                                               ; preds = %46
  %60 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 1
  call void @_ZN4dali11SmallVectorIfLm32ESaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(136) %60)
  %61 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 1
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 1.000000e+00, ptr %10, align 4, !tbaa !24
  call void @_ZN4dali11SmallVectorIfLm32ESaIfEE6resizeEmRKf(ptr noundef nonnull align 8 dereferenceable(136) %61, i64 noundef %63, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %64

64:                                               ; preds = %59, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %64
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.dali::TensorViewBase.219", ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds i32, ptr %70, i64 0
  %72 = load i32, ptr %71, align 4, !tbaa !9
  br label %74

73:                                               ; preds = %64
  br label %74

74:                                               ; preds = %73, %67
  %75 = phi i32 [ %72, %67 ], [ 0, %73 ]
  store i32 %75, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %160, %74
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %163

81:                                               ; preds = %76
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.dali::TensorViewBase.219", ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !16
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %89, i64 noundef %91)
  store i32 %88, ptr %92, align 4, !tbaa !9
  %93 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %93, i64 noundef %95)
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %106

100:                                              ; preds = %81
  %101 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %101, i64 noundef %103)
  %105 = load i32, ptr %104, align 4, !tbaa !9
  store i32 %105, ptr %11, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %100, %81
  %107 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %107, i64 noundef %109)
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  %113 = load i32, ptr %112, align 8, !tbaa !11
  %114 = icmp eq i32 %111, %113
  br i1 %114, label %115, label %159

115:                                              ; preds = %106
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %157

118:                                              ; preds = %115
  store i1 true, ptr %21, align 1
  %119 = call ptr @__cxa_allocate_exception(i64 80) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %120 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %120, i64 noundef %122)
          to label %124 unwind label %130

124:                                              ; preds = %118
  invoke void @_ZN4dali11make_stringIJA13_ciA130_cEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 1 dereferenceable(13) @.str.39, ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 1 dereferenceable(130) @.str.40)
          to label %125 unwind label %130

125:                                              ; preds = %124
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %126 unwind label %134

126:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.41, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %127 unwind label %138

127:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20)
          to label %128 unwind label %142

128:                                              ; preds = %127
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %119, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %129 unwind label %146

129:                                              ; preds = %128
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %119, ptr @_ZTIN4dali13DALIExceptionE, ptr @_ZN4dali13DALIExceptionD2Ev) #6
          to label %309 unwind label %146

130:                                              ; preds = %124, %118
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %16, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %17, align 4
  br label %153

134:                                              ; preds = %125
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %16, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %17, align 4
  br label %152

138:                                              ; preds = %126
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %16, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %17, align 4
  br label %151

142:                                              ; preds = %127
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %16, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %17, align 4
  br label %150

146:                                              ; preds = %129, %128
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %16, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %150

150:                                              ; preds = %146, %142
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %151

151:                                              ; preds = %150, %138
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %152

152:                                              ; preds = %151, %134
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %153

153:                                              ; preds = %152, %130
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %154 = load i1, ptr %21, align 1
  br i1 %154, label %155, label %156

155:                                              ; preds = %153
  call void @__cxa_free_exception(ptr %119) #5
  br label %156

156:                                              ; preds = %155, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %233

157:                                              ; preds = %115
  store i8 1, ptr %12, align 1, !tbaa !26
  br label %158

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158, %106
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %13, align 4, !tbaa !9
  br label %76, !llvm.loop !28

163:                                              ; preds = %80
  %164 = load i8, ptr %12, align 1, !tbaa !26, !range !30, !noundef !31
  %165 = trunc i8 %164 to i1
  br i1 %165, label %166, label %232

166:                                              ; preds = %163
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %169 = icmp eq i32 %167, %168
  br i1 %169, label %170, label %227

170:                                              ; preds = %166
  %171 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  %172 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  store i32 %171, ptr %172, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #5
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %173 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  store ptr %173, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %174 = load ptr, ptr %23, align 8, !tbaa !5
  %175 = invoke noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(136) %174)
          to label %176 unwind label %185

176:                                              ; preds = %170
  store ptr %175, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %177 = load ptr, ptr %23, align 8, !tbaa !5
  %178 = invoke noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(136) %177)
          to label %179 unwind label %189

179:                                              ; preds = %176
  store ptr %178, ptr %25, align 8, !tbaa !5
  br label %180

180:                                              ; preds = %202, %179
  %181 = load ptr, ptr %24, align 8, !tbaa !5
  %182 = load ptr, ptr %25, align 8, !tbaa !5
  %183 = icmp ne ptr %181, %182
  br i1 %183, label %193, label %184

184:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %211

185:                                              ; preds = %170
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %16, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %17, align 4
  br label %210

189:                                              ; preds = %176
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %16, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %17, align 4
  br label %209

193:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %194 = load ptr, ptr %24, align 8, !tbaa !5
  %195 = load i32, ptr %194, align 4, !tbaa !9
  store i32 %195, ptr %26, align 4, !tbaa !9
  %196 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %197 unwind label %205

197:                                              ; preds = %193
  %198 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 0
  %199 = extractvalue { ptr, i8 } %196, 0
  store ptr %199, ptr %198, align 8
  %200 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 1
  %201 = extractvalue { ptr, i8 } %196, 1
  store i8 %201, ptr %200, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %202

202:                                              ; preds = %197
  %203 = load ptr, ptr %24, align 8, !tbaa !5
  %204 = getelementptr inbounds i32, ptr %203, i32 1
  store ptr %204, ptr %24, align 8, !tbaa !5
  br label %180

205:                                              ; preds = %193
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %16, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %209

209:                                              ; preds = %205, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %210

210:                                              ; preds = %209, %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %226

211:                                              ; preds = %184
  br label %212

212:                                              ; preds = %217, %211
  %213 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  %214 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 4 dereferenceable(4) %213)
          to label %215 unwind label %221

215:                                              ; preds = %212
  %216 = icmp ne i64 %214, 0
  br i1 %216, label %217, label %225

217:                                              ; preds = %215
  %218 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  %219 = load i32, ptr %218, align 8, !tbaa !11
  %220 = add nsw i32 %219, -1
  store i32 %220, ptr %218, align 8, !tbaa !11
  br label %212, !llvm.loop !32

221:                                              ; preds = %212
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %16, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %17, align 4
  br label %226

225:                                              ; preds = %215
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  br label %231

226:                                              ; preds = %221, %210
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  br label %233

227:                                              ; preds = %166
  %228 = load i32, ptr %11, align 4, !tbaa !9
  %229 = sub nsw i32 %228, 1
  %230 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  store i32 %229, ptr %230, align 8, !tbaa !11
  br label %231

231:                                              ; preds = %227, %225
  br label %232

232:                                              ; preds = %231, %163
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %234

233:                                              ; preds = %226, %156
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %304

234:                                              ; preds = %232, %39
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.dali::TensorViewBase.221", ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !22
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %303

239:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.dali::TensorViewBase.221", ptr %240, i32 0, i32 1
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %241, i32 noundef 0)
  %243 = load i64, ptr %242, align 8, !tbaa !21
  %244 = trunc i64 %243 to i32
  store i32 %244, ptr %28, align 4, !tbaa !9
  %245 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 1
  %246 = load i32, ptr %28, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  call void @_ZN4dali11SmallVectorIfLm32ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %245, i64 noundef %247)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %248

248:                                              ; preds = %265, %239
  %249 = load i32, ptr %29, align 4, !tbaa !9
  %250 = load i32, ptr %28, align 4, !tbaa !9
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %268

253:                                              ; preds = %248
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.dali::TensorViewBase.221", ptr %254, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8, !tbaa !22
  %257 = load i32, ptr %29, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds float, ptr %256, i64 %258
  %260 = load float, ptr %259, align 4, !tbaa !24
  %261 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 1
  %262 = load i32, ptr %29, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm32ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %261, i64 noundef %263)
  store float %260, ptr %264, align 4, !tbaa !24
  br label %265

265:                                              ; preds = %253
  %266 = load i32, ptr %29, align 4, !tbaa !9
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %29, align 4, !tbaa !9
  br label %248, !llvm.loop !33

268:                                              ; preds = %252
  %269 = load ptr, ptr %7, align 8, !tbaa !5
  %270 = getelementptr inbounds %"struct.dali::TensorViewBase.219", ptr %269, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8, !tbaa !16
  %272 = icmp ne ptr %271, null
  br i1 %272, label %302, label %273

273:                                              ; preds = %268
  %274 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %275 = load i32, ptr %28, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  call void @_ZN4dali11SmallVectorIiLm32ESaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %274, i64 noundef %276)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %277

277:                                              ; preds = %296, %273
  %278 = load i32, ptr %31, align 4, !tbaa !9
  %279 = load i32, ptr %28, align 4, !tbaa !9
  %280 = icmp slt i32 %278, %279
  br i1 %280, label %282, label %281

281:                                              ; preds = %277
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %301

282:                                              ; preds = %277
  %283 = load i32, ptr %30, align 4, !tbaa !9
  %284 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 3
  %285 = load i32, ptr %284, align 8, !tbaa !11
  %286 = icmp eq i32 %283, %285
  br i1 %286, label %287, label %290

287:                                              ; preds = %282
  %288 = load i32, ptr %30, align 4, !tbaa !9
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %30, align 4, !tbaa !9
  br label %290

290:                                              ; preds = %287, %282
  %291 = load i32, ptr %30, align 4, !tbaa !9
  %292 = getelementptr inbounds %"struct.dali::RandomObjectBBox::ClassInfo", ptr %32, i32 0, i32 0
  %293 = load i32, ptr %31, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %292, i64 noundef %294)
  store i32 %291, ptr %295, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %290
  %297 = load i32, ptr %31, align 4, !tbaa !9
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %31, align 4, !tbaa !9
  %299 = load i32, ptr %30, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %30, align 4, !tbaa !9
  br label %277, !llvm.loop !34

301:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %302

302:                                              ; preds = %301, %268
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %303

303:                                              ; preds = %302, %234
  ret void

304:                                              ; preds = %233
  %305 = load ptr, ptr %16, align 8
  %306 = load i32, ptr %17, align 4
  %307 = insertvalue { ptr, i32 } poison, ptr %305, 0
  %308 = insertvalue { ptr, i32 } %307, i32 %306, 1
  resume { ptr, i32 } %308

309:                                              ; preds = %129
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali11SmallVectorIfLm32ESaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(136)) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(136)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(136)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm32ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) #3 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 408}
!12 = !{!"_ZTSN4dali16RandomObjectBBox9ClassInfoE", !13, i64 0, !15, i64 136, !15, i64 272, !10, i64 408}
!13 = !{!"_ZTSN4dali11SmallVectorIiLm32ESaIiEEE", !7, i64 0, !14, i64 128}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN4dali11SmallVectorIfLm32ESaIfEEE", !7, i64 0, !14, i64 128}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUEKiLi1EEE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSN4dali11TensorShapeILi1EEE", !19, i64 0}
!19 = !{!"_ZTSN4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEE", !20, i64 0}
!20 = !{!"_ZTSN4dali11DeviceArrayIlLm1EEE", !7, i64 0}
!21 = !{!14, !14, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUEKfLi1EEE", !6, i64 0, !18, i64 8}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !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] }
%"class.std::allocator" = type { i8 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.87" }
%"class.std::_Hashtable.87" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.39 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [130 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [102 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

; 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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) local_unnamed_addr #3

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

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali16RandomObjectBBox9ClassInfo4InitEPKiRKNS_10TensorViewINS_10StorageCPUES2_Li1EEERKNS4_IS5_KfLi1EEE(ptr noundef nonnull align 8 dereferenceable(412) %0, ptr noundef readonly %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca float, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::unordered_set", align 8
  %12 = alloca i32, align 4
  tail call void @_ZN4dali16RandomObjectBBox9ClassInfo5ResetEv(ptr noundef nonnull align 8 dereferenceable(412) %0)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %15, label %13

13:                                               ; preds = %4
  %14 = load i32, ptr %1, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %4, %13
  %16 = phi i32 [ %14, %13 ], [ 0, %4 ]
  %17 = getelementptr inbounds i8, ptr %0, i64 408
  store i32 %16, ptr %17, align 8, !tbaa !9
  %18 = load ptr, ptr %2, align 8, !tbaa !14
  %.not77 = icmp eq ptr %18, null
  br i1 %.not77, label %._crit_edge.thread, label %19

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %2, i64 8
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef 0)
  %22 = load i64, ptr %21, align 8, !tbaa !20
  %23 = trunc i64 %22 to i32
  %sext = shl i64 %22, 32
  %24 = ashr exact i64 %sext, 32
  tail call void @_ZN4dali11SmallVectorIiLm32ESaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %24)
  %25 = load ptr, ptr %3, align 8, !tbaa !21
  %.not78 = icmp eq ptr %25, null
  br i1 %.not78, label %26, label %28

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @_ZN4dali11SmallVectorIfLm32ESaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(136) %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store float 1.000000e+00, ptr %5, align 4, !tbaa !23
  call void @_ZN4dali11SmallVectorIfLm32ESaIfEE6resizeEmRKf(ptr noundef nonnull align 8 dereferenceable(136) %27, i64 noundef %24, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %28

28:                                               ; preds = %26, %19
  %29 = icmp sgt i32 %23, 0
  br i1 %29, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %28
  %30 = load ptr, ptr %2, align 8, !tbaa !14
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %wide.trip.count128 = and i64 %22, 2147483647
  br i1 %.not, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %42
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %42 ], [ 0, %.lr.ph ]
  %.054106.us = phi i32 [ %.155.us, %42 ], [ %31, %.lr.ph ]
  %.056105.us = phi i1 [ %.056.mux.us, %42 ], [ false, %.lr.ph ]
  %32 = load ptr, ptr %2, align 8, !tbaa !14
  %33 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv126
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv126)
  store i32 %34, ptr %35, align 4, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv126)
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp slt i32 %37, %.054106.us
  br i1 %38, label %39, label %42

39:                                               ; preds = %.lr.ph.split.us
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv126)
  %41 = load i32, ptr %40, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %39, %.lr.ph.split.us
  %.155.us = phi i32 [ %41, %39 ], [ %.054106.us, %.lr.ph.split.us ]
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv126)
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr %17, align 8, !tbaa !9
  %.not121 = icmp eq i32 %44, %45
  %.056.mux.us = select i1 %.not121, i1 true, i1 %.056105.us
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count128
  br i1 %exitcond129.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !25

._crit_edge:                                      ; preds = %42
  br i1 %.056.mux.us, label %81, label %._crit_edge.thread

.lr.ph.split:                                     ; preds = %.lr.ph, %80
  %indvars.iv = phi i64 [ %indvars.iv.next, %80 ], [ 0, %.lr.ph ]
  %.054106 = phi i32 [ %.155, %80 ], [ %31, %.lr.ph ]
  %46 = load ptr, ptr %2, align 8, !tbaa !14
  %47 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv)
  store i32 %48, ptr %49, align 4, !tbaa !5
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv)
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp slt i32 %51, %.054106
  br i1 %52, label %53, label %56

53:                                               ; preds = %.lr.ph.split
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv)
  %55 = load i32, ptr %54, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %53, %.lr.ph.split
  %.155 = phi i32 [ %55, %53 ], [ %.054106, %.lr.ph.split ]
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv)
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %17, align 8, !tbaa !9
  %.not120 = icmp eq i32 %58, %59
  br i1 %.not120, label %60, label %80

60:                                               ; preds = %56
  %61 = call ptr @__cxa_allocate_exception(i64 80) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %62 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv)
          to label %63 unwind label %.thread

63:                                               ; preds = %60
  invoke void @_ZN4dali11make_stringIJA13_ciA130_cEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 1 dereferenceable(13) @.str.39, ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 1 dereferenceable(130) @.str.40)
          to label %64 unwind label %.thread

64:                                               ; preds = %63
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %65 unwind label %.thread98

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

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10)
          to label %67 unwind label %73

67:                                               ; preds = %66
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %61, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %68 unwind label %75

68:                                               ; preds = %67
  invoke void @__cxa_throw(ptr nonnull %61, ptr nonnull @_ZTIN4dali13DALIExceptionE, ptr nonnull @_ZN4dali13DALIExceptionD2Ev) #6
          to label %132 unwind label %75

.thread:                                          ; preds = %60, %63
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %79

.thread98:                                        ; preds = %64
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %79

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %78

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %68, %67
  %.070 = phi i1 [ false, %68 ], [ true, %67 ]
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %77

77:                                               ; preds = %75, %73
  %.171 = phi i1 [ %.070, %75 ], [ true, %73 ]
  %.pn88 = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %78

78:                                               ; preds = %71, %77
  %.272 = phi i1 [ %.171, %77 ], [ true, %71 ]
  %.pn88.pn = phi { ptr, i32 } [ %.pn88, %77 ], [ %72, %71 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br i1 %.272, label %79, label %110

79:                                               ; preds = %.thread98, %.thread, %78
  %.pn88.pn.pn.pn97 = phi { ptr, i32 } [ %69, %.thread ], [ %.pn88.pn, %78 ], [ %70, %.thread98 ]
  call void @__cxa_free_exception(ptr %61) #5
  br label %110

80:                                               ; preds = %56
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count128
  br i1 %exitcond.not, label %._crit_edge.thread, label %.lr.ph.split, !llvm.loop !25

81:                                               ; preds = %._crit_edge
  %82 = call noundef i32 @_ZNSt14numeric_limitsIiE3minEv() #5
  %83 = icmp eq i32 %.155.us, %82
  br i1 %83, label %84, label %108

84:                                               ; preds = %81
  %85 = call noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() #5
  store i32 %85, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #5
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  %86 = invoke noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %87 unwind label %89

87:                                               ; preds = %84
  %88 = invoke noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %.preheader101 unwind label %91

.preheader101:                                    ; preds = %87
  %.not80109 = icmp eq ptr %86, %88
  br i1 %.not80109, label %.preheader.preheader, label %.lr.ph111

.preheader.preheader:                             ; preds = %95, %.preheader101
  br label %.preheader

89:                                               ; preds = %84
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %107

91:                                               ; preds = %87
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %107

.lr.ph111:                                        ; preds = %.preheader101, %95
  %.061110 = phi ptr [ %96, %95 ], [ %86, %.preheader101 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %93 = load i32, ptr %.061110, align 4, !tbaa !5
  store i32 %93, ptr %12, align 4, !tbaa !5
  %94 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %95 unwind label %97

95:                                               ; preds = %.lr.ph111
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  %96 = getelementptr inbounds i8, ptr %.061110, i64 4
  %.not80 = icmp eq ptr %96, %88
  br i1 %.not80, label %.preheader.preheader, label %.lr.ph111

97:                                               ; preds = %.lr.ph111
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %107

.preheader:                                       ; preds = %.preheader.preheader, %101
  %99 = invoke noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %100 unwind label %104

100:                                              ; preds = %.preheader
  %.not81 = icmp eq i64 %99, 0
  br i1 %.not81, label %106, label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %17, align 8, !tbaa !9
  %103 = add nsw i32 %102, -1
  store i32 %103, ptr %17, align 8, !tbaa !9
  br label %.preheader, !llvm.loop !27

104:                                              ; preds = %.preheader
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %107

106:                                              ; preds = %100
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #5
  br label %._crit_edge.thread

107:                                              ; preds = %89, %97, %91, %104
  %.pn.pn.pn = phi { ptr, i32 } [ %105, %104 ], [ %90, %89 ], [ %98, %97 ], [ %92, %91 ]
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #5
  br label %110

108:                                              ; preds = %81
  %109 = add nsw i32 %.155.us, -1
  store i32 %109, ptr %17, align 8, !tbaa !9
  br label %._crit_edge.thread

110:                                              ; preds = %78, %79, %107
  %.pn88.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %107 ], [ %.pn88.pn.pn.pn97, %79 ], [ %.pn88.pn, %78 ]
  resume { ptr, i32 } %.pn88.pn.pn.pn.pn

._crit_edge.thread:                               ; preds = %80, %28, %._crit_edge, %108, %106, %15
  %111 = load ptr, ptr %3, align 8, !tbaa !21
  %.not82 = icmp eq ptr %111, null
  br i1 %.not82, label %.loopexit, label %112

112:                                              ; preds = %._crit_edge.thread
  %113 = getelementptr inbounds i8, ptr %3, i64 8
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef 0)
  %115 = load i64, ptr %114, align 8, !tbaa !20
  %116 = trunc i64 %115 to i32
  %117 = getelementptr inbounds i8, ptr %0, i64 136
  %sext83 = shl i64 %115, 32
  %118 = ashr exact i64 %sext83, 32
  call void @_ZN4dali11SmallVectorIfLm32ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %117, i64 noundef %118)
  %119 = icmp sgt i32 %116, 0
  br i1 %119, label %.lr.ph114.preheader, label %._crit_edge115.thread

.lr.ph114.preheader:                              ; preds = %112
  %wide.trip.count133 = and i64 %115, 2147483647
  br label %.lr.ph114

._crit_edge115:                                   ; preds = %.lr.ph114
  %120 = load ptr, ptr %2, align 8, !tbaa !14
  %.not84 = icmp eq ptr %120, null
  br i1 %.not84, label %126, label %.loopexit

._crit_edge115.thread:                            ; preds = %112
  %121 = load ptr, ptr %2, align 8, !tbaa !14
  %.not84143 = icmp eq ptr %121, null
  br i1 %.not84143, label %.thread144, label %.loopexit

.thread144:                                       ; preds = %._crit_edge115.thread
  call void @_ZN4dali11SmallVectorIiLm32ESaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %118)
  br label %.loopexit

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %.lr.ph114
  %indvars.iv130 = phi i64 [ 0, %.lr.ph114.preheader ], [ %indvars.iv.next131, %.lr.ph114 ]
  %122 = load ptr, ptr %3, align 8, !tbaa !21
  %123 = getelementptr inbounds float, ptr %122, i64 %indvars.iv130
  %124 = load float, ptr %123, align 4, !tbaa !23
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm32ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %117, i64 noundef %indvars.iv130)
  store float %124, ptr %125, align 4, !tbaa !23
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133
  br i1 %exitcond134.not, label %._crit_edge115, label %.lr.ph114, !llvm.loop !28

126:                                              ; preds = %._crit_edge115
  call void @_ZN4dali11SmallVectorIiLm32ESaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %118)
  br i1 %119, label %.lr.ph119.preheader, label %.loopexit

.lr.ph119.preheader:                              ; preds = %126
  %wide.trip.count138 = and i64 %115, 2147483647
  br label %.lr.ph119

.lr.ph119:                                        ; preds = %.lr.ph119.preheader, %.lr.ph119
  %indvars.iv135 = phi i64 [ 0, %.lr.ph119.preheader ], [ %indvars.iv.next136, %.lr.ph119 ]
  %.052116 = phi i32 [ 0, %.lr.ph119.preheader ], [ %131, %.lr.ph119 ]
  %127 = load i32, ptr %17, align 8, !tbaa !9
  %128 = icmp eq i32 %.052116, %127
  %129 = zext i1 %128 to i32
  %spec.select = add nsw i32 %.052116, %129
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %indvars.iv135)
  store i32 %spec.select, ptr %130, align 4, !tbaa !5
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %131 = add nsw i32 %spec.select, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138
  br i1 %exitcond139.not, label %.loopexit, label %.lr.ph119, !llvm.loop !29

.loopexit:                                        ; preds = %.lr.ph119, %.thread144, %._crit_edge115.thread, %126, %._crit_edge115, %._crit_edge.thread
  ret void

132:                                              ; preds = %68
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali11SmallVectorIfLm32ESaIfEE5clearEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIiLm32ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA13_ciA130_cEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(13), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(130)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3minEv() local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt14numeric_limitsIiE3maxEv() local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIiLm32ESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm32ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) local_unnamed_addr #3 align 2

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

!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, !6, i64 408}
!10 = !{!"_ZTSN4dali16RandomObjectBBox9ClassInfoE", !11, i64 0, !13, i64 136, !13, i64 272, !6, i64 408}
!11 = !{!"_ZTSN4dali11SmallVectorIiLm32ESaIiEEE", !7, i64 0, !12, i64 128}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN4dali11SmallVectorIfLm32ESaIfEEE", !7, i64 0, !12, i64 128}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUEKiLi1EEE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN4dali11TensorShapeILi1EEE", !18, i64 0}
!18 = !{!"_ZTSN4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEE", !19, i64 0}
!19 = !{!"_ZTSN4dali11DeviceArrayIlLm1EEE", !7, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!22, !16, i64 0}
!22 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUEKfLi1EEE", !16, i64 0, !17, i64 8}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass