; LLVM IR from XiaoMi/mace :: micro/ops/nhwc/batch_norm.ll (ZN5micro3ops11BatchNormOp3RunEv)

; 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 }
%"class.micro::framework::ScratchBuffer" = type <{ ptr, i32, [4 x i8] }>
%"class.micro::ops::BatchNormOp" = type { %"class.micro::framework::Operator", ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, float, %"class.micro::ops::Activation" }
%"class.micro::framework::Operator" = type { ptr, ptr, ptr, ptr }
%"class.micro::ops::Activation" = type { i32, float, float }

@.str = external hidden unnamed_addr constant [74 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0 align 2

declare noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops11BatchNormOp3RunEv(ptr noundef nonnull align 8 dereferenceable(128) %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 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 %"class.micro::base::Logger", align 4
  %17 = alloca %"class.micro::base::Logger", align 4
  %18 = alloca %"class.micro::framework::ScratchBuffer", align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.micro::base::Logger", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %28 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 3
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 0, i32 noundef %29, ptr noundef %31)
  store i32 %32, ptr %4, align 4, !tbaa !17
  %33 = load i32, ptr %4, align 4, !tbaa !17
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %54

35:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef @.str, i32 noundef 51, i32 noundef 1)
  %36 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 3
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 0, i32 noundef %37, ptr noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %35
  %42 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %40)
          to label %43 unwind label %50

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef @.str.7)
          to label %45 unwind label %50

45:                                               ; preds = %43
  %46 = load i32, ptr %4, align 4, !tbaa !17
  %47 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %44, i32 noundef %46)
          to label %48 unwind label %50

48:                                               ; preds = %45
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %49 = load i32, ptr %4, align 4, !tbaa !17
  store i32 %49, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %55

50:                                               ; preds = %45, %43, %41, %35
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %274

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

55:                                               ; preds = %54, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %56 = load i32, ptr %8, align 4
  switch i32 %56, label %279 [
    i32 0, label %57
    i32 1, label %272
  ]

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %58 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !19
  store ptr %59, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %60 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 7
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  store ptr %61, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %62 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = sub i32 %63, 1
  store i32 %64, ptr %11, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %65 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = load i32, ptr %11, align 4, !tbaa !21
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %66, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !21
  store i32 %70, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %71 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = load i32, ptr %11, align 4, !tbaa !21
  %74 = call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %72, i32 noundef 0, i32 noundef %73)
  store i32 %74, ptr %13, align 4, !tbaa !21
  %75 = call noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  %76 = icmp eq i32 %75, 5
  br i1 %76, label %77, label %182

77:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %78 = call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 3)
  store ptr %78, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %79 = call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 4)
  store ptr %79, ptr %15, align 8, !tbaa !5
  %80 = call noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 3)
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %91, label %82

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef @.str, i32 noundef 64, i32 noundef 4)
  %83 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef @.str.8)
          to label %84 unwind label %87

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef @.str.9)
          to label %86 unwind label %87

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

87:                                               ; preds = %84, %82
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %181

91:                                               ; preds = %86, %77
  %92 = call noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 4)
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %103, label %94

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef @.str, i32 noundef 65, i32 noundef 4)
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef @.str.10)
          to label %96 unwind label %99

96:                                               ; preds = %94
  %97 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef @.str.11)
          to label %98 unwind label %99

98:                                               ; preds = %96
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %103

99:                                               ; preds = %96, %94
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %181

103:                                              ; preds = %98, %91
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %104 = getelementptr inbounds %"class.micro::framework::Operator", ptr %27, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !22
  call void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12) %18, ptr noundef %105)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %106 = load i32, ptr %12, align 4, !tbaa !21
  %107 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %18, i32 noundef %106)
          to label %108 unwind label %117

108:                                              ; preds = %103
  store ptr %107, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %109 = load i32, ptr %12, align 4, !tbaa !21
  %110 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %18, i32 noundef %109)
          to label %111 unwind label %121

111:                                              ; preds = %108
  store ptr %110, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !21
  br label %112

112:                                              ; preds = %169, %111
  %113 = load i32, ptr %21, align 4, !tbaa !21
  %114 = load i32, ptr %12, align 4, !tbaa !21
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %125, label %116

116:                                              ; preds = %112
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %176

117:                                              ; preds = %103
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %6, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %7, align 4
  br label %180

121:                                              ; preds = %108
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %6, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %7, align 4
  br label %179

125:                                              ; preds = %112
  %126 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !19
  %128 = load i32, ptr %21, align 4, !tbaa !21
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %127, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !23
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = load i32, ptr %21, align 4, !tbaa !21
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds float, ptr %132, i64 %134
  %136 = load float, ptr %135, align 4, !tbaa !23
  %137 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 11
  %138 = load float, ptr %137, align 8, !tbaa !24
  %139 = fadd float %136, %138
  %140 = invoke noundef float @_ZN5micro4base4sqrtEf(float noundef %139)
          to label %141 unwind label %172

141:                                              ; preds = %125
  %142 = fdiv float %131, %140
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  %144 = load i32, ptr %21, align 4, !tbaa !21
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds float, ptr %143, i64 %145
  store float %142, ptr %146, align 4, !tbaa !23
  %147 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 7
  %148 = load ptr, ptr %147, align 8, !tbaa !20
  %149 = load i32, ptr %21, align 4, !tbaa !21
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds float, ptr %148, i64 %150
  %152 = load float, ptr %151, align 4, !tbaa !23
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load i32, ptr %21, align 4, !tbaa !21
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds float, ptr %153, i64 %155
  %157 = load float, ptr %156, align 4, !tbaa !23
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = load i32, ptr %21, align 4, !tbaa !21
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds float, ptr %158, i64 %160
  %162 = load float, ptr %161, align 4, !tbaa !23
  %163 = fneg float %157
  %164 = call float @llvm.fmuladd.f32(float %163, float %162, float %152)
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = load i32, ptr %21, align 4, !tbaa !21
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds float, ptr %165, i64 %167
  store float %164, ptr %168, align 4, !tbaa !23
  br label %169

169:                                              ; preds = %141
  %170 = load i32, ptr %21, align 4, !tbaa !21
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %21, align 4, !tbaa !21
  br label %112, !llvm.loop !25

172:                                              ; preds = %125
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %6, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %179

176:                                              ; preds = %116
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %177, ptr %9, align 8, !tbaa !5
  %178 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %178, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %182

179:                                              ; preds = %172, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %180

180:                                              ; preds = %179, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %181

181:                                              ; preds = %180, %99, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %271

182:                                              ; preds = %176, %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !21
  br label %183

183:                                              ; preds = %228, %182
  %184 = load i32, ptr %22, align 4, !tbaa !21
  %185 = load i32, ptr %13, align 4, !tbaa !21
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %231

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %189 = load i32, ptr %22, align 4, !tbaa !21
  %190 = load i32, ptr %12, align 4, !tbaa !21
  %191 = mul nsw i32 %189, %190
  store i32 %191, ptr %23, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !21
  br label %192

192:                                              ; preds = %224, %188
  %193 = load i32, ptr %24, align 4, !tbaa !21
  %194 = load i32, ptr %12, align 4, !tbaa !21
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %227

197:                                              ; preds = %192
  %198 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 1
  %199 = load ptr, ptr %198, align 8, !tbaa !27
  %200 = load i32, ptr %23, align 4, !tbaa !21
  %201 = load i32, ptr %24, align 4, !tbaa !21
  %202 = add nsw i32 %200, %201
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds float, ptr %199, i64 %203
  %205 = load float, ptr %204, align 4, !tbaa !23
  %206 = load ptr, ptr %9, align 8, !tbaa !5
  %207 = load i32, ptr %24, align 4, !tbaa !21
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds float, ptr %206, i64 %208
  %210 = load float, ptr %209, align 4, !tbaa !23
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = load i32, ptr %24, align 4, !tbaa !21
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds float, ptr %211, i64 %213
  %215 = load float, ptr %214, align 4, !tbaa !23
  %216 = call float @llvm.fmuladd.f32(float %205, float %210, float %215)
  %217 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 10
  %218 = load ptr, ptr %217, align 8, !tbaa !28
  %219 = load i32, ptr %23, align 4, !tbaa !21
  %220 = load i32, ptr %24, align 4, !tbaa !21
  %221 = add nsw i32 %219, %220
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds float, ptr %218, i64 %222
  store float %216, ptr %223, align 4, !tbaa !23
  br label %224

224:                                              ; preds = %197
  %225 = load i32, ptr %24, align 4, !tbaa !21
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %24, align 4, !tbaa !21
  br label %192, !llvm.loop !29

227:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %22, align 4, !tbaa !21
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %22, align 4, !tbaa !21
  br label %183, !llvm.loop !30

231:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %232 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 12
  %233 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 10
  %234 = load ptr, ptr %233, align 8, !tbaa !28
  %235 = load i32, ptr %13, align 4, !tbaa !21
  %236 = load i32, ptr %12, align 4, !tbaa !21
  %237 = mul nsw i32 %235, %236
  %238 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 10
  %239 = load ptr, ptr %238, align 8, !tbaa !28
  %240 = call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %232, ptr noundef %234, i32 noundef %237, ptr noundef %239)
  store i32 %240, ptr %25, align 4, !tbaa !17
  %241 = load i32, ptr %25, align 4, !tbaa !17
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %243, label %266

243:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef @.str, i32 noundef 86, i32 noundef 1)
  %244 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 12
  %245 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 10
  %246 = load ptr, ptr %245, align 8, !tbaa !28
  %247 = load i32, ptr %13, align 4, !tbaa !21
  %248 = load i32, ptr %12, align 4, !tbaa !21
  %249 = mul nsw i32 %247, %248
  %250 = getelementptr inbounds %"class.micro::ops::BatchNormOp", ptr %27, i32 0, i32 10
  %251 = load ptr, ptr %250, align 8, !tbaa !28
  %252 = invoke noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %244, ptr noundef %246, i32 noundef %249, ptr noundef %251)
          to label %253 unwind label %262

253:                                              ; preds = %243
  %254 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %26, i32 noundef %252)
          to label %255 unwind label %262

255:                                              ; preds = %253
  %256 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %254, ptr noundef @.str.7)
          to label %257 unwind label %262

257:                                              ; preds = %255
  %258 = load i32, ptr %25, align 4, !tbaa !17
  %259 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %256, i32 noundef %258)
          to label %260 unwind label %262

260:                                              ; preds = %257
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  %261 = load i32, ptr %25, align 4, !tbaa !17
  store i32 %261, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %267

262:                                              ; preds = %257, %255, %253, %243
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %6, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %7, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %271

266:                                              ; preds = %231
  store i32 0, ptr %8, align 4
  br label %267

267:                                              ; preds = %266, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %268 = load i32, ptr %8, align 4
  switch i32 %268, label %270 [
    i32 0, label %269
  ]

269:                                              ; preds = %267
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %270

270:                                              ; preds = %269, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %272

271:                                              ; preds = %262, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %274

272:                                              ; preds = %270, %55
  %273 = load i32, ptr %2, align 4
  ret i32 %273

274:                                              ; preds = %271, %50
  %275 = load ptr, ptr %6, align 8
  %276 = load i32, ptr %7, align 4
  %277 = insertvalue { ptr, i32 } poison, ptr %275, 0
  %278 = insertvalue { ptr, i32 } %277, i32 %276, 1
  resume { ptr, i32 } %278

279:                                              ; preds = %55
  unreachable
}

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

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

declare noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1

declare void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #0 align 2

declare noundef float @_ZN5micro4base4sqrtEf(float noundef) #1

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

; Function Attrs: nounwind
declare void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3

declare noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!"_ZTSN5micro3ops11BatchNormOpE", !11, i64 0, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88, !12, i64 96, !6, i64 104, !13, i64 112, !14, i64 116}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN5micro3ops10ActivationE", !15, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!"_ZTSN5micro3ops14ActivationTypeE", !7, i64 0}
!16 = !{!10, !6, i64 40}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTSN5micro10MaceStatusE", !7, i64 0}
!19 = !{!10, !6, i64 56}
!20 = !{!10, !6, i64 80}
!21 = !{!12, !12, i64 0}
!22 = !{!11, !6, i64 16}
!23 = !{!13, !13, i64 0}
!24 = !{!10, !13, i64 112}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !6, i64 32}
!28 = !{!10, !6, i64 104}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}


; 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 }
%"class.micro::framework::ScratchBuffer" = type <{ ptr, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [74 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #0 align 2

declare noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str, i32 noundef 51, i32 noundef 1)
  %13 = load i32, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %9, align 8, !tbaa !15
  %15 = invoke noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef %13, ptr noundef %14)
          to label %16 unwind label %22

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

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull @.str.7)
          to label %20 unwind label %22

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %11)
          to label %24 unwind label %22

22:                                               ; preds = %20, %18, %16, %12
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %173

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

25:                                               ; preds = %1
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %0, i64 80
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = load i32, ptr %7, align 8, !tbaa !5
  %31 = add i32 %30, -1
  %32 = load ptr, ptr %9, align 8, !tbaa !15
  %33 = zext i32 %31 to i64
  %34 = getelementptr inbounds i32, ptr %32, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = tail call noundef i32 @_ZN5micro4base16accumulate_multiIiEET_PKS2_jj(ptr noundef %32, i32 noundef 0, i32 noundef %31)
  %37 = tail call noundef i32 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %38 = icmp eq i32 %37, 5
  br i1 %38, label %39, label %96

39:                                               ; preds = %25
  %40 = tail call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 3)
  %41 = tail call noundef ptr @_ZN5micro9framework8Operator12GetInputDataIfEEPKT_j(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 4)
  %42 = tail call noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 3)
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %51, label %44

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str, i32 noundef 64, i32 noundef 4)
  %45 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str.8)
          to label %46 unwind label %49

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %45, ptr noundef nonnull @.str.9)
          to label %48 unwind label %49

48:                                               ; preds = %46
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %51

49:                                               ; preds = %46, %44
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %173

51:                                               ; preds = %48, %39
  %52 = call noundef i32 @_ZN5micro9framework8Operator20GetInputShapeDimSizeEj(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 4)
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %61, label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str, i32 noundef 65, i32 noundef 4)
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str.10)
          to label %56 unwind label %59

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %55, ptr noundef nonnull @.str.11)
          to label %58 unwind label %59

58:                                               ; preds = %56
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %61

59:                                               ; preds = %56, %54
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %173

61:                                               ; preds = %58, %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %62 = getelementptr inbounds i8, ptr %0, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  call void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef %63)
  %64 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef %35)
          to label %65 unwind label %69

65:                                               ; preds = %61
  %66 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef %35)
          to label %.preheader unwind label %71

.preheader:                                       ; preds = %65
  %67 = icmp sgt i32 %35, 0
  br i1 %67, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %68 = getelementptr inbounds i8, ptr %0, i64 112
  %wide.trip.count = zext nneg i32 %35 to i64
  br label %73

._crit_edge:                                      ; preds = %82, %.preheader
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %96

69:                                               ; preds = %61
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %95

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %95

73:                                               ; preds = %.lr.ph, %82
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %82 ]
  %74 = load ptr, ptr %26, align 8, !tbaa !16
  %75 = getelementptr inbounds float, ptr %74, i64 %indvars.iv
  %76 = load float, ptr %75, align 4, !tbaa !20
  %77 = getelementptr inbounds float, ptr %41, i64 %indvars.iv
  %78 = load float, ptr %77, align 4, !tbaa !20
  %79 = load float, ptr %68, align 8, !tbaa !21
  %80 = fadd float %78, %79
  %81 = invoke noundef float @_ZN5micro4base4sqrtEf(float noundef %80)
          to label %82 unwind label %93

82:                                               ; preds = %73
  %83 = fdiv float %76, %81
  %84 = getelementptr inbounds float, ptr %64, i64 %indvars.iv
  store float %83, ptr %84, align 4, !tbaa !20
  %85 = load ptr, ptr %28, align 8, !tbaa !17
  %86 = getelementptr inbounds float, ptr %85, i64 %indvars.iv
  %87 = load float, ptr %86, align 4, !tbaa !20
  %88 = getelementptr inbounds float, ptr %40, i64 %indvars.iv
  %89 = load float, ptr %88, align 4, !tbaa !20
  %90 = fneg float %89
  %91 = call float @llvm.fmuladd.f32(float %90, float %83, float %87)
  %92 = getelementptr inbounds float, ptr %66, i64 %indvars.iv
  store float %91, ptr %92, align 4, !tbaa !20
  %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 %._crit_edge, label %73, !llvm.loop !22

93:                                               ; preds = %73
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %95

95:                                               ; preds = %71, %93, %69
  %.pn.pn = phi { ptr, i32 } [ %70, %69 ], [ %94, %93 ], [ %72, %71 ]
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %173

96:                                               ; preds = %._crit_edge, %25
  %.067 = phi ptr [ %66, %._crit_edge ], [ %29, %25 ]
  %.066 = phi ptr [ %64, %._crit_edge ], [ %27, %25 ]
  %.06698 = ptrtoint ptr %.066 to i64
  %.067100 = ptrtoint ptr %.067 to i64
  %97 = icmp sgt i32 %36, 0
  br i1 %97, label %.lr.ph84, label %.._crit_edge85_crit_edge

.._crit_edge85_crit_edge:                         ; preds = %96
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 104
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !24
  br label %._crit_edge85

.lr.ph84:                                         ; preds = %96
  %98 = icmp sgt i32 %35, 0
  %99 = getelementptr inbounds i8, ptr %0, i64 32
  %100 = load ptr, ptr %99, align 8
  %101 = getelementptr inbounds i8, ptr %0, i64 104
  %102 = load ptr, ptr %101, align 8
  br i1 %98, label %.lr.ph80.us.preheader, label %._crit_edge85

.lr.ph80.us.preheader:                            ; preds = %.lr.ph84
  %103 = ptrtoint ptr %102 to i64
  %104 = ptrtoint ptr %100 to i64
  %105 = zext nneg i32 %35 to i64
  %wide.trip.count96 = zext nneg i32 %36 to i64
  %106 = sub i64 %103, %104
  %107 = sub i64 %103, %.06698
  %108 = shl nuw nsw i64 %105, 2
  %109 = sub i64 %103, %.067100
  %min.iters.check = icmp ult i32 %35, 8
  %diff.check = icmp ult i64 %106, 32
  %n.vec = and i64 %105, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %105
  %xtraiter = and i64 %105, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %110 = add nsw i64 %105, -1
  br label %.lr.ph80.us

.lr.ph80.us:                                      ; preds = %.lr.ph80.us.preheader, %._crit_edge81.us
  %indvars.iv93 = phi i64 [ 0, %.lr.ph80.us.preheader ], [ %indvars.iv.next94, %._crit_edge81.us ]
  %111 = mul nuw nsw i64 %indvars.iv93, %105
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph80.us
  %112 = mul i64 %108, %indvars.iv93
  %113 = add i64 %109, %112
  %114 = add i64 %107, %112
  %diff.check99 = icmp ult i64 %114, 32
  %conflict.rdx = or i1 %diff.check, %diff.check99
  %diff.check101 = icmp ult i64 %113, 32
  %conflict.rdx102 = or i1 %conflict.rdx, %diff.check101
  br i1 %conflict.rdx102, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %115 = add nuw nsw i64 %index, %111
  %116 = getelementptr inbounds float, ptr %100, i64 %115
  %117 = getelementptr inbounds i8, ptr %116, i64 16
  %wide.load = load <4 x float>, ptr %116, align 4, !tbaa !20
  %wide.load103 = load <4 x float>, ptr %117, align 4, !tbaa !20
  %118 = getelementptr inbounds float, ptr %.066, i64 %index
  %119 = getelementptr inbounds i8, ptr %118, i64 16
  %wide.load104 = load <4 x float>, ptr %118, align 4, !tbaa !20
  %wide.load105 = load <4 x float>, ptr %119, align 4, !tbaa !20
  %120 = getelementptr inbounds float, ptr %.067, i64 %index
  %121 = getelementptr inbounds i8, ptr %120, i64 16
  %wide.load106 = load <4 x float>, ptr %120, align 4, !tbaa !20
  %wide.load107 = load <4 x float>, ptr %121, align 4, !tbaa !20
  %122 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load, <4 x float> %wide.load104, <4 x float> %wide.load106)
  %123 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load103, <4 x float> %wide.load105, <4 x float> %wide.load107)
  %124 = getelementptr inbounds float, ptr %102, i64 %115
  %125 = getelementptr inbounds i8, ptr %124, i64 16
  store <4 x float> %122, ptr %124, align 4, !tbaa !20
  store <4 x float> %123, ptr %125, align 4, !tbaa !20
  %index.next = add nuw i64 %index, 8
  %126 = icmp eq i64 %index.next, %n.vec
  br i1 %126, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge81.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph80.us
  %indvars.iv88.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph80.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %127 = add nuw nsw i64 %indvars.iv88.ph, %111
  %128 = getelementptr inbounds float, ptr %100, i64 %127
  %129 = load float, ptr %128, align 4, !tbaa !20
  %130 = getelementptr inbounds float, ptr %.066, i64 %indvars.iv88.ph
  %131 = load float, ptr %130, align 4, !tbaa !20
  %132 = getelementptr inbounds float, ptr %.067, i64 %indvars.iv88.ph
  %133 = load float, ptr %132, align 4, !tbaa !20
  %134 = call float @llvm.fmuladd.f32(float %129, float %131, float %133)
  %135 = getelementptr inbounds float, ptr %102, i64 %127
  store float %134, ptr %135, align 4, !tbaa !20
  %indvars.iv.next89.prol = or disjoint i64 %indvars.iv88.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv88.unr = phi i64 [ %indvars.iv88.ph, %scalar.ph.preheader ], [ %indvars.iv.next89.prol, %scalar.ph.prol ]
  %136 = icmp eq i64 %indvars.iv88.ph, %110
  br i1 %136, label %._crit_edge81.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv88 = phi i64 [ %indvars.iv.next89.1, %scalar.ph ], [ %indvars.iv88.unr, %scalar.ph.prol.loopexit ]
  %137 = add nuw nsw i64 %indvars.iv88, %111
  %138 = getelementptr inbounds float, ptr %100, i64 %137
  %139 = load float, ptr %138, align 4, !tbaa !20
  %140 = getelementptr inbounds float, ptr %.066, i64 %indvars.iv88
  %141 = load float, ptr %140, align 4, !tbaa !20
  %142 = getelementptr inbounds float, ptr %.067, i64 %indvars.iv88
  %143 = load float, ptr %142, align 4, !tbaa !20
  %144 = call float @llvm.fmuladd.f32(float %139, float %141, float %143)
  %145 = getelementptr inbounds float, ptr %102, i64 %137
  store float %144, ptr %145, align 4, !tbaa !20
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %146 = add nuw nsw i64 %indvars.iv.next89, %111
  %147 = getelementptr inbounds float, ptr %100, i64 %146
  %148 = load float, ptr %147, align 4, !tbaa !20
  %149 = getelementptr inbounds float, ptr %.066, i64 %indvars.iv.next89
  %150 = load float, ptr %149, align 4, !tbaa !20
  %151 = getelementptr inbounds float, ptr %.067, i64 %indvars.iv.next89
  %152 = load float, ptr %151, align 4, !tbaa !20
  %153 = call float @llvm.fmuladd.f32(float %148, float %150, float %152)
  %154 = getelementptr inbounds float, ptr %102, i64 %146
  store float %153, ptr %154, align 4, !tbaa !20
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88, 2
  %exitcond92.not.1 = icmp eq i64 %indvars.iv.next89.1, %105
  br i1 %exitcond92.not.1, label %._crit_edge81.us, label %scalar.ph, !llvm.loop !28

._crit_edge81.us:                                 ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge85, label %.lr.ph80.us, !llvm.loop !29

._crit_edge85:                                    ; preds = %._crit_edge81.us, %.lr.ph84, %.._crit_edge85_crit_edge
  %155 = phi ptr [ %.pre, %.._crit_edge85_crit_edge ], [ %102, %.lr.ph84 ], [ %102, %._crit_edge81.us ]
  %156 = getelementptr inbounds i8, ptr %0, i64 116
  %157 = mul nsw i32 %36, %35
  %158 = call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %156, ptr noundef %155, i32 noundef %157, ptr noundef %155)
  %.not70 = icmp eq i32 %158, 0
  br i1 %.not70, label %172, label %159

159:                                              ; preds = %._crit_edge85
  %160 = getelementptr inbounds i8, ptr %0, i64 104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str, i32 noundef 86, i32 noundef 1)
  %161 = load ptr, ptr %160, align 8, !tbaa !24
  %162 = invoke noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %156, ptr noundef %161, i32 noundef %157, ptr noundef %161)
          to label %163 unwind label %170

163:                                              ; preds = %159
  %164 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %162)
          to label %165 unwind label %170

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef nonnull @.str.7)
          to label %167 unwind label %170

167:                                              ; preds = %165
  %168 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %166, i32 noundef %158)
          to label %169 unwind label %170

169:                                              ; preds = %167
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %172

170:                                              ; preds = %167, %165, %163, %159
  %171 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %173

172:                                              ; preds = %169, %._crit_edge85, %24
  %.3 = phi i32 [ %11, %24 ], [ %158, %169 ], [ 0, %._crit_edge85 ]
  ret i32 %.3

173:                                              ; preds = %170, %95, %59, %49, %22
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %23, %22 ], [ %171, %170 ], [ %.pn.pn, %95 ], [ %60, %59 ], [ %50, %49 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

; 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 @_ZN5micro9framework8Operator12GetInputSizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3

declare noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x 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 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 48}
!6 = !{!"_ZTSN5micro3ops11BatchNormOpE", !7, i64 0, !8, i64 32, !8, i64 40, !11, i64 48, !8, i64 56, !8, i64 64, !11, i64 72, !8, i64 80, !8, i64 88, !11, i64 96, !8, i64 104, !12, i64 112, !13, i64 116}
!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 = !{!"float", !9, i64 0}
!13 = !{!"_ZTSN5micro3ops10ActivationE", !14, i64 0, !12, i64 4, !12, i64 8}
!14 = !{!"_ZTSN5micro3ops14ActivationTypeE", !9, i64 0}
!15 = !{!6, !8, i64 40}
!16 = !{!6, !8, i64 56}
!17 = !{!6, !8, i64 80}
!18 = !{!11, !11, i64 0}
!19 = !{!7, !8, i64 16}
!20 = !{!12, !12, i64 0}
!21 = !{!6, !12, i64 112}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !8, i64 104}
!25 = distinct !{!25, !23, !26, !27}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !23, !26}
!29 = distinct !{!29, !23}


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