; LLVM IR from XiaoMi/mace :: micro/ops/cmsis_nn/quantize.ll (ZN5micro3ops10QuantizeOp3RunEv)

; 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::base::Logger" = type { i32 }
%"struct.micro::QuantizeInfo" = type { float, i32 }
%"class.micro::ops::QuantizeOp" = type { %"class.micro::framework::Operator", ptr, ptr, i32, ptr }
%"class.micro::framework::Operator" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops10QuantizeOp3RunEv(ptr noundef nonnull align 8 dereferenceable(64) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.micro::base::Logger", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.micro::QuantizeInfo", align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %16 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 2
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0, i32 noundef %17, ptr noundef %19)
  store i32 %20, ptr %4, align 4, !tbaa !14
  %21 = load i32, ptr %4, align 4, !tbaa !14
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %42

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef @.str, i32 noundef 46, i32 noundef 1)
  %24 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 3
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0, i32 noundef %25, ptr noundef %27)
          to label %29 unwind label %38

29:                                               ; preds = %23
  %30 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %28)
          to label %31 unwind label %38

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef @.str.1)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = load i32, ptr %4, align 4, !tbaa !14
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %32, i32 noundef %34)
          to label %36 unwind label %38

36:                                               ; preds = %33
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %37 = load i32, ptr %4, align 4, !tbaa !14
  store i32 %37, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %43

38:                                               ; preds = %33, %31, %29, %23
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %100

42:                                               ; preds = %1
  store i32 0, ptr %8, align 4
  br label %43

43:                                               ; preds = %42, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %44 = load i32, ptr %8, align 4
  switch i32 %44, label %105 [
    i32 0, label %45
    i32 1, label %98
  ]

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %46 = call i64 @_ZN5micro9framework8Operator21GetOutputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
  store i64 %46, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %47 = getelementptr inbounds %"struct.micro::QuantizeInfo", ptr %9, i32 0, i32 0
  %48 = load float, ptr %47, align 4, !tbaa !16
  %49 = fdiv float 1.000000e+00, %48
  store float %49, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %50 = getelementptr inbounds %"struct.micro::QuantizeInfo", ptr %9, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !20
  store i32 %51, ptr %11, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !21
  br label %52

52:                                               ; preds = %67, %45
  %53 = load i32, ptr %13, align 4, !tbaa !21
  %54 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 3
  %55 = load i32, ptr %54, align 8, !tbaa !9
  %56 = icmp ult i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %70

58:                                               ; preds = %52
  %59 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = load i32, ptr %13, align 4, !tbaa !21
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %60, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !21
  %65 = load i32, ptr %12, align 4, !tbaa !21
  %66 = mul nsw i32 %65, %64
  store i32 %66, ptr %12, align 4, !tbaa !21
  br label %67

67:                                               ; preds = %58
  %68 = load i32, ptr %13, align 4, !tbaa !21
  %69 = add i32 %68, 1
  store i32 %69, ptr %13, align 4, !tbaa !21
  br label %52, !llvm.loop !22

70:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !21
  br label %71

71:                                               ; preds = %94, %70
  %72 = load i32, ptr %14, align 4, !tbaa !21
  %73 = load i32, ptr %12, align 4, !tbaa !21
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %97

76:                                               ; preds = %71
  %77 = load float, ptr %10, align 4, !tbaa !19
  %78 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !24
  %80 = load i32, ptr %14, align 4, !tbaa !21
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds float, ptr %79, i64 %81
  %83 = load float, ptr %82, align 4, !tbaa !19
  %84 = load i32, ptr %11, align 4, !tbaa !21
  %85 = sitofp i32 %84 to float
  %86 = call float @llvm.fmuladd.f32(float %77, float %83, float %85)
  %87 = call float @llvm.round.f32(float %86)
  %88 = call noundef signext i8 @_ZN5micro3ops12SaturateInt8Ef(float noundef %87)
  %89 = getelementptr inbounds %"class.micro::ops::QuantizeOp", ptr %15, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !25
  %91 = load i32, ptr %14, align 4, !tbaa !21
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %90, i64 %92
  store i8 %88, ptr %93, align 1, !tbaa !26
  br label %94

94:                                               ; preds = %76
  %95 = load i32, ptr %14, align 4, !tbaa !21
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %14, align 4, !tbaa !21
  br label %71, !llvm.loop !27

97:                                               ; preds = %75
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %98

98:                                               ; preds = %97, %43
  %99 = load i32, ptr %2, align 4
  ret i32 %99

100:                                              ; preds = %38
  %101 = load ptr, ptr %6, align 8
  %102 = load i32, ptr %7, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %43
  unreachable
}

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

declare noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) #2

declare void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #2

; Function Attrs: nounwind
declare void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

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

declare i64 @_ZN5micro9framework8Operator21GetOutputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZN5micro3ops12SaturateInt8Ef(float noundef) #4

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

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

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 = { 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 "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !12, i64 48}
!10 = !{!"_ZTSN5micro3ops10QuantizeOpE", !11, i64 0, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 40}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN5micro10MaceStatusE", !7, i64 0}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSN5micro12QuantizeInfoE", !18, i64 0, !12, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!17, !12, i64 4}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !6, i64 32}
!25 = !{!10, !6, i64 56}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !23}


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

%"class.micro::base::Logger" = type { i32 }

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops10QuantizeOp3RunEv(ptr noundef nonnull align 8 dereferenceable(64) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.micro::base::Logger", align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = tail call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef %4, ptr noundef %6)
  %.not.not = icmp eq i32 %7, 0
  br i1 %.not.not, label %21, label %8

8:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str, i32 noundef 46, i32 noundef 1)
  %9 = load i32, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8, !tbaa !12
  %11 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef %9, ptr noundef %10)
          to label %12 unwind label %18

12:                                               ; preds = %8
  %13 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %11)
          to label %14 unwind label %18

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull @.str.1)
          to label %16 unwind label %18

16:                                               ; preds = %14
  %17 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef %7)
          to label %20 unwind label %18

18:                                               ; preds = %16, %14, %12, %8
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  resume { ptr, i32 } %19

20:                                               ; preds = %16
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br label %.loopexit

21:                                               ; preds = %1
  %22 = tail call i64 @_ZN5micro9framework8Operator21GetOutputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0)
  %.sroa.0.0.extract.trunc = trunc i64 %22 to i32
  %23 = bitcast i32 %.sroa.0.0.extract.trunc to float
  %.sroa.4.0.extract.shift = lshr i64 %22, 32
  %.sroa.4.0.extract.trunc = trunc nuw i64 %.sroa.4.0.extract.shift to i32
  %24 = fdiv float 1.000000e+00, %23
  %25 = load i32, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %.lr.ph27, label %.lr.ph

.lr.ph:                                           ; preds = %21
  %26 = load ptr, ptr %5, align 8, !tbaa !12
  %wide.trip.count = zext i32 %25 to i64
  %min.iters.check = icmp ult i32 %25, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.01924.ph = phi i32 [ 1, %.lr.ph ], [ %32, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %29, %vector.body ]
  %vec.phi36 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %30, %vector.body ]
  %27 = getelementptr inbounds i32, ptr %26, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load = load <4 x i32>, ptr %27, align 4, !tbaa !13
  %wide.load37 = load <4 x i32>, ptr %28, align 4, !tbaa !13
  %29 = mul <4 x i32> %wide.load, %vec.phi
  %30 = mul <4 x i32> %wide.load37, %vec.phi36
  %index.next = add nuw i64 %index, 8
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = mul <4 x i32> %30, %29
  %32 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %scalar.ph.preheader

.preheader:                                       ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %32, %middle.block ], [ %39, %scalar.ph ]
  %33 = icmp sgt i32 %.lcssa, 0
  br i1 %33, label %.lr.ph27, label %.loopexit

.lr.ph27:                                         ; preds = %21, %.preheader
  %.019.lcssa35 = phi i32 [ %.lcssa, %.preheader ], [ 1, %21 ]
  %34 = getelementptr inbounds i8, ptr %0, i64 32
  %35 = sitofp i32 %.sroa.4.0.extract.trunc to float
  %36 = getelementptr inbounds i8, ptr %0, i64 56
  %wide.trip.count32 = zext nneg i32 %.019.lcssa35 to i64
  br label %40

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.01924 = phi i32 [ %39, %scalar.ph ], [ %.01924.ph, %scalar.ph.preheader ]
  %37 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = mul nsw i32 %38, %.01924
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %scalar.ph, !llvm.loop !18

40:                                               ; preds = %.lr.ph27, %40
  %indvars.iv29 = phi i64 [ 0, %.lr.ph27 ], [ %indvars.iv.next30, %40 ]
  %41 = load ptr, ptr %34, align 8, !tbaa !19
  %42 = getelementptr inbounds float, ptr %41, i64 %indvars.iv29
  %43 = load float, ptr %42, align 4, !tbaa !20
  %44 = tail call float @llvm.fmuladd.f32(float %24, float %43, float %35)
  %45 = tail call float @llvm.round.f32(float %44)
  %46 = tail call noundef signext i8 @_ZN5micro3ops12SaturateInt8Ef(float noundef %45)
  %47 = load ptr, ptr %36, align 8, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %47, i64 %indvars.iv29
  store i8 %46, ptr %48, align 1, !tbaa !23
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %exitcond33.not = icmp eq i64 %indvars.iv.next30, %wide.trip.count32
  br i1 %exitcond33.not, label %.loopexit, label %40, !llvm.loop !24

.loopexit:                                        ; preds = %40, %.preheader, %20
  %.1 = phi i32 [ %7, %20 ], [ 0, %.preheader ], [ 0, %40 ]
  ret i32 %.1
}

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

declare noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3

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

declare i64 @_ZN5micro9framework8Operator21GetOutputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZN5micro3ops12SaturateInt8Ef(float noundef) local_unnamed_addr #4

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

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

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

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 = { mustprogress 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 "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !11, i64 48}
!6 = !{!"_ZTSN5micro3ops10QuantizeOpE", !7, i64 0, !8, i64 32, !8, i64 40, !11, i64 48, !8, i64 56}
!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 = !{!6, !8, i64 40}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15, !17, !16}
!19 = !{!6, !8, i64 32}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !9, i64 0}
!22 = !{!6, !8, i64 56}
!23 = !{!9, !9, i64 0}
!24 = distinct !{!24, !15}


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