; LLVM IR from XiaoMi/mace :: micro/ops/softmax.ll (ZN5micro3ops9SoftmaxOp10RunForNHWCEv)

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

%"class.micro::ops::SoftmaxOp" = type { %"class.micro::framework::Operator", ptr, ptr, i32, ptr, i8, i32 }
%"class.micro::framework::Operator" = type { ptr, ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops9SoftmaxOp10RunForNHWCEv(ptr noundef nonnull align 8 dereferenceable(72) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %25 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 3
  %28 = load i32, ptr %27, align 8, !tbaa !15
  %29 = sub i32 %28, 1
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %26, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !16
  store i32 %32, ptr %3, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %33 = load i32, ptr %3, align 4, !tbaa !16
  store i32 %33, ptr %4, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %34 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 3
  %37 = load i32, ptr %36, align 8, !tbaa !15
  %38 = call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %35, i32 noundef 1, i32 noundef %37)
  store i32 %38, ptr %5, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %39 = load i32, ptr %5, align 4, !tbaa !16
  store i32 %39, ptr %6, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %40 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 3
  %41 = load i32, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %41, ptr noundef %43)
  store i32 %44, ptr %7, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %45 = call noundef float @_ZN5micro4base6lowestEv()
  store float %45, ptr %8, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %46

46:                                               ; preds = %176, %1
  %47 = load i32, ptr %9, align 4, !tbaa !16
  %48 = load i32, ptr %7, align 4, !tbaa !16
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %180

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %52 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !19
  %54 = load i32, ptr %9, align 4, !tbaa !16
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %53, i64 %55
  store ptr %56, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %57 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = load i32, ptr %9, align 4, !tbaa !16
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %58, i64 %60
  store ptr %61, 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 !16
  br label %62

62:                                               ; preds = %171, %51
  %63 = load i32, ptr %13, align 4, !tbaa !16
  %64 = load i32, ptr %5, align 4, !tbaa !16
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %175

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = load i32, ptr %13, align 4, !tbaa !16
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds float, ptr %68, i64 %70
  store ptr %71, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load i32, ptr %13, align 4, !tbaa !16
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds float, ptr %72, i64 %74
  store ptr %75, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %76 = load float, ptr %8, align 4, !tbaa !17
  store float %76, ptr %16, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !16
  br label %77

77:                                               ; preds = %90, %67
  %78 = load i32, ptr %17, align 4, !tbaa !16
  %79 = load i32, ptr %3, align 4, !tbaa !16
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %93

82:                                               ; preds = %77
  %83 = load float, ptr %16, align 4, !tbaa !17
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = load i32, ptr %17, align 4, !tbaa !16
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds float, ptr %84, i64 %86
  %88 = load float, ptr %87, align 4, !tbaa !17
  %89 = call noundef float @_ZN5micro4base3maxIfEET_S2_S2_(float noundef %83, float noundef %88)
  store float %89, ptr %16, align 4, !tbaa !17
  br label %90

90:                                               ; preds = %82
  %91 = load i32, ptr %17, align 4, !tbaa !16
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %17, align 4, !tbaa !16
  br label %77, !llvm.loop !21

93:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store float 0.000000e+00, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !16
  br label %94

94:                                               ; preds = %116, %93
  %95 = load i32, ptr %19, align 4, !tbaa !16
  %96 = load i32, ptr %3, align 4, !tbaa !16
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %119

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = load i32, ptr %19, align 4, !tbaa !16
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds float, ptr %100, i64 %102
  %104 = load float, ptr %103, align 4, !tbaa !17
  %105 = load float, ptr %16, align 4, !tbaa !17
  %106 = fsub float %104, %105
  %107 = call noundef float @_ZN5micro4base3expEf(float noundef %106)
  store float %107, ptr %20, align 4, !tbaa !17
  %108 = load float, ptr %20, align 4, !tbaa !17
  %109 = load float, ptr %18, align 4, !tbaa !17
  %110 = fadd float %109, %108
  store float %110, ptr %18, align 4, !tbaa !17
  %111 = load float, ptr %20, align 4, !tbaa !17
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = load i32, ptr %19, align 4, !tbaa !16
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds float, ptr %112, i64 %114
  store float %111, ptr %115, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %116

116:                                              ; preds = %99
  %117 = load i32, ptr %19, align 4, !tbaa !16
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %19, align 4, !tbaa !16
  br label %94, !llvm.loop !23

119:                                              ; preds = %98
  %120 = getelementptr inbounds %"class.micro::ops::SoftmaxOp", ptr %24, i32 0, i32 5
  %121 = load i8, ptr %120, align 8, !tbaa !24, !range !25, !noundef !26
  %122 = trunc i8 %121 to i1
  br i1 %122, label %123, label %148

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !16
  br label %124

124:                                              ; preds = %144, %123
  %125 = load i32, ptr %21, align 4, !tbaa !16
  %126 = load i32, ptr %3, align 4, !tbaa !16
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %147

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load i32, ptr %21, align 4, !tbaa !16
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %130, i64 %132
  %134 = load float, ptr %133, align 4, !tbaa !17
  store float %134, ptr %22, align 4, !tbaa !17
  %135 = load float, ptr %18, align 4, !tbaa !17
  %136 = load float, ptr %22, align 4, !tbaa !17
  %137 = fdiv float %136, %135
  store float %137, ptr %22, align 4, !tbaa !17
  %138 = load float, ptr %22, align 4, !tbaa !17
  %139 = call noundef float @_ZN5micro4base3logEf(float noundef %138)
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = load i32, ptr %21, align 4, !tbaa !16
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds float, ptr %140, i64 %142
  store float %139, ptr %143, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %144

144:                                              ; preds = %129
  %145 = load i32, ptr %21, align 4, !tbaa !16
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %21, align 4, !tbaa !16
  br label %124, !llvm.loop !27

147:                                              ; preds = %128
  br label %170

148:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !16
  br label %149

149:                                              ; preds = %166, %148
  %150 = load i32, ptr %23, align 4, !tbaa !16
  %151 = load i32, ptr %3, align 4, !tbaa !16
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %169

154:                                              ; preds = %149
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = load i32, ptr %23, align 4, !tbaa !16
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds float, ptr %155, i64 %157
  %159 = load float, ptr %158, align 4, !tbaa !17
  %160 = load float, ptr %18, align 4, !tbaa !17
  %161 = fdiv float %159, %160
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = load i32, ptr %23, align 4, !tbaa !16
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds float, ptr %162, i64 %164
  store float %161, ptr %165, align 4, !tbaa !17
  br label %166

166:                                              ; preds = %154
  %167 = load i32, ptr %23, align 4, !tbaa !16
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %23, align 4, !tbaa !16
  br label %149, !llvm.loop !28

169:                                              ; preds = %153
  br label %170

170:                                              ; preds = %169, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 %171

171:                                              ; preds = %170
  %172 = load i32, ptr %4, align 4, !tbaa !16
  %173 = load i32, ptr %13, align 4, !tbaa !16
  %174 = add nsw i32 %173, %172
  store i32 %174, ptr %13, align 4, !tbaa !16
  br label %62, !llvm.loop !29

175:                                              ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %6, align 4, !tbaa !16
  %178 = load i32, ptr %9, align 4, !tbaa !16
  %179 = add nsw i32 %178, %177
  store i32 %179, ptr %9, align 4, !tbaa !16
  br label %46, !llvm.loop !30

180:                                              ; preds = %50
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef, i32 noundef, i32 noundef) #1

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

declare noundef float @_ZN5micro4base6lowestEv() #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN5micro4base3maxIfEET_S2_S2_(float noundef, float noundef) #3

declare noundef float @_ZN5micro4base3expEf(float noundef) #2

declare noundef float @_ZN5micro4base3logEf(float noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 40}
!10 = !{!"_ZTSN5micro3ops9SoftmaxOpE", !11, i64 0, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !13, i64 64, !14, i64 68}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN5micro10DataFormatE", !7, i64 0}
!15 = !{!10, !12, i64 48}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!10, !6, i64 32}
!20 = !{!10, !6, i64 56}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!10, !13, i64 64}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops9SoftmaxOp10RunForNHWCEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(72) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = load i32, ptr %4, align 8, !tbaa !14
  %6 = add i32 %5, -1
  %7 = zext i32 %6 to i64
  %8 = getelementptr inbounds i32, ptr %3, i64 %7
  %9 = load i32, ptr %8, align 4, !tbaa !15
  %.fr100 = freeze i32 %9
  %10 = tail call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %3, i32 noundef 1, i32 noundef %5)
  %11 = load i32, ptr %4, align 8, !tbaa !14
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = tail call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %11, ptr noundef %12)
  %14 = tail call noundef float @_ZN5micro4base6lowestEv()
  %15 = icmp sgt i32 %13, 0
  br i1 %15, label %.lr.ph79, label %._crit_edge

.lr.ph79:                                         ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = icmp sgt i32 %10, 0
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  br i1 %18, label %.lr.ph79.split.us, label %._crit_edge

.lr.ph79.split.us:                                ; preds = %.lr.ph79
  %20 = icmp sgt i32 %.fr100, 0
  %21 = zext nneg i32 %10 to i64
  br i1 %20, label %.lr.ph76.us.us.us.us.us.preheader, label %._crit_edge

.lr.ph76.us.us.us.us.us.preheader:                ; preds = %.lr.ph79.split.us
  %22 = zext nneg i32 %.fr100 to i64
  %min.iters.check = icmp ult i32 %.fr100, 4
  %n.vec = and i64 %22, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %22
  br label %.lr.ph76.us.us.us.us.us

.lr.ph76.us.us.us.us.us:                          ; preds = %.lr.ph76.us.us.us.us.us.preheader, %._crit_edge77.split.us.us.us.split.us.us.split.us.us.split.us.us
  %indvars.iv218 = phi i64 [ 0, %.lr.ph76.us.us.us.us.us.preheader ], [ %indvars.iv.next219, %._crit_edge77.split.us.us.us.split.us.us.split.us.us.split.us.us ]
  %23 = load ptr, ptr %16, align 8, !tbaa !16
  %24 = getelementptr inbounds float, ptr %23, i64 %indvars.iv218
  %25 = load ptr, ptr %17, align 8, !tbaa !17
  %26 = getelementptr inbounds float, ptr %25, i64 %indvars.iv218
  br label %.lr.ph.us.us.us.us.us.us.us.us.us

.lr.ph.us.us.us.us.us.us.us.us.us:                ; preds = %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us, %.lr.ph76.us.us.us.us.us
  %indvars.iv215 = phi i64 [ %indvars.iv.next216, %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us ], [ 0, %.lr.ph76.us.us.us.us.us ]
  %27 = getelementptr inbounds float, ptr %24, i64 %indvars.iv215
  br label %44

.preheader61.us.us.us.us.us.us.us.us.us:          ; preds = %.preheader61.us.us.us.us.us.us.us.us.us.preheader229, %.preheader61.us.us.us.us.us.us.us.us.us
  %indvars.iv205 = phi i64 [ %indvars.iv.next206, %.preheader61.us.us.us.us.us.us.us.us.us ], [ %indvars.iv205.ph, %.preheader61.us.us.us.us.us.us.us.us.us.preheader229 ]
  %28 = getelementptr inbounds float, ptr %48, i64 %indvars.iv205
  %29 = load float, ptr %28, align 4, !tbaa !18
  %30 = fdiv float %29, %42
  store float %30, ptr %28, align 4, !tbaa !18
  %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1
  %exitcond209.not = icmp eq i64 %indvars.iv.next206, %22
  br i1 %exitcond209.not, label %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us, label %.preheader61.us.us.us.us.us.us.us.us.us, !llvm.loop !20

..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us: ; preds = %.preheader61.us.us.us.us.us.us.us.us.us, %.preheader.us.us.us.us.us.us.us.us.us, %middle.block
  %indvars.iv.next216 = add nuw nsw i64 %indvars.iv215, %22
  %31 = trunc nuw i64 %indvars.iv.next216 to i32
  %32 = icmp sgt i32 %10, %31
  br i1 %32, label %.lr.ph.us.us.us.us.us.us.us.us.us, label %._crit_edge77.split.us.us.us.split.us.us.split.us.us.split.us.us, !llvm.loop !24

.preheader.us.us.us.us.us.us.us.us.us:            ; preds = %._crit_edge.us.us.us.us.us.us.us.us.us, %.preheader.us.us.us.us.us.us.us.us.us
  %indvars.iv210 = phi i64 [ %indvars.iv.next211, %.preheader.us.us.us.us.us.us.us.us.us ], [ 0, %._crit_edge.us.us.us.us.us.us.us.us.us ]
  %33 = getelementptr inbounds float, ptr %48, i64 %indvars.iv210
  %34 = load float, ptr %33, align 4, !tbaa !18
  %35 = fdiv float %34, %42
  %36 = tail call noundef float @_ZN5micro4base3logEf(float noundef %35)
  store float %36, ptr %33, align 4, !tbaa !18
  %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
  %exitcond214.not = icmp eq i64 %indvars.iv.next211, %22
  br i1 %exitcond214.not, label %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us, label %.preheader.us.us.us.us.us.us.us.us.us, !llvm.loop !25

37:                                               ; preds = %..preheader63_crit_edge.us.us.us.us.us.us.us.us.us, %37
  %indvars.iv200 = phi i64 [ 0, %..preheader63_crit_edge.us.us.us.us.us.us.us.us.us ], [ %indvars.iv.next201, %37 ]
  %.05566.us.us.us.us.us.us.us.us.us = phi float [ 0.000000e+00, %..preheader63_crit_edge.us.us.us.us.us.us.us.us.us ], [ %42, %37 ]
  %38 = getelementptr inbounds float, ptr %27, i64 %indvars.iv200
  %39 = load float, ptr %38, align 4, !tbaa !18
  %40 = fsub float %39, %47
  %41 = tail call noundef float @_ZN5micro4base3expEf(float noundef %40)
  %42 = fadd float %.05566.us.us.us.us.us.us.us.us.us, %41
  %43 = getelementptr inbounds float, ptr %48, i64 %indvars.iv200
  store float %41, ptr %43, align 4, !tbaa !18
  %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1
  %exitcond204.not = icmp eq i64 %indvars.iv.next201, %22
  br i1 %exitcond204.not, label %._crit_edge.us.us.us.us.us.us.us.us.us, label %37, !llvm.loop !26

44:                                               ; preds = %44, %.lr.ph.us.us.us.us.us.us.us.us.us
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %44 ], [ 0, %.lr.ph.us.us.us.us.us.us.us.us.us ]
  %.05764.us.us.us.us.us.us.us.us.us = phi float [ %47, %44 ], [ %14, %.lr.ph.us.us.us.us.us.us.us.us.us ]
  %45 = getelementptr inbounds float, ptr %27, i64 %indvars.iv195
  %46 = load float, ptr %45, align 4, !tbaa !18
  %47 = tail call noundef float @_ZN5micro4base3maxIfEET_S2_S2_(float noundef %.05764.us.us.us.us.us.us.us.us.us, float noundef %46)
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %exitcond199.not = icmp eq i64 %indvars.iv.next196, %22
  br i1 %exitcond199.not, label %..preheader63_crit_edge.us.us.us.us.us.us.us.us.us, label %44, !llvm.loop !27

..preheader63_crit_edge.us.us.us.us.us.us.us.us.us: ; preds = %44
  %48 = getelementptr inbounds float, ptr %26, i64 %indvars.iv215
  br label %37

._crit_edge.us.us.us.us.us.us.us.us.us:           ; preds = %37
  %49 = load i8, ptr %19, align 8, !tbaa !28, !range !29, !noundef !30
  %50 = trunc nuw i8 %49 to i1
  br i1 %50, label %.preheader.us.us.us.us.us.us.us.us.us, label %.preheader61.us.us.us.us.us.us.us.us.us.preheader

.preheader61.us.us.us.us.us.us.us.us.us.preheader: ; preds = %._crit_edge.us.us.us.us.us.us.us.us.us
  br i1 %min.iters.check, label %.preheader61.us.us.us.us.us.us.us.us.us.preheader229, label %vector.ph

.preheader61.us.us.us.us.us.us.us.us.us.preheader229: ; preds = %middle.block, %.preheader61.us.us.us.us.us.us.us.us.us.preheader
  %indvars.iv205.ph = phi i64 [ 0, %.preheader61.us.us.us.us.us.us.us.us.us.preheader ], [ %n.vec, %middle.block ]
  br label %.preheader61.us.us.us.us.us.us.us.us.us

vector.ph:                                        ; preds = %.preheader61.us.us.us.us.us.us.us.us.us.preheader
  %broadcast.splatinsert = insertelement <4 x float> poison, float %42, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %51 = getelementptr inbounds float, ptr %48, i64 %index
  %wide.load = load <4 x float>, ptr %51, align 4, !tbaa !18
  %52 = fdiv <4 x float> %wide.load, %broadcast.splat
  store <4 x float> %52, ptr %51, align 4, !tbaa !18
  %index.next = add nuw i64 %index, 4
  %53 = icmp eq i64 %index.next, %n.vec
  br i1 %53, label %middle.block, label %vector.body, !llvm.loop !31

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us, label %.preheader61.us.us.us.us.us.us.us.us.us.preheader229

._crit_edge77.split.us.us.us.split.us.us.split.us.us.split.us.us: ; preds = %..loopexit62_crit_edge.us.us.us.us.us.us.us.us.us
  %indvars.iv.next219 = add nuw nsw i64 %indvars.iv218, %21
  %54 = trunc nuw i64 %indvars.iv.next219 to i32
  %55 = icmp sgt i32 %13, %54
  br i1 %55, label %.lr.ph76.us.us.us.us.us, label %._crit_edge, !llvm.loop !32

._crit_edge:                                      ; preds = %._crit_edge77.split.us.us.us.split.us.us.split.us.us.split.us.us, %.lr.ph79.split.us, %.lr.ph79, %1
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

declare noundef float @_ZN5micro4base6lowestEv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN5micro4base3maxIfEET_S2_S2_(float noundef, float noundef) local_unnamed_addr #2

declare noundef float @_ZN5micro4base3expEf(float noundef) local_unnamed_addr #1

declare noundef float @_ZN5micro4base3logEf(float noundef) local_unnamed_addr #1

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 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" }

!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, !8, i64 40}
!6 = !{!"_ZTSN5micro3ops9SoftmaxOpE", !7, i64 0, !8, i64 32, !8, i64 40, !11, i64 48, !8, i64 56, !12, i64 64, !13, i64 68}
!7 = !{!"_ZTSN5micro9framework8OperatorE", !8, i64 8, !8, i64 16, !8, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTSN5micro10DataFormatE", !9, i64 0}
!14 = !{!6, !11, i64 48}
!15 = !{!11, !11, i64 0}
!16 = !{!6, !8, i64 32}
!17 = !{!6, !8, i64 56}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !9, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = distinct !{!27, !21}
!28 = !{!6, !12, i64 64}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = distinct !{!31, !21, !23, !22}
!32 = distinct !{!32, !21}


; Effective O3 passes: ADCEPass,BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass