; LLVM IR from jingweizhanghuai/Morn :: src/deep_learning (morn_tensor_deconv)

; 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.TensorRegister = type { [32 x i8], ptr, ptr, ptr }
%struct.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }
%struct.TensorDeconvPara = type { ptr, i32, i32, i32, i32, i32, i32, float, float, float }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }
%struct.HandleTensorDeconv = type { ptr, ptr, ptr }
%struct.MMemoryBlock = type { i32, i32, ptr, ptr, ptr, i32 }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_parafile = external global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorDeconvBackward = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@morn_network_time = external global i32, align 4
@morn_network_save = external global i32, align 4
@morn_network_error = external global float, align 4
@morn_network_error_thresh = external global float, align 4
@morn_network_time_max = external global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @DeconvTensorToMatData(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @DeconvMatDataToTensor(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @endTensorDeconv(ptr noundef) #0

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #5

declare i32 @m_Hash(ptr noundef, i32 noundef) #3

declare void @mSgemm(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, i32 noundef) #3

declare ptr @mTensorMemory(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDeconvBackward(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %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 ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca [64 x i8], align 16
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %28, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = ptrtoint ptr %25 to i64
  %27 = icmp eq i64 %26, -1
  br label %28

28:                                               ; preds = %24, %21
  %29 = phi i1 [ true, %21 ], [ %27, %24 ]
  %30 = zext i1 %29 to i32
  store i32 %30, ptr %3, align 4, !tbaa !9
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %34, i32 noundef -1, ptr noundef @.str.1, i32 noundef 243, ptr noundef @__FUNCTION__.mTensorDeconvBackward, ptr noundef @.str.17)
  br label %35

35:                                               ; preds = %33, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MLayer, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.TensorRegister, ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds [32 x i8], ptr %43, i64 0, i64 0
  %45 = call i32 @strcmp(ptr noundef @.str.18, ptr noundef %44) #8
  store i32 %45, ptr %4, align 4, !tbaa !9
  %46 = load i32, ptr %4, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %37
  %49 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %49, i32 noundef -1, ptr noundef @.str.1, i32 noundef 244, ptr noundef @__FUNCTION__.mTensorDeconvBackward, ptr noundef @.str.19)
  br label %50

50:                                               ; preds = %48, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.MLayer, ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  store ptr %54, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.TensorDeconvPara, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !14
  %58 = getelementptr inbounds %struct.MLayer, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  store ptr %59, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.TensorDeconvPara, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = getelementptr inbounds %struct.MLayer, ptr %62, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  store ptr %64, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.MLayer, ptr %65, i32 0, i32 3
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  store ptr %67, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MLayer, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = call ptr @GetHandle(ptr noundef %70, i32 noundef 24, i32 noundef -1870146660, ptr noundef @endTensorDeconv)
  store ptr %71, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.MHandle, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  store ptr %74, ptr %10, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MHandle, ptr %76, i32 0, i32 1
  %78 = load volatile i32, ptr %77, align 4, !tbaa !21
  %79 = icmp eq i32 %78, 0
  %80 = zext i1 %79 to i32
  store i32 %80, ptr %11, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %85

83:                                               ; preds = %75
  %84 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %84, i32 noundef -1, ptr noundef @.str.1, i32 noundef 253, ptr noundef @__FUNCTION__.mTensorDeconvBackward, ptr noundef @.str.20)
  br label %85

85:                                               ; preds = %83, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.MTensor, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !22
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MTensor, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !24
  %94 = mul nsw i32 %90, %93
  store i32 %94, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.TensorDeconvPara, ptr %95, i32 0, i32 2
  %97 = load i32, ptr %96, align 4, !tbaa !25
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.TensorDeconvPara, ptr %98, i32 0, i32 3
  %100 = load i32, ptr %99, align 8, !tbaa !26
  %101 = mul nsw i32 %97, %100
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.MTensor, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !27
  %105 = mul nsw i32 %101, %104
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !28
  %110 = getelementptr inbounds %struct.MMemoryBlock, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !30
  store ptr %111, ptr %14, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %87
  %113 = load i32, ptr @morn_network_time, align 4, !tbaa !9
  %114 = load i32, ptr @morn_network_save, align 4, !tbaa !9
  %115 = srem i32 %113, %114
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %120

117:                                              ; preds = %112
  %118 = load i32, ptr @morn_network_time, align 4, !tbaa !9
  %119 = icmp sgt i32 %118, 0
  br i1 %119, label %129, label %120

120:                                              ; preds = %117, %112
  %121 = load float, ptr @morn_network_error, align 4, !tbaa !32
  %122 = load float, ptr @morn_network_error_thresh, align 4, !tbaa !32
  %123 = fcmp ole float %121, %122
  br i1 %123, label %129, label %124

124:                                              ; preds = %120
  %125 = load float, ptr @morn_network_error, align 4, !tbaa !32
  %126 = load i32, ptr @morn_network_time_max, align 4, !tbaa !9
  %127 = sitofp i32 %126 to float
  %128 = fcmp oeq float %125, %127
  br i1 %128, label %129, label %153

129:                                              ; preds = %124, %120, %117
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  %130 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.MLayer, ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds [32 x i8], ptr %132, i64 0, i64 0
  %134 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %130, ptr noundef @.str.15, ptr noundef %133, ptr noundef @.str.16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !33
  %138 = getelementptr inbounds %struct.MMemoryBlock, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !30
  store ptr %139, ptr %16, align 8, !tbaa !5
  %140 = load ptr, ptr @morn_network_parafile, align 8, !tbaa !5
  %141 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %142 = getelementptr inbounds i8, ptr %141, i64 0
  %143 = call i32 @m_Hash(ptr noundef %142, i32 noundef -1)
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.TensorDeconvPara, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 8, !tbaa !34
  %147 = load i32, ptr %13, align 4, !tbaa !9
  %148 = mul nsw i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = mul i64 %149, 4
  %151 = trunc i64 %150 to i32
  %152 = call i32 @mMORNWrite(ptr noundef %140, i32 noundef %143, ptr noundef %16, i32 noundef 1, i32 noundef %151)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  br label %153

153:                                              ; preds = %129, %124
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %210, %155
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.MTensor, ptr %158, i32 0, i32 0
  %160 = load i32, ptr %159, align 8, !tbaa !35
  %161 = icmp slt i32 %157, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %213

163:                                              ; preds = %156
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.TensorDeconvPara, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 4, !tbaa !25
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.TensorDeconvPara, ptr %170, i32 0, i32 3
  %172 = load i32, ptr %171, align 8, !tbaa !26
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.TensorDeconvPara, ptr %173, i32 0, i32 5
  %175 = load i32, ptr %174, align 8, !tbaa !36
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.TensorDeconvPara, ptr %176, i32 0, i32 4
  %178 = load i32, ptr %177, align 4, !tbaa !37
  call void @DeconvTensorToMatData(ptr noundef %164, i32 noundef %165, ptr noundef %166, i32 noundef %169, i32 noundef %172, i32 noundef %175, i32 noundef %178)
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = sub nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds float, ptr %179, i64 %182
  store float 1.000000e+00, ptr %183, align 4, !tbaa !32
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.TensorDeconvPara, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %185, align 8, !tbaa !34
  %187 = load i32, ptr %13, align 4, !tbaa !9
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = load i32, ptr %17, align 4, !tbaa !9
  %191 = call ptr @mTensorMemory(ptr noundef %189, i32 noundef %190)
  %192 = load i32, ptr %12, align 4, !tbaa !9
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  %196 = load i32, ptr %13, align 4, !tbaa !9
  %197 = load i32, ptr %17, align 4, !tbaa !9
  %198 = icmp eq i32 %197, 0
  br i1 %198, label %199, label %203

199:                                              ; preds = %163
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.TensorDeconvPara, ptr %200, i32 0, i32 9
  %202 = load float, ptr %201, align 8, !tbaa !38
  br label %204

203:                                              ; preds = %163
  br label %204

204:                                              ; preds = %203, %199
  %205 = phi float [ %202, %199 ], [ 1.000000e+00, %203 ]
  %206 = load ptr, ptr %10, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %206, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !39
  %209 = load i32, ptr %13, align 4, !tbaa !9
  call void @mSgemm(i32 noundef 0, i32 noundef 0, i32 noundef %186, i32 noundef %187, i32 noundef %188, float noundef 1.000000e+00, ptr noundef %191, i32 noundef %192, ptr noundef %195, i32 noundef %196, float noundef %205, ptr noundef %208, i32 noundef %209)
  br label %210

210:                                              ; preds = %204
  %211 = load i32, ptr %17, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %17, align 4, !tbaa !9
  br label %156, !llvm.loop !40

213:                                              ; preds = %162
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.TensorDeconvPara, ptr %214, i32 0, i32 1
  %216 = load i32, ptr %215, align 8, !tbaa !34
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = mul nsw i32 %216, %217
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.TensorDeconvPara, ptr %219, i32 0, i32 7
  %221 = load float, ptr %220, align 8, !tbaa !42
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.MTensor, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 8, !tbaa !35
  %225 = sitofp i32 %224 to float
  %226 = fdiv float %221, %225
  %227 = fsub float 0.000000e+00, %226
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %228, i32 0, i32 2
  %230 = load ptr, ptr %229, align 8, !tbaa !39
  %231 = getelementptr inbounds %struct.MMemoryBlock, ptr %230, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !30
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.TensorDeconvPara, ptr %233, i32 0, i32 8
  %235 = load float, ptr %234, align 4, !tbaa !43
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.TensorDeconvPara, ptr %236, i32 0, i32 7
  %238 = load float, ptr %237, align 8, !tbaa !42
  %239 = fneg float %235
  %240 = call float @llvm.fmuladd.f32(float %239, float %238, float 1.000000e+00)
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %241, i32 0, i32 1
  %243 = load ptr, ptr %242, align 8, !tbaa !33
  %244 = getelementptr inbounds %struct.MMemoryBlock, ptr %243, i32 0, i32 2
  %245 = load ptr, ptr %244, align 8, !tbaa !30
  call void @mSaxpby(i32 noundef %218, float noundef %227, ptr noundef %232, float noundef %240, ptr noundef %245)
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.TensorDeconvPara, ptr %246, i32 0, i32 6
  %248 = load i32, ptr %247, align 4, !tbaa !44
  %249 = icmp eq i32 %248, 0
  br i1 %249, label %250, label %251

250:                                              ; preds = %213
  store i32 1, ptr %18, align 4
  br label %344

251:                                              ; preds = %213
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.TensorDeconvPara, ptr %252, i32 0, i32 0
  %254 = load ptr, ptr %253, align 8, !tbaa !14
  %255 = getelementptr inbounds %struct.MLayer, ptr %254, i32 0, i32 5
  %256 = load i32, ptr %255, align 8, !tbaa !45
  %257 = icmp eq i32 %256, 0
  br i1 %257, label %258, label %295

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

259:                                              ; preds = %287, %258
  %260 = load i32, ptr %19, align 4, !tbaa !9
  %261 = load ptr, ptr %7, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.MTensor, ptr %261, i32 0, i32 0
  %263 = load i32, ptr %262, align 8, !tbaa !35
  %264 = icmp slt i32 %260, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %259
  store i32 13, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %290

266:                                              ; preds = %259
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.MTensor, ptr %267, i32 0, i32 4
  %269 = load ptr, ptr %268, align 8, !tbaa !46
  %270 = load i32, ptr %19, align 4, !tbaa !9
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds ptr, ptr %269, i64 %271
  %273 = load ptr, ptr %272, align 8, !tbaa !5
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.MTensor, ptr %274, i32 0, i32 2
  %276 = load i32, ptr %275, align 8, !tbaa !22
  %277 = load ptr, ptr %6, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.MTensor, ptr %277, i32 0, i32 3
  %279 = load i32, ptr %278, align 4, !tbaa !24
  %280 = mul nsw i32 %276, %279
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.MTensor, ptr %281, i32 0, i32 1
  %283 = load i32, ptr %282, align 4, !tbaa !27
  %284 = mul nsw i32 %280, %283
  %285 = sext i32 %284 to i64
  %286 = mul i64 %285, 4
  call void @llvm.memset.p0.i64(ptr align 4 %273, i8 0, i64 %286, i1 false)
  br label %287

287:                                              ; preds = %266
  %288 = load i32, ptr %19, align 4, !tbaa !9
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %19, align 4, !tbaa !9
  br label %259, !llvm.loop !47

290:                                              ; preds = %265
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.TensorDeconvPara, ptr %291, i32 0, i32 0
  %293 = load ptr, ptr %292, align 8, !tbaa !14
  %294 = getelementptr inbounds %struct.MLayer, ptr %293, i32 0, i32 5
  store i32 1, ptr %294, align 8, !tbaa !45
  br label %295

295:                                              ; preds = %290, %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %340, %295
  %297 = load i32, ptr %20, align 4, !tbaa !9
  %298 = load ptr, ptr %6, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.MTensor, ptr %298, i32 0, i32 0
  %300 = load i32, ptr %299, align 8, !tbaa !35
  %301 = icmp slt i32 %297, %300
  br i1 %301, label %303, label %302

302:                                              ; preds = %296
  store i32 16, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %343

303:                                              ; preds = %296
  %304 = load i32, ptr %12, align 4, !tbaa !9
  %305 = load i32, ptr %13, align 4, !tbaa !9
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.TensorDeconvPara, ptr %306, i32 0, i32 1
  %308 = load i32, ptr %307, align 8, !tbaa !34
  %309 = load ptr, ptr %8, align 8, !tbaa !5
  %310 = load i32, ptr %20, align 4, !tbaa !9
  %311 = call ptr @mTensorMemory(ptr noundef %309, i32 noundef %310)
  %312 = load i32, ptr %12, align 4, !tbaa !9
  %313 = load ptr, ptr %10, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %313, i32 0, i32 1
  %315 = load ptr, ptr %314, align 8, !tbaa !33
  %316 = load i32, ptr %13, align 4, !tbaa !9
  %317 = load ptr, ptr %10, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %317, i32 0, i32 0
  %319 = load ptr, ptr %318, align 8, !tbaa !28
  %320 = load i32, ptr %13, align 4, !tbaa !9
  call void @mSgemm(i32 noundef 1, i32 noundef 0, i32 noundef %304, i32 noundef %305, i32 noundef %308, float noundef 1.000000e+00, ptr noundef %311, i32 noundef %312, ptr noundef %315, i32 noundef %316, float noundef 0.000000e+00, ptr noundef %319, i32 noundef %320)
  %321 = load ptr, ptr %10, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %321, i32 0, i32 0
  %323 = load ptr, ptr %322, align 8, !tbaa !28
  %324 = getelementptr inbounds %struct.MMemoryBlock, ptr %323, i32 0, i32 2
  %325 = load ptr, ptr %324, align 8, !tbaa !30
  %326 = load ptr, ptr %7, align 8, !tbaa !5
  %327 = load i32, ptr %20, align 4, !tbaa !9
  %328 = load ptr, ptr %5, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.TensorDeconvPara, ptr %328, i32 0, i32 2
  %330 = load i32, ptr %329, align 4, !tbaa !25
  %331 = load ptr, ptr %5, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.TensorDeconvPara, ptr %331, i32 0, i32 3
  %333 = load i32, ptr %332, align 8, !tbaa !26
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.TensorDeconvPara, ptr %334, i32 0, i32 5
  %336 = load i32, ptr %335, align 8, !tbaa !36
  %337 = load ptr, ptr %5, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.TensorDeconvPara, ptr %337, i32 0, i32 4
  %339 = load i32, ptr %338, align 4, !tbaa !37
  call void @DeconvMatDataToTensor(ptr noundef %325, ptr noundef %326, i32 noundef %327, i32 noundef %330, i32 noundef %333, i32 noundef %336, i32 noundef %339)
  br label %340

340:                                              ; preds = %303
  %341 = load i32, ptr %20, align 4, !tbaa !9
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %20, align 4, !tbaa !9
  br label %296, !llvm.loop !48

343:                                              ; preds = %302
  store i32 0, ptr %18, align 4
  br label %344

344:                                              ; preds = %343, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %345 = load i32, ptr %18, align 4
  switch i32 %345, label %347 [
    i32 0, label %346
    i32 1, label %346
  ]

346:                                              ; preds = %344, %344
  ret void

347:                                              ; preds = %344
  unreachable
}

declare i32 @mMORNWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #3

declare void @mSaxpby(i32 noundef, float noundef, ptr noundef, float noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"MLayer", !7, i64 0, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!13 = !{!12, !6, i64 56}
!14 = !{!15, !6, i64 0}
!15 = !{!"TensorDeconvPara", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !16, i64 32, !16, i64 36, !16, i64 40}
!16 = !{!"float", !7, i64 0}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!20, !6, i64 16}
!20 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!21 = !{!20, !10, i64 4}
!22 = !{!23, !10, i64 8}
!23 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!24 = !{!23, !10, i64 12}
!25 = !{!15, !10, i64 12}
!26 = !{!15, !10, i64 16}
!27 = !{!23, !10, i64 4}
!28 = !{!29, !6, i64 0}
!29 = !{!"HandleTensorDeconv", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!31, !6, i64 8}
!31 = !{!"MMemoryBlock", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!32 = !{!16, !16, i64 0}
!33 = !{!29, !6, i64 8}
!34 = !{!15, !10, i64 8}
!35 = !{!23, !10, i64 0}
!36 = !{!15, !10, i64 24}
!37 = !{!15, !10, i64 20}
!38 = !{!15, !16, i64 40}
!39 = !{!29, !6, i64 16}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!15, !16, i64 32}
!43 = !{!15, !16, i64 36}
!44 = !{!15, !10, i64 28}
!45 = !{!12, !10, i64 64}
!46 = !{!23, !6, i64 16}
!47 = distinct !{!47, !41}
!48 = distinct !{!48, !41}


; 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.TensorRegister = type { [32 x i8], ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_parafile = external local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorDeconvBackward = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@morn_network_time = external local_unnamed_addr global i32, align 4
@morn_network_save = external local_unnamed_addr global i32, align 4
@morn_network_error = external local_unnamed_addr global float, align 4
@morn_network_error_thresh = external local_unnamed_addr global float, align 4
@morn_network_time_max = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
declare dso_local void @DeconvTensorToMatData(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @DeconvMatDataToTensor(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @endTensorDeconv(ptr noundef) #0

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

declare i32 @m_Hash(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @mSgemm(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare ptr @mTensorMemory(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDeconvBackward(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [64 x i8], align 16
  %3 = alloca ptr, align 8
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %4
    i64 0, label %4
  ]

4:                                                ; preds = %1, %1
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %7 = or i1 %5, %6
  %8 = zext i1 %7 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %8, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 243, ptr noundef nonnull @__FUNCTION__.mTensorDeconvBackward, ptr noundef nonnull @.str.17) #7
  br label %9

9:                                                ; preds = %1, %4
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %12
  %14 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str.18, ptr noundef nonnull dereferenceable(1) %13) #8
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %16, label %15

15:                                               ; preds = %9
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %14, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 244, ptr noundef nonnull @__FUNCTION__.mTensorDeconvBackward, ptr noundef nonnull @.str.19) #7
  br label %16

16:                                               ; preds = %15, %9
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %19, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %19, i64 48
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = tail call ptr @GetHandle(ptr noundef %27, i32 noundef 24, i32 noundef -1870146660, ptr noundef nonnull @endTensorDeconv) #7
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %28, i64 4
  %32 = load volatile i32, ptr %31, align 4, !tbaa !19
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %16
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 253, ptr noundef nonnull @__FUNCTION__.mTensorDeconvBackward, ptr noundef nonnull @.str.20) #7
  br label %35

35:                                               ; preds = %34, %16
  %36 = getelementptr inbounds i8, ptr %25, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %25, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = mul nsw i32 %39, %37
  %41 = getelementptr inbounds i8, ptr %18, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %18, i64 16
  %44 = load i32, ptr %43, align 8, !tbaa !24
  %45 = mul nsw i32 %44, %42
  %46 = getelementptr inbounds i8, ptr %21, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !25
  %48 = mul nsw i32 %45, %47
  %49 = add nsw i32 %48, 1
  %50 = load ptr, ptr %30, align 8, !tbaa !26
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = load i32, ptr @morn_network_time, align 4
  %54 = load i32, ptr @morn_network_save, align 4, !tbaa !30
  %55 = srem i32 %53, %54
  %56 = icmp eq i32 %55, 0
  %57 = icmp sgt i32 %53, 0
  %or.cond = and i1 %57, %56
  br i1 %or.cond, label %66, label %58

58:                                               ; preds = %35
  %59 = load float, ptr @morn_network_error, align 4, !tbaa !31
  %60 = load float, ptr @morn_network_error_thresh, align 4, !tbaa !31
  %61 = fcmp ugt float %59, %60
  br i1 %61, label %62, label %66

62:                                               ; preds = %58
  %63 = load i32, ptr @morn_network_time_max, align 4, !tbaa !30
  %64 = sitofp i32 %63 to float
  %65 = fcmp oeq float %59, %64
  br i1 %65, label %66, label %79

66:                                               ; preds = %35, %62, %58
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #7
  %67 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull %0, ptr noundef nonnull @.str.16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %68 = getelementptr inbounds i8, ptr %30, i64 8
  %69 = load ptr, ptr %68, align 8, !tbaa !32
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !28
  store ptr %71, ptr %3, align 8, !tbaa !33
  %72 = load ptr, ptr @morn_network_parafile, align 8, !tbaa !33
  %73 = call i32 @m_Hash(ptr noundef nonnull %2, i32 noundef -1) #7
  %74 = getelementptr inbounds i8, ptr %18, i64 8
  %75 = load i32, ptr %74, align 8, !tbaa !34
  %76 = shl i32 %49, 2
  %77 = mul i32 %76, %75
  %78 = call i32 @mMORNWrite(ptr noundef %72, i32 noundef %73, ptr noundef nonnull %3, i32 noundef 1, i32 noundef %77) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #7
  br label %79

79:                                               ; preds = %66, %62
  %80 = load i32, ptr %21, align 8, !tbaa !35
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %82, label %._crit_edge

82:                                               ; preds = %79
  %83 = getelementptr inbounds i8, ptr %18, i64 24
  %84 = getelementptr inbounds i8, ptr %18, i64 20
  %85 = sext i32 %48 to i64
  %86 = getelementptr inbounds float, ptr %52, i64 %85
  %87 = getelementptr inbounds i8, ptr %18, i64 8
  %88 = getelementptr inbounds i8, ptr %30, i64 16
  %89 = load i32, ptr %41, align 4, !tbaa !23
  %90 = load i32, ptr %43, align 8, !tbaa !24
  %91 = load i32, ptr %83, align 8, !tbaa !36
  %92 = load i32, ptr %84, align 4, !tbaa !37
  call void @DeconvTensorToMatData(ptr noundef nonnull %21, i32 noundef 0, ptr noundef %52, i32 noundef %89, i32 noundef %90, i32 noundef %91, i32 noundef %92)
  store float 1.000000e+00, ptr %86, align 4, !tbaa !31
  %93 = load i32, ptr %87, align 8, !tbaa !34
  %94 = call ptr @mTensorMemory(ptr noundef nonnull %25, i32 noundef 0) #7
  %95 = load ptr, ptr %30, align 8, !tbaa !26
  %96 = getelementptr inbounds i8, ptr %18, i64 40
  %97 = load float, ptr %96, align 8, !tbaa !38
  %98 = load ptr, ptr %88, align 8, !tbaa !39
  call void @mSgemm(i32 noundef 0, i32 noundef 0, i32 noundef %93, i32 noundef %49, i32 noundef %40, float noundef 1.000000e+00, ptr noundef %94, i32 noundef %40, ptr noundef %95, i32 noundef %49, float noundef %97, ptr noundef %98, i32 noundef %49) #7
  %99 = load i32, ptr %21, align 8, !tbaa !35
  %100 = icmp sgt i32 %99, 1
  br i1 %100, label %.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %.peel.next, %82, %79
  %.lcssa = phi i32 [ %80, %79 ], [ %99, %82 ], [ %133, %.peel.next ]
  %101 = getelementptr inbounds i8, ptr %18, i64 8
  %102 = load i32, ptr %101, align 8, !tbaa !34
  %103 = mul nsw i32 %102, %49
  %104 = getelementptr inbounds i8, ptr %18, i64 32
  %105 = load float, ptr %104, align 8, !tbaa !40
  %106 = sitofp i32 %.lcssa to float
  %107 = fdiv float %105, %106
  %108 = fsub float 0.000000e+00, %107
  %109 = getelementptr inbounds i8, ptr %30, i64 16
  %110 = load ptr, ptr %109, align 8, !tbaa !39
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load ptr, ptr %111, align 8, !tbaa !28
  %113 = getelementptr inbounds i8, ptr %18, i64 36
  %114 = load float, ptr %113, align 4, !tbaa !41
  %115 = fneg float %114
  %116 = call float @llvm.fmuladd.f32(float %115, float %105, float 1.000000e+00)
  %117 = getelementptr inbounds i8, ptr %30, i64 8
  %118 = load ptr, ptr %117, align 8, !tbaa !32
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = load ptr, ptr %119, align 8, !tbaa !28
  call void @mSaxpby(i32 noundef %103, float noundef %108, ptr noundef %112, float noundef %116, ptr noundef %120) #7
  %121 = getelementptr inbounds i8, ptr %18, i64 28
  %122 = load i32, ptr %121, align 4, !tbaa !42
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %.loopexit, label %135

.peel.next:                                       ; preds = %82, %.peel.next
  %.09094 = phi i32 [ %132, %.peel.next ], [ 1, %82 ]
  %124 = load i32, ptr %41, align 4, !tbaa !23
  %125 = load i32, ptr %43, align 8, !tbaa !24
  %126 = load i32, ptr %83, align 8, !tbaa !36
  %127 = load i32, ptr %84, align 4, !tbaa !37
  call void @DeconvTensorToMatData(ptr noundef nonnull %21, i32 noundef %.09094, ptr noundef nonnull %52, i32 noundef %124, i32 noundef %125, i32 noundef %126, i32 noundef %127)
  store float 1.000000e+00, ptr %86, align 4, !tbaa !31
  %128 = load i32, ptr %87, align 8, !tbaa !34
  %129 = call ptr @mTensorMemory(ptr noundef %25, i32 noundef %.09094) #7
  %130 = load ptr, ptr %30, align 8, !tbaa !26
  %131 = load ptr, ptr %88, align 8, !tbaa !39
  call void @mSgemm(i32 noundef 0, i32 noundef 0, i32 noundef %128, i32 noundef %49, i32 noundef %40, float noundef 1.000000e+00, ptr noundef %129, i32 noundef %40, ptr noundef %130, i32 noundef %49, float noundef 1.000000e+00, ptr noundef %131, i32 noundef %49) #7
  %132 = add nuw nsw i32 %.09094, 1
  %133 = load i32, ptr %21, align 8, !tbaa !35
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %.peel.next, label %._crit_edge, !llvm.loop !43

135:                                              ; preds = %._crit_edge
  %136 = load ptr, ptr %18, align 8, !tbaa !12
  %137 = getelementptr inbounds i8, ptr %136, i64 64
  %138 = load i32, ptr %137, align 8, !tbaa !46
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %.preheader, label %161

.preheader:                                       ; preds = %135
  %140 = load i32, ptr %23, align 8, !tbaa !35
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %.preheader
  %142 = getelementptr inbounds i8, ptr %23, i64 16
  %143 = getelementptr inbounds i8, ptr %21, i64 8
  %144 = getelementptr inbounds i8, ptr %21, i64 12
  br label %147

._crit_edge97.loopexit:                           ; preds = %147
  %.pre = load ptr, ptr %18, align 8, !tbaa !12
  br label %._crit_edge97

._crit_edge97:                                    ; preds = %._crit_edge97.loopexit, %.preheader
  %145 = phi ptr [ %.pre, %._crit_edge97.loopexit ], [ %136, %.preheader ]
  %146 = getelementptr inbounds i8, ptr %145, i64 64
  store i32 1, ptr %146, align 8, !tbaa !46
  br label %161

147:                                              ; preds = %.lr.ph96, %147
  %indvars.iv = phi i64 [ 0, %.lr.ph96 ], [ %indvars.iv.next, %147 ]
  %148 = load ptr, ptr %142, align 8, !tbaa !47
  %149 = getelementptr inbounds ptr, ptr %148, i64 %indvars.iv
  %150 = load ptr, ptr %149, align 8, !tbaa !33
  %151 = load i32, ptr %143, align 8, !tbaa !20
  %152 = load i32, ptr %144, align 4, !tbaa !22
  %153 = mul nsw i32 %152, %151
  %154 = load i32, ptr %46, align 4, !tbaa !25
  %155 = mul nsw i32 %153, %154
  %156 = sext i32 %155 to i64
  %157 = shl nsw i64 %156, 2
  call void @llvm.memset.p0.i64(ptr align 4 %150, i8 0, i64 %157, i1 false)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %158 = load i32, ptr %23, align 8, !tbaa !35
  %159 = sext i32 %158 to i64
  %160 = icmp slt i64 %indvars.iv.next, %159
  br i1 %160, label %147, label %._crit_edge97.loopexit, !llvm.loop !48

161:                                              ; preds = %._crit_edge97, %135
  %162 = load i32, ptr %21, align 8, !tbaa !35
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %.lr.ph100, label %.loopexit

.lr.ph100:                                        ; preds = %161
  %164 = getelementptr inbounds i8, ptr %18, i64 24
  %165 = getelementptr inbounds i8, ptr %18, i64 20
  br label %166

166:                                              ; preds = %.lr.ph100, %166
  %.098 = phi i32 [ 0, %.lr.ph100 ], [ %178, %166 ]
  %167 = load i32, ptr %101, align 8, !tbaa !34
  %168 = call ptr @mTensorMemory(ptr noundef %25, i32 noundef %.098) #7
  %169 = load ptr, ptr %117, align 8, !tbaa !32
  %170 = load ptr, ptr %30, align 8, !tbaa !26
  call void @mSgemm(i32 noundef 1, i32 noundef 0, i32 noundef %40, i32 noundef %49, i32 noundef %167, float noundef 1.000000e+00, ptr noundef %168, i32 noundef %40, ptr noundef %169, i32 noundef %49, float noundef 0.000000e+00, ptr noundef %170, i32 noundef %49) #7
  %171 = load ptr, ptr %30, align 8, !tbaa !26
  %172 = getelementptr inbounds i8, ptr %171, i64 8
  %173 = load ptr, ptr %172, align 8, !tbaa !28
  %174 = load i32, ptr %41, align 4, !tbaa !23
  %175 = load i32, ptr %43, align 8, !tbaa !24
  %176 = load i32, ptr %164, align 8, !tbaa !36
  %177 = load i32, ptr %165, align 4, !tbaa !37
  call void @DeconvMatDataToTensor(ptr noundef %173, ptr noundef %23, i32 noundef %.098, i32 noundef %174, i32 noundef %175, i32 noundef %176, i32 noundef %177)
  %178 = add nuw nsw i32 %.098, 1
  %179 = load i32, ptr %21, align 8, !tbaa !35
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %166, label %.loopexit, !llvm.loop !49

.loopexit:                                        ; preds = %166, %161, %._crit_edge
  ret void
}

declare i32 @mMORNWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @mSaxpby(i32 noundef, float noundef, ptr noundef, float noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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, !9, i64 32}
!6 = !{!"MLayer", !7, i64 0, !9, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !10, i64 56}
!12 = !{!13, !10, i64 0}
!13 = !{!"TensorDeconvPara", !10, i64 0, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !14, i64 32, !14, i64 36, !14, i64 40}
!14 = !{!"float", !7, i64 0}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 48}
!17 = !{!18, !10, i64 16}
!18 = !{!"MHandle", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16}
!19 = !{!18, !9, i64 4}
!20 = !{!21, !9, i64 8}
!21 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!22 = !{!21, !9, i64 12}
!23 = !{!13, !9, i64 12}
!24 = !{!13, !9, i64 16}
!25 = !{!21, !9, i64 4}
!26 = !{!27, !10, i64 0}
!27 = !{!"HandleTensorDeconv", !10, i64 0, !10, i64 8, !10, i64 16}
!28 = !{!29, !10, i64 8}
!29 = !{!"MMemoryBlock", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !9, i64 32}
!30 = !{!9, !9, i64 0}
!31 = !{!14, !14, i64 0}
!32 = !{!27, !10, i64 8}
!33 = !{!10, !10, i64 0}
!34 = !{!13, !9, i64 8}
!35 = !{!21, !9, i64 0}
!36 = !{!13, !9, i64 24}
!37 = !{!13, !9, i64 20}
!38 = !{!13, !14, i64 40}
!39 = !{!27, !10, i64 16}
!40 = !{!13, !14, i64 32}
!41 = !{!13, !14, i64 36}
!42 = !{!13, !9, i64 28}
!43 = distinct !{!43, !44, !45}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!"llvm.loop.peeled.count", i32 1}
!46 = !{!6, !9, i64 64}
!47 = !{!21, !10, i64 16}
!48 = distinct !{!48, !44}
!49 = distinct !{!49, !44}


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