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

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

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@__func__.libxsmm_generator_gemm_rv64_setup_n_blocking = external hidden unnamed_addr constant [45 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 @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_rv64_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_rv64_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_rv64_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_rv64_setup_n_blocking, ptr noundef @.str, i32 noundef 559, i32 noundef %40)
  store i32 1, ptr %16, align 4
  br label %162

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
  br label %77

77:                                               ; preds = %88, %76
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = mul i32 %78, %79
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = add i32 %80, %81
  %83 = add i32 %82, 1
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !18
  %87 = icmp ugt i32 %83, %86
  br i1 %87, label %88, label %91

88:                                               ; preds = %77
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = add i32 %89, -1
  store i32 %90, ptr %13, align 4, !tbaa !9
  br label %77, !llvm.loop !19

91:                                               ; preds = %77
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %92, i32 0, i32 6
  %94 = load i32, ptr %93, align 1, !tbaa !21
  %95 = and i32 %94, 2048
  %96 = icmp ugt i32 %95, 0
  br i1 %96, label %97, label %147

97:                                               ; preds = %91
  store i32 16, ptr %13, align 4, !tbaa !9
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 1, !tbaa !22
  %101 = icmp ult i32 %100, 16
  br i1 %101, label %102, label %117

102:                                              ; preds = %97
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 1, !tbaa !22
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = getelementptr inbounds i32, ptr %106, i64 0
  store i32 %105, ptr %107, align 4, !tbaa !9
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 1, !tbaa !22
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = getelementptr inbounds i32, ptr %111, i64 0
  store i32 %110, ptr %112, align 4, !tbaa !9
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds i32, ptr %113, i64 1
  store i32 0, ptr %114, align 4, !tbaa !9
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds i32, ptr %115, i64 1
  store i32 0, ptr %116, align 4, !tbaa !9
  br label %146

117:                                              ; preds = %97
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 1, !tbaa !22
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 1, !tbaa !22
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = urem i32 %123, %124
  %126 = sub i32 %120, %125
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds i32, ptr %127, i64 0
  store i32 %126, ptr %128, align 4, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds i32, ptr %130, i64 0
  store i32 %129, ptr %131, align 4, !tbaa !9
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 1, !tbaa !22
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = urem i32 %134, %135
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = getelementptr inbounds i32, ptr %137, i64 1
  store i32 %136, ptr %138, align 4, !tbaa !9
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 1, !tbaa !22
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = urem i32 %141, %142
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  %145 = getelementptr inbounds i32, ptr %144, i64 1
  store i32 %143, ptr %145, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %117, %102
  br label %161

147:                                              ; preds = %91
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %148, i32 0, i32 1
  %150 = load i32, ptr %149, align 1, !tbaa !22
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds i32, ptr %152, i64 0
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = getelementptr inbounds i32, ptr %154, i64 0
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds i32, ptr %156, i64 1
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = getelementptr inbounds i32, ptr %158, i64 1
  %160 = call i32 @libxsmm_compute_equalized_blocking(i32 noundef %150, i32 noundef %151, ptr noundef %153, ptr noundef %155, ptr noundef %157, ptr noundef %159)
  br label %161

161:                                              ; preds = %147, %146
  store i32 0, ptr %16, align 4
  br label %162

162:                                              ; preds = %161, %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
  %163 = load i32, ptr %16, align 4
  switch i32 %163, label %165 [
    i32 0, label %164
    i32 1, label %164
  ]

164:                                              ; preds = %162, %162
  ret void

165:                                              ; preds = %162
  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 = !{!12, !10, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!16, !10, i64 24}
!22 = !{!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 = external hidden unnamed_addr constant [82 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_rv64_setup_n_blocking = external hidden unnamed_addr constant [45 x i8], align 1

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_rv64_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_rv64_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_rv64_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_rv64_get_max_n_blocking(ptr noundef %1, ptr noundef %2, i32 noundef %3)
  %8 = tail call i32 @libxsmm_generator_gemm_rv64_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_rv64_setup_n_blocking, ptr noundef nonnull @.str, i32 noundef 559, i32 noundef %18) #2
  br label %65

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 %1, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !17
  br label %36

36:                                               ; preds = %36, %33
  %.049 = phi i32 [ %7, %33 ], [ %40, %36 ]
  %.054 = add i32 %.049, 1
  %37 = mul i32 %.054, %.0
  %38 = add i32 %37, 1
  %39 = icmp ugt i32 %38, %35
  %40 = add i32 %.049, -1
  br i1 %39, label %36, label %41, !llvm.loop !18

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %2, i64 24
  %43 = load i32, ptr %42, align 1, !tbaa !20
  %44 = and i32 %43, 2048
  %.not55 = icmp eq i32 %44, 0
  %45 = getelementptr inbounds i8, ptr %2, i64 4
  %46 = load i32, ptr %45, align 1, !tbaa !21
  br i1 %.not55, label %61, label %47

47:                                               ; preds = %41
  %48 = icmp ult i32 %46, 16
  br i1 %48, label %49, label %53

49:                                               ; preds = %47
  store i32 %46, ptr %4, align 4, !tbaa !13
  %50 = load i32, ptr %45, align 1, !tbaa !21
  store i32 %50, ptr %5, align 4, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 0, ptr %51, align 4, !tbaa !13
  %52 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 0, ptr %52, align 4, !tbaa !13
  br label %65

53:                                               ; preds = %47
  %54 = and i32 %46, -16
  store i32 %54, ptr %4, align 4, !tbaa !13
  store i32 16, ptr %5, align 4, !tbaa !13
  %55 = load i32, ptr %45, align 1, !tbaa !21
  %56 = and i32 %55, 15
  %57 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %56, ptr %57, align 4, !tbaa !13
  %58 = load i32, ptr %45, align 1, !tbaa !21
  %59 = and i32 %58, 15
  %60 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %59, ptr %60, align 4, !tbaa !13
  br label %65

61:                                               ; preds = %41
  %62 = getelementptr inbounds i8, ptr %4, i64 4
  %63 = getelementptr inbounds i8, ptr %5, i64 4
  %64 = tail call i32 @libxsmm_compute_equalized_blocking(i32 noundef %46, i32 noundef %.049, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %62, ptr noundef nonnull %63) #2
  br label %65

65:                                               ; preds = %61, %53, %49, %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 = !{!6, !7, i64 4}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!15, !7, i64 24}
!21 = !{!15, !7, i64 4}


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