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

; 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.TensorActivationPara = type { ptr, i32, ptr, [4 x float] }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }
%struct.ActvRegister = type { [32 x i8], ptr, ptr, ptr }

@.str.8 = external hidden unnamed_addr constant [98 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorActivationBackward = external hidden unnamed_addr constant [26 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorActivationBackward(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  br label %19

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

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

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

31:                                               ; preds = %26
  %32 = load i32, ptr %3, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %32, i32 noundef -1, ptr noundef @.str.8, i32 noundef 329, ptr noundef @__FUNCTION__.mTensorActivationBackward, ptr noundef @.str.19)
  br label %33

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

34:                                               ; preds = %33
  br label %35

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

46:                                               ; preds = %35
  %47 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %47, i32 noundef -1, ptr noundef @.str.8, i32 noundef 330, ptr noundef @__FUNCTION__.mTensorActivationBackward, ptr noundef @.str.21)
  br label %48

48:                                               ; preds = %46, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %49

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.MLayer, ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  store ptr %52, ptr %5, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.TensorActivationPara, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !14
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  store i32 1, ptr %6, align 4
  br label %176

58:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TensorActivationPara, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !16
  %62 = getelementptr inbounds %struct.MLayer, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  store ptr %63, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.TensorActivationPara, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.MLayer, ptr %66, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !18
  store ptr %68, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.MLayer, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  store ptr %71, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.TensorActivationPara, ptr %72, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  store ptr %74, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.MTensor, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !20
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.MTensor, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !22
  %81 = mul nsw i32 %77, %80
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.MTensor, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 4, !tbaa !23
  %85 = mul nsw i32 %81, %84
  store i32 %85, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.TensorActivationPara, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !16
  %89 = getelementptr inbounds %struct.MLayer, ptr %88, i32 0, i32 5
  %90 = load i32, ptr %89, align 8, !tbaa !24
  %91 = icmp eq i32 %90, 0
  %92 = zext i1 %91 to i32
  store i32 %92, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %168, %58
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MTensor, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !25
  %98 = icmp slt i32 %94, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %93
  store i32 6, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %171

100:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.MTensor, ptr %101, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !26
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  store ptr %107, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MTensor, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %110, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  store ptr %114, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.MTensor, ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !26
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  store ptr %121, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %164, %100
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 9, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %167

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = load i32, ptr %17, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds float, ptr %128, i64 %130
  %132 = load float, ptr %131, align 4, !tbaa !27
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ActvRegister, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !29
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load i32, ptr %17, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds float, ptr %136, i64 %138
  %140 = load float, ptr %139, align 4, !tbaa !27
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.TensorActivationPara, ptr %141, i32 0, i32 3
  %143 = getelementptr inbounds [4 x float], ptr %142, i64 0, i64 0
  %144 = call float %135(float noundef %140, ptr noundef %143)
  %145 = fmul float %132, %144
  store float %145, ptr %18, align 4, !tbaa !27
  %146 = load i32, ptr %12, align 4, !tbaa !9
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %150

148:                                              ; preds = %127
  %149 = load float, ptr %18, align 4, !tbaa !27
  br label %158

150:                                              ; preds = %127
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load i32, ptr %17, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds float, ptr %151, i64 %153
  %155 = load float, ptr %154, align 4, !tbaa !27
  %156 = load float, ptr %18, align 4, !tbaa !27
  %157 = fadd float %155, %156
  br label %158

158:                                              ; preds = %150, %148
  %159 = phi float [ %149, %148 ], [ %157, %150 ]
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  %161 = load i32, ptr %17, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds float, ptr %160, i64 %162
  store float %159, ptr %163, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %164

164:                                              ; preds = %158
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %17, align 4, !tbaa !9
  br label %122, !llvm.loop !31

167:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %13, align 4, !tbaa !9
  br label %93, !llvm.loop !33

171:                                              ; preds = %99
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.TensorActivationPara, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !16
  %175 = getelementptr inbounds %struct.MLayer, ptr %174, i32 0, i32 5
  store i32 1, ptr %175, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  store i32 0, ptr %6, align 4
  br label %176

176:                                              ; preds = %171, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %177 = load i32, ptr %6, align 4
  switch i32 %177, label %179 [
    i32 0, label %178
    i32 1, label %178
  ]

178:                                              ; preds = %176, %176
  ret void

179:                                              ; preds = %176
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { 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, !10, i64 8}
!15 = !{!"TensorActivationPara", !6, i64 0, !10, i64 8, !6, i64 16, !7, i64 24}
!16 = !{!15, !6, i64 0}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!15, !6, i64 16}
!20 = !{!21, !10, i64 4}
!21 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!22 = !{!21, !10, i64 8}
!23 = !{!21, !10, i64 12}
!24 = !{!12, !10, i64 64}
!25 = !{!21, !10, i64 0}
!26 = !{!21, !6, i64 16}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !7, i64 0}
!29 = !{!30, !6, i64 40}
!30 = !{!"ActvRegister", !7, i64 0, !6, i64 32, !6, i64 40, !6, i64 48}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


; 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.8 = external hidden unnamed_addr constant [98 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorActivationBackward = external hidden unnamed_addr constant [26 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorActivationBackward(ptr noundef %0) local_unnamed_addr #2 {
  %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.8, i32 noundef 329, ptr noundef nonnull @__FUNCTION__.mTensorActivationBackward, ptr noundef nonnull @.str.19) #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.20, 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.8, i32 noundef 330, ptr noundef nonnull @__FUNCTION__.mTensorActivationBackward, ptr noundef nonnull @.str.21) #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 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !12
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %95, label %20

20:                                               ; preds = %14
  %21 = load ptr, ptr %16, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %21, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %23, i64 4
  %25 = load i32, ptr %24, align 4, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %23, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = mul i32 %27, %25
  %29 = getelementptr inbounds i8, ptr %23, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !19
  %31 = mul i32 %28, %30
  %32 = load i32, ptr %23, align 8, !tbaa !20
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %20
  %34 = getelementptr inbounds i8, ptr %16, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = getelementptr inbounds i8, ptr %0, i64 48
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %21, i64 48
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %23, i64 16
  %41 = getelementptr inbounds i8, ptr %39, i64 16
  %42 = getelementptr inbounds i8, ptr %37, i64 16
  %43 = icmp sgt i32 %31, 0
  %44 = getelementptr inbounds i8, ptr %35, i64 40
  %45 = getelementptr inbounds i8, ptr %16, i64 24
  br i1 %43, label %.lr.ph47.split.us, label %._crit_edge48

.lr.ph47.split.us:                                ; preds = %.lr.ph47
  %46 = getelementptr inbounds i8, ptr %21, i64 64
  %47 = load i32, ptr %46, align 8, !tbaa !23
  %.fr52 = freeze i32 %47
  %48 = icmp eq i32 %.fr52, 0
  %wide.trip.count62 = zext nneg i32 %31 to i64
  br i1 %48, label %.lr.ph.us.us, label %.lr.ph.us

.lr.ph.us.us:                                     ; preds = %.lr.ph47.split.us, %._crit_edge.split.us.us.us
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %._crit_edge.split.us.us.us ], [ 0, %.lr.ph47.split.us ]
  %49 = load ptr, ptr %40, align 8, !tbaa !24
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv64
  %51 = load ptr, ptr %50, align 8, !tbaa !25
  %52 = load ptr, ptr %41, align 8, !tbaa !24
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv64
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = load ptr, ptr %42, align 8, !tbaa !24
  %56 = getelementptr inbounds ptr, ptr %55, i64 %indvars.iv64
  %57 = load ptr, ptr %56, align 8, !tbaa !25
  br label %58

58:                                               ; preds = %58, %.lr.ph.us.us
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %58 ], [ 0, %.lr.ph.us.us ]
  %59 = getelementptr inbounds float, ptr %57, i64 %indvars.iv59
  %60 = load float, ptr %59, align 4, !tbaa !26
  %61 = load ptr, ptr %44, align 8, !tbaa !28
  %62 = getelementptr inbounds float, ptr %51, i64 %indvars.iv59
  %63 = load float, ptr %62, align 4, !tbaa !26
  %64 = tail call float %61(float noundef %63, ptr noundef nonnull %45) #3
  %65 = fmul float %60, %64
  %66 = getelementptr inbounds float, ptr %54, i64 %indvars.iv59
  store float %65, ptr %66, align 4, !tbaa !26
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count62
  br i1 %exitcond63.not, label %._crit_edge.split.us.us.us, label %58, !llvm.loop !30

._crit_edge.split.us.us.us:                       ; preds = %58
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %67 = load i32, ptr %23, align 8, !tbaa !20
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next65, %68
  br i1 %69, label %.lr.ph.us.us, label %._crit_edge48, !llvm.loop !32

.lr.ph.us:                                        ; preds = %.lr.ph47.split.us, %._crit_edge.split.us50
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge.split.us50 ], [ 0, %.lr.ph47.split.us ]
  %70 = load ptr, ptr %40, align 8, !tbaa !24
  %71 = getelementptr inbounds ptr, ptr %70, i64 %indvars.iv56
  %72 = load ptr, ptr %71, align 8, !tbaa !25
  %73 = load ptr, ptr %41, align 8, !tbaa !24
  %74 = getelementptr inbounds ptr, ptr %73, i64 %indvars.iv56
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = load ptr, ptr %42, align 8, !tbaa !24
  %77 = getelementptr inbounds ptr, ptr %76, i64 %indvars.iv56
  %78 = load ptr, ptr %77, align 8, !tbaa !25
  br label %79

79:                                               ; preds = %.lr.ph.us, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %79 ]
  %80 = getelementptr inbounds float, ptr %78, i64 %indvars.iv
  %81 = load float, ptr %80, align 4, !tbaa !26
  %82 = load ptr, ptr %44, align 8, !tbaa !28
  %83 = getelementptr inbounds float, ptr %72, i64 %indvars.iv
  %84 = load float, ptr %83, align 4, !tbaa !26
  %85 = tail call float %82(float noundef %84, ptr noundef nonnull %45) #3
  %86 = fmul float %81, %85
  %87 = getelementptr inbounds float, ptr %75, i64 %indvars.iv
  %88 = load float, ptr %87, align 4, !tbaa !26
  %89 = fadd float %86, %88
  store float %89, ptr %87, align 4, !tbaa !26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count62
  br i1 %exitcond.not, label %._crit_edge.split.us50, label %79, !llvm.loop !30

._crit_edge.split.us50:                           ; preds = %79
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %90 = load i32, ptr %23, align 8, !tbaa !20
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next57, %91
  br i1 %92, label %.lr.ph.us, label %._crit_edge48, !llvm.loop !32

._crit_edge48:                                    ; preds = %._crit_edge.split.us50, %._crit_edge.split.us.us.us, %.lr.ph47, %20
  %93 = load ptr, ptr %16, align 8, !tbaa !14
  %94 = getelementptr inbounds i8, ptr %93, i64 64
  store i32 1, ptr %94, align 8, !tbaa !23
  br label %95

95:                                               ; preds = %14, %._crit_edge48
  ret void
}

attributes #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 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 #2 = { 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 #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, !9, i64 8}
!13 = !{!"TensorActivationPara", !10, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!14 = !{!13, !10, i64 0}
!15 = !{!6, !10, i64 40}
!16 = !{!17, !9, i64 4}
!17 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!18 = !{!17, !9, i64 8}
!19 = !{!17, !9, i64 12}
!20 = !{!17, !9, i64 0}
!21 = !{!13, !10, i64 16}
!22 = !{!6, !10, i64 48}
!23 = !{!6, !9, i64 64}
!24 = !{!17, !10, i64 16}
!25 = !{!10, !10, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !7, i64 0}
!28 = !{!29, !10, i64 40}
!29 = !{!"ActvRegister", !7, i64 0, !10, i64 32, !10, i64 40, !10, i64 48}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass