; LLVM IR from huawei-noah/bolt :: compute/tensor/src (fully_connected)

; 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.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%struct.ArchInfo = type { i32, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 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: nounwind
declare i64 @syscall(i64 noundef, ...) #1

declare i32 @printf(ptr noundef, ...) #2

declare i32 @fflush(ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

; 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)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs2d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z8tensor1d8DataTypej(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) #7

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15fully_connected6TensorS_S_St6vectorIS_SaIS_EES_P8ArchInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #5 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.TensorDesc, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %class.Tensor, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.TensorDesc, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %class.Tensor, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %class.Tensor, align 8
  %24 = alloca %struct.TensorDesc, align 4
  %25 = alloca %struct.TensorDesc, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca %class.Tensor, align 8
  %29 = alloca %struct.TensorDesc, align 4
  %30 = alloca ptr, align 8
  %31 = alloca %class.Tensor, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca %struct.TensorDesc, align 4
  %38 = alloca %struct.TensorDesc, align 8
  %39 = alloca %struct.TensorDesc, align 8
  %40 = alloca %struct.TensorDesc, align 8
  %41 = alloca %struct.TensorDesc, align 8
  %42 = alloca i32, align 4
  %43 = alloca %struct.TensorDesc, align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca %struct.TensorDesc, align 8
  %47 = alloca i32, align 4
  %48 = alloca %struct.TensorDesc, align 8
  %49 = alloca ptr, align 8
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca %struct.TensorDesc, align 8
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca ptr, align 8
  %62 = alloca i32, align 4
  %63 = alloca %struct.TensorDesc, align 8
  %64 = alloca i32, align 4
  %65 = alloca %struct.TensorDesc, align 8
  %66 = alloca %struct.TensorDesc, align 4
  %67 = alloca %struct.TensorDesc, align 4
  %68 = alloca %struct.TensorDesc, align 8
  %69 = alloca %struct.TensorDesc, align 8
  %70 = alloca %struct.TensorDesc, align 8
  %71 = alloca %struct.TensorDesc, align 4
  %72 = alloca %struct.TensorDesc, align 4
  %73 = alloca %struct.TensorDesc, align 8
  %74 = alloca %struct.TensorDesc, align 8
  %75 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ArchInfo, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !9
  store i32 %78, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 92, ptr %14) #9
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %14, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %0) #9
  %79 = load i32, ptr %13, align 4, !tbaa !12
  %80 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %16, i32 noundef %79)
          to label %81 unwind label %91

81:                                               ; preds = %6
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  store ptr %80, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %19) #9
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %19, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %82 = load i32, ptr %13, align 4, !tbaa !12
  %83 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %21, i32 noundef %82)
          to label %84 unwind label %95

84:                                               ; preds = %81
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  store ptr %83, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  %85 = load i32, ptr %13, align 4, !tbaa !12
  %86 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %23, i32 noundef %85)
          to label %87 unwind label %99

87:                                               ; preds = %84
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #9
  store ptr %86, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %24) #9
  call void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92) %24) #9
  %88 = load ptr, ptr %22, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %103

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 92, ptr %25) #9
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %25, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %25, i64 92, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 92, ptr %25) #9
  br label %103

91:                                               ; preds = %6
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %17, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %18, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  br label %342

95:                                               ; preds = %81
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %17, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %18, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  br label %341

99:                                               ; preds = %84
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %17, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %18, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #9
  br label %340

103:                                              ; preds = %90, %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #9
  %105 = call noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %104)
  store i32 %105, ptr %26, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %106 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(32) %106) #9
  %107 = load i32, ptr %13, align 4, !tbaa !12
  %108 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %28, i32 noundef %107)
          to label %109 unwind label %119

109:                                              ; preds = %103
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  store ptr %108, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %29) #9
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %29, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  %110 = load i32, ptr %13, align 4, !tbaa !12
  %111 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %31, i32 noundef %110)
          to label %112 unwind label %123

112:                                              ; preds = %109
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  store ptr %111, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 51, ptr %32, align 4, !tbaa !21
  %113 = load i32, ptr %13, align 4, !tbaa !12
  %114 = icmp eq i32 %113, 2
  br i1 %114, label %118, label %115

115:                                              ; preds = %112
  %116 = load i32, ptr %13, align 4, !tbaa !12
  %117 = icmp eq i32 %116, 7
  br i1 %117, label %118, label %127

118:                                              ; preds = %115, %112
  br label %337

119:                                              ; preds = %103
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %17, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %18, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  br label %339

123:                                              ; preds = %109
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %17, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %18, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %29) #9
  br label %339

127:                                              ; preds = %115
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = icmp eq ptr %128, null
  br i1 %129, label %136, label %130

130:                                              ; preds = %127
  %131 = load ptr, ptr %20, align 8, !tbaa !5
  %132 = icmp eq ptr %131, null
  br i1 %132, label %136, label %133

133:                                              ; preds = %130
  %134 = load ptr, ptr %30, align 8, !tbaa !5
  %135 = icmp eq ptr %134, null
  br i1 %135, label %136, label %152

136:                                              ; preds = %133, %130, %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 1, ptr %33, align 4, !tbaa !21
  %137 = load i32, ptr %33, align 4, !tbaa !21
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %151

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %140 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %141 = trunc i64 %140 to i32
  store i32 %141, ptr %34, align 4, !tbaa !18
  %142 = load i32, ptr %34, align 4, !tbaa !18
  %143 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %142)
  %144 = load ptr, ptr @stdout, align 8, !tbaa !5
  %145 = call i32 @fflush(ptr noundef %144)
  %146 = load i32, ptr %33, align 4, !tbaa !21
  %147 = call ptr @ee2str(i32 noundef %146)
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %147)
  %149 = load ptr, ptr @stdout, align 8, !tbaa !5
  %150 = call i32 @fflush(ptr noundef %149)
  call void @exit(i32 noundef 1) #10
  unreachable

151:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %152

152:                                              ; preds = %151, %133
  %153 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 1
  %154 = load i32, ptr %153, align 4, !tbaa !23
  %155 = icmp eq i32 %154, 2
  br i1 %155, label %156, label %193

156:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  store i32 1, ptr %35, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %157 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %158 = load i32, ptr %157, align 4, !tbaa !25
  %159 = sub i32 %158, 3
  store i32 %159, ptr %36, align 4, !tbaa !18
  br label %160

160:                                              ; preds = %172, %156
  %161 = load i32, ptr %36, align 4, !tbaa !18
  %162 = icmp sge i32 %161, 0
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %175

164:                                              ; preds = %160
  %165 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %166 = load i32, ptr %36, align 4, !tbaa !18
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [20 x i32], ptr %165, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !18
  %170 = load i32, ptr %35, align 4, !tbaa !18
  %171 = mul i32 %170, %169
  store i32 %171, ptr %35, align 4, !tbaa !18
  br label %172

172:                                              ; preds = %164
  %173 = load i32, ptr %36, align 4, !tbaa !18
  %174 = add nsw i32 %173, -1
  store i32 %174, ptr %36, align 4, !tbaa !18
  br label %160, !llvm.loop !26

175:                                              ; preds = %163
  %176 = load i32, ptr %35, align 4, !tbaa !18
  %177 = icmp ugt i32 %176, 1
  br i1 %177, label %178, label %192

178:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 92, ptr %37) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !13
  %179 = getelementptr inbounds %struct.TensorDesc, ptr %37, i32 0, i32 1
  store i32 0, ptr %179, align 4, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !13
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %37, i64 92, i1 false), !tbaa.struct !13
  %181 = load ptr, ptr %27, align 8, !tbaa !5
  %182 = call noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8 %38, ptr noundef %180, ptr noundef byval(%struct.TensorDesc) align 8 %39, ptr noundef %181)
  %183 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %183, ptr %15, align 8, !tbaa !5
  %184 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %37, i64 92, i1 false), !tbaa.struct !13
  %185 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %40)
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds i8, ptr %184, i64 %186
  store ptr %187, ptr %27, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %37, i64 92, i1 false), !tbaa.struct !13
  %188 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %41)
  %189 = load i32, ptr %26, align 4, !tbaa !18
  %190 = sub i32 %189, %188
  store i32 %190, ptr %26, align 4, !tbaa !18
  %191 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 1
  store i32 0, ptr %191, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 92, ptr %37) #9
  br label %192

192:                                              ; preds = %178, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %193

193:                                              ; preds = %192, %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  %194 = getelementptr inbounds %struct.TensorDesc, ptr %29, i32 0, i32 3
  %195 = getelementptr inbounds [20 x i32], ptr %194, i64 0, i64 0
  %196 = load i32, ptr %195, align 4, !tbaa !18
  store i32 %196, ptr %42, align 4, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %19, i64 92, i1 false), !tbaa.struct !13
  %197 = call noundef zeroext i8 @_Z10tensorIs2d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %43)
  %198 = icmp ne i8 %197, 0
  br i1 %198, label %209, label %199

199:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  %200 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %201 = trunc i64 %200 to i32
  store i32 %201, ptr %44, align 4, !tbaa !18
  %202 = load i32, ptr %44, align 4, !tbaa !18
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %202)
  %204 = load ptr, ptr @stdout, align 8, !tbaa !5
  %205 = call i32 @fflush(ptr noundef %204)
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %207 = load ptr, ptr @stdout, align 8, !tbaa !5
  %208 = call i32 @fflush(ptr noundef %207)
  call void @exit(i32 noundef 1) #10
  unreachable

209:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %19, i64 92, i1 false), !tbaa.struct !13
  %210 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %46)
  %211 = load i32, ptr %42, align 4, !tbaa !18
  %212 = udiv i32 %210, %211
  store i32 %212, ptr %45, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !13
  %213 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %48)
  %214 = load i32, ptr %45, align 4, !tbaa !18
  %215 = udiv i32 %213, %214
  store i32 %215, ptr %47, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  store ptr null, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  %216 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 0
  %217 = load i32, ptr %216, align 4, !tbaa !28
  store i32 %217, ptr %50, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  %218 = getelementptr inbounds %struct.TensorDesc, ptr %19, i32 0, i32 0
  %219 = load i32, ptr %218, align 4, !tbaa !28
  store i32 %219, ptr %51, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  %220 = getelementptr inbounds %struct.TensorDesc, ptr %29, i32 0, i32 0
  %221 = load i32, ptr %220, align 4, !tbaa !28
  store i32 %221, ptr %52, align 4, !tbaa !14
  %222 = load ptr, ptr %22, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %224, label %283

224:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %24, i64 92, i1 false), !tbaa.struct !13
  %225 = call noundef i32 @_Z11tensor1dGet10TensorDescP8DataTypeP10DataFormatPj(ptr noundef byval(%struct.TensorDesc) align 8 %57, ptr noundef %53, ptr noundef %54, ptr noundef %55)
  store i32 %225, ptr %56, align 4, !tbaa !21
  %226 = load i32, ptr %56, align 4, !tbaa !21
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %240

228:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #9
  %229 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %230 = trunc i64 %229 to i32
  store i32 %230, ptr %58, align 4, !tbaa !18
  %231 = load i32, ptr %58, align 4, !tbaa !18
  %232 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %231)
  %233 = load ptr, ptr @stdout, align 8, !tbaa !5
  %234 = call i32 @fflush(ptr noundef %233)
  %235 = load i32, ptr %56, align 4, !tbaa !21
  %236 = call ptr @ee2str(i32 noundef %235)
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %236)
  %238 = load ptr, ptr @stdout, align 8, !tbaa !5
  %239 = call i32 @fflush(ptr noundef %238)
  call void @exit(i32 noundef 1) #10
  unreachable

240:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #9
  %241 = load i32, ptr %55, align 4, !tbaa !18
  %242 = load i32, ptr %42, align 4, !tbaa !18
  %243 = icmp ne i32 %241, %242
  br i1 %243, label %244, label %260

244:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #9
  store i32 2, ptr %59, align 4, !tbaa !21
  %245 = load i32, ptr %59, align 4, !tbaa !21
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %247, label %259

247:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #9
  %248 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %249 = trunc i64 %248 to i32
  store i32 %249, ptr %60, align 4, !tbaa !18
  %250 = load i32, ptr %60, align 4, !tbaa !18
  %251 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %250)
  %252 = load ptr, ptr @stdout, align 8, !tbaa !5
  %253 = call i32 @fflush(ptr noundef %252)
  %254 = load i32, ptr %59, align 4, !tbaa !21
  %255 = call ptr @ee2str(i32 noundef %254)
  %256 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %255)
  %257 = load ptr, ptr @stdout, align 8, !tbaa !5
  %258 = call i32 @fflush(ptr noundef %257)
  call void @exit(i32 noundef 1) #10
  unreachable

259:                                              ; preds = %244
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  br label %282

260:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #9
  %261 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %261, ptr %61, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %24, i64 92, i1 false), !tbaa.struct !13
  %262 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %63)
  store i32 %262, ptr %62, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #9
  store i32 0, ptr %64, align 4, !tbaa !18
  br label %263

263:                                              ; preds = %278, %260
  %264 = load i32, ptr %64, align 4, !tbaa !18
  %265 = load i32, ptr %47, align 4, !tbaa !18
  %266 = icmp ult i32 %264, %265
  br i1 %266, label %268, label %267

267:                                              ; preds = %263
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #9
  br label %281

268:                                              ; preds = %263
  %269 = load ptr, ptr %61, align 8, !tbaa !5
  %270 = load i32, ptr %64, align 4, !tbaa !18
  %271 = load i32, ptr %62, align 4, !tbaa !18
  %272 = mul i32 %270, %271
  %273 = zext i32 %272 to i64
  %274 = getelementptr inbounds i8, ptr %269, i64 %273
  %275 = load ptr, ptr %22, align 8, !tbaa !5
  %276 = load i32, ptr %62, align 4, !tbaa !18
  %277 = zext i32 %276 to i64
  call void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %274, ptr noundef %275, i64 noundef %277)
  br label %278

278:                                              ; preds = %268
  %279 = load i32, ptr %64, align 4, !tbaa !18
  %280 = add i32 %279, 1
  store i32 %280, ptr %64, align 4, !tbaa !18
  br label %263, !llvm.loop !29

281:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #9
  br label %282

282:                                              ; preds = %281, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  br label %287

283:                                              ; preds = %209
  %284 = load ptr, ptr %30, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %29, i64 92, i1 false), !tbaa.struct !13
  %285 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %65)
  %286 = zext i32 %285 to i64
  call void @_Z10UNI_MEMSETPvim(ptr noundef %284, i32 noundef 0, i64 noundef %286)
  br label %287

287:                                              ; preds = %283, %282
  %288 = load i32, ptr %47, align 4, !tbaa !18
  %289 = icmp eq i32 %288, 1
  br i1 %289, label %290, label %318

290:                                              ; preds = %287
  %291 = getelementptr inbounds %struct.TensorDesc, ptr %19, i32 0, i32 1
  %292 = load i32, ptr %291, align 4, !tbaa !23
  %293 = load i32, ptr %51, align 4, !tbaa !14
  %294 = call i32 @matrix_matrix_multiply_rhs_format(i32 noundef %293)
  %295 = icmp ne i32 %292, %294
  br i1 %295, label %296, label %318

296:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 92, ptr %66) #9
  %297 = load i32, ptr %50, align 4, !tbaa !14
  %298 = load i32, ptr %45, align 4, !tbaa !18
  call void @_Z8tensor1d8DataTypej(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %66, i32 noundef %297, i32 noundef %298)
  call void @llvm.lifetime.start.p0(i64 92, ptr %67) #9
  %299 = load i32, ptr %52, align 4, !tbaa !14
  %300 = load i32, ptr %42, align 4, !tbaa !18
  call void @_Z8tensor1d8DataTypej(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %67, i32 noundef %299, i32 noundef %300)
  %301 = load ptr, ptr %12, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.ArchInfo, ptr %301, i32 0, i32 0
  %303 = load i32, ptr %302, align 8, !tbaa !9
  %304 = icmp eq i32 %303, 1
  br i1 %304, label %305, label %307

305:                                              ; preds = %296
  %306 = getelementptr inbounds %struct.TensorDesc, ptr %19, i32 0, i32 1
  store i32 14, ptr %306, align 4, !tbaa !23
  br label %307

307:                                              ; preds = %305, %296
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 4 %19, i64 92, i1 false), !tbaa.struct !13
  %308 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %69, ptr align 4 %66, i64 92, i1 false), !tbaa.struct !13
  %309 = load ptr, ptr %15, align 8, !tbaa !5
  %310 = load i32, ptr %26, align 4, !tbaa !18
  %311 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %67, i64 92, i1 false), !tbaa.struct !13
  %312 = load ptr, ptr %30, align 8, !tbaa !5
  %313 = load ptr, ptr %49, align 8, !tbaa !5
  %314 = load ptr, ptr %12, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.ArchInfo, ptr %314, i32 0, i32 0
  %316 = load i32, ptr %315, align 8, !tbaa !9
  %317 = call i32 @matrix_vector_multiply(ptr noundef byval(%struct.TensorDesc) align 8 %68, ptr noundef %308, ptr noundef byval(%struct.TensorDesc) align 8 %69, ptr noundef %309, i32 noundef %310, ptr noundef %311, ptr noundef byval(%struct.TensorDesc) align 8 %70, ptr noundef %312, ptr noundef %313, i32 noundef %316)
  store i32 %317, ptr %32, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 92, ptr %67) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %66) #9
  br label %336

318:                                              ; preds = %290, %287
  call void @llvm.lifetime.start.p0(i64 92, ptr %71) #9
  %319 = load i32, ptr %50, align 4, !tbaa !14
  %320 = load i32, ptr %47, align 4, !tbaa !18
  %321 = load i32, ptr %45, align 4, !tbaa !18
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %71, i32 noundef %319, i32 noundef 14, i32 noundef %320, i32 noundef %321)
  call void @llvm.lifetime.start.p0(i64 92, ptr %72) #9
  %322 = getelementptr inbounds %struct.TensorDesc, ptr %29, i32 0, i32 0
  %323 = load i32, ptr %322, align 4, !tbaa !28
  %324 = load i32, ptr %47, align 4, !tbaa !18
  %325 = load i32, ptr %42, align 4, !tbaa !18
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %72, i32 noundef %323, i32 noundef 14, i32 noundef %324, i32 noundef %325)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %71, i64 92, i1 false), !tbaa.struct !13
  %326 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 4 %19, i64 92, i1 false), !tbaa.struct !13
  %327 = load ptr, ptr %20, align 8, !tbaa !5
  %328 = load i32, ptr %26, align 4, !tbaa !18
  %329 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %72, i64 92, i1 false), !tbaa.struct !13
  %330 = load ptr, ptr %30, align 8, !tbaa !5
  %331 = load ptr, ptr %49, align 8, !tbaa !5
  %332 = load ptr, ptr %12, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.ArchInfo, ptr %332, i32 0, i32 0
  %334 = load i32, ptr %333, align 8, !tbaa !9
  %335 = call i32 @matrix_matrix_multiply(ptr noundef byval(%struct.TensorDesc) align 8 %73, ptr noundef %326, ptr noundef byval(%struct.TensorDesc) align 8 %74, ptr noundef %327, i32 noundef %328, ptr noundef %329, ptr noundef byval(%struct.TensorDesc) align 8 %75, ptr noundef %330, ptr noundef %331, i32 noundef %334)
  store i32 %335, ptr %32, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 92, ptr %72) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %71) #9
  br label %336

336:                                              ; preds = %318, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %337

337:                                              ; preds = %336, %118
  %338 = load i32, ptr %32, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  ret i32 %338

339:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %24) #9
  br label %340

340:                                              ; preds = %339, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %341

341:                                              ; preds = %340, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %19) #9
  br label %342

342:                                              ; preds = %341, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %343

343:                                              ; preds = %342
  %344 = load ptr, ptr %17, align 8
  %345 = load i32, ptr %18, align 4
  %346 = insertvalue { ptr, i32 } poison, ptr %344, 0
  %347 = insertvalue { ptr, i32 } %346, i32 %345, 1
  resume { ptr, i32 } %347
}

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

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

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

declare noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor1dGet10TensorDescP8DataTypeP10DataFormatPj(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10UNI_MEMSETPvim(ptr noundef, i32 noundef, i64 noundef) #3

declare i32 @matrix_matrix_multiply_rhs_format(i32 noundef) #2

declare i32 @matrix_vector_multiply(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @matrix_matrix_multiply(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn 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, !11, i64 0}
!10 = !{!"_ZTS8ArchInfo", !11, i64 0, !6, i64 8}
!11 = !{!"_ZTS4Arch", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !16, i64 8, i64 4, !18, i64 12, i64 80, !20}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS8DataType", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS10DataFormat", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTS2EE", !7, i64 0}
!23 = !{!24, !17, i64 4}
!24 = !{!"_ZTS10TensorDesc", !15, i64 0, !17, i64 4, !19, i64 8, !7, i64 12}
!25 = !{!24, !19, i64 8}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!24, !15, i64 0}
!29 = distinct !{!29, !27}


; 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.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 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: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; 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 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 #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs2d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z8tensor1d8DataTypej(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) local_unnamed_addr #7

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15fully_connected6TensorS_S_St6vectorIS_SaIS_EES_P8ArchInfo(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef readonly %5) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.TensorDesc, align 8
  %8 = alloca %class.Tensor, align 8
  %9 = alloca %struct.TensorDesc, align 8
  %10 = alloca %class.Tensor, align 8
  %11 = alloca %class.Tensor, align 8
  %12 = alloca %struct.TensorDesc, align 8
  %13 = alloca %struct.TensorDesc, align 4
  %14 = alloca %class.Tensor, align 8
  %15 = alloca %struct.TensorDesc, align 8
  %16 = alloca %class.Tensor, align 8
  %.sroa.7 = alloca { i32, [20 x i32] }, align 8
  %17 = alloca %struct.TensorDesc, align 8
  %18 = alloca %struct.TensorDesc, align 8
  %19 = alloca %struct.TensorDesc, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.TensorDesc, align 8
  %24 = alloca %struct.TensorDesc, align 8
  %25 = alloca %struct.TensorDesc, align 8
  %26 = alloca %struct.TensorDesc, align 8
  %27 = load i32, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %7) #11
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %0) #11
  %28 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %8, i32 noundef %27)
          to label %29 unwind label %35

29:                                               ; preds = %6
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #11
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %9) #11
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %9, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %1) #11
  %30 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %10, i32 noundef %27)
          to label %31 unwind label %37

31:                                               ; preds = %29
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #11
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %2) #11
  %32 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %11, i32 noundef %27)
          to label %33 unwind label %39

33:                                               ; preds = %31
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #11
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %12) #11
  call void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92) %12) #11
  %.not = icmp eq ptr %32, null
  br i1 %.not, label %41, label %34

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %13) #11
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %13, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %12, ptr noundef nonnull align 4 dereferenceable(92) %13, i64 92, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %13) #11
  br label %41

35:                                               ; preds = %6
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #11
  br label %173

37:                                               ; preds = %29
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #11
  br label %172

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #11
  br label %172

41:                                               ; preds = %34, %33
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #11
  %43 = call noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %42)
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #11
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %44) #11
  %45 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %14, i32 noundef %27)
          to label %46 unwind label %49

46:                                               ; preds = %41
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #11
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %15) #11
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %15, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  %47 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %16, i32 noundef %27)
          to label %48 unwind label %51

48:                                               ; preds = %46
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  switch i32 %27, label %53 [
    i32 7, label %170
    i32 2, label %170
  ]

49:                                               ; preds = %41
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #11
  br label %171

51:                                               ; preds = %46
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %15) #11
  br label %171

53:                                               ; preds = %48
  %54 = icmp eq ptr %28, null
  %55 = icmp eq ptr %30, null
  %or.cond3 = or i1 %54, %55
  %56 = icmp eq ptr %47, null
  %or.cond5 = or i1 %or.cond3, %56
  br i1 %or.cond5, label %57, label %67

57:                                               ; preds = %53
  %58 = call i64 (i64, ...) @syscall(i64 noundef 186) #11
  %59 = trunc i64 %58 to i32
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %59)
  %61 = load ptr, ptr @stdout, align 8, !tbaa !19
  %62 = call i32 @fflush(ptr noundef %61)
  %63 = call ptr @ee2str(i32 noundef 1)
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %63)
  %65 = load ptr, ptr @stdout, align 8, !tbaa !19
  %66 = call i32 @fflush(ptr noundef %65)
  call void @exit(i32 noundef 1) #12
  unreachable

67:                                               ; preds = %53
  %68 = getelementptr inbounds i8, ptr %7, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !20
  %70 = icmp eq i32 %69, 2
  br i1 %70, label %71, label %._crit_edge.thread

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %7, i64 8
  %73 = load i32, ptr %72, align 8, !tbaa !22
  %74 = add i32 %73, -3
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %71
  %76 = getelementptr inbounds i8, ptr %7, i64 12
  %77 = zext nneg i32 %74 to i64
  %78 = add nuw nsw i64 %77, 1
  %min.iters.check = icmp ult i32 %74, 7
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %77, %.lr.ph ], [ %ind.end, %middle.block ]
  %.0104117.ph = phi i32 [ 1, %.lr.ph ], [ %85, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %78, 4294967288
  %ind.end = sub nsw i64 %77, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %82, %vector.body ]
  %vec.phi129 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %83, %vector.body ]
  %offset.idx = sub i64 %77, %index
  %79 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %offset.idx
  %80 = getelementptr inbounds i8, ptr %79, i64 -12
  %81 = getelementptr inbounds i8, ptr %79, i64 -28
  %wide.load = load <4 x i32>, ptr %80, align 4, !tbaa !16
  %reverse = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load130 = load <4 x i32>, ptr %81, align 4, !tbaa !16
  %reverse131 = shufflevector <4 x i32> %wide.load130, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %82 = mul <4 x i32> %reverse, %vec.phi
  %83 = mul <4 x i32> %reverse131, %vec.phi129
  %index.next = add nuw i64 %index, 8
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %bin.rdx = mul <4 x i32> %83, %82
  %85 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %78, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %85, %middle.block ], [ %89, %scalar.ph ]
  %86 = icmp ugt i32 %.lcssa, 1
  br i1 %86, label %90, label %._crit_edge.thread

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.0104117 = phi i32 [ %89, %scalar.ph ], [ %.0104117.ph, %scalar.ph.preheader ]
  %87 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %indvars.iv
  %88 = load i32, ptr %87, align 4, !tbaa !16
  %89 = mul i32 %88, %.0104117
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not128 = icmp eq i64 %indvars.iv, 0
  br i1 %.not128, label %._crit_edge, label %scalar.ph, !llvm.loop !27

90:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %.sroa.7)
  %.sroa.0.0.copyload = load i32, ptr %7, align 8, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, ptr noundef nonnull align 8 dereferenceable(84) %72, i64 84, i1 false), !tbaa.struct !28
  store i32 %.sroa.0.0.copyload, ptr %17, align 8, !tbaa !12
  %.sroa.6.0..sroa_idx37 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx37, align 4, !tbaa !14
  %.sroa.7.0..sroa_idx43 = getelementptr inbounds i8, ptr %17, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx43, ptr noundef nonnull align 8 dereferenceable(84) %72, i64 84, i1 false)
  %91 = call noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %7, ptr noundef %28, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %17, ptr noundef %45)
  store i32 %.sroa.0.0.copyload, ptr %18, align 8, !tbaa !12
  %.sroa.6.0..sroa_idx39 = getelementptr inbounds i8, ptr %18, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx39, align 4, !tbaa !14
  %.sroa.7.0..sroa_idx44 = getelementptr inbounds i8, ptr %18, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx44, ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, i64 84, i1 false), !tbaa.struct !28
  %92 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %18)
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %45, i64 %93
  store i32 %.sroa.0.0.copyload, ptr %19, align 8, !tbaa !12
  %.sroa.6.0..sroa_idx41 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx41, align 4, !tbaa !14
  %.sroa.7.0..sroa_idx45 = getelementptr inbounds i8, ptr %19, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx45, ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, i64 84, i1 false), !tbaa.struct !28
  %95 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %19)
  %96 = sub i32 %43, %95
  store i32 0, ptr %68, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %.sroa.7)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %71, %._crit_edge, %90, %67
  %.1101 = phi ptr [ %45, %67 ], [ %94, %90 ], [ %45, %._crit_edge ], [ %45, %71 ]
  %.199 = phi i32 [ %43, %67 ], [ %96, %90 ], [ %43, %._crit_edge ], [ %43, %71 ]
  %.1 = phi ptr [ %28, %67 ], [ %45, %90 ], [ %28, %._crit_edge ], [ %28, %71 ]
  %97 = getelementptr inbounds i8, ptr %15, i64 12
  %98 = load i32, ptr %97, align 4, !tbaa !16
  %99 = call noundef zeroext i8 @_Z10tensorIs2d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9)
  %.not112 = icmp eq i8 %99, 0
  br i1 %.not112, label %100, label %109

100:                                              ; preds = %._crit_edge.thread
  %101 = call i64 (i64, ...) @syscall(i64 noundef 186) #11
  %102 = trunc i64 %101 to i32
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %102)
  %104 = load ptr, ptr @stdout, align 8, !tbaa !19
  %105 = call i32 @fflush(ptr noundef %104)
  %106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %107 = load ptr, ptr @stdout, align 8, !tbaa !19
  %108 = call i32 @fflush(ptr noundef %107)
  call void @exit(i32 noundef 1) #12
  unreachable

109:                                              ; preds = %._crit_edge.thread
  %110 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9)
  %111 = udiv i32 %110, %98
  %112 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %7)
  %113 = udiv i32 %112, %111
  %114 = load i32, ptr %7, align 8, !tbaa !29
  %115 = load i32, ptr %9, align 8, !tbaa !29
  %116 = load i32, ptr %15, align 8, !tbaa !29
  br i1 %.not, label %151, label %117

117:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #11
  %118 = call noundef i32 @_Z11tensor1dGet10TensorDescP8DataTypeP10DataFormatPj(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %12, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %22)
  %.not113 = icmp eq i32 %118, 0
  br i1 %.not113, label %129, label %119

119:                                              ; preds = %117
  %120 = call i64 (i64, ...) @syscall(i64 noundef 186) #11
  %121 = trunc i64 %120 to i32
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %121)
  %123 = load ptr, ptr @stdout, align 8, !tbaa !19
  %124 = call i32 @fflush(ptr noundef %123)
  %125 = call ptr @ee2str(i32 noundef %118)
  %126 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %125)
  %127 = load ptr, ptr @stdout, align 8, !tbaa !19
  %128 = call i32 @fflush(ptr noundef %127)
  call void @exit(i32 noundef 1) #12
  unreachable

129:                                              ; preds = %117
  %130 = load i32, ptr %22, align 4, !tbaa !16
  %.not114 = icmp eq i32 %130, %98
  br i1 %.not114, label %141, label %131

131:                                              ; preds = %129
  %132 = call i64 (i64, ...) @syscall(i64 noundef 186) #11
  %133 = trunc i64 %132 to i32
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %133)
  %135 = load ptr, ptr @stdout, align 8, !tbaa !19
  %136 = call i32 @fflush(ptr noundef %135)
  %137 = call ptr @ee2str(i32 noundef 2)
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %137)
  %139 = load ptr, ptr @stdout, align 8, !tbaa !19
  %140 = call i32 @fflush(ptr noundef %139)
  call void @exit(i32 noundef 1) #12
  unreachable

141:                                              ; preds = %129
  %142 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %12)
  %.not122 = icmp ugt i32 %111, %112
  br i1 %.not122, label %._crit_edge121, label %.lr.ph120

.lr.ph120:                                        ; preds = %141
  %143 = zext i32 %142 to i64
  %144 = zext i32 %113 to i64
  br label %145

145:                                              ; preds = %.lr.ph120, %145
  %indvars.iv124 = phi i64 [ 0, %.lr.ph120 ], [ %indvars.iv.next125, %145 ]
  %146 = trunc nuw i64 %indvars.iv124 to i32
  %147 = mul i32 %142, %146
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %47, i64 %148
  call void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %149, ptr noundef nonnull %32, i64 noundef %143)
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %150 = icmp ult i64 %indvars.iv.next125, %144
  br i1 %150, label %145, label %._crit_edge121, !llvm.loop !30

._crit_edge121:                                   ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #11
  br label %154

151:                                              ; preds = %109
  %152 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %15)
  %153 = zext i32 %152 to i64
  call void @_Z10UNI_MEMSETPvim(ptr noundef %47, i32 noundef 0, i64 noundef %153)
  br label %154

154:                                              ; preds = %151, %._crit_edge121
  %155 = icmp eq i32 %113, 1
  br i1 %155, label %156, label %166

156:                                              ; preds = %154
  %157 = getelementptr inbounds i8, ptr %9, i64 4
  %158 = load i32, ptr %157, align 4, !tbaa !20
  %159 = call i32 @matrix_matrix_multiply_rhs_format(i32 noundef %115)
  %.not115 = icmp eq i32 %158, %159
  br i1 %.not115, label %166, label %160

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %23) #11
  call void @_Z8tensor1d8DataTypej(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %23, i32 noundef %114, i32 noundef %111)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %24) #11
  call void @_Z8tensor1d8DataTypej(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %24, i32 noundef %116, i32 noundef %98)
  %161 = load i32, ptr %5, align 8, !tbaa !5
  %162 = icmp eq i32 %161, 1
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  store i32 14, ptr %157, align 4, !tbaa !20
  br label %164

164:                                              ; preds = %163, %160
  %165 = call i32 @matrix_vector_multiply(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9, ptr noundef %30, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %23, ptr noundef %.1, i32 noundef %.199, ptr noundef %.1101, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %24, ptr noundef %47, ptr noundef null, i32 noundef %161)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %24) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %23) #11
  br label %170

166:                                              ; preds = %156, %154
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %25) #11
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %25, i32 noundef %114, i32 noundef 14, i32 noundef %113, i32 noundef %111)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %26) #11
  %167 = load i32, ptr %15, align 8, !tbaa !29
  call void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %26, i32 noundef %167, i32 noundef 14, i32 noundef %113, i32 noundef %98)
  %168 = load i32, ptr %5, align 8, !tbaa !5
  %169 = call i32 @matrix_matrix_multiply(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %25, ptr noundef %.1, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9, ptr noundef %30, i32 noundef %.199, ptr noundef %.1101, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %26, ptr noundef %47, ptr noundef null, i32 noundef %168)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %26) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %25) #11
  br label %170

170:                                              ; preds = %164, %166, %48, %48
  %.1103 = phi i32 [ 51, %48 ], [ 51, %48 ], [ %165, %164 ], [ %169, %166 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #11
  ret i32 %.1103

171:                                              ; preds = %51, %49
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %12) #11
  br label %172

172:                                              ; preds = %39, %171, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %38, %37 ], [ %.pn, %171 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #11
  br label %173

173:                                              ; preds = %172, %35
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %172 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #11
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

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

declare noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) local_unnamed_addr #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor1dGet10TensorDescP8DataTypeP10DataFormatPj(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10UNI_MEMSETPvim(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

declare i32 @matrix_matrix_multiply_rhs_format(i32 noundef) local_unnamed_addr #9

declare i32 @matrix_vector_multiply(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #9

declare i32 @matrix_matrix_multiply(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, i32 noundef, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #10

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { 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 #9 = { "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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { noreturn 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 = !{!"_ZTS8ArchInfo", !7, i64 0, !10, i64 8}
!7 = !{!"_ZTS4Arch", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !14, i64 8, i64 4, !16, i64 12, i64 80, !18}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS8DataType", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS10DataFormat", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!8, !8, i64 0}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !15, i64 4}
!21 = !{!"_ZTS10TensorDesc", !13, i64 0, !15, i64 4, !17, i64 8, !8, i64 12}
!22 = !{!21, !17, i64 8}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !26, !25}
!28 = !{i64 0, i64 4, !16, i64 4, i64 80, !18}
!29 = !{!21, !13, i64 0}
!30 = distinct !{!30, !24}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass