; LLVM IR from XiaoMi/mace :: micro/ops/nhwc/pooling_ref.ll (ZN5micro3ops12PoolingRefOp10AvgPoolingEPKfPKiS5_S5_S5_)

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5micro3ops12PoolingRefOp10AvgPoolingEPKfPKiS5_S5_S5_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.micro::framework::ScratchBuffer", align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %45 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds i32, ptr %46, i64 0
  %48 = load i32, ptr %47, align 4, !tbaa !17
  store i32 %48, ptr %13, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %49 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 5
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds i32, ptr %50, i64 3
  %52 = load i32, ptr %51, align 4, !tbaa !17
  store i32 %52, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %53 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 5
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds i32, ptr %54, i64 1
  %56 = load i32, ptr %55, align 4, !tbaa !17
  store i32 %56, ptr %15, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %57 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 5
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds i32, ptr %58, i64 2
  %60 = load i32, ptr %59, align 4, !tbaa !17
  store i32 %60, ptr %16, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %61 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = getelementptr inbounds i32, ptr %62, i64 3
  %64 = load i32, ptr %63, align 4, !tbaa !17
  store i32 %64, ptr %17, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %65 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !18
  %67 = getelementptr inbounds i32, ptr %66, i64 1
  %68 = load i32, ptr %67, align 4, !tbaa !17
  store i32 %68, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %69 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = getelementptr inbounds i32, ptr %70, i64 2
  %72 = load i32, ptr %71, align 4, !tbaa !17
  store i32 %72, ptr %19, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %73 = getelementptr inbounds %"class.micro::framework::Operator", ptr %44, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  call void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12) %20, ptr noundef %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %75 = load i32, ptr %17, align 4, !tbaa !17
  %76 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %20, i32 noundef %75)
          to label %77 unwind label %86

77:                                               ; preds = %6
  store ptr %76, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %78 = load i32, ptr %17, align 4, !tbaa !17
  %79 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIjEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %20, i32 noundef %78)
          to label %80 unwind label %90

80:                                               ; preds = %77
  store ptr %79, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !17
  br label %81

81:                                               ; preds = %288, %80
  %82 = load i32, ptr %25, align 4, !tbaa !17
  %83 = load i32, ptr %13, align 4, !tbaa !17
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %94, label %85

85:                                               ; preds = %81
  store i32 2, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %291

86:                                               ; preds = %6
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %22, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %23, align 4
  br label %292

90:                                               ; preds = %77
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %22, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %292

94:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %95 = load i32, ptr %25, align 4, !tbaa !17
  %96 = load i32, ptr %15, align 4, !tbaa !17
  %97 = mul nsw i32 %95, %96
  store i32 %97, ptr %27, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %98 = load i32, ptr %25, align 4, !tbaa !17
  %99 = load i32, ptr %18, align 4, !tbaa !17
  %100 = mul nsw i32 %98, %99
  store i32 %100, ptr %28, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 0, ptr %29, align 4, !tbaa !17
  br label %101

101:                                              ; preds = %284, %94
  %102 = load i32, ptr %29, align 4, !tbaa !17
  %103 = load i32, ptr %15, align 4, !tbaa !17
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 5, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %287

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %107 = load i32, ptr %27, align 4, !tbaa !17
  %108 = load i32, ptr %29, align 4, !tbaa !17
  %109 = add nsw i32 %107, %108
  %110 = load i32, ptr %16, align 4, !tbaa !17
  %111 = mul nsw i32 %109, %110
  store i32 %111, ptr %30, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %112 = load i32, ptr %29, align 4, !tbaa !17
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds i32, ptr %113, i64 0
  %115 = load i32, ptr %114, align 4, !tbaa !17
  %116 = mul nsw i32 %112, %115
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds i32, ptr %117, i64 0
  %119 = load i32, ptr %118, align 4, !tbaa !17
  %120 = sub nsw i32 %116, %119
  store i32 %120, ptr %31, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  store i32 0, ptr %32, align 4, !tbaa !17
  br label %121

121:                                              ; preds = %280, %106
  %122 = load i32, ptr %32, align 4, !tbaa !17
  %123 = load i32, ptr %16, align 4, !tbaa !17
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 8, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %283

126:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %127 = load i32, ptr %30, align 4, !tbaa !17
  %128 = load i32, ptr %32, align 4, !tbaa !17
  %129 = add nsw i32 %127, %128
  %130 = load i32, ptr %14, align 4, !tbaa !17
  %131 = mul nsw i32 %129, %130
  store i32 %131, ptr %33, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  %132 = load i32, ptr %32, align 4, !tbaa !17
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds i32, ptr %133, i64 1
  %135 = load i32, ptr %134, align 4, !tbaa !17
  %136 = mul nsw i32 %132, %135
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = getelementptr inbounds i32, ptr %137, i64 1
  %139 = load i32, ptr %138, align 4, !tbaa !17
  %140 = sub nsw i32 %136, %139
  store i32 %140, ptr %34, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  store i32 0, ptr %35, align 4, !tbaa !17
  br label %141

141:                                              ; preds = %155, %126
  %142 = load i32, ptr %35, align 4, !tbaa !17
  %143 = load i32, ptr %14, align 4, !tbaa !17
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  br label %158

146:                                              ; preds = %141
  %147 = load ptr, ptr %21, align 8, !tbaa !5
  %148 = load i32, ptr %35, align 4, !tbaa !17
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds float, ptr %147, i64 %149
  store float 0.000000e+00, ptr %150, align 4, !tbaa !20
  %151 = load ptr, ptr %24, align 8, !tbaa !5
  %152 = load i32, ptr %35, align 4, !tbaa !17
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  store i32 0, ptr %154, align 4, !tbaa !17
  br label %155

155:                                              ; preds = %146
  %156 = load i32, ptr %35, align 4, !tbaa !17
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %35, align 4, !tbaa !17
  br label %141, !llvm.loop !22

158:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  store i32 0, ptr %36, align 4, !tbaa !17
  br label %159

159:                                              ; preds = %247, %158
  %160 = load i32, ptr %36, align 4, !tbaa !17
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds i32, ptr %161, i64 0
  %163 = load i32, ptr %162, align 4, !tbaa !17
  %164 = icmp slt i32 %160, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %159
  store i32 14, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  br label %250

166:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #4
  %167 = load i32, ptr %31, align 4, !tbaa !17
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = getelementptr inbounds i32, ptr %168, i64 0
  %170 = load i32, ptr %169, align 4, !tbaa !17
  %171 = load i32, ptr %36, align 4, !tbaa !17
  %172 = mul nsw i32 %170, %171
  %173 = add nsw i32 %167, %172
  store i32 %173, ptr %37, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #4
  %174 = load i32, ptr %28, align 4, !tbaa !17
  %175 = load i32, ptr %37, align 4, !tbaa !17
  %176 = add nsw i32 %174, %175
  %177 = load i32, ptr %19, align 4, !tbaa !17
  %178 = mul nsw i32 %176, %177
  store i32 %178, ptr %38, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #4
  store i32 0, ptr %39, align 4, !tbaa !17
  br label %179

179:                                              ; preds = %243, %166
  %180 = load i32, ptr %39, align 4, !tbaa !17
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds i32, ptr %181, i64 1
  %183 = load i32, ptr %182, align 4, !tbaa !17
  %184 = icmp slt i32 %180, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %179
  store i32 17, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #4
  br label %246

186:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #4
  %187 = load i32, ptr %34, align 4, !tbaa !17
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = getelementptr inbounds i32, ptr %188, i64 1
  %190 = load i32, ptr %189, align 4, !tbaa !17
  %191 = load i32, ptr %39, align 4, !tbaa !17
  %192 = mul nsw i32 %190, %191
  %193 = add nsw i32 %187, %192
  store i32 %193, ptr %40, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #4
  %194 = load i32, ptr %38, align 4, !tbaa !17
  %195 = load i32, ptr %40, align 4, !tbaa !17
  %196 = add nsw i32 %194, %195
  %197 = load i32, ptr %17, align 4, !tbaa !17
  %198 = mul nsw i32 %196, %197
  store i32 %198, ptr %41, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #4
  store i32 0, ptr %42, align 4, !tbaa !17
  br label %199

199:                                              ; preds = %239, %186
  %200 = load i32, ptr %42, align 4, !tbaa !17
  %201 = load i32, ptr %14, align 4, !tbaa !17
  %202 = icmp slt i32 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  store i32 20, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #4
  br label %242

204:                                              ; preds = %199
  %205 = load i32, ptr %37, align 4, !tbaa !17
  %206 = icmp sge i32 %205, 0
  br i1 %206, label %207, label %238

207:                                              ; preds = %204
  %208 = load i32, ptr %37, align 4, !tbaa !17
  %209 = load i32, ptr %18, align 4, !tbaa !17
  %210 = icmp slt i32 %208, %209
  br i1 %210, label %211, label %238

211:                                              ; preds = %207
  %212 = load i32, ptr %40, align 4, !tbaa !17
  %213 = icmp sge i32 %212, 0
  br i1 %213, label %214, label %238

214:                                              ; preds = %211
  %215 = load i32, ptr %40, align 4, !tbaa !17
  %216 = load i32, ptr %19, align 4, !tbaa !17
  %217 = icmp slt i32 %215, %216
  br i1 %217, label %218, label %238

218:                                              ; preds = %214
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = load i32, ptr %41, align 4, !tbaa !17
  %221 = load i32, ptr %42, align 4, !tbaa !17
  %222 = add nsw i32 %220, %221
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds float, ptr %219, i64 %223
  %225 = load float, ptr %224, align 4, !tbaa !20
  %226 = load ptr, ptr %21, align 8, !tbaa !5
  %227 = load i32, ptr %42, align 4, !tbaa !17
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds float, ptr %226, i64 %228
  %230 = load float, ptr %229, align 4, !tbaa !20
  %231 = fadd float %230, %225
  store float %231, ptr %229, align 4, !tbaa !20
  %232 = load ptr, ptr %24, align 8, !tbaa !5
  %233 = load i32, ptr %42, align 4, !tbaa !17
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i32, ptr %232, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !17
  %237 = add i32 %236, 1
  store i32 %237, ptr %235, align 4, !tbaa !17
  br label %238

238:                                              ; preds = %218, %214, %211, %207, %204
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %42, align 4, !tbaa !17
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %42, align 4, !tbaa !17
  br label %199, !llvm.loop !24

242:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #4
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %39, align 4, !tbaa !17
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %39, align 4, !tbaa !17
  br label %179, !llvm.loop !25

246:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #4
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %36, align 4, !tbaa !17
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %36, align 4, !tbaa !17
  br label %159, !llvm.loop !26

250:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #4
  store i32 0, ptr %43, align 4, !tbaa !17
  br label %251

251:                                              ; preds = %276, %250
  %252 = load i32, ptr %43, align 4, !tbaa !17
  %253 = load i32, ptr %14, align 4, !tbaa !17
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 23, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #4
  br label %279

256:                                              ; preds = %251
  %257 = load ptr, ptr %21, align 8, !tbaa !5
  %258 = load i32, ptr %43, align 4, !tbaa !17
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds float, ptr %257, i64 %259
  %261 = load float, ptr %260, align 4, !tbaa !20
  %262 = load ptr, ptr %24, align 8, !tbaa !5
  %263 = load i32, ptr %43, align 4, !tbaa !17
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds i32, ptr %262, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !17
  %267 = uitofp i32 %266 to float
  %268 = fdiv float %261, %267
  %269 = getelementptr inbounds %"class.micro::ops::PoolingBase", ptr %44, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !27
  %271 = load i32, ptr %33, align 4, !tbaa !17
  %272 = load i32, ptr %43, align 4, !tbaa !17
  %273 = add nsw i32 %271, %272
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds float, ptr %270, i64 %274
  store float %268, ptr %275, align 4, !tbaa !20
  br label %276

276:                                              ; preds = %256
  %277 = load i32, ptr %43, align 4, !tbaa !17
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %43, align 4, !tbaa !17
  br label %251, !llvm.loop !28

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

280:                                              ; preds = %279
  %281 = load i32, ptr %32, align 4, !tbaa !17
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %32, align 4, !tbaa !17
  br label %121, !llvm.loop !29

283:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %284

284:                                              ; preds = %283
  %285 = load i32, ptr %29, align 4, !tbaa !17
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %29, align 4, !tbaa !17
  br label %101, !llvm.loop !30

287:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %25, align 4, !tbaa !17
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %25, align 4, !tbaa !17
  br label %81, !llvm.loop !31

291:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret void

292:                                              ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %293

293:                                              ; preds = %292
  %294 = load ptr, ptr %22, align 8
  %295 = load i32, ptr %23, align 4
  %296 = insertvalue { ptr, i32 } poison, ptr %294, 0
  %297 = insertvalue { ptr, i32 } %296, i32 %295, 1
  resume { ptr, i32 } %297
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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, !6, i64 96}
!10 = !{!"_ZTSN5micro3ops11PoolingBaseE", !11, i64 0, !6, i64 64, !6, i64 72, !14, i64 80, !6, i64 88, !6, i64 96, !14, i64 104, !6, i64 112, !7, i64 120, !15, i64 136, !16, i64 140}
!11 = !{!"_ZTSN5micro3ops12FilterOpBaseE", !12, i64 0, !13, i64 32, !6, i64 40, !7, i64 48, !7, i64 56}
!12 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"_ZTSN5micro3ops7PaddingE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5micro3ops9RoundTypeE", !7, i64 0}
!16 = !{!"_ZTSN5micro3ops11PoolingTypeE", !7, i64 0}
!17 = !{!14, !14, i64 0}
!18 = !{!10, !6, i64 72}
!19 = !{!12, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = !{!10, !6, i64 88}
!28 = distinct !{!28, !23}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !23}
!31 = distinct !{!31, !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::framework::ScratchBuffer" = type <{ ptr, i32, [4 x i8] }>

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

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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5micro3ops12PoolingRefOp10AvgPoolingEPKfPKiS5_S5_S5_(ptr nocapture noundef nonnull readonly align 8 dereferenceable(144) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.micro::framework::ScratchBuffer", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load i32, ptr %9, align 4, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %9, i64 12
  %12 = load i32, ptr %11, align 4, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %9, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %9, i64 8
  %16 = load i32, ptr %15, align 4, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = load ptr, ptr %17, align 8, !tbaa !17
  %19 = getelementptr inbounds i8, ptr %18, i64 12
  %20 = load i32, ptr %19, align 4, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %18, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %18, i64 8
  %24 = load i32, ptr %23, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  call void @_ZN5micro9framework13ScratchBufferC1EPNS_21MaceMicroEngineConfigE(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef %26)
  %27 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIfEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %7, i32 noundef %20)
          to label %28 unwind label %177

28:                                               ; preds = %6
  %29 = ptrtoint ptr %27 to i64
  %30 = invoke noundef ptr @_ZN5micro9framework13ScratchBuffer9GetBufferIjEEPT_i(ptr noundef nonnull align 8 dereferenceable(12) %7, i32 noundef %20)
          to label %.preheader95 unwind label %179

.preheader95:                                     ; preds = %28
  %31 = icmp sgt i32 %10, 0
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader95
  %32 = icmp sgt i32 %14, 0
  %33 = getelementptr inbounds i8, ptr %3, i64 4
  %34 = getelementptr inbounds i8, ptr %5, i64 4
  %35 = icmp sgt i32 %12, 0
  %36 = getelementptr inbounds i8, ptr %2, i64 4
  %37 = getelementptr inbounds i8, ptr %4, i64 4
  %38 = getelementptr inbounds i8, ptr %0, i64 88
  %39 = icmp sgt i32 %16, 0
  %or.cond = select i1 %32, i1 %39, i1 false
  br i1 %or.cond, label %.lr.ph119.us.us.preheader, label %._crit_edge

.lr.ph119.us.us.preheader:                        ; preds = %.lr.ph
  %40 = sext i32 %12 to i64
  %41 = zext nneg i32 %16 to i64
  %42 = zext nneg i32 %14 to i64
  %wide.trip.count165 = zext nneg i32 %10 to i64
  %wide.trip.count160 = zext nneg i32 %14 to i64
  %wide.trip.count155 = zext nneg i32 %16 to i64
  %wide.trip.count = zext i32 %12 to i64
  %wide.trip.count145 = zext nneg i32 %12 to i64
  %wide.trip.count150 = zext nneg i32 %12 to i64
  %43 = mul nsw i64 %40, %wide.trip.count160
  %44 = mul i64 %43, %wide.trip.count155
  %45 = shl i64 %44, 2
  %46 = mul nsw i64 %40, %wide.trip.count155
  %47 = shl i64 %46, 2
  %48 = shl nsw i64 %40, 2
  %49 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep = getelementptr i8, ptr %27, i64 %49
  %scevgep173 = getelementptr i8, ptr %1, i64 %49
  %min.iters.check194 = icmp ult i32 %12, 8
  %n.vec197 = and i64 %wide.trip.count, 2147483640
  %cmp.n202 = icmp eq i64 %n.vec197, %wide.trip.count
  %min.iters.check177 = icmp ult i32 %12, 8
  %n.vec180 = and i64 %wide.trip.count, 2147483640
  %cmp.n191 = icmp eq i64 %n.vec180, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %50 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i32 %12, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter207 = and i64 %wide.trip.count, 1
  %lcmp.mod208.not = icmp eq i64 %xtraiter207, 0
  %51 = add nsw i64 %wide.trip.count, -1
  br label %.lr.ph119.us.us

.lr.ph119.us.us:                                  ; preds = %.lr.ph119.us.us.preheader, %._crit_edge120.split.us.us.us
  %indvars.iv162 = phi i64 [ 0, %.lr.ph119.us.us.preheader ], [ %indvars.iv.next163, %._crit_edge120.split.us.us.us ]
  %52 = mul i64 %45, %indvars.iv162
  %53 = sub i64 %52, %29
  %54 = mul nuw nsw i64 %indvars.iv162, %42
  %55 = trunc i64 %indvars.iv162 to i32
  %56 = mul i32 %22, %55
  br label %.lr.ph115.us.us.us

.lr.ph115.us.us.us:                               ; preds = %._crit_edge116.us.us.us, %.lr.ph119.us.us
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %._crit_edge116.us.us.us ], [ 0, %.lr.ph119.us.us ]
  %57 = mul i64 %47, %indvars.iv157
  %58 = add i64 %53, %57
  %59 = add nuw nsw i64 %indvars.iv157, %54
  %60 = mul nuw nsw i64 %59, %41
  %61 = load i32, ptr %3, align 4, !tbaa !16
  %62 = trunc nuw nsw i64 %indvars.iv157 to i32
  %63 = mul nsw i32 %61, %62
  %64 = load i32, ptr %5, align 4, !tbaa !16
  %65 = sub nsw i32 %63, %64
  %66 = load ptr, ptr %38, align 8
  %67 = ptrtoint ptr %66 to i64
  %68 = add i64 %58, %67
  br label %69

69:                                               ; preds = %._crit_edge.us.us.us, %.lr.ph115.us.us.us
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %._crit_edge.us.us.us ], [ 0, %.lr.ph115.us.us.us ]
  %70 = mul i64 %48, %indvars.iv152
  %71 = add i64 %68, %70
  %72 = add nuw nsw i64 %indvars.iv152, %60
  %73 = mul nsw i64 %72, %40
  %74 = load i32, ptr %33, align 4, !tbaa !16
  %75 = trunc nuw nsw i64 %indvars.iv152 to i32
  %76 = mul nsw i32 %74, %75
  %77 = load i32, ptr %34, align 4, !tbaa !16
  %78 = sub nsw i32 %76, %77
  br i1 %35, label %.lr.ph.us.us.us.preheader, label %.preheader94.us.us.us

.lr.ph.us.us.us.preheader:                        ; preds = %69
  br i1 %min.iters.check194, label %.lr.ph.us.us.us.preheader206, label %vector.body199

.lr.ph.us.us.us.preheader206:                     ; preds = %middle.block192, %.lr.ph.us.us.us.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.us.us.us.preheader ], [ %n.vec197, %middle.block192 ]
  br label %.lr.ph.us.us.us

vector.body199:                                   ; preds = %.lr.ph.us.us.us.preheader, %vector.body199
  %index200 = phi i64 [ %index.next201, %vector.body199 ], [ 0, %.lr.ph.us.us.us.preheader ]
  %79 = getelementptr inbounds float, ptr %27, i64 %index200
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  store <4 x float> zeroinitializer, ptr %79, align 4, !tbaa !19
  store <4 x float> zeroinitializer, ptr %80, align 4, !tbaa !19
  %81 = getelementptr inbounds i32, ptr %30, i64 %index200
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  store <4 x i32> zeroinitializer, ptr %81, align 4, !tbaa !16
  store <4 x i32> zeroinitializer, ptr %82, align 4, !tbaa !16
  %index.next201 = add nuw i64 %index200, 8
  %83 = icmp eq i64 %index.next201, %n.vec197
  br i1 %83, label %middle.block192, label %vector.body199, !llvm.loop !21

middle.block192:                                  ; preds = %vector.body199
  br i1 %cmp.n202, label %.preheader94.us.us.us, label %.lr.ph.us.us.us.preheader206

._crit_edge.us.us.us:                             ; preds = %.lr.ph112.us.us.us.prol.loopexit, %.lr.ph112.us.us.us, %middle.block, %.preheader.us.us.us
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count155
  br i1 %exitcond156.not, label %._crit_edge116.us.us.us, label %69, !llvm.loop !25

.lr.ph112.us.us.us:                               ; preds = %.lr.ph112.us.us.us.prol.loopexit, %.lr.ph112.us.us.us
  %indvars.iv147 = phi i64 [ %indvars.iv.next148.1, %.lr.ph112.us.us.us ], [ %indvars.iv147.unr, %.lr.ph112.us.us.us.prol.loopexit ]
  %84 = getelementptr inbounds float, ptr %27, i64 %indvars.iv147
  %85 = load float, ptr %84, align 4, !tbaa !19
  %86 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv147
  %87 = load i32, ptr %86, align 4, !tbaa !16
  %88 = uitofp i32 %87 to float
  %89 = fdiv float %85, %88
  %gep169 = getelementptr float, ptr %invariant.gep168, i64 %indvars.iv147
  store float %89, ptr %gep169, align 4, !tbaa !19
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %90 = getelementptr inbounds float, ptr %27, i64 %indvars.iv.next148
  %91 = load float, ptr %90, align 4, !tbaa !19
  %92 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next148
  %93 = load i32, ptr %92, align 4, !tbaa !16
  %94 = uitofp i32 %93 to float
  %95 = fdiv float %91, %94
  %gep169.1 = getelementptr float, ptr %invariant.gep168, i64 %indvars.iv.next148
  store float %95, ptr %gep169.1, align 4, !tbaa !19
  %indvars.iv.next148.1 = add nuw nsw i64 %indvars.iv147, 2
  %exitcond151.not.1 = icmp eq i64 %indvars.iv.next148.1, %wide.trip.count150
  br i1 %exitcond151.not.1, label %._crit_edge.us.us.us, label %.lr.ph112.us.us.us, !llvm.loop !26

.lr.ph110.split.us130.us.us:                      ; preds = %.lr.ph110.us.us.us, %._crit_edge102.us.us.us
  %96 = phi i32 [ %105, %._crit_edge102.us.us.us ], [ %125, %.lr.ph110.us.us.us ]
  %97 = phi i32 [ %106, %._crit_edge102.us.us.us ], [ %175, %.lr.ph110.us.us.us ]
  %98 = phi i32 [ %107, %._crit_edge102.us.us.us ], [ %175, %.lr.ph110.us.us.us ]
  %.085109.us121.us.us = phi i32 [ %108, %._crit_edge102.us.us.us ], [ 0, %.lr.ph110.us.us.us ]
  %99 = load i32, ptr %4, align 4, !tbaa !16
  %100 = mul nsw i32 %99, %.085109.us121.us.us
  %101 = add nsw i32 %100, %65
  %102 = add nsw i32 %101, %56
  %103 = mul nsw i32 %102, %24
  %104 = icmp sgt i32 %98, 0
  br i1 %104, label %.lr.ph101.us.us.us, label %._crit_edge102.us.us.us

._crit_edge102.us.us.us.loopexit:                 ; preds = %._crit_edge.split.us.us.us.us.us.us
  %.pre167 = load i32, ptr %2, align 4, !tbaa !16
  br label %._crit_edge102.us.us.us

._crit_edge102.us.us.us:                          ; preds = %.lr.ph101.us.us.us, %._crit_edge102.us.us.us.loopexit, %.lr.ph110.split.us130.us.us
  %105 = phi i32 [ %.pre167, %._crit_edge102.us.us.us.loopexit ], [ %96, %.lr.ph110.split.us130.us.us ], [ %96, %.lr.ph101.us.us.us ]
  %106 = phi i32 [ %158, %._crit_edge102.us.us.us.loopexit ], [ %97, %.lr.ph110.split.us130.us.us ], [ %97, %.lr.ph101.us.us.us ]
  %107 = phi i32 [ %158, %._crit_edge102.us.us.us.loopexit ], [ %98, %.lr.ph110.split.us130.us.us ], [ %98, %.lr.ph101.us.us.us ]
  %108 = add nuw nsw i32 %.085109.us121.us.us, 1
  %109 = icmp slt i32 %108, %105
  br i1 %109, label %.lr.ph110.split.us130.us.us, label %.preheader.us.us.us, !llvm.loop !27

.lr.ph.us.us.us:                                  ; preds = %.lr.ph.us.us.us.preheader206, %.lr.ph.us.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.us.us.us ], [ %indvars.iv.ph, %.lr.ph.us.us.us.preheader206 ]
  %110 = getelementptr inbounds float, ptr %27, i64 %indvars.iv
  store float 0.000000e+00, ptr %110, align 4, !tbaa !19
  %111 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  store i32 0, ptr %111, align 4, !tbaa !16
  %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 %.preheader94.us.us.us, label %.lr.ph.us.us.us, !llvm.loop !29

.preheader.us.us.us:                              ; preds = %._crit_edge102.us.us.us, %.lr.ph110.us.us.us, %.preheader94.us.us.us
  br i1 %35, label %.lr.ph112.us.us.us.preheader, label %._crit_edge.us.us.us

.lr.ph112.us.us.us.preheader:                     ; preds = %.preheader.us.us.us
  %invariant.gep168 = getelementptr float, ptr %66, i64 %73
  %diff.check = icmp ult i64 %71, 16
  %or.cond203 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond203, label %.lr.ph112.us.us.us.preheader205, label %vector.body

.lr.ph112.us.us.us.preheader205:                  ; preds = %middle.block, %.lr.ph112.us.us.us.preheader
  %indvars.iv147.ph = phi i64 [ 0, %.lr.ph112.us.us.us.preheader ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod208.not, label %.lr.ph112.us.us.us.prol.loopexit, label %.lr.ph112.us.us.us.prol

.lr.ph112.us.us.us.prol:                          ; preds = %.lr.ph112.us.us.us.preheader205
  %112 = getelementptr inbounds float, ptr %27, i64 %indvars.iv147.ph
  %113 = load float, ptr %112, align 4, !tbaa !19
  %114 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv147.ph
  %115 = load i32, ptr %114, align 4, !tbaa !16
  %116 = uitofp i32 %115 to float
  %117 = fdiv float %113, %116
  %gep169.prol = getelementptr float, ptr %invariant.gep168, i64 %indvars.iv147.ph
  store float %117, ptr %gep169.prol, align 4, !tbaa !19
  %indvars.iv.next148.prol = or disjoint i64 %indvars.iv147.ph, 1
  br label %.lr.ph112.us.us.us.prol.loopexit

.lr.ph112.us.us.us.prol.loopexit:                 ; preds = %.lr.ph112.us.us.us.prol, %.lr.ph112.us.us.us.preheader205
  %indvars.iv147.unr = phi i64 [ %indvars.iv147.ph, %.lr.ph112.us.us.us.preheader205 ], [ %indvars.iv.next148.prol, %.lr.ph112.us.us.us.prol ]
  %118 = icmp eq i64 %indvars.iv147.ph, %51
  br i1 %118, label %._crit_edge.us.us.us, label %.lr.ph112.us.us.us

vector.body:                                      ; preds = %.lr.ph112.us.us.us.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph112.us.us.us.preheader ]
  %119 = getelementptr inbounds float, ptr %27, i64 %index
  %wide.load = load <4 x float>, ptr %119, align 4, !tbaa !19
  %120 = getelementptr inbounds i32, ptr %30, i64 %index
  %wide.load171 = load <4 x i32>, ptr %120, align 4, !tbaa !16
  %121 = uitofp <4 x i32> %wide.load171 to <4 x float>
  %122 = fdiv <4 x float> %wide.load, %121
  %123 = getelementptr float, ptr %invariant.gep168, i64 %index
  store <4 x float> %122, ptr %123, align 4, !tbaa !19
  %index.next = add nuw i64 %index, 4
  %124 = icmp eq i64 %index.next, %n.vec
  br i1 %124, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us.us, label %.lr.ph112.us.us.us.preheader205

.preheader94.us.us.us:                            ; preds = %.lr.ph.us.us.us, %middle.block192, %69
  %125 = load i32, ptr %2, align 4, !tbaa !16
  %126 = icmp sgt i32 %125, 0
  br i1 %126, label %.lr.ph110.us.us.us, label %.preheader.us.us.us

.lr.ph101.us.us.us:                               ; preds = %.lr.ph110.split.us130.us.us
  %127 = icmp slt i32 %101, %22
  %128 = icmp sgt i32 %101, -1
  %or.cond170 = select i1 %35, i1 %128, i1 false
  br i1 %or.cond170, label %.lr.ph98.us.us.us.us.us, label %._crit_edge102.us.us.us

.lr.ph98.us.us.us.us.us:                          ; preds = %.lr.ph101.us.us.us, %._crit_edge.split.us.us.us.us.us.us
  %129 = phi i32 [ %158, %._crit_edge.split.us.us.us.us.us.us ], [ %97, %.lr.ph101.us.us.us ]
  %.08399.us.us.us.us.us = phi i32 [ %159, %._crit_edge.split.us.us.us.us.us.us ], [ 0, %.lr.ph101.us.us.us ]
  %130 = load i32, ptr %37, align 4, !tbaa !16
  %131 = mul nsw i32 %130, %.08399.us.us.us.us.us
  %132 = add nsw i32 %131, %78
  %133 = icmp sgt i32 %132, -1
  %or.cond.us.us.us.us.us = select i1 %127, i1 %133, i1 false
  %134 = icmp slt i32 %132, %24
  %or.cond93.us.us.us.us.us = select i1 %or.cond.us.us.us.us.us, i1 %134, i1 false
  br i1 %or.cond93.us.us.us.us.us, label %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader, label %._crit_edge.split.us.us.us.us.us.us

.lr.ph98.split.us.split.us.us.us.us.us.us.preheader: ; preds = %.lr.ph98.us.us.us.us.us
  %135 = add nsw i32 %132, %103
  %136 = mul nsw i32 %135, %20
  %137 = sext i32 %136 to i64
  %invariant.gep = getelementptr float, ptr %1, i64 %137
  br i1 %min.iters.check177, label %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204, label %vector.memcheck172

.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204: ; preds = %middle.block175, %vector.memcheck172, %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader
  %indvars.iv142.ph = phi i64 [ 0, %vector.memcheck172 ], [ 0, %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader ], [ %n.vec180, %middle.block175 ]
  br i1 %lcmp.mod.not, label %.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit, label %.lr.ph98.split.us.split.us.us.us.us.us.us.prol

.lr.ph98.split.us.split.us.us.us.us.us.us.prol:   ; preds = %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204
  %gep.prol = getelementptr float, ptr %invariant.gep, i64 %indvars.iv142.ph
  %138 = load float, ptr %gep.prol, align 4, !tbaa !19
  %139 = getelementptr inbounds float, ptr %27, i64 %indvars.iv142.ph
  %140 = load float, ptr %139, align 4, !tbaa !19
  %141 = fadd float %138, %140
  store float %141, ptr %139, align 4, !tbaa !19
  %142 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv142.ph
  %143 = load i32, ptr %142, align 4, !tbaa !16
  %144 = add i32 %143, 1
  store i32 %144, ptr %142, align 4, !tbaa !16
  %indvars.iv.next143.prol = or disjoint i64 %indvars.iv142.ph, 1
  br label %.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit

.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit: ; preds = %.lr.ph98.split.us.split.us.us.us.us.us.us.prol, %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204
  %indvars.iv142.unr = phi i64 [ %indvars.iv142.ph, %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204 ], [ %indvars.iv.next143.prol, %.lr.ph98.split.us.split.us.us.us.us.us.us.prol ]
  %145 = icmp eq i64 %indvars.iv142.ph, %50
  br i1 %145, label %._crit_edge.split.us.us.us.us.us.us.loopexit, label %.lr.ph98.split.us.split.us.us.us.us.us.us

vector.memcheck172:                               ; preds = %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader
  %146 = shl nsw i64 %137, 2
  %scevgep174 = getelementptr i8, ptr %scevgep173, i64 %146
  %bound0 = icmp ult ptr %27, %scevgep174
  %bound1 = icmp ult ptr %invariant.gep, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204, label %vector.body182

vector.body182:                                   ; preds = %vector.memcheck172, %vector.body182
  %index183 = phi i64 [ %index.next190, %vector.body182 ], [ 0, %vector.memcheck172 ]
  %147 = getelementptr float, ptr %invariant.gep, i64 %index183
  %148 = getelementptr i8, ptr %147, i64 16
  %wide.load184 = load <4 x float>, ptr %147, align 4, !tbaa !19, !alias.scope !31
  %wide.load185 = load <4 x float>, ptr %148, align 4, !tbaa !19, !alias.scope !31
  %149 = getelementptr inbounds float, ptr %27, i64 %index183
  %150 = getelementptr inbounds i8, ptr %149, i64 16
  %wide.load186 = load <4 x float>, ptr %149, align 4, !tbaa !19, !alias.scope !34, !noalias !31
  %wide.load187 = load <4 x float>, ptr %150, align 4, !tbaa !19, !alias.scope !34, !noalias !31
  %151 = fadd <4 x float> %wide.load184, %wide.load186
  %152 = fadd <4 x float> %wide.load185, %wide.load187
  store <4 x float> %151, ptr %149, align 4, !tbaa !19, !alias.scope !34, !noalias !31
  store <4 x float> %152, ptr %150, align 4, !tbaa !19, !alias.scope !34, !noalias !31
  %153 = getelementptr inbounds i32, ptr %30, i64 %index183
  %154 = getelementptr inbounds i8, ptr %153, i64 16
  %wide.load188 = load <4 x i32>, ptr %153, align 4, !tbaa !16
  %wide.load189 = load <4 x i32>, ptr %154, align 4, !tbaa !16
  %155 = add <4 x i32> %wide.load188, <i32 1, i32 1, i32 1, i32 1>
  %156 = add <4 x i32> %wide.load189, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %155, ptr %153, align 4, !tbaa !16
  store <4 x i32> %156, ptr %154, align 4, !tbaa !16
  %index.next190 = add nuw i64 %index183, 8
  %157 = icmp eq i64 %index.next190, %n.vec180
  br i1 %157, label %middle.block175, label %vector.body182, !llvm.loop !36

middle.block175:                                  ; preds = %vector.body182
  br i1 %cmp.n191, label %._crit_edge.split.us.us.us.us.us.us.loopexit, label %.lr.ph98.split.us.split.us.us.us.us.us.us.preheader204

._crit_edge.split.us.us.us.us.us.us.loopexit:     ; preds = %.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit, %.lr.ph98.split.us.split.us.us.us.us.us.us, %middle.block175
  %.pre = load i32, ptr %36, align 4, !tbaa !16
  br label %._crit_edge.split.us.us.us.us.us.us

._crit_edge.split.us.us.us.us.us.us:              ; preds = %.lr.ph98.us.us.us.us.us, %._crit_edge.split.us.us.us.us.us.us.loopexit
  %158 = phi i32 [ %.pre, %._crit_edge.split.us.us.us.us.us.us.loopexit ], [ %129, %.lr.ph98.us.us.us.us.us ]
  %159 = add nuw nsw i32 %.08399.us.us.us.us.us, 1
  %160 = icmp slt i32 %159, %158
  br i1 %160, label %.lr.ph98.us.us.us.us.us, label %._crit_edge102.us.us.us.loopexit, !llvm.loop !37

.lr.ph98.split.us.split.us.us.us.us.us.us:        ; preds = %.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit, %.lr.ph98.split.us.split.us.us.us.us.us.us
  %indvars.iv142 = phi i64 [ %indvars.iv.next143.1, %.lr.ph98.split.us.split.us.us.us.us.us.us ], [ %indvars.iv142.unr, %.lr.ph98.split.us.split.us.us.us.us.us.us.prol.loopexit ]
  %gep = getelementptr float, ptr %invariant.gep, i64 %indvars.iv142
  %161 = load float, ptr %gep, align 4, !tbaa !19
  %162 = getelementptr inbounds float, ptr %27, i64 %indvars.iv142
  %163 = load float, ptr %162, align 4, !tbaa !19
  %164 = fadd float %161, %163
  store float %164, ptr %162, align 4, !tbaa !19
  %165 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv142
  %166 = load i32, ptr %165, align 4, !tbaa !16
  %167 = add i32 %166, 1
  store i32 %167, ptr %165, align 4, !tbaa !16
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %gep.1 = getelementptr float, ptr %invariant.gep, i64 %indvars.iv.next143
  %168 = load float, ptr %gep.1, align 4, !tbaa !19
  %169 = getelementptr inbounds float, ptr %27, i64 %indvars.iv.next143
  %170 = load float, ptr %169, align 4, !tbaa !19
  %171 = fadd float %168, %170
  store float %171, ptr %169, align 4, !tbaa !19
  %172 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next143
  %173 = load i32, ptr %172, align 4, !tbaa !16
  %174 = add i32 %173, 1
  store i32 %174, ptr %172, align 4, !tbaa !16
  %indvars.iv.next143.1 = add nuw nsw i64 %indvars.iv142, 2
  %exitcond146.not.1 = icmp eq i64 %indvars.iv.next143.1, %wide.trip.count145
  br i1 %exitcond146.not.1, label %._crit_edge.split.us.us.us.us.us.us.loopexit, label %.lr.ph98.split.us.split.us.us.us.us.us.us, !llvm.loop !38

.lr.ph110.us.us.us:                               ; preds = %.preheader94.us.us.us
  %175 = load i32, ptr %36, align 4, !tbaa !16
  %176 = icmp sgt i32 %175, 0
  br i1 %176, label %.lr.ph110.split.us130.us.us, label %.preheader.us.us.us

._crit_edge116.us.us.us:                          ; preds = %._crit_edge.us.us.us
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge120.split.us.us.us, label %.lr.ph115.us.us.us, !llvm.loop !39

._crit_edge120.split.us.us.us:                    ; preds = %._crit_edge116.us.us.us
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165
  br i1 %exitcond166.not, label %._crit_edge, label %.lr.ph119.us.us, !llvm.loop !40

._crit_edge:                                      ; preds = %._crit_edge120.split.us.us.us, %.lr.ph, %.preheader95
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  ret void

177:                                              ; preds = %6
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %181

179:                                              ; preds = %28
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %181

181:                                              ; preds = %179, %177
  %.pn = phi { ptr, i32 } [ %180, %179 ], [ %178, %177 ]
  call void @_ZN5micro9framework13ScratchBufferD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  resume { ptr, i32 } %.pn
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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, !9, i64 96}
!6 = !{!"_ZTSN5micro3ops11PoolingBaseE", !7, i64 0, !9, i64 64, !9, i64 72, !13, i64 80, !9, i64 88, !9, i64 96, !13, i64 104, !9, i64 112, !10, i64 120, !14, i64 136, !15, i64 140}
!7 = !{!"_ZTSN5micro3ops12FilterOpBaseE", !8, i64 0, !12, i64 32, !9, i64 40, !10, i64 48, !10, i64 56}
!8 = !{!"_ZTSN5micro9framework8OperatorE", !9, i64 8, !9, i64 16, !9, i64 24}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN5micro3ops7PaddingE", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!"_ZTSN5micro3ops9RoundTypeE", !10, i64 0}
!15 = !{!"_ZTSN5micro3ops11PoolingTypeE", !10, i64 0}
!16 = !{!13, !13, i64 0}
!17 = !{!6, !9, i64 72}
!18 = !{!8, !9, i64 16}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !10, i64 0}
!21 = distinct !{!21, !22, !23, !24}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22, !23}
!27 = distinct !{!27, !22, !28}
!28 = !{!"llvm.loop.unswitch.partial.disable"}
!29 = distinct !{!29, !22, !24, !23}
!30 = distinct !{!30, !22, !23, !24}
!31 = !{!32}
!32 = distinct !{!32, !33}
!33 = distinct !{!33, !"LVerDomain"}
!34 = !{!35}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !22, !23, !24}
!37 = distinct !{!37, !22}
!38 = distinct !{!38, !22, !23}
!39 = distinct !{!39, !22}
!40 = distinct !{!40, !22}


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