; LLVM IR from huawei-noah/bolt :: inference/engine/src (bolt_dllite)

; 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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%"class.std::map.76" = type { %"class.std::_Rb_tree.77" }
%"class.std::_Rb_tree.77" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned char *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned char *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned char *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned char *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.81" = type { %"class.std::_Rb_tree.82" }
%"class.std::_Rb_tree.82" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%class.Tensor = type { %"class.std::shared_ptr.30", %"class.std::shared_ptr.33" }
%"class.std::shared_ptr.30" = type { %"class.std::__shared_ptr.31" }
%"class.std::__shared_ptr.31" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.33" = type { %"class.std::__shared_ptr.34" }
%"class.std::__shared_ptr.34" = type { ptr, %"class.std::__shared_count" }
%"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.3" = type { i8 }
%struct.DLLiteInfo = type { ptr, i8 }
%struct.ModelHandleInfo = type { ptr, ptr, i32, ptr, i8 }
%"struct.bolt::IOTensor" = type { %"class.std::__cxx11::basic_string", i32, i32, %"class.std::vector.62", %"struct.std::pair" }
%"class.std::vector.62" = type { %"struct.std::_Vector_base.63" }
%"struct.std::_Vector_base.63" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { ptr, i64 }
%struct.ResultHandleInner = type { i32, ptr, i32 }
%struct.DataDesc = type { [8 x i32], [128 x i8], i32, i32, ptr }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_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: mustprogress uwtable
declare dso_local void @_Z14UpdateDataDesc10TensorDescP8DataDesc(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4bolt8RunModelEPvS0_RKSt6vectorINS_8IOTensorESaIS2_EE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::map.76", align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::map.76", align 8
  %19 = alloca %"class.std::map.81", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %class.Tensor, align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.3", align 1
  %25 = alloca %struct.TensorDesc, align 8
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.DLLiteInfo, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  store ptr %29, ptr %9, align 8, !tbaa !5
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = icmp eq ptr null, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %3
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %146

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ModelHandleInfo, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  store ptr %36, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ModelHandleInfo, ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 8, !tbaa !15
  store i32 %39, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %40, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !17
  br label %41

41:                                               ; preds = %60, %33
  %42 = load i64, ptr %15, align 8, !tbaa !17
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = call noundef i64 @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  %45 = icmp ult i64 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %67

47:                                               ; preds = %41
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load i64, ptr %15, align 8, !tbaa !17
  %50 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %49) #6
  %51 = getelementptr inbounds %"struct.bolt::IOTensor", ptr %50, i32 0, i32 4
  %52 = getelementptr inbounds %"struct.std::pair", ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load i64, ptr %15, align 8, !tbaa !17
  %56 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %55) #6
  %57 = getelementptr inbounds %"struct.bolt::IOTensor", ptr %56, i32 0, i32 0
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(32) %57)
          to label %59 unwind label %63

59:                                               ; preds = %47
  store ptr %53, ptr %58, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %59
  %61 = load i64, ptr %15, align 8, !tbaa !17
  %62 = add i64 %61, 1
  store i64 %62, ptr %15, align 8, !tbaa !17
  br label %41, !llvm.loop !30

63:                                               ; preds = %47
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %16, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %145

67:                                               ; preds = %46
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %69 unwind label %86

69:                                               ; preds = %67
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  invoke void @_ZN3CNN17set_input_by_copyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS6_ESaISt4pairIKS6_S7_EEES0_IS6_PfS9_SaISA_ISB_SF_EEE(ptr noundef nonnull align 8 dereferenceable(5265) %68, ptr noundef %18, ptr noundef %19)
          to label %70 unwind label %90

70:                                               ; preds = %69
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #6
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = load ptr, ptr %71, align 8, !tbaa !32
  %73 = getelementptr inbounds ptr, ptr %72, i64 3
  %74 = load ptr, ptr %73, align 8
  invoke void %74(ptr noundef nonnull align 8 dereferenceable(5265) %71)
          to label %75 unwind label %86

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ResultHandleInner, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !34
  store ptr %78, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !37
  br label %79

79:                                               ; preds = %140, %75
  %80 = load i32, ptr %21, align 4, !tbaa !37
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ResultHandleInner, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !38
  %84 = icmp ult i32 %80, %83
  br i1 %84, label %94, label %85

85:                                               ; preds = %79
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %144

86:                                               ; preds = %70, %67
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %16, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %17, align 4
  br label %145

90:                                               ; preds = %69
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %16, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %17, align 4
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #6
  br label %145

94:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = load i32, ptr %21, align 4, !tbaa !37
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds %struct.DataDesc, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.DataDesc, ptr %99, i32 0, i32 1
  %101 = getelementptr inbounds [128 x i8], ptr %100, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef %101, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %102 unwind label %116

102:                                              ; preds = %94
  invoke void @_ZN3CNN18get_tensor_by_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %22, ptr noundef nonnull align 8 dereferenceable(5265) %95, ptr noundef %23)
          to label %103 unwind label %120

103:                                              ; preds = %102
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %25, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %104 unwind label %125

104:                                              ; preds = %103
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  %106 = load i32, ptr %21, align 4, !tbaa !37
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds %struct.DataDesc, ptr %105, i64 %107
  invoke void @_Z14UpdateDataDesc10TensorDescP8DataDesc(ptr noundef byval(%struct.TensorDesc) align 8 %25, ptr noundef %108)
          to label %109 unwind label %125

109:                                              ; preds = %104
  %110 = load i32, ptr %12, align 4, !tbaa !16
  %111 = icmp eq i32 %110, 10
  br i1 %111, label %115, label %112

112:                                              ; preds = %109
  %113 = load i32, ptr %12, align 4, !tbaa !16
  %114 = icmp eq i32 %113, 11
  br i1 %114, label %115, label %129

115:                                              ; preds = %112, %109
  br label %139

116:                                              ; preds = %94
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %16, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %17, align 4
  br label %124

120:                                              ; preds = %102
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %16, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  br label %124

124:                                              ; preds = %120, %116
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  br label %143

125:                                              ; preds = %131, %129, %104, %103
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %16, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %17, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %143

129:                                              ; preds = %112
  %130 = invoke noundef ptr @_ZN6Tensor10get_memoryEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %131 unwind label %125

131:                                              ; preds = %129
  %132 = invoke noundef ptr @_ZN9CpuMemory7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(125) %130)
          to label %133 unwind label %125

133:                                              ; preds = %131
  %134 = load ptr, ptr %20, align 8, !tbaa !5
  %135 = load i32, ptr %21, align 4, !tbaa !37
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds %struct.DataDesc, ptr %134, i64 %136
  %138 = getelementptr inbounds %struct.DataDesc, ptr %137, i32 0, i32 4
  store ptr %132, ptr %138, align 8, !tbaa !39
  br label %139

139:                                              ; preds = %133, %115
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %21, align 4, !tbaa !37
  %142 = add i32 %141, 1
  store i32 %142, ptr %21, align 4, !tbaa !37
  br label %79, !llvm.loop !43

143:                                              ; preds = %125, %124
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %145

144:                                              ; preds = %85
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %146

145:                                              ; preds = %143, %90, %86, %63
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %148

146:                                              ; preds = %144, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %147 = load i32, ptr %4, align 4
  ret i32 %147

148:                                              ; preds = %145
  %149 = load ptr, ptr %16, align 8
  %150 = load i32, ptr %17, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

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

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

declare void @_ZN3CNN17set_input_by_copyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS6_ESaISt4pairIKS6_S7_EEES0_IS6_PfS9_SaISA_ISB_SF_EEE(ptr noundef nonnull align 8 dereferenceable(5265), ptr noundef, ptr noundef) #4

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

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

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

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

declare void @_ZN3CNN18get_tensor_by_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%class.Tensor) align 8, ptr noundef nonnull align 8 dereferenceable(5265), ptr noundef) #4

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS10DLLiteInfo", !6, i64 0, !11, i64 8}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTS15ModelHandleInfo", !6, i64 0, !6, i64 8, !14, i64 16, !6, i64 24, !11, i64 32}
!14 = !{!"_ZTS13HARDWARE_TYPE", !7, i64 0}
!15 = !{!13, !14, i64 16}
!16 = !{!14, !14, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !6, i64 64}
!20 = !{!"_ZTSN4bolt8IOTensorE", !21, i64 0, !23, i64 32, !24, i64 36, !25, i64 40, !29, i64 64}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !18, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"_ZTSN4bolt10TensorTypeE", !7, i64 0}
!24 = !{!"_ZTSN4bolt12TensorLayoutE", !7, i64 0}
!25 = !{!"_ZTSSt6vectorImSaImEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseImSaImEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt4pairIPvmE", !6, i64 0, !18, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!33, !33, i64 0}
!33 = !{!"vtable pointer", !8, i64 0}
!34 = !{!35, !6, i64 8}
!35 = !{!"_ZTS17ResultHandleInner", !36, i64 0, !6, i64 8, !14, i64 16}
!36 = !{!"int", !7, i64 0}
!37 = !{!36, !36, i64 0}
!38 = !{!35, !36, i64 0}
!39 = !{!40, !6, i64 168}
!40 = !{!"_ZTS8DataDesc", !7, i64 0, !7, i64 32, !41, i64 160, !42, i64 164, !6, i64 168}
!41 = !{!"_ZTS8DataType", !7, i64 0}
!42 = !{!"_ZTS10DataFormat", !7, i64 0}
!43 = distinct !{!43, !31}


; 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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%"class.std::map.76" = type { %"class.std::_Rb_tree.77" }
%"class.std::_Rb_tree.77" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned char *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned char *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned char *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned char *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.81" = type { %"class.std::_Rb_tree.82" }
%"class.std::_Rb_tree.82" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%class.Tensor = type { %"class.std::shared_ptr.30", %"class.std::shared_ptr.33" }
%"class.std::shared_ptr.30" = type { %"class.std::__shared_ptr.31" }
%"class.std::__shared_ptr.31" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.33" = type { %"class.std::__shared_ptr.34" }
%"class.std::__shared_ptr.34" = type { ptr, %"class.std::__shared_count" }
%"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.3" = type { i8 }
%struct.DataDesc = type { [8 x i32], [128 x i8], i32, i32, ptr }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_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 uwtable
declare dso_local void @_Z14UpdateDataDesc10TensorDescP8DataDesc(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -2, 1) i32 @_ZN4bolt8RunModelEPvS0_RKSt6vectorINS_8IOTensorESaIS2_EE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::map.76", align 8
  %5 = alloca %"class.std::map.76", align 8
  %6 = alloca %"class.std::map.81", align 8
  %7 = alloca %class.Tensor, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.3", align 1
  %10 = alloca %struct.TensorDesc, align 8
  %11 = load ptr, ptr %0, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %76, label %13

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %11, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %11, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  %18 = call noundef i64 @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %.not = icmp eq i64 %18, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %24, %13
  invoke void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %30 unwind label %52

.lr.ph:                                           ; preds = %13, %24
  %.03643 = phi i64 [ %25, %24 ], [ 0, %13 ]
  %19 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.03643) #6
  %20 = getelementptr inbounds i8, ptr %19, i64 64
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.03643) #6
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %24 unwind label %28

24:                                               ; preds = %.lr.ph
  store ptr %21, ptr %23, align 8, !tbaa !27
  %25 = add nuw i64 %.03643, 1
  %26 = call noundef i64 @_ZNKSt6vectorIN4bolt8IOTensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %27 = icmp ult i64 %25, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !28

28:                                               ; preds = %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %75

30:                                               ; preds = %._crit_edge
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  invoke void @_ZN3CNN17set_input_by_copyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS6_ESaISt4pairIKS6_S7_EEES0_IS6_PfS9_SaISA_ISB_SF_EEE(ptr noundef nonnull align 8 dereferenceable(5265) %15, ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %31 unwind label %54

31:                                               ; preds = %30
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %32 = load ptr, ptr %15, align 8, !tbaa !30
  %33 = getelementptr inbounds i8, ptr %32, i64 24
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr noundef nonnull align 8 dereferenceable(5265) %15)
          to label %35 unwind label %52

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %1, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !32
  %38 = load i32, ptr %1, align 8, !tbaa !35
  %.not54 = icmp eq i32 %38, 0
  br i1 %.not54, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %35
  %.fr55 = freeze i32 %17
  %39 = and i32 %.fr55, -2
  %or.cond = icmp eq i32 %39, 10
  br i1 %or.cond, label %.lr.ph46.split.us, label %.lr.ph46.split

.lr.ph46.split.us:                                ; preds = %.lr.ph46, %45
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %45 ], [ 0, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %40 = getelementptr inbounds %struct.DataDesc, ptr %37, i64 %indvars.iv58
  %41 = getelementptr inbounds i8, ptr %40, i64 32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %41, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %42 unwind label %.split.us

42:                                               ; preds = %.lr.ph46.split.us
  invoke void @_ZN3CNN18get_tensor_by_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %7, ptr noundef nonnull align 8 dereferenceable(5265) %15, ptr noundef nonnull %8)
          to label %43 unwind label %.split49.us

43:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %10, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %44 unwind label %.split52.us

44:                                               ; preds = %43
  invoke void @_Z14UpdateDataDesc10TensorDescP8DataDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %10, ptr noundef %40)
          to label %45 unwind label %.split52.us

45:                                               ; preds = %44
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %46 = load i32, ptr %1, align 8, !tbaa !35
  %47 = zext i32 %46 to i64
  %48 = icmp ult i64 %indvars.iv.next59, %47
  br i1 %48, label %.lr.ph46.split.us, label %._crit_edge47, !llvm.loop !36

.split.us:                                        ; preds = %.lr.ph46.split.us
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %71

.split49.us:                                      ; preds = %42
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %70

.split52.us:                                      ; preds = %44, %43
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %73

._crit_edge47:                                    ; preds = %61, %45, %35
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  br label %76

52:                                               ; preds = %31, %._crit_edge
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %75

54:                                               ; preds = %30
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPfSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  br label %75

.lr.ph46.split:                                   ; preds = %.lr.ph46, %61
  %indvars.iv = phi i64 [ %indvars.iv.next, %61 ], [ 0, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %56 = getelementptr inbounds %struct.DataDesc, ptr %37, i64 %indvars.iv
  %57 = getelementptr inbounds i8, ptr %56, i64 32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %57, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %58 unwind label %.split

58:                                               ; preds = %.lr.ph46.split
  invoke void @_ZN3CNN18get_tensor_by_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %7, ptr noundef nonnull align 8 dereferenceable(5265) %15, ptr noundef nonnull %8)
          to label %59 unwind label %.split49

59:                                               ; preds = %58
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %10, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %60 unwind label %.split52

60:                                               ; preds = %59
  invoke void @_Z14UpdateDataDesc10TensorDescP8DataDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %10, ptr noundef %56)
          to label %61 unwind label %.split52

61:                                               ; preds = %60
  %62 = call noundef ptr @_ZN6Tensor10get_memoryEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %63 = call noundef ptr @_ZN9CpuMemory7get_ptrEv(ptr noundef nonnull align 8 dereferenceable(125) %62)
  %64 = getelementptr inbounds i8, ptr %56, i64 168
  store ptr %63, ptr %64, align 8, !tbaa !37
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %65 = load i32, ptr %1, align 8, !tbaa !35
  %66 = zext i32 %65 to i64
  %67 = icmp ult i64 %indvars.iv.next, %66
  br i1 %67, label %.lr.ph46.split, label %._crit_edge47, !llvm.loop !36

.split:                                           ; preds = %.lr.ph46.split
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

.split49:                                         ; preds = %58
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %70

70:                                               ; preds = %.split49.us, %.split49
  %.us-phi50 = phi { ptr, i32 } [ %69, %.split49 ], [ %50, %.split49.us ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %71

71:                                               ; preds = %.split, %.split.us, %70
  %.pn = phi { ptr, i32 } [ %.us-phi50, %70 ], [ %68, %.split ], [ %49, %.split.us ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  br label %74

.split52:                                         ; preds = %60, %59
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %73

73:                                               ; preds = %.split52.us, %.split52
  %.us-phi53 = phi { ptr, i32 } [ %72, %.split52 ], [ %51, %.split52.us ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %74

74:                                               ; preds = %73, %71
  %.pn39 = phi { ptr, i32 } [ %.us-phi53, %73 ], [ %.pn, %71 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %75

75:                                               ; preds = %74, %54, %52, %28
  %.pn41 = phi { ptr, i32 } [ %29, %28 ], [ %.pn39, %74 ], [ %53, %52 ], [ %55, %54 ]
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS5_ESaISt4pairIKS5_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn41

76:                                               ; preds = %3, %._crit_edge47
  %.031 = phi i32 [ 0, %._crit_edge47 ], [ -2, %3 ]
  ret i32 %.031
}

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

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

declare void @_ZN3CNN17set_input_by_copyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPhSt4lessIS6_ESaISt4pairIKS6_S7_EEES0_IS6_PfS9_SaISA_ISB_SF_EEE(ptr noundef nonnull align 8 dereferenceable(5265), ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

declare void @_ZN3CNN18get_tensor_by_nameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%class.Tensor) align 8, ptr noundef nonnull align 8 dereferenceable(5265), ptr noundef) local_unnamed_addr #4

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS10DLLiteInfo", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"_ZTS15ModelHandleInfo", !7, i64 0, !7, i64 8, !13, i64 16, !7, i64 24, !10, i64 32}
!13 = !{!"_ZTS13HARDWARE_TYPE", !8, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!16, !7, i64 64}
!16 = !{!"_ZTSN4bolt8IOTensorE", !17, i64 0, !20, i64 32, !21, i64 36, !22, i64 40, !26, i64 64}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !8, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_ZTSN4bolt10TensorTypeE", !8, i64 0}
!21 = !{!"_ZTSN4bolt12TensorLayoutE", !8, i64 0}
!22 = !{!"_ZTSSt6vectorImSaImEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseImSaImEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!"_ZTSSt4pairIPvmE", !7, i64 0, !19, i64 8}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !9, i64 0}
!32 = !{!33, !7, i64 8}
!33 = !{!"_ZTS17ResultHandleInner", !34, i64 0, !7, i64 8, !13, i64 16}
!34 = !{!"int", !8, i64 0}
!35 = !{!33, !34, i64 0}
!36 = distinct !{!36, !29}
!37 = !{!38, !7, i64 168}
!38 = !{!"_ZTS8DataDesc", !8, i64 0, !8, i64 32, !39, i64 160, !40, i64 164, !7, i64 168}
!39 = !{!"_ZTS8DataType", !8, i64 0}
!40 = !{!"_ZTS10DataFormat", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass