; 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

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

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

35:                                               ; preds = %30, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef @.str.1, i32 noundef 123, i32 noundef 4)
  %36 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef @.str.6)
          to label %37 unwind label %40

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

39:                                               ; preds = %37
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %44

40:                                               ; preds = %37, %35
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %12, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %13, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %196

44:                                               ; preds = %39, %30
  %45 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 4
  %46 = getelementptr inbounds [2 x i32], ptr %45, i64 0, i64 0
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %55, label %49

49:                                               ; preds = %44
  %50 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds i32, ptr %51, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %66

55:                                               ; preds = %49, %44
  %56 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 4
  %57 = getelementptr inbounds [2 x i32], ptr %56, i64 0, i64 1
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %75, label %60

60:                                               ; preds = %55
  %61 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds i32, ptr %62, i64 1
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = icmp eq i32 %64, 1
  br i1 %65, label %75, label %66

66:                                               ; preds = %60, %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef @.str.1, i32 noundef 126, i32 noundef 4)
  %67 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef @.str.8)
          to label %68 unwind label %71

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

70:                                               ; preds = %68
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %75

71:                                               ; preds = %68, %66
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %12, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %13, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %196

75:                                               ; preds = %70, %60, %55
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %85, label %78

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

80:                                               ; preds = %78
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %85

81:                                               ; preds = %78
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %12, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %13, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %196

85:                                               ; preds = %80, %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds i32, ptr %86, i64 1
  %88 = load i32, ptr %87, align 4, !tbaa !11
  store i32 %88, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds i32, ptr %89, i64 2
  %91 = load i32, ptr %90, align 4, !tbaa !11
  store i32 %91, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds i32, ptr %92, i64 1
  %94 = load i32, ptr %93, align 4, !tbaa !11
  store i32 %94, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds i32, ptr %95, i64 2
  %97 = load i32, ptr %96, align 4, !tbaa !11
  store i32 %97, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds i32, ptr %98, i64 0
  %100 = load i32, ptr %99, align 4, !tbaa !11
  store i32 %100, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %101 = load i32, ptr %16, align 4, !tbaa !11
  %102 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 3
  %103 = getelementptr inbounds [2 x i32], ptr %102, i64 0, i64 0
  %104 = load i32, ptr %103, align 8, !tbaa !11
  %105 = add nsw i32 %101, %104
  %106 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 3
  %107 = getelementptr inbounds [2 x i32], ptr %106, i64 0, i64 0
  %108 = load i32, ptr %107, align 8, !tbaa !11
  %109 = add nsw i32 %105, %108
  %110 = load i32, ptr %18, align 4, !tbaa !11
  %111 = sub nsw i32 %110, 1
  %112 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 4
  %113 = getelementptr inbounds [2 x i32], ptr %112, i64 0, i64 0
  %114 = load i32, ptr %113, align 8, !tbaa !11
  %115 = mul nsw i32 %111, %114
  %116 = sub nsw i32 %109, %115
  %117 = sub nsw i32 %116, 1
  %118 = sitofp i32 %117 to float
  store float %118, ptr %21, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %119 = load i32, ptr %17, align 4, !tbaa !11
  %120 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 3
  %121 = getelementptr inbounds [2 x i32], ptr %120, i64 0, i64 1
  %122 = load i32, ptr %121, align 4, !tbaa !11
  %123 = add nsw i32 %119, %122
  %124 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 3
  %125 = getelementptr inbounds [2 x i32], ptr %124, i64 0, i64 1
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = add nsw i32 %123, %126
  %128 = load i32, ptr %19, align 4, !tbaa !11
  %129 = sub nsw i32 %128, 1
  %130 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 4
  %131 = getelementptr inbounds [2 x i32], ptr %130, i64 0, i64 1
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = mul nsw i32 %129, %132
  %134 = sub nsw i32 %127, %133
  %135 = sub nsw i32 %134, 1
  %136 = sitofp i32 %135 to float
  store float %136, ptr %22, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 1, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 1, ptr %24, align 4, !tbaa !11
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %160

139:                                              ; preds = %85
  %140 = load float, ptr %21, align 4, !tbaa !17
  %141 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = getelementptr inbounds i32, ptr %142, i64 0
  %144 = load i32, ptr %143, align 4, !tbaa !11
  %145 = sitofp i32 %144 to float
  %146 = fdiv float %140, %145
  %147 = fptosi float %146 to i32
  %148 = load i32, ptr %23, align 4, !tbaa !11
  %149 = add nsw i32 %148, %147
  store i32 %149, ptr %23, align 4, !tbaa !11
  %150 = load float, ptr %22, align 4, !tbaa !17
  %151 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %153 = getelementptr inbounds i32, ptr %152, i64 1
  %154 = load i32, ptr %153, align 4, !tbaa !11
  %155 = sitofp i32 %154 to float
  %156 = fdiv float %150, %155
  %157 = fptosi float %156 to i32
  %158 = load i32, ptr %24, align 4, !tbaa !11
  %159 = add nsw i32 %158, %157
  store i32 %159, ptr %24, align 4, !tbaa !11
  br label %181

160:                                              ; preds = %85
  %161 = load float, ptr %21, align 4, !tbaa !17
  %162 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !13
  %164 = getelementptr inbounds i32, ptr %163, i64 0
  %165 = load i32, ptr %164, align 4, !tbaa !11
  %166 = sitofp i32 %165 to float
  %167 = fdiv float %161, %166
  %168 = call noundef i32 @_ZN5micro4base4ceilEf(float noundef %167)
  %169 = load i32, ptr %23, align 4, !tbaa !11
  %170 = add nsw i32 %169, %168
  store i32 %170, ptr %23, align 4, !tbaa !11
  %171 = load float, ptr %22, align 4, !tbaa !17
  %172 = getelementptr inbounds %"class.micro::ops::FilterOpBase", ptr %25, i32 0, i32 2
  %173 = load ptr, ptr %172, align 8, !tbaa !13
  %174 = getelementptr inbounds i32, ptr %173, i64 1
  %175 = load i32, ptr %174, align 4, !tbaa !11
  %176 = sitofp i32 %175 to float
  %177 = fdiv float %171, %176
  %178 = call noundef i32 @_ZN5micro4base4ceilEf(float noundef %177)
  %179 = load i32, ptr %24, align 4, !tbaa !11
  %180 = add nsw i32 %179, %178
  store i32 %180, ptr %24, align 4, !tbaa !11
  br label %181

181:                                              ; preds = %160, %139
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = getelementptr inbounds i32, ptr %182, i64 0
  %184 = load i32, ptr %183, align 4, !tbaa !11
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = getelementptr inbounds i32, ptr %185, i64 0
  store i32 %184, ptr %186, align 4, !tbaa !11
  %187 = load i32, ptr %23, align 4, !tbaa !11
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = getelementptr inbounds i32, ptr %188, i64 1
  store i32 %187, ptr %189, align 4, !tbaa !11
  %190 = load i32, ptr %24, align 4, !tbaa !11
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds i32, ptr %191, i64 2
  store i32 %190, ptr %192, align 4, !tbaa !11
  %193 = load i32, ptr %20, align 4, !tbaa !11
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = getelementptr inbounds i32, ptr %194, i64 3
  store i32 %193, ptr %195, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void

196:                                              ; preds = %81, %71, %40
  %197 = load ptr, ptr %12, align 8
  %198 = load i32, ptr %13, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200
}

declare noundef i32 @_ZN5micro4base4ceilEf(float noundef) #1

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 = { 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 = !{!"_ZTSN5micro3ops9RoundTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 40}
!14 = !{!"_ZTSN5micro3ops12FilterOpBaseE", !15, i64 0, !16, i64 32, !6, i64 40, !7, i64 48, !7, i64 56}
!15 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN5micro3ops7PaddingE", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}


; 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

; 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 @_ZN5micro3ops12FilterOpBase29CalcOutputSizeWithPaddingSizeEPKiS3_NS0_9RoundTypeEPi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(64) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3, ptr noundef writeonly %4) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %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 = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull @.str.1, i32 noundef 123, i32 noundef 4)
  %16 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %6, 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) %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %.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) %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %110

22:                                               ; preds = %5, %19
  %23 = phi i32 [ %10, %5 ], [ %.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 %7) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str.1, i32 noundef 126, i32 noundef 4)
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %7, 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) %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %46

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

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

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

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

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

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 = getelementptr inbounds i8, ptr %0, i64 48
  %63 = load i32, ptr %62, align 8, !tbaa !5
  %reass.add = shl i32 %63, 1
  %64 = add i32 %reass.add, %54
  %65 = add nsw i32 %58, -1
  %66 = load i32, ptr %9, align 8, !tbaa !5
  %67 = mul nsw i32 %66, %65
  %68 = xor i32 %67, -1
  %69 = add i32 %64, %68
  %70 = sitofp i32 %69 to float
  %71 = getelementptr inbounds i8, ptr %0, i64 52
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %reass.add33 = shl i32 %72, 1
  %73 = add i32 %reass.add33, %56
  %74 = add nsw i32 %60, -1
  %75 = load i32, ptr %12, align 4, !tbaa !5
  %76 = mul nsw i32 %75, %74
  %77 = xor i32 %76, -1
  %78 = add i32 %73, %77
  %79 = sitofp i32 %78 to float
  %80 = icmp eq i32 %3, 0
  %81 = getelementptr inbounds i8, ptr %0, i64 40
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sitofp i32 %83 to float
  %85 = fdiv float %70, %84
  br i1 %80, label %86, label %94

86:                                               ; preds = %52
  %87 = getelementptr inbounds i8, ptr %82, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sitofp i32 %88 to float
  %90 = fdiv float %79, %89
  %91 = insertelement <2 x float> poison, float %85, i64 0
  %92 = insertelement <2 x float> %91, float %90, i64 1
  %93 = fptosi <2 x float> %92 to <2 x i32>
  br label %104

94:                                               ; preds = %52
  %95 = call noundef i32 @_ZN5micro4base4ceilEf(float noundef %85)
  %96 = load ptr, ptr %81, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sitofp i32 %98 to float
  %100 = fdiv float %79, %99
  %101 = call noundef i32 @_ZN5micro4base4ceilEf(float noundef %100)
  %102 = insertelement <2 x i32> poison, i32 %95, i64 0
  %103 = insertelement <2 x i32> %102, i32 %101, i64 1
  br label %104

104:                                              ; preds = %94, %86
  %105 = phi <2 x i32> [ %93, %86 ], [ %103, %94 ]
  %106 = add nsw <2 x i32> %105, <i32 1, i32 1>
  %107 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %107, ptr %4, align 4, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %4, i64 4
  store <2 x i32> %106, ptr %108, align 4, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 %61, ptr %109, align 4, !tbaa !5
  ret void

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

declare noundef i32 @_ZN5micro4base4ceilEf(float noundef) local_unnamed_addr #1

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 = { 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}


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