; LLVM IR from XiaoMi/mace :: micro/ops/nhwc/base/conv_2d_base.ll (ZN5micro3ops10Conv2dBase3RunEv)

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

@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops10Conv2dBase3RunEv(ptr noundef nonnull align 8 dereferenceable(156) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [4 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca %"class.micro::base::Logger", align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.micro::base::Logger", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.micro::base::Logger", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  call void @llvm.memset.p0.i64(ptr align 16 %4, i8 0, i64 16, i1 false)
  %15 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 6
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  call void @_ZN5micro3ops12FilterOpBase24InitPaddingAndOutputSizeEPKiS3_NS0_9RoundTypeEPi(ptr noundef nonnull align 8 dereferenceable(64) %14, ptr noundef %16, ptr noundef %18, i32 noundef 0, ptr noundef %19)
  %20 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  %21 = call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 0, i32 noundef 4, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %22 = load ptr, ptr %14, align 8, !tbaa !19
  %23 = getelementptr inbounds ptr, ptr %22, i64 2
  %24 = load ptr, ptr %23, align 8
  %25 = call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(156) %14, ptr noundef nonnull align 4 dereferenceable(16) %4)
  store i32 %25, ptr %5, align 4, !tbaa !21
  %26 = load i32, ptr %5, align 4, !tbaa !21
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %46

28:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef @.str.1, i32 noundef 59, i32 noundef 1)
  %29 = load ptr, ptr %14, align 8, !tbaa !19
  %30 = getelementptr inbounds ptr, ptr %29, i64 2
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef i32 %31(ptr noundef nonnull align 8 dereferenceable(156) %14, ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %33 unwind label %42

33:                                               ; preds = %28
  %34 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %32)
          to label %35 unwind label %42

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

37:                                               ; preds = %35
  %38 = load i32, ptr %5, align 4, !tbaa !21
  %39 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef %38)
          to label %40 unwind label %42

40:                                               ; preds = %37
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %41 = load i32, ptr %5, align 4, !tbaa !21
  store i32 %41, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %47

42:                                               ; preds = %37, %35, %33, %28
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %146

46:                                               ; preds = %1
  store i32 0, ptr %9, align 4
  br label %47

47:                                               ; preds = %46, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %48 = load i32, ptr %9, align 4
  switch i32 %48, label %144 [
    i32 0, label %49
  ]

49:                                               ; preds = %47
  %50 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 9
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %102

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %54 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %55 = load ptr, ptr %54, align 8, !tbaa !24
  %56 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  %57 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 3
  %58 = load i32, ptr %57, align 8, !tbaa !25
  %59 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 9
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 10
  %62 = load ptr, ptr %61, align 8, !tbaa !26
  %63 = getelementptr inbounds i32, ptr %62, i64 0
  %64 = load i32, ptr %63, align 4, !tbaa !27
  %65 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = call noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef %55, ptr noundef %56, i32 noundef %58, ptr noundef %60, i32 noundef %64, ptr noundef %66)
  store i32 %67, ptr %10, align 4, !tbaa !21
  %68 = load i32, ptr %10, align 4, !tbaa !21
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %98

70:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef @.str.1, i32 noundef 63, i32 noundef 1)
  %71 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %72 = load ptr, ptr %71, align 8, !tbaa !24
  %73 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  %74 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !25
  %76 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 9
  %77 = load ptr, ptr %76, align 8, !tbaa !23
  %78 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 10
  %79 = load ptr, ptr %78, align 8, !tbaa !26
  %80 = getelementptr inbounds i32, ptr %79, i64 0
  %81 = load i32, ptr %80, align 4, !tbaa !27
  %82 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %83 = load ptr, ptr %82, align 8, !tbaa !24
  %84 = invoke noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef %72, ptr noundef %73, i32 noundef %75, ptr noundef %77, i32 noundef %81, ptr noundef %83)
          to label %85 unwind label %94

85:                                               ; preds = %70
  %86 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef %84)
          to label %87 unwind label %94

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef @.str.4)
          to label %89 unwind label %94

89:                                               ; preds = %87
  %90 = load i32, ptr %10, align 4, !tbaa !21
  %91 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %88, i32 noundef %90)
          to label %92 unwind label %94

92:                                               ; preds = %89
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %93 = load i32, ptr %10, align 4, !tbaa !21
  store i32 %93, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %99

94:                                               ; preds = %89, %87, %85, %70
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %146

98:                                               ; preds = %53
  store i32 0, ptr %9, align 4
  br label %99

99:                                               ; preds = %98, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %100 = load i32, ptr %9, align 4
  switch i32 %100, label %144 [
    i32 0, label %101
  ]

101:                                              ; preds = %99
  br label %102

102:                                              ; preds = %101, %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %103 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 14
  %104 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %105 = load ptr, ptr %104, align 8, !tbaa !24
  %106 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 3
  %107 = load i32, ptr %106, align 8, !tbaa !25
  %108 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  %109 = call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %107, ptr noundef %108)
  %110 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %111 = load ptr, ptr %110, align 8, !tbaa !24
  %112 = call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %103, ptr noundef %105, i32 noundef %109, ptr noundef %111)
  store i32 %112, ptr %12, align 4, !tbaa !21
  %113 = load i32, ptr %12, align 4, !tbaa !21
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %140

115:                                              ; preds = %102
  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 66, i32 noundef 1)
  %116 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 14
  %117 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %118 = load ptr, ptr %117, align 8, !tbaa !24
  %119 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 3
  %120 = load i32, ptr %119, align 8, !tbaa !25
  %121 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 0
  %122 = invoke noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %120, ptr noundef %121)
          to label %123 unwind label %136

123:                                              ; preds = %115
  %124 = getelementptr inbounds %"class.micro::ops::Conv2dBase", ptr %14, i32 0, i32 13
  %125 = load ptr, ptr %124, align 8, !tbaa !24
  %126 = invoke noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %116, ptr noundef %118, i32 noundef %122, ptr noundef %125)
          to label %127 unwind label %136

127:                                              ; preds = %123
  %128 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %126)
          to label %129 unwind label %136

129:                                              ; preds = %127
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %128, ptr noundef @.str.4)
          to label %131 unwind label %136

131:                                              ; preds = %129
  %132 = load i32, ptr %12, align 4, !tbaa !21
  %133 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %130, i32 noundef %132)
          to label %134 unwind label %136

134:                                              ; preds = %131
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %135 = load i32, ptr %12, align 4, !tbaa !21
  store i32 %135, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %141

136:                                              ; preds = %131, %129, %127, %123, %115
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %7, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %146

140:                                              ; preds = %102
  store i32 0, ptr %9, align 4
  br label %141

141:                                              ; preds = %140, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %142 = load i32, ptr %9, align 4
  switch i32 %142, label %144 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %144

144:                                              ; preds = %143, %141, %99, %47
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  %145 = load i32, ptr %2, align 4
  ret i32 %145

146:                                              ; preds = %136, %94, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %7, align 8
  %149 = load i32, ptr %8, align 4
  %150 = insertvalue { ptr, i32 } poison, ptr %148, 0
  %151 = insertvalue { ptr, i32 } %150, i32 %149, 1
  resume { ptr, i32 } %151
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @_ZN5micro3ops12FilterOpBase24InitPaddingAndOutputSizeEPKiS3_NS0_9RoundTypeEPi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

declare noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

declare noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef, ptr 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !6, i64 72}
!10 = !{!"_ZTSN5micro3ops10Conv2dBaseE", !11, i64 0, !6, i64 64, !6, i64 72, !14, i64 80, !6, i64 88, !6, i64 96, !14, i64 104, !6, i64 112, !6, i64 120, !14, i64 128, !6, i64 136, !15, i64 144}
!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 = !{!"_ZTSN5micro3ops10ActivationE", !16, i64 0, !17, i64 4, !17, i64 8}
!16 = !{!"_ZTSN5micro3ops14ActivationTypeE", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!10, !6, i64 96}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTSN5micro10MaceStatusE", !7, i64 0}
!23 = !{!10, !6, i64 112}
!24 = !{!10, !6, i64 136}
!25 = !{!10, !14, i64 80}
!26 = !{!10, !6, i64 120}
!27 = !{!14, !14, 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 [81 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5micro3ops10Conv2dBase3RunEv(ptr noundef nonnull align 8 dereferenceable(156) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [4 x i32], align 16
  %3 = alloca %"class.micro::base::Logger", align 4
  %4 = alloca %"class.micro::base::Logger", align 4
  %5 = alloca %"class.micro::base::Logger", align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  %9 = load ptr, ptr %8, align 8, !tbaa !17
  call void @_ZN5micro3ops12FilterOpBase24InitPaddingAndOutputSizeEPKiS3_NS0_9RoundTypeEPi(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %7, ptr noundef %9, i32 noundef 0, ptr noundef nonnull %2)
  %10 = call noundef i32 @_ZN5micro9framework8Operator17ResizeOutputShapeEjjPKi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0, i32 noundef 4, ptr noundef nonnull %2)
  %11 = load ptr, ptr %0, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load ptr, ptr %12, align 8
  %14 = call noundef i32 %13(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef nonnull align 4 dereferenceable(16) %2)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %.critedge, label %15

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str.1, i32 noundef 59, i32 noundef 1)
  %16 = load ptr, ptr %0, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = load ptr, ptr %17, align 8
  %19 = invoke noundef i32 %18(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef nonnull align 4 dereferenceable(16) %2)
          to label %20 unwind label %27

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

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull @.str.4)
          to label %24 unwind label %27

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef %14)
          to label %26 unwind label %27

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

27:                                               ; preds = %24, %22, %20, %15
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %81

.critedge:                                        ; preds = %1
  %29 = getelementptr inbounds i8, ptr %0, i64 112
  %30 = load ptr, ptr %29, align 8, !tbaa !20
  %.not25 = icmp eq ptr %30, null
  br i1 %.not25, label %.thread, label %31

31:                                               ; preds = %.critedge
  %32 = getelementptr inbounds i8, ptr %0, i64 136
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %0, i64 80
  %35 = load i32, ptr %34, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %0, i64 120
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = load i32, ptr %37, align 4, !tbaa !24
  %39 = call noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef %33, ptr noundef nonnull %2, i32 noundef %35, ptr noundef nonnull %30, i32 noundef %38, ptr noundef %33)
  %.not26 = icmp eq i32 %39, 0
  br i1 %.not26, label %.thread, label %40

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str.1, i32 noundef 63, i32 noundef 1)
  %41 = load ptr, ptr %32, align 8, !tbaa !21
  %42 = load i32, ptr %34, align 8, !tbaa !22
  %43 = load ptr, ptr %29, align 8, !tbaa !20
  %44 = load ptr, ptr %36, align 8, !tbaa !23
  %45 = load i32, ptr %44, align 4, !tbaa !24
  %46 = invoke noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef %41, ptr noundef nonnull %2, i32 noundef %42, ptr noundef %43, i32 noundef %45, ptr noundef %41)
          to label %47 unwind label %53

47:                                               ; preds = %40
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %46)
          to label %49 unwind label %53

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull @.str.4)
          to label %51 unwind label %53

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %50, i32 noundef %39)
          to label %55 unwind label %53

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

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

.thread:                                          ; preds = %31, %.critedge
  %56 = getelementptr inbounds i8, ptr %0, i64 144
  %57 = getelementptr inbounds i8, ptr %0, i64 136
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = getelementptr inbounds i8, ptr %0, i64 80
  %60 = load i32, ptr %59, align 8, !tbaa !22
  %61 = call noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %60, ptr noundef nonnull %2)
  %62 = load ptr, ptr %57, align 8, !tbaa !21
  %63 = call noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef %58, i32 noundef %61, ptr noundef %62)
  %.not27 = icmp eq i32 %63, 0
  br i1 %.not27, label %80, label %64

64:                                               ; preds = %.thread
  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 66, i32 noundef 1)
  %65 = load ptr, ptr %57, align 8, !tbaa !21
  %66 = load i32, ptr %59, align 8, !tbaa !22
  %67 = invoke noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef %66, ptr noundef nonnull %2)
          to label %68 unwind label %78

68:                                               ; preds = %64
  %69 = load ptr, ptr %57, align 8, !tbaa !21
  %70 = invoke noundef i32 @_ZN5micro3ops10Activation7ComputeEPKfiPf(ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef %65, i32 noundef %67, ptr noundef %69)
          to label %71 unwind label %78

71:                                               ; preds = %68
  %72 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %70)
          to label %73 unwind label %78

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull @.str.4)
          to label %75 unwind label %78

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEi(ptr noundef nonnull align 4 dereferenceable(4) %74, i32 noundef %63)
          to label %77 unwind label %78

77:                                               ; preds = %75
  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 %80

78:                                               ; preds = %75, %73, %71, %68, %64
  %79 = 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 %81

80:                                               ; preds = %77, %.thread, %55, %26
  %.4 = phi i32 [ %39, %55 ], [ %14, %26 ], [ %63, %77 ], [ 0, %.thread ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret i32 %.4

81:                                               ; preds = %78, %53, %27
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %54, %53 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @_ZN5micro3ops12FilterOpBase24InitPaddingAndOutputSizeEPKiS3_NS0_9RoundTypeEPi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef i32 @_ZN5micro3ops5crumb11ComputeBiasEPKfPKijS3_iPf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef i32 @_ZN5micro4base12GetShapeSizeEjPKi(i32 noundef, ptr 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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, !9, i64 72}
!6 = !{!"_ZTSN5micro3ops10Conv2dBaseE", !7, i64 0, !9, i64 64, !9, i64 72, !13, i64 80, !9, i64 88, !9, i64 96, !13, i64 104, !9, i64 112, !9, i64 120, !13, i64 128, !9, i64 136, !14, i64 144}
!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 = !{!"_ZTSN5micro3ops10ActivationE", !15, i64 0, !16, i64 4, !16, i64 8}
!15 = !{!"_ZTSN5micro3ops14ActivationTypeE", !10, i64 0}
!16 = !{!"float", !10, i64 0}
!17 = !{!6, !9, i64 96}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !11, i64 0}
!20 = !{!6, !9, i64 112}
!21 = !{!6, !9, i64 136}
!22 = !{!6, !13, i64 80}
!23 = !{!6, !9, i64 120}
!24 = !{!13, !13, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass