; LLVM IR from XiaoMi/mace :: micro/ops/cmsis_nn/dequantize.ll (ZN5micro3ops12DequantizeOp3RunEv)

; 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::DequantizeOp" = type { %"class.micro::framework::Operator", ptr, ptr, i32, ptr }
%"class.micro::framework::Operator" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [78 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 @_ZN5micro3ops12DequantizeOp3RunEv(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) #4
  %16 = getelementptr inbounds %"class.micro::ops::DequantizeOp", ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds %"class.micro::ops::DequantizeOp", 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) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef @.str, i32 noundef 37, i32 noundef 1)
  %24 = getelementptr inbounds %"class.micro::ops::DequantizeOp", ptr %15, i32 0, i32 3
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.micro::ops::DequantizeOp", 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) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  %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) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %99

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) #4
  %44 = load i32, ptr %8, align 4
  switch i32 %44, label %104 [
    i32 0, label %45
    i32 1, label %97
  ]

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %46 = call i64 @_ZN5micro9framework8Operator20GetInputQuantizeInfoEj(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) #4
  %47 = getelementptr inbounds %"struct.micro::QuantizeInfo", ptr %9, i32 0, i32 0
  %48 = load float, ptr %47, align 4, !tbaa !16
  store float %48, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %49 = getelementptr inbounds %"struct.micro::QuantizeInfo", ptr %9, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !20
  store i32 %50, ptr %11, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !21
  br label %51

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

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

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

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

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

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

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

75:                                               ; preds = %70
  %76 = load float, ptr %10, align 4, !tbaa !19
  %77 = getelementptr inbounds %"class.micro::ops::DequantizeOp", ptr %15, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  %79 = load i32, ptr %14, align 4, !tbaa !21
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %78, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !25
  %83 = sext i8 %82 to i32
  %84 = load i32, ptr %11, align 4, !tbaa !21
  %85 = sub nsw i32 %83, %84
  %86 = sitofp i32 %85 to float
  %87 = fmul float %76, %86
  %88 = getelementptr inbounds %"class.micro::ops::DequantizeOp", ptr %15, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = load i32, ptr %14, align 4, !tbaa !21
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds float, ptr %89, i64 %91
  store float %87, ptr %92, align 4, !tbaa !19
  br label %93

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

96:                                               ; preds = %74
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  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 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %97

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

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

104:                                              ; 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 @_ZN5micro9framework8Operator20GetInputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #2

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 = { 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 = !{!"_ZTSN5micro3ops12DequantizeOpE", !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 = !{!7, !7, i64 0}
!26 = !{!10, !6, i64 56}
!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 [78 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 @_ZN5micro3ops12DequantizeOp3RunEv(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) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str, i32 noundef 37, 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) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  resume { ptr, i32 } %19

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

21:                                               ; preds = %1
  %22 = tail call i64 @_ZN5micro9framework8Operator20GetInputQuantizeInfoEj(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 = load i32, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %.lr.ph27, label %.lr.ph

.lr.ph:                                           ; preds = %21
  %25 = load ptr, ptr %5, align 8, !tbaa !12
  %wide.trip.count = zext i32 %24 to i64
  %min.iters.check = icmp ult i32 %24, 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 ], [ %31, %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 ], [ %28, %vector.body ]
  %vec.phi36 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %29, %vector.body ]
  %26 = getelementptr inbounds i32, ptr %25, i64 %index
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load = load <4 x i32>, ptr %26, align 4, !tbaa !13
  %wide.load37 = load <4 x i32>, ptr %27, align 4, !tbaa !13
  %28 = mul <4 x i32> %wide.load, %vec.phi
  %29 = mul <4 x i32> %wide.load37, %vec.phi36
  %index.next = add nuw i64 %index, 8
  %30 = icmp eq i64 %index.next, %n.vec
  br i1 %30, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = mul <4 x i32> %29, %28
  %31 = 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 [ %31, %middle.block ], [ %62, %scalar.ph ]
  %32 = icmp sgt i32 %.lcssa, 0
  br i1 %32, label %.lr.ph27, label %.loopexit

.lr.ph27:                                         ; preds = %21, %.preheader
  %.019.lcssa35 = phi i32 [ %.lcssa, %.preheader ], [ 1, %21 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = getelementptr inbounds i8, ptr %0, i64 56
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %wide.trip.count32 = zext nneg i32 %.019.lcssa35 to i64
  %min.iters.check41 = icmp ult i32 %.019.lcssa35, 8
  br i1 %min.iters.check41, label %scalar.ph40.preheader, label %vector.memcheck

scalar.ph40.preheader:                            ; preds = %middle.block39, %vector.memcheck, %.lr.ph27
  %indvars.iv29.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph27 ], [ %n.vec44, %middle.block39 ]
  %xtraiter = and i64 %wide.trip.count32, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph40.prol.loopexit, label %scalar.ph40.prol

scalar.ph40.prol:                                 ; preds = %scalar.ph40.preheader
  %37 = getelementptr inbounds i8, ptr %34, i64 %indvars.iv29.ph
  %38 = load i8, ptr %37, align 1, !tbaa !20
  %39 = sext i8 %38 to i32
  %40 = sub nsw i32 %39, %.sroa.4.0.extract.trunc
  %41 = sitofp i32 %40 to float
  %42 = fmul float %23, %41
  %43 = getelementptr inbounds float, ptr %36, i64 %indvars.iv29.ph
  store float %42, ptr %43, align 4, !tbaa !21
  %indvars.iv.next30.prol = or disjoint i64 %indvars.iv29.ph, 1
  br label %scalar.ph40.prol.loopexit

scalar.ph40.prol.loopexit:                        ; preds = %scalar.ph40.prol, %scalar.ph40.preheader
  %indvars.iv29.unr = phi i64 [ %indvars.iv29.ph, %scalar.ph40.preheader ], [ %indvars.iv.next30.prol, %scalar.ph40.prol ]
  %44 = add nsw i64 %wide.trip.count32, -1
  %45 = icmp eq i64 %indvars.iv29.ph, %44
  br i1 %45, label %.loopexit, label %scalar.ph40

vector.memcheck:                                  ; preds = %.lr.ph27
  %46 = shl nuw nsw i64 %wide.trip.count32, 2
  %scevgep = getelementptr i8, ptr %36, i64 %46
  %scevgep38 = getelementptr i8, ptr %34, i64 %wide.trip.count32
  %bound0 = icmp ult ptr %36, %scevgep38
  %bound1 = icmp ult ptr %34, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph40.preheader, label %vector.ph42

vector.ph42:                                      ; preds = %vector.memcheck
  %n.vec44 = and i64 %wide.trip.count32, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.sroa.4.0.extract.trunc, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert50 = insertelement <4 x float> poison, float %23, i64 0
  %broadcast.splat51 = shufflevector <4 x float> %broadcast.splatinsert50, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body46

vector.body46:                                    ; preds = %vector.body46, %vector.ph42
  %index47 = phi i64 [ 0, %vector.ph42 ], [ %index.next52, %vector.body46 ]
  %47 = getelementptr inbounds i8, ptr %34, i64 %index47
  %48 = getelementptr inbounds i8, ptr %47, i64 4
  %wide.load48 = load <4 x i8>, ptr %47, align 1, !tbaa !20, !alias.scope !23
  %wide.load49 = load <4 x i8>, ptr %48, align 1, !tbaa !20, !alias.scope !23
  %49 = sext <4 x i8> %wide.load48 to <4 x i32>
  %50 = sext <4 x i8> %wide.load49 to <4 x i32>
  %51 = sub nsw <4 x i32> %49, %broadcast.splat
  %52 = sub nsw <4 x i32> %50, %broadcast.splat
  %53 = sitofp <4 x i32> %51 to <4 x float>
  %54 = sitofp <4 x i32> %52 to <4 x float>
  %55 = fmul <4 x float> %broadcast.splat51, %53
  %56 = fmul <4 x float> %broadcast.splat51, %54
  %57 = getelementptr inbounds float, ptr %36, i64 %index47
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  store <4 x float> %55, ptr %57, align 4, !tbaa !21, !alias.scope !26, !noalias !23
  store <4 x float> %56, ptr %58, align 4, !tbaa !21, !alias.scope !26, !noalias !23
  %index.next52 = add nuw i64 %index47, 8
  %59 = icmp eq i64 %index.next52, %n.vec44
  br i1 %59, label %middle.block39, label %vector.body46, !llvm.loop !28

middle.block39:                                   ; preds = %vector.body46
  %cmp.n53 = icmp eq i64 %n.vec44, %wide.trip.count32
  br i1 %cmp.n53, label %.loopexit, label %scalar.ph40.preheader

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 [ %62, %scalar.ph ], [ %.01924.ph, %scalar.ph.preheader ]
  %60 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = mul nsw i32 %61, %.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 !29

scalar.ph40:                                      ; preds = %scalar.ph40.prol.loopexit, %scalar.ph40
  %indvars.iv29 = phi i64 [ %indvars.iv.next30.1, %scalar.ph40 ], [ %indvars.iv29.unr, %scalar.ph40.prol.loopexit ]
  %63 = getelementptr inbounds i8, ptr %34, i64 %indvars.iv29
  %64 = load i8, ptr %63, align 1, !tbaa !20
  %65 = sext i8 %64 to i32
  %66 = sub nsw i32 %65, %.sroa.4.0.extract.trunc
  %67 = sitofp i32 %66 to float
  %68 = fmul float %23, %67
  %69 = getelementptr inbounds float, ptr %36, i64 %indvars.iv29
  store float %68, ptr %69, align 4, !tbaa !21
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %70 = getelementptr inbounds i8, ptr %34, i64 %indvars.iv.next30
  %71 = load i8, ptr %70, align 1, !tbaa !20
  %72 = sext i8 %71 to i32
  %73 = sub nsw i32 %72, %.sroa.4.0.extract.trunc
  %74 = sitofp i32 %73 to float
  %75 = fmul float %23, %74
  %76 = getelementptr inbounds float, ptr %36, i64 %indvars.iv.next30
  store float %75, ptr %76, align 4, !tbaa !21
  %indvars.iv.next30.1 = add nuw nsw i64 %indvars.iv29, 2
  %exitcond33.not.1 = icmp eq i64 %indvars.iv.next30.1, %wide.trip.count32
  br i1 %exitcond33.not.1, label %.loopexit, label %scalar.ph40, !llvm.loop !30

.loopexit:                                        ; preds = %scalar.ph40.prol.loopexit, %scalar.ph40, %middle.block39, %.preheader, %20
  %.1 = phi i32 [ %7, %20 ], [ 0, %.preheader ], [ 0, %middle.block39 ], [ 0, %scalar.ph40 ], [ 0, %scalar.ph40.prol.loopexit ]
  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 @_ZN5micro9framework8Operator20GetInputQuantizeInfoEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #2

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"_ZTSN5micro3ops12DequantizeOpE", !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 = !{!6, !8, i64 32}
!19 = !{!6, !8, i64 56}
!20 = !{!9, !9, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !9, i64 0}
!23 = !{!24}
!24 = distinct !{!24, !25}
!25 = distinct !{!25, !"LVerDomain"}
!26 = !{!27}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !15, !16, !17}
!29 = distinct !{!29, !15, !17, !16}
!30 = distinct !{!30, !15, !16}


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