; LLVM IR from XiaoMi/mace :: micro/ops/nhwc/base (filter_op_base)

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

@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; 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 @_ZN5micro3ops12FilterOpBase24CalcPaddingAndOutputSizeEPKiS3_Pi(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.micro::base::Logger", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.micro::base::Logger", align 4
  %13 = alloca %"class.micro::base::Logger", 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 i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.micro::base::Logger", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8
  %25 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %26 = getelementptr inbounds [2 x i32], ptr %25, i64 0, i64 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %29, label %34

29:                                               ; preds = %4
  %30 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %31 = getelementptr inbounds [2 x i32], ptr %30, i64 0, i64 1
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %43, label %34

34:                                               ; preds = %29, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str.1, i32 noundef 63, i32 noundef 4)
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef @.str.6)
          to label %36 unwind label %39

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef @.str.7)
          to label %38 unwind label %39

38:                                               ; preds = %36
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %43

39:                                               ; preds = %36, %34
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %10, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %229

43:                                               ; preds = %38, %29
  %44 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %45 = getelementptr inbounds [2 x i32], ptr %44, i64 0, i64 0
  %46 = load i32, ptr %45, align 8, !tbaa !9
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %54, label %48

48:                                               ; preds = %43
  %49 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds i32, ptr %50, i64 0
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %65

54:                                               ; preds = %48, %43
  %55 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %56 = getelementptr inbounds [2 x i32], ptr %55, i64 0, i64 1
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %74, label %59

59:                                               ; preds = %54
  %60 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds i32, ptr %61, i64 1
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %74, label %65

65:                                               ; preds = %59, %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef @.str.1, i32 noundef 66, i32 noundef 4)
  %66 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef @.str.8)
          to label %67 unwind label %70

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef @.str.9)
          to label %69 unwind label %70

69:                                               ; preds = %67
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %74

70:                                               ; preds = %67, %65
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %229

74:                                               ; preds = %69, %59, %54
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = icmp ne ptr %75, null
  br i1 %76, label %84, label %77

77:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.1, i32 noundef 67, i32 noundef 4)
  %78 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.10)
          to label %79 unwind label %80

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

80:                                               ; preds = %77
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %10, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %229

84:                                               ; preds = %79, %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds i32, ptr %85, i64 1
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds i32, ptr %88, i64 2
  %90 = load i32, ptr %89, align 4, !tbaa !9
  store i32 %90, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds i32, ptr %91, i64 1
  %93 = load i32, ptr %92, align 4, !tbaa !9
  store i32 %93, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds i32, ptr %94, i64 2
  %96 = load i32, ptr %95, align 4, !tbaa !9
  store i32 %96, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds i32, ptr %97, i64 0
  %99 = load i32, ptr %98, align 4, !tbaa !9
  store i32 %99, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = sub nsw i32 %100, 1
  %102 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %103 = getelementptr inbounds [2 x i32], ptr %102, i64 0, i64 0
  %104 = load i32, ptr %103, align 8, !tbaa !9
  %105 = mul nsw i32 %101, %104
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = sub nsw i32 %107, 1
  %109 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 4
  %110 = getelementptr inbounds [2 x i32], ptr %109, i64 0, i64 1
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = mul nsw i32 %108, %111
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %22, align 4, !tbaa !9
  %114 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 1
  %115 = load i32, ptr %114, align 8, !tbaa !15
  switch i32 %115, label %173 [
    i32 0, label %116
    i32 1, label %135
    i32 2, label %152
  ]

116:                                              ; preds = %84
  %117 = load i32, ptr %14, align 4, !tbaa !9
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = sub nsw i32 %117, %118
  %120 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = getelementptr inbounds i32, ptr %121, i64 0
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = sdiv i32 %119, %123
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %18, align 4, !tbaa !9
  %126 = load i32, ptr %15, align 4, !tbaa !9
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = sub nsw i32 %126, %127
  %129 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !11
  %131 = getelementptr inbounds i32, ptr %130, i64 1
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = sdiv i32 %128, %132
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %19, align 4, !tbaa !9
  br label %186

135:                                              ; preds = %84
  %136 = load i32, ptr %14, align 4, !tbaa !9
  %137 = sub nsw i32 %136, 1
  %138 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds i32, ptr %139, i64 0
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = sdiv i32 %137, %141
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %18, align 4, !tbaa !9
  %144 = load i32, ptr %15, align 4, !tbaa !9
  %145 = sub nsw i32 %144, 1
  %146 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds i32, ptr %147, i64 1
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = sdiv i32 %145, %149
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %19, align 4, !tbaa !9
  br label %186

152:                                              ; preds = %84
  %153 = load i32, ptr %14, align 4, !tbaa !9
  %154 = load i32, ptr %21, align 4, !tbaa !9
  %155 = add nsw i32 %153, %154
  %156 = sub nsw i32 %155, 2
  %157 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = getelementptr inbounds i32, ptr %158, i64 0
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = sdiv i32 %156, %160
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %18, align 4, !tbaa !9
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = add nsw i32 %163, %164
  %166 = sub nsw i32 %165, 2
  %167 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %168 = load ptr, ptr %167, align 8, !tbaa !11
  %169 = getelementptr inbounds i32, ptr %168, i64 1
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = sdiv i32 %166, %170
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %19, align 4, !tbaa !9
  br label %186

173:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef @.str.1, i32 noundef 102, i32 noundef 4)
  %174 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef @.str.11)
          to label %175 unwind label %182

175:                                              ; preds = %173
  %176 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %174, ptr noundef @.str.12)
          to label %177 unwind label %182

177:                                              ; preds = %175
  %178 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 1
  %179 = load i32, ptr %178, align 8, !tbaa !15
  %180 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %176, i32 noundef %179)
          to label %181 unwind label %182

181:                                              ; preds = %177
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %186

182:                                              ; preds = %177, %175, %173
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %10, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %11, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %229

186:                                              ; preds = %181, %152, %135, %116
  %187 = load i32, ptr %18, align 4, !tbaa !9
  %188 = sub nsw i32 %187, 1
  %189 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = getelementptr inbounds i32, ptr %190, i64 0
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = mul nsw i32 %188, %192
  %194 = load i32, ptr %21, align 4, !tbaa !9
  %195 = add nsw i32 %193, %194
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = sub nsw i32 %195, %196
  %198 = call noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef 0, i32 noundef %197)
  %199 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 3
  %200 = getelementptr inbounds [2 x i32], ptr %199, i64 0, i64 0
  store i32 %198, ptr %200, align 8, !tbaa !9
  %201 = load i32, ptr %19, align 4, !tbaa !9
  %202 = sub nsw i32 %201, 1
  %203 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 2
  %204 = load ptr, ptr %203, align 8, !tbaa !11
  %205 = getelementptr inbounds i32, ptr %204, i64 1
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = mul nsw i32 %202, %206
  %208 = load i32, ptr %22, align 4, !tbaa !9
  %209 = add nsw i32 %207, %208
  %210 = load i32, ptr %15, align 4, !tbaa !9
  %211 = sub nsw i32 %209, %210
  %212 = call noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef 0, i32 noundef %211)
  %213 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %24, i32 0, i32 3
  %214 = getelementptr inbounds [2 x i32], ptr %213, i64 0, i64 1
  store i32 %212, ptr %214, align 4, !tbaa !9
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = getelementptr inbounds i32, ptr %215, i64 0
  %217 = load i32, ptr %216, align 4, !tbaa !9
  %218 = load ptr, ptr %8, align 8, !tbaa !5
  %219 = getelementptr inbounds i32, ptr %218, i64 0
  store i32 %217, ptr %219, align 4, !tbaa !9
  %220 = load i32, ptr %18, align 4, !tbaa !9
  %221 = load ptr, ptr %8, align 8, !tbaa !5
  %222 = getelementptr inbounds i32, ptr %221, i64 1
  store i32 %220, ptr %222, align 4, !tbaa !9
  %223 = load i32, ptr %19, align 4, !tbaa !9
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = getelementptr inbounds i32, ptr %224, i64 2
  store i32 %223, ptr %225, align 4, !tbaa !9
  %226 = load i32, ptr %20, align 4, !tbaa !9
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = getelementptr inbounds i32, ptr %227, i64 3
  store i32 %226, ptr %228, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  ret void

229:                                              ; preds = %182, %80, %70, %39
  %230 = load ptr, ptr %10, align 8
  %231 = load i32, ptr %11, align 4
  %232 = insertvalue { ptr, i32 } poison, ptr %230, 0
  %233 = insertvalue { ptr, i32 } %232, i32 %231, 1
  resume { ptr, i32 } %233
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef, i32 noundef) #4

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 = { 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 #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTSN5micro3ops12FilterOpBaseE", !13, i64 0, !14, i64 32, !6, i64 40, !7, i64 48, !7, i64 56}
!13 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"_ZTSN5micro3ops7PaddingE", !7, i64 0}
!15 = !{!12, !14, i64 32}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; 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 @_ZN5micro3ops12FilterOpBase24CalcPaddingAndOutputSizeEPKiS3_Pi(ptr nocapture noundef nonnull align 8 dereferenceable(64) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr noundef writeonly %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.micro::base::Logger", align 4
  %6 = alloca %"class.micro::base::Logger", align 4
  %7 = alloca %"class.micro::base::Logger", align 4
  %8 = alloca %"class.micro::base::Logger", align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  %12 = getelementptr inbounds i8, ptr %0, i64 60
  %13 = load i32, ptr %12, align 4
  %14 = icmp sgt i32 %13, 0
  %or.cond = select i1 %11, i1 %14, i1 false
  br i1 %or.cond, label %22, label %15

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull @.str.1, i32 noundef 63, i32 noundef 4)
  %16 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull @.str.6)
          to label %17 unwind label %20

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

19:                                               ; preds = %17
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %.pre = load i32, ptr %9, align 8, !tbaa !5
  br label %22

20:                                               ; preds = %17, %15
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %142

22:                                               ; preds = %4, %19
  %23 = phi i32 [ %10, %4 ], [ %.pre, %19 ]
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %30, label %25

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %39

30:                                               ; preds = %25, %22
  %31 = load i32, ptr %12, align 4, !tbaa !5
  %32 = icmp eq i32 %31, 1
  br i1 %32, label %46, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %46, label %39

39:                                               ; preds = %33, %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str.1, i32 noundef 66, i32 noundef 4)
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str.8)
          to label %41 unwind label %44

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

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

44:                                               ; preds = %41, %39
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %142

46:                                               ; preds = %43, %33, %30
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %47, label %52

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str.1, i32 noundef 67, i32 noundef 4)
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str.10)
          to label %49 unwind label %50

49:                                               ; preds = %47
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %52

50:                                               ; preds = %47
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %142

52:                                               ; preds = %49, %46
  %53 = getelementptr inbounds i8, ptr %1, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %1, i64 8
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %2, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %2, i64 8
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = add nsw i32 %58, -1
  %63 = load i32, ptr %9, align 8, !tbaa !5
  %64 = mul nsw i32 %63, %62
  %65 = add nsw i32 %64, 1
  %66 = add nsw i32 %60, -1
  %67 = load i32, ptr %12, align 4, !tbaa !5
  %68 = mul nsw i32 %67, %66
  %69 = add nsw i32 %68, 1
  %70 = getelementptr inbounds i8, ptr %0, i64 32
  %71 = load i32, ptr %70, align 8, !tbaa !14
  switch i32 %71, label %110 [
    i32 0, label %72
    i32 1, label %84
    i32 2, label %96
  ]

72:                                               ; preds = %52
  %73 = sub nsw i32 %54, %65
  %74 = getelementptr inbounds i8, ptr %0, i64 40
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sdiv i32 %73, %76
  %78 = add nsw i32 %77, 1
  %79 = sub nsw i32 %56, %69
  %80 = getelementptr inbounds i8, ptr %75, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sdiv i32 %79, %81
  %83 = add nsw i32 %82, 1
  br label %120

84:                                               ; preds = %52
  %85 = add nsw i32 %54, -1
  %86 = getelementptr inbounds i8, ptr %0, i64 40
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sdiv i32 %85, %88
  %90 = add nsw i32 %89, 1
  %91 = add nsw i32 %56, -1
  %92 = getelementptr inbounds i8, ptr %87, i64 4
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sdiv i32 %91, %93
  %95 = add nsw i32 %94, 1
  br label %120

96:                                               ; preds = %52
  %97 = add i32 %54, -2
  %98 = add i32 %97, %65
  %99 = getelementptr inbounds i8, ptr %0, i64 40
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sdiv i32 %98, %101
  %103 = add nsw i32 %102, 1
  %104 = add i32 %56, -2
  %105 = add i32 %104, %69
  %106 = getelementptr inbounds i8, ptr %100, i64 4
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sdiv i32 %105, %107
  %109 = add nsw i32 %108, 1
  br label %120

110:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull @.str.1, i32 noundef 102, i32 noundef 4)
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull @.str.11)
          to label %112 unwind label %118

112:                                              ; preds = %110
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %111, ptr noundef nonnull @.str.12)
          to label %114 unwind label %118

114:                                              ; preds = %112
  %115 = load i32, ptr %70, align 8, !tbaa !14
  %116 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %113, i32 noundef %115)
          to label %117 unwind label %118

117:                                              ; preds = %114
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 40
  %.pre41 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !9
  %.pre42 = load i32, ptr %.pre41, align 4, !tbaa !5
  br label %120

118:                                              ; preds = %114, %112, %110
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %142

120:                                              ; preds = %117, %96, %84, %72
  %121 = phi i32 [ %.pre42, %117 ], [ %101, %96 ], [ %88, %84 ], [ %76, %72 ]
  %.036 = phi i32 [ 0, %117 ], [ %109, %96 ], [ %95, %84 ], [ %83, %72 ]
  %.035 = phi i32 [ 0, %117 ], [ %103, %96 ], [ %90, %84 ], [ %78, %72 ]
  %122 = add nsw i32 %.035, -1
  %123 = getelementptr inbounds i8, ptr %0, i64 40
  %124 = mul nsw i32 %121, %122
  %125 = sub i32 %65, %54
  %126 = add i32 %125, %124
  %127 = call noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef 0, i32 noundef %126)
  %128 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %127, ptr %128, align 8, !tbaa !5
  %129 = add nsw i32 %.036, -1
  %130 = load ptr, ptr %123, align 8, !tbaa !9
  %131 = getelementptr inbounds i8, ptr %130, i64 4
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = mul nsw i32 %132, %129
  %134 = sub i32 %69, %56
  %135 = add i32 %134, %133
  %136 = call noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef 0, i32 noundef %135)
  %137 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %136, ptr %137, align 4, !tbaa !5
  %138 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %138, ptr %3, align 4, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %.035, ptr %139, align 4, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %.036, ptr %140, align 4, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 %61, ptr %141, align 4, !tbaa !5
  ret void

142:                                              ; preds = %118, %50, %44, %20
  %.pn = phi { ptr, i32 } [ %119, %118 ], [ %51, %50 ], [ %45, %44 ], [ %21, %20 ]
  resume { ptr, i32 } %.pn
}

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 nounwind uwtable
declare dso_local noundef i32 @_ZN5micro4base3maxIiEET_S2_S2_(i32 noundef, i32 noundef) local_unnamed_addr #4

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 = { 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 #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 40}
!10 = !{!"_ZTSN5micro3ops12FilterOpBaseE", !11, i64 0, !13, i64 32, !12, i64 40, !7, i64 48, !7, i64 56}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN5micro3ops7PaddingE", !7, i64 0}
!14 = !{!10, !13, i64 32}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass