; LLVM IR from libxsmm/libxsmm :: src (generator_gemm_common_aarch64)

; 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"

%struct.libxsmm_micro_kernel_config = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], [4 x i32], i32, [2 x %struct.libxsmm_blocking_info_t], %struct.libxsmm_tile_config, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.libxsmm_blocking_info_t = type { i32, [4 x i32], i32, i32 }
%struct.libxsmm_tile_config = type { i8, i16, i8, i16, i8, i16, i8, i16, i8, i16, i8, i16, i8, i16, i8, i16, i8 }
%struct.libxsmm_gemm_descriptor = type <{ i32, i32, i32, i32, i32, i32, i32, i8, [3 x i8], i8, i64, i64, i8, i32, i32, i32, i16, i16, i8, i8, i8, i8, i16, i16, i16, i16, i16, i16, i32, i32, i32, i8 }>
%struct.libxsmm_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@__func__.libxsmm_generator_gemm_aarch64_setup_n_blocking = external hidden unnamed_addr constant [48 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

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

declare i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef) #1

declare void @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_gemm_aarch64_get_max_n_blocking(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_gemm_aarch64_get_initial_m_blocking(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_aarch64_setup_n_blocking(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = call i32 @libxsmm_generator_gemm_aarch64_get_max_n_blocking(ptr noundef %17, ptr noundef %18, i32 noundef %19)
  store i32 %20, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = call i32 @libxsmm_generator_gemm_aarch64_get_initial_m_blocking(ptr noundef %21, ptr noundef %22, i32 noundef %23)
  store i32 %24, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %32, label %27

27:                                               ; preds = %6
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !11
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %41

32:                                               ; preds = %27, %6
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %35 = icmp ult i32 1, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %32
  %37 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %39

38:                                               ; preds = %32
  br label %39

39:                                               ; preds = %38, %36
  %40 = phi i32 [ %37, %36 ], [ 1, %38 ]
  call void @libxsmm_handle_error(ptr noundef %33, i32 noundef 90016, ptr noundef @__func__.libxsmm_generator_gemm_aarch64_setup_n_blocking, ptr noundef @.str.1, i32 noundef 2086, i32 noundef %40)
  store i32 1, ptr %16, align 4
  br label %197

41:                                               ; preds = %27
  %42 = load i32, ptr %14, align 4, !tbaa !9
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 8, !tbaa !11
  %46 = sub i32 %45, 1
  %47 = add i32 %42, %46
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = udiv i32 %47, %50
  store i32 %51, ptr %15, align 4, !tbaa !9
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = icmp ugt i32 %52, 0
  br i1 %53, label %54, label %76

54:                                               ; preds = %41
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = urem i32 %55, %58
  %60 = icmp eq i32 %59, 3
  br i1 %60, label %72, label %61

61:                                               ; preds = %54
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 1, !tbaa !15
  %65 = load i32, ptr %14, align 4, !tbaa !9
  %66 = urem i32 %64, %65
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = urem i32 %66, %69
  %71 = icmp eq i32 %70, 3
  br i1 %71, label %72, label %75

72:                                               ; preds = %61, %54
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = add i32 %73, 1
  store i32 %74, ptr %15, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %72, %61
  br label %76

76:                                               ; preds = %75, %41
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %78, align 4, !tbaa !18
  %80 = icmp eq i32 %79, 2001
  br i1 %80, label %81, label %98

81:                                               ; preds = %76
  br label %82

82:                                               ; preds = %94, %81
  %83 = load i32, ptr %15, align 4, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = mul i32 %83, %84
  %86 = load i32, ptr %15, align 4, !tbaa !9
  %87 = add i32 %85, %86
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = add i32 %87, %88
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = icmp ugt i32 %89, %92
  br i1 %93, label %94, label %97

94:                                               ; preds = %82
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = add i32 %95, -1
  store i32 %96, ptr %13, align 4, !tbaa !9
  br label %82, !llvm.loop !21

97:                                               ; preds = %82
  br label %114

98:                                               ; preds = %76
  br label %99

99:                                               ; preds = %110, %98
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = mul i32 %100, %101
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = add i32 %102, %103
  %105 = add i32 %104, 1
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !20
  %109 = icmp ugt i32 %105, %108
  br i1 %109, label %110, label %113

110:                                              ; preds = %99
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = add i32 %111, -1
  store i32 %112, ptr %13, align 4, !tbaa !9
  br label %99, !llvm.loop !23

113:                                              ; preds = %99
  br label %114

114:                                              ; preds = %113, %97
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %116, align 1, !tbaa !24
  %118 = and i32 %117, 2048
  %119 = icmp ugt i32 %118, 0
  br i1 %119, label %132, label %120

120:                                              ; preds = %114
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %121, i32 0, i32 6
  %123 = load i32, ptr %122, align 1, !tbaa !24
  %124 = and i32 %123, 2048
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %182

126:                                              ; preds = %120
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %127, i32 0, i32 8
  %129 = getelementptr inbounds [3 x i8], ptr %128, i64 0, i64 0
  %130 = call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef %129)
  %131 = icmp eq i32 2, %130
  br i1 %131, label %132, label %182

132:                                              ; preds = %126, %114
  store i32 6, ptr %13, align 4, !tbaa !9
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 1, !tbaa !25
  %136 = icmp ult i32 %135, 6
  br i1 %136, label %137, label %152

137:                                              ; preds = %132
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %138, i32 0, i32 1
  %140 = load i32, ptr %139, align 1, !tbaa !25
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = getelementptr inbounds i32, ptr %141, i64 0
  store i32 %140, ptr %142, align 4, !tbaa !9
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 1, !tbaa !25
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = getelementptr inbounds i32, ptr %146, i64 0
  store i32 %145, ptr %147, align 4, !tbaa !9
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds i32, ptr %148, i64 1
  store i32 0, ptr %149, align 4, !tbaa !9
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = getelementptr inbounds i32, ptr %150, i64 1
  store i32 0, ptr %151, align 4, !tbaa !9
  br label %181

152:                                              ; preds = %132
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 1, !tbaa !25
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 1, !tbaa !25
  %159 = load i32, ptr %13, align 4, !tbaa !9
  %160 = urem i32 %158, %159
  %161 = sub i32 %155, %160
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds i32, ptr %162, i64 0
  store i32 %161, ptr %163, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = getelementptr inbounds i32, ptr %165, i64 0
  store i32 %164, ptr %166, align 4, !tbaa !9
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 1, !tbaa !25
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = urem i32 %169, %170
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = getelementptr inbounds i32, ptr %172, i64 1
  store i32 %171, ptr %173, align 4, !tbaa !9
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 1, !tbaa !25
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = urem i32 %176, %177
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = getelementptr inbounds i32, ptr %179, i64 1
  store i32 %178, ptr %180, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %152, %137
  br label %196

182:                                              ; preds = %126, %120
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 1, !tbaa !25
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = getelementptr inbounds i32, ptr %187, i64 0
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  %190 = getelementptr inbounds i32, ptr %189, i64 0
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = getelementptr inbounds i32, ptr %191, i64 1
  %193 = load ptr, ptr %12, align 8, !tbaa !5
  %194 = getelementptr inbounds i32, ptr %193, i64 1
  %195 = call i32 @libxsmm_compute_equalized_blocking(i32 noundef %185, i32 noundef %186, ptr noundef %188, ptr noundef %190, ptr noundef %192, ptr noundef %194)
  br label %196

196:                                              ; preds = %182, %181
  store i32 0, ptr %16, align 4
  br label %197

197:                                              ; preds = %196, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  %198 = load i32, ptr %16, align 4
  switch i32 %198, label %200 [
    i32 0, label %199
    i32 1, label %199
  ]

199:                                              ; preds = %197, %197
  ret void

200:                                              ; preds = %197
  unreachable
}

declare i32 @libxsmm_compute_equalized_blocking(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"libxsmm_micro_kernel_config", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !7, i64 364, !7, i64 380, !7, i64 396, !7, i64 412, !7, i64 428, !7, i64 444, !10, i64 460, !7, i64 464, !13, i64 520, !10, i64 556, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !6, i64 592, !10, i64 600, !10, i64 604, !10, i64 608, !10, i64 612, !6, i64 616, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !10, i64 640, !10, i64 644, !10, i64 648, !10, i64 652, !10, i64 656, !10, i64 660, !10, i64 664, !10, i64 668, !10, i64 672, !10, i64 676, !10, i64 680}
!13 = !{!"libxsmm_tile_config", !7, i64 0, !14, i64 2, !7, i64 4, !14, i64 6, !7, i64 8, !14, i64 10, !7, i64 12, !14, i64 14, !7, i64 16, !14, i64 18, !7, i64 20, !14, i64 22, !7, i64 24, !14, i64 26, !7, i64 28, !14, i64 30, !7, i64 32}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"libxsmm_gemm_descriptor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28, !7, i64 29, !7, i64 32, !17, i64 33, !17, i64 41, !7, i64 49, !10, i64 50, !10, i64 54, !10, i64 58, !14, i64 62, !14, i64 64, !7, i64 66, !7, i64 67, !7, i64 68, !7, i64 69, !14, i64 70, !14, i64 72, !14, i64 74, !14, i64 76, !14, i64 78, !14, i64 80, !10, i64 82, !10, i64 86, !10, i64 90, !7, i64 94}
!17 = !{!"long long", !7, i64 0}
!18 = !{!19, !10, i64 28}
!19 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!20 = !{!12, !10, i64 4}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!16, !10, i64 24}
!25 = !{!16, !10, i64 4}


; 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"

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@libxsmm_ninit = external local_unnamed_addr global i32, align 4
@libxsmm_verbosity = external local_unnamed_addr global i32, align 4
@__func__.libxsmm_generator_gemm_aarch64_setup_n_blocking = external hidden unnamed_addr constant [48 x i8], align 1

declare i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef) local_unnamed_addr #0

declare void @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_gemm_aarch64_get_max_n_blocking(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_gemm_aarch64_get_initial_m_blocking(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_aarch64_setup_n_blocking(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = tail call i32 @libxsmm_generator_gemm_aarch64_get_max_n_blocking(ptr noundef %1, ptr noundef %2, i32 noundef %3)
  %8 = tail call i32 @libxsmm_generator_gemm_aarch64_get_initial_m_blocking(ptr noundef %1, ptr noundef %2, i32 noundef %3)
  %9 = icmp eq i32 %7, 0
  br i1 %9, label %14, label %10

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %19

14:                                               ; preds = %10, %6
  %15 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !13
  %16 = icmp ugt i32 %15, 1
  %17 = load i32, ptr @libxsmm_verbosity, align 4
  %18 = select i1 %16, i32 %17, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90016, ptr noundef nonnull @__func__.libxsmm_generator_gemm_aarch64_setup_n_blocking, ptr noundef nonnull @.str.1, i32 noundef 2086, i32 noundef %18) #2
  br label %77

19:                                               ; preds = %10
  %20 = add i32 %8, -1
  %21 = add i32 %20, %12
  %22 = udiv i32 %21, %12
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %33, label %23

23:                                               ; preds = %19
  %24 = urem i32 %8, %12
  %25 = icmp eq i32 %24, 3
  br i1 %25, label %31, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %2, align 1, !tbaa !14
  %28 = urem i32 %27, %8
  %29 = urem i32 %28, %12
  %30 = icmp eq i32 %29, 3
  br i1 %30, label %31, label %33

31:                                               ; preds = %26, %23
  %32 = add i32 %22, 1
  br label %33

33:                                               ; preds = %26, %31, %19
  %.0 = phi i32 [ %32, %31 ], [ %22, %26 ], [ %22, %19 ]
  %34 = getelementptr inbounds i8, ptr %0, i64 28
  %35 = load i32, ptr %34, align 4, !tbaa !17
  %36 = icmp eq i32 %35, 2001
  %37 = getelementptr inbounds i8, ptr %1, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !19
  br i1 %36, label %.preheader, label %.preheader67

.preheader:                                       ; preds = %33, %.preheader
  %.058 = phi i32 [ %42, %.preheader ], [ %7, %33 ]
  %.065 = add i32 %.058, 1
  %39 = mul i32 %.065, %.0
  %40 = add i32 %39, %.058
  %41 = icmp ugt i32 %40, %38
  %42 = add i32 %.058, -1
  br i1 %41, label %.preheader, label %.loopexit, !llvm.loop !20

.preheader67:                                     ; preds = %33, %.preheader67
  %.1 = phi i32 [ %46, %.preheader67 ], [ %7, %33 ]
  %.064 = add i32 %.1, 1
  %43 = mul i32 %.064, %.0
  %44 = add i32 %43, 1
  %45 = icmp ugt i32 %44, %38
  %46 = add i32 %.1, -1
  br i1 %45, label %.preheader67, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %.preheader67, %.preheader
  %.2 = phi i32 [ %.058, %.preheader ], [ %.1, %.preheader67 ]
  %47 = getelementptr inbounds i8, ptr %2, i64 24
  %48 = load i32, ptr %47, align 1, !tbaa !23
  %49 = and i32 %48, 2048
  %.not66 = icmp eq i32 %49, 0
  br i1 %.not66, label %50, label %54

50:                                               ; preds = %.loopexit
  %51 = getelementptr inbounds i8, ptr %2, i64 29
  %52 = tail call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef nonnull %51) #2
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %54, label %71

54:                                               ; preds = %50, %.loopexit
  %55 = getelementptr inbounds i8, ptr %2, i64 4
  %56 = load i32, ptr %55, align 1, !tbaa !24
  %57 = icmp ult i32 %56, 6
  br i1 %57, label %58, label %62

58:                                               ; preds = %54
  store i32 %56, ptr %4, align 4, !tbaa !13
  %59 = load i32, ptr %55, align 1, !tbaa !24
  store i32 %59, ptr %5, align 4, !tbaa !13
  %60 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 0, ptr %60, align 4, !tbaa !13
  %61 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 0, ptr %61, align 4, !tbaa !13
  br label %77

62:                                               ; preds = %54
  %63 = urem i32 %56, 6
  %64 = sub nuw i32 %56, %63
  store i32 %64, ptr %4, align 4, !tbaa !13
  store i32 6, ptr %5, align 4, !tbaa !13
  %65 = load i32, ptr %55, align 1, !tbaa !24
  %66 = urem i32 %65, 6
  %67 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %66, ptr %67, align 4, !tbaa !13
  %68 = load i32, ptr %55, align 1, !tbaa !24
  %69 = urem i32 %68, 6
  %70 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %69, ptr %70, align 4, !tbaa !13
  br label %77

71:                                               ; preds = %50
  %72 = getelementptr inbounds i8, ptr %2, i64 4
  %73 = load i32, ptr %72, align 1, !tbaa !24
  %74 = getelementptr inbounds i8, ptr %4, i64 4
  %75 = getelementptr inbounds i8, ptr %5, i64 4
  %76 = tail call i32 @libxsmm_compute_equalized_blocking(i32 noundef %73, i32 noundef %.2, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %74, ptr noundef nonnull %75) #2
  br label %77

77:                                               ; preds = %71, %62, %58, %14
  ret void
}

declare i32 @libxsmm_compute_equalized_blocking(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #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 #1 = { 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 #2 = { 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, !7, i64 8}
!6 = !{!"libxsmm_micro_kernel_config", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !8, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !7, i64 272, !7, i64 276, !7, i64 280, !7, i64 284, !7, i64 288, !7, i64 292, !7, i64 296, !7, i64 300, !7, i64 304, !7, i64 308, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328, !7, i64 332, !7, i64 336, !7, i64 340, !7, i64 344, !7, i64 348, !7, i64 352, !7, i64 356, !7, i64 360, !8, i64 364, !8, i64 380, !8, i64 396, !8, i64 412, !8, i64 428, !8, i64 444, !7, i64 460, !8, i64 464, !10, i64 520, !7, i64 556, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !7, i64 584, !12, i64 592, !7, i64 600, !7, i64 604, !7, i64 608, !7, i64 612, !12, i64 616, !7, i64 624, !7, i64 628, !7, i64 632, !7, i64 636, !7, i64 640, !7, i64 644, !7, i64 648, !7, i64 652, !7, i64 656, !7, i64 660, !7, i64 664, !7, i64 668, !7, i64 672, !7, i64 676, !7, i64 680}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"libxsmm_tile_config", !8, i64 0, !11, i64 2, !8, i64 4, !11, i64 6, !8, i64 8, !11, i64 10, !8, i64 12, !11, i64 14, !8, i64 16, !11, i64 18, !8, i64 20, !11, i64 22, !8, i64 24, !11, i64 26, !8, i64 28, !11, i64 30, !8, i64 32}
!11 = !{!"short", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"libxsmm_gemm_descriptor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 28, !8, i64 29, !8, i64 32, !16, i64 33, !16, i64 41, !8, i64 49, !7, i64 50, !7, i64 54, !7, i64 58, !11, i64 62, !11, i64 64, !8, i64 66, !8, i64 67, !8, i64 68, !8, i64 69, !11, i64 70, !11, i64 72, !11, i64 74, !11, i64 76, !11, i64 78, !11, i64 80, !7, i64 82, !7, i64 86, !7, i64 90, !8, i64 94}
!16 = !{!"long long", !8, i64 0}
!17 = !{!18, !7, i64 28}
!18 = !{!"libxsmm_generated_code", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!19 = !{!6, !7, i64 4}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!15, !7, i64 24}
!24 = !{!15, !7, i64 4}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass