; LLVM IR from XiaoMi/mace :: micro/ops/matmul.ll (ZN5micro3ops8MatMulOp8ValidateEv)

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

@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [51 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 noundef zeroext i1 @_ZN5micro3ops8MatMulOp8ValidateEv(ptr noundef nonnull align 8 dereferenceable(116) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.micro::base::Logger", align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.micro::base::Logger", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.micro::base::Logger", align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %16 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !9
  store i32 %17, ptr %4, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %18 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 7
  %19 = load i32, ptr %18, align 8, !tbaa !17
  store i32 %19, ptr %5, align 4, !tbaa !16
  %20 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 7
  %23 = load i32, ptr %22, align 8, !tbaa !17
  %24 = icmp eq i32 %21, %23
  br i1 %24, label %25, label %61

25:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %26

26:                                               ; preds = %57, %25
  %27 = load i32, ptr %6, align 4, !tbaa !16
  %28 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 3
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = sub i32 %29, 2
  %31 = icmp ult i32 %27, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %60

33:                                               ; preds = %26
  %34 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = load i32, ptr %6, align 4, !tbaa !16
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %35, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !16
  %40 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !19
  %42 = load i32, ptr %6, align 4, !tbaa !16
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %41, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !16
  %46 = icmp eq i32 %39, %45
  br i1 %46, label %56, label %47

47:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef @.str.2, i32 noundef 148, i32 noundef 4)
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef @.str.9)
          to label %49 unwind label %52

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

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

52:                                               ; preds = %49, %47
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %137

56:                                               ; preds = %51, %33
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %6, align 4, !tbaa !16
  %59 = add i32 %58, 1
  store i32 %59, ptr %6, align 4, !tbaa !16
  br label %26, !llvm.loop !20

60:                                               ; preds = %32
  br label %79

61:                                               ; preds = %1
  %62 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = icmp eq i32 %63, 2
  br i1 %64, label %78, label %65

65:                                               ; preds = %61
  %66 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 7
  %67 = load i32, ptr %66, align 8, !tbaa !17
  %68 = icmp eq i32 %67, 2
  br i1 %68, label %78, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef @.str.2, i32 noundef 153, i32 noundef 4)
  %70 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef @.str.11)
          to label %71 unwind label %74

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

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

74:                                               ; preds = %71, %69
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %137

78:                                               ; preds = %73, %65, %61
  br label %79

79:                                               ; preds = %78, %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %80 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 14
  %81 = load i8, ptr %80, align 8, !tbaa !22, !range !23, !noundef !24
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %91

83:                                               ; preds = %79
  %84 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = load i32, ptr %4, align 4, !tbaa !16
  %87 = sub nsw i32 %86, 2
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %85, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !16
  br label %99

91:                                               ; preds = %79
  %92 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 2
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = load i32, ptr %4, align 4, !tbaa !16
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %93, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !16
  br label %99

99:                                               ; preds = %91, %83
  %100 = phi i32 [ %90, %83 ], [ %98, %91 ]
  store i32 %100, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %101 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 15
  %102 = load i8, ptr %101, align 1, !tbaa !25, !range !23, !noundef !24
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %112

104:                                              ; preds = %99
  %105 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 6
  %106 = load ptr, ptr %105, align 8, !tbaa !19
  %107 = load i32, ptr %5, align 4, !tbaa !16
  %108 = sub nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %106, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !16
  br label %120

112:                                              ; preds = %99
  %113 = getelementptr inbounds %"class.micro::ops::MatMulOp", ptr %15, i32 0, i32 6
  %114 = load ptr, ptr %113, align 8, !tbaa !19
  %115 = load i32, ptr %5, align 4, !tbaa !16
  %116 = sub nsw i32 %115, 2
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %114, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !16
  br label %120

120:                                              ; preds = %112, %104
  %121 = phi i32 [ %111, %104 ], [ %119, %112 ]
  store i32 %121, ptr %12, align 4, !tbaa !16
  %122 = load i32, ptr %11, align 4, !tbaa !16
  %123 = load i32, ptr %12, align 4, !tbaa !16
  %124 = icmp ne i32 %122, %123
  br i1 %124, label %125, label %134

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.2, i32 noundef 161, i32 noundef 4)
  %126 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.13)
          to label %127 unwind label %130

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

129:                                              ; preds = %127
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  store i1 false, ptr %2, align 1
  store i32 1, ptr %14, align 4
  br label %135

130:                                              ; preds = %127, %125
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %8, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %9, align 4
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %137

134:                                              ; preds = %120
  store i1 true, ptr %2, align 1
  store i32 1, ptr %14, align 4
  br label %135

135:                                              ; preds = %134, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %136 = load i1, ptr %2, align 1
  ret i1 %136

137:                                              ; preds = %130, %74, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %8, align 8
  %140 = load i32, ptr %9, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

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, !12, i64 48}
!10 = !{!"_ZTSN5micro3ops8MatMulOpE", !11, i64 0, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88, !12, i64 96, !6, i64 104, !13, i64 112, !13, i64 113, !14, i64 114, !15, i64 115}
!11 = !{!"_ZTSN5micro9framework8OperatorE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN5micro3ops4GemvIfEE"}
!15 = !{!"_ZTSN5micro3ops4GemmIfEE"}
!16 = !{!12, !12, i64 0}
!17 = !{!10, !12, i64 72}
!18 = !{!10, !6, i64 40}
!19 = !{!10, !6, i64 64}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !13, i64 112}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!10, !13, i64 113}


; 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.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [51 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 noundef zeroext i1 @_ZN5micro3ops8MatMulOp8ValidateEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(116) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.micro::base::Logger", align 4
  %3 = alloca %"class.micro::base::Logger", align 4
  %4 = alloca %"class.micro::base::Logger", align 4
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load i32, ptr %7, align 8, !tbaa !15
  %9 = icmp eq i32 %6, %8
  %.not21 = icmp eq i32 %6, 2
  br i1 %9, label %.preheader, label %33

.preheader:                                       ; preds = %1
  br i1 %.not21, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  br label %12

12:                                               ; preds = %.lr.ph, %28
  %13 = phi i32 [ %6, %.lr.ph ], [ %29, %28 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %28 ]
  %14 = load ptr, ptr %10, align 8, !tbaa !16
  %15 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv
  %16 = load i32, ptr %15, align 4, !tbaa !17
  %17 = load ptr, ptr %11, align 8, !tbaa !18
  %18 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = icmp eq i32 %16, %19
  br i1 %20, label %28, label %21

21:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str.2, i32 noundef 148, i32 noundef 4)
  %22 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull @.str.9)
          to label %23 unwind label %26

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

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

26:                                               ; preds = %23, %21
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  br label %66

28:                                               ; preds = %12, %25
  %29 = phi i32 [ %13, %12 ], [ %.pre, %25 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = add i32 %29, -2
  %31 = zext i32 %30 to i64
  %32 = icmp ult i64 %indvars.iv.next, %31
  br i1 %32, label %12, label %.loopexit, !llvm.loop !19

33:                                               ; preds = %1
  %34 = icmp eq i32 %8, 2
  %or.cond = or i1 %.not21, %34
  br i1 %or.cond, label %.loopexit, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str.2, i32 noundef 153, i32 noundef 4)
  %36 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull @.str.11)
          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 nonnull @.str.12)
          to label %39 unwind label %40

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

40:                                               ; preds = %37, %35
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %66

.loopexit:                                        ; preds = %28, %.preheader, %33, %39
  %42 = getelementptr inbounds i8, ptr %0, i64 112
  %43 = load i8, ptr %42, align 8, !tbaa !21, !range !22, !noundef !23
  %44 = trunc nuw i8 %43 to i1
  %45 = getelementptr inbounds i8, ptr %0, i64 40
  %46 = load ptr, ptr %45, align 8
  %47 = sext i32 %6 to i64
  %48 = getelementptr i32, ptr %46, i64 %47
  %.in.v = select i1 %44, i64 -8, i64 -4
  %.in = getelementptr i8, ptr %48, i64 %.in.v
  %49 = load i32, ptr %.in, align 4, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %0, i64 113
  %51 = load i8, ptr %50, align 1, !tbaa !24, !range !22, !noundef !23
  %52 = trunc nuw i8 %51 to i1
  %53 = getelementptr inbounds i8, ptr %0, i64 64
  %54 = load ptr, ptr %53, align 8
  %55 = sext i32 %8 to i64
  %56 = getelementptr i32, ptr %54, i64 %55
  %.in18.v = select i1 %52, i64 -4, i64 -8
  %.in18 = getelementptr i8, ptr %56, i64 %.in18.v
  %57 = load i32, ptr %.in18, align 4, !tbaa !17
  %.not = icmp eq i32 %49, %57
  br i1 %.not, label %65, label %58

58:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @_ZN5micro4base6LoggerC1EPKcjNS_8LogLevelE(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str.2, i32 noundef 161, i32 noundef 4)
  %59 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str.13)
          to label %60 unwind label %63

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5micro4base6LoggerlsEPKc(ptr noundef nonnull align 4 dereferenceable(4) %59, ptr noundef nonnull @.str.14)
          to label %62 unwind label %63

62:                                               ; preds = %60
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %65

63:                                               ; preds = %60, %58
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5micro4base6LoggerD1Ev(ptr noundef nonnull align 4 dereferenceable(4) %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %66

65:                                               ; preds = %.loopexit, %62
  ret i1 %.not

66:                                               ; preds = %63, %40, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %64, %63 ], [ %41, %40 ]
  resume { ptr, i32 } %.pn
}

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, !11, i64 48}
!6 = !{!"_ZTSN5micro3ops8MatMulOpE", !7, i64 0, !8, i64 32, !8, i64 40, !11, i64 48, !8, i64 56, !8, i64 64, !11, i64 72, !8, i64 80, !8, i64 88, !11, i64 96, !8, i64 104, !12, i64 112, !12, i64 113, !13, i64 114, !14, i64 115}
!7 = !{!"_ZTSN5micro9framework8OperatorE", !8, i64 8, !8, i64 16, !8, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTSN5micro3ops4GemvIfEE"}
!14 = !{!"_ZTSN5micro3ops4GemmIfEE"}
!15 = !{!6, !11, i64 72}
!16 = !{!6, !8, i64 40}
!17 = !{!11, !11, i64 0}
!18 = !{!6, !8, i64 64}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !12, i64 112}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!6, !12, i64 113}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass