; 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
@__FUNCTION__.mTensorDeconvForward = external hidden unnamed_addr constant [21 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 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDeconvForward(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 i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  br label %14

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

17:                                               ; preds = %14
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = ptrtoint ptr %18 to i64
  %20 = icmp eq i64 %19, -1
  br label %21

21:                                               ; preds = %17, %14
  %22 = phi i1 [ true, %14 ], [ %20, %17 ]
  %23 = zext i1 %22 to i32
  store i32 %23, ptr %3, align 4, !tbaa !9
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %21
  %27 = load i32, ptr %3, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %27, i32 noundef -1, ptr noundef @.str.1, i32 noundef 212, ptr noundef @__FUNCTION__.mTensorDeconvForward, ptr noundef @.str.17)
  br label %28

28:                                               ; preds = %26, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %29

29:                                               ; preds = %28
  br label %30

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

41:                                               ; preds = %30
  %42 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %42, i32 noundef -1, ptr noundef @.str.1, i32 noundef 213, ptr noundef @__FUNCTION__.mTensorDeconvForward, ptr noundef @.str.19)
  br label %43

43:                                               ; preds = %41, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.MLayer, ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  store ptr %47, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.TensorDeconvPara, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = getelementptr inbounds %struct.MLayer, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  store ptr %52, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.MLayer, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  store ptr %55, ptr %7, align 8, !tbaa !5
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  call void @TensorDeconvSet(ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call ptr @GetHandle(ptr noundef %57, i32 noundef 24, i32 noundef -1870146660, ptr noundef @endTensorDeconv)
  store ptr %58, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.MHandle, ptr %59, i32 0, i32 3
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  store ptr %61, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.MTensor, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 8, !tbaa !20
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.MTensor, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %66, align 4, !tbaa !22
  %68 = mul nsw i32 %64, %67
  store i32 %68, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.TensorDeconvPara, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !23
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.TensorDeconvPara, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %73, align 8, !tbaa !24
  %75 = mul nsw i32 %71, %74
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MTensor, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !25
  %79 = mul nsw i32 %75, %78
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !26
  %84 = getelementptr inbounds %struct.MMemoryBlock, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !28
  store ptr %85, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %131, %44
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.MTensor, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !30
  %91 = icmp slt i32 %87, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %134

93:                                               ; preds = %86
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.TensorDeconvPara, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !23
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.TensorDeconvPara, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 8, !tbaa !24
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TensorDeconvPara, ptr %103, i32 0, i32 5
  %105 = load i32, ptr %104, align 8, !tbaa !31
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.TensorDeconvPara, ptr %106, i32 0, i32 4
  %108 = load i32, ptr %107, align 4, !tbaa !32
  call void @DeconvTensorToMatData(ptr noundef %94, i32 noundef %95, ptr noundef %96, i32 noundef %99, i32 noundef %102, i32 noundef %105, i32 noundef %108)
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !9
  %111 = sub nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %109, i64 %112
  store float 1.000000e+00, ptr %113, align 4, !tbaa !33
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.TensorDeconvPara, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 8, !tbaa !34
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !35
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.HandleTensorDeconv, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !26
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = call ptr @mTensorMemory(ptr noundef %127, i32 noundef %128)
  %130 = load i32, ptr %10, align 4, !tbaa !9
  call void @mSgemm(i32 noundef 0, i32 noundef 1, i32 noundef %116, i32 noundef %117, i32 noundef %118, float noundef 1.000000e+00, ptr noundef %121, i32 noundef %122, ptr noundef %125, i32 noundef %126, float noundef 0.000000e+00, ptr noundef %129, i32 noundef %130)
  br label %131

131:                                              ; preds = %93
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %13, align 4, !tbaa !9
  br label %86, !llvm.loop !36

134:                                              ; preds = %92
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.MLayer, ptr %135, i32 0, i32 5
  store i32 0, ptr %136, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

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) #2

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

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 = { "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 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!19, !6, i64 16}
!19 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!20 = !{!21, !10, i64 8}
!21 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!22 = !{!21, !10, i64 12}
!23 = !{!15, !10, i64 12}
!24 = !{!15, !10, i64 16}
!25 = !{!21, !10, i64 4}
!26 = !{!27, !6, i64 0}
!27 = !{!"HandleTensorDeconv", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!29, !6, i64 8}
!29 = !{!"MMemoryBlock", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!30 = !{!21, !10, i64 0}
!31 = !{!15, !10, i64 24}
!32 = !{!15, !10, i64 20}
!33 = !{!16, !16, i64 0}
!34 = !{!15, !10, i64 8}
!35 = !{!27, !6, i64 8}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!12, !10, i64 64}


; 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
@__FUNCTION__.mTensorDeconvForward = external hidden unnamed_addr constant [21 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 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorDeconvForward(ptr noundef %0) local_unnamed_addr #0 {
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %7 [
    i64 -1, label %2
    i64 0, label %2
  ]

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

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

13:                                               ; preds = %7
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %12, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 213, ptr noundef nonnull @__FUNCTION__.mTensorDeconvForward, ptr noundef nonnull @.str.19) #3
  br label %14

14:                                               ; preds = %13, %7
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %17, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  tail call void @TensorDeconvSet(ptr noundef nonnull %0)
  %22 = tail call ptr @GetHandle(ptr noundef %21, i32 noundef 24, i32 noundef -1870146660, ptr noundef nonnull @endTensorDeconv) #3
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %21, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %21, i64 12
  %28 = load i32, ptr %27, align 4, !tbaa !20
  %29 = mul nsw i32 %28, %26
  %30 = getelementptr inbounds i8, ptr %16, i64 12
  %31 = load i32, ptr %30, align 4, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %16, i64 16
  %33 = load i32, ptr %32, align 8, !tbaa !22
  %34 = mul nsw i32 %33, %31
  %35 = getelementptr inbounds i8, ptr %19, i64 4
  %36 = load i32, ptr %35, align 4, !tbaa !23
  %37 = mul nsw i32 %34, %36
  %38 = add nsw i32 %37, 1
  %39 = load ptr, ptr %24, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  %42 = load i32, ptr %19, align 8, !tbaa !28
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %44 = getelementptr inbounds i8, ptr %16, i64 24
  %45 = getelementptr inbounds i8, ptr %16, i64 20
  %46 = sext i32 %37 to i64
  %47 = getelementptr inbounds float, ptr %41, i64 %46
  %48 = getelementptr inbounds i8, ptr %16, i64 8
  %49 = getelementptr inbounds i8, ptr %24, i64 8
  br label %51

._crit_edge:                                      ; preds = %51, %14
  %50 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %50, align 8, !tbaa !29
  ret void

51:                                               ; preds = %.lr.ph, %51
  %.042 = phi i32 [ 0, %.lr.ph ], [ %60, %51 ]
  %52 = load i32, ptr %30, align 4, !tbaa !21
  %53 = load i32, ptr %32, align 8, !tbaa !22
  %54 = load i32, ptr %44, align 8, !tbaa !30
  %55 = load i32, ptr %45, align 4, !tbaa !31
  tail call void @DeconvTensorToMatData(ptr noundef nonnull %19, i32 noundef %.042, ptr noundef %41, i32 noundef %52, i32 noundef %53, i32 noundef %54, i32 noundef %55)
  store float 1.000000e+00, ptr %47, align 4, !tbaa !32
  %56 = load i32, ptr %48, align 8, !tbaa !33
  %57 = load ptr, ptr %49, align 8, !tbaa !34
  %58 = load ptr, ptr %24, align 8, !tbaa !24
  %59 = tail call ptr @mTensorMemory(ptr noundef %21, i32 noundef %.042) #3
  tail call void @mSgemm(i32 noundef 0, i32 noundef 1, i32 noundef %56, i32 noundef %29, i32 noundef %38, float noundef 1.000000e+00, ptr noundef %57, i32 noundef %38, ptr noundef %58, i32 noundef %38, float noundef 0.000000e+00, ptr noundef %59, i32 noundef %29) #3
  %60 = add nuw nsw i32 %.042, 1
  %61 = load i32, ptr %19, align 8, !tbaa !28
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %51, label %._crit_edge, !llvm.loop !35
}

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 #1

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { nounwind }
attributes #4 = { 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 = !{!17, !10, i64 16}
!17 = !{!"MHandle", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16}
!18 = !{!19, !9, i64 8}
!19 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!20 = !{!19, !9, i64 12}
!21 = !{!13, !9, i64 12}
!22 = !{!13, !9, i64 16}
!23 = !{!19, !9, i64 4}
!24 = !{!25, !10, i64 0}
!25 = !{!"HandleTensorDeconv", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!27, !10, i64 8}
!27 = !{!"MMemoryBlock", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !9, i64 32}
!28 = !{!19, !9, i64 0}
!29 = !{!6, !9, i64 64}
!30 = !{!13, !9, i64 24}
!31 = !{!13, !9, i64 20}
!32 = !{!14, !14, i64 0}
!33 = !{!13, !9, i64 8}
!34 = !{!25, !10, i64 8}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}


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