; 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_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }
%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_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_gp_reg_mapping_struct = type { 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 }

@.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_k_strides = external hidden unnamed_addr constant [44 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

declare i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef) #1

declare void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef, i32 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_rv64_setup_k_strides(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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 ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %17 = call i32 @libxsmm_cpuid_arm_use_bfdot()
  store i32 %17, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %18 = call i32 @libxsmm_cpuid_arm_use_i8dot()
  store i32 %18, ptr %15, align 4, !tbaa !9
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = icmp uge i32 %21, 3001
  br i1 %22, label %23, label %68

23:                                               ; preds = %6
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %24, i32 0, i32 6
  %26 = load i32, ptr %25, align 1, !tbaa !13
  %27 = and i32 %26, 2
  %28 = icmp ugt i32 %27, 0
  br i1 %28, label %29, label %43

29:                                               ; preds = %23
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %30, i32 0, i32 4
  %32 = load i32, ptr %31, align 1, !tbaa !17
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %33, i32 0, i32 3
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = mul i32 %32, %35
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %37, i32 0, i32 3
  %39 = load i32, ptr %38, align 4, !tbaa !18
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = mul i32 %39, %40
  %42 = sub i32 %36, %41
  store i32 %42, ptr %13, align 4, !tbaa !9
  br label %67

43:                                               ; preds = %23
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 1, !tbaa !17
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 4, !tbaa !18
  %50 = mul i32 %46, %49
  store i32 %50, ptr %13, align 4, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %52, i32 0, i32 24
  %54 = load i32, ptr %53, align 4, !tbaa !21
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef %51, i32 noundef %54, i64 noundef %56)
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %57, i32 0, i32 4
  %59 = load i32, ptr %58, align 1, !tbaa !17
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = sub i32 %59, %60
  store i32 %61, ptr %13, align 4, !tbaa !9
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %62, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = mul i32 %65, %64
  store i32 %66, ptr %13, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %43, %29
  br label %77

68:                                               ; preds = %6
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %71 = icmp ult i32 1, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %68
  %73 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %75

74:                                               ; preds = %68
  br label %75

75:                                               ; preds = %74, %72
  %76 = phi i32 [ %73, %72 ], [ 1, %74 ]
  call void @libxsmm_handle_error(ptr noundef %69, i32 noundef 90005, ptr noundef @__func__.libxsmm_generator_gemm_rv64_setup_k_strides, ptr noundef @.str, i32 noundef 619, i32 noundef %76)
  store i32 1, ptr %16, align 4
  br label %156

77:                                               ; preds = %67
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %79, i32 0, i32 23
  %81 = load i32, ptr %80, align 4, !tbaa !23
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef %78, i32 noundef %81, i64 noundef %83)
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %110

86:                                               ; preds = %77
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %87, i32 0, i32 8
  %89 = getelementptr inbounds [3 x i8], ptr %88, i64 0, i64 0
  %90 = call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef %89)
  %91 = icmp eq i32 2, %90
  br i1 %91, label %92, label %110

92:                                               ; preds = %86
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %94, i32 0, i32 22
  %96 = load i32, ptr %95, align 4, !tbaa !24
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %97, i32 0, i32 3
  %99 = load i32, ptr %98, align 1, !tbaa !25
  %100 = zext i32 %99 to i64
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = sub nsw i64 %100, %102
  %104 = mul nsw i64 %103, 2
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %105, i32 0, i32 3
  %107 = load i32, ptr %106, align 4, !tbaa !18
  %108 = zext i32 %107 to i64
  %109 = mul nsw i64 %104, %108
  call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef %93, i32 noundef %96, i64 noundef %109)
  br label %155

110:                                              ; preds = %86, %77
  %111 = load i32, ptr %15, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %137

113:                                              ; preds = %110
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %114, i32 0, i32 8
  %116 = getelementptr inbounds [3 x i8], ptr %115, i64 0, i64 0
  %117 = call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef %116)
  %118 = icmp eq i32 12, %117
  br i1 %118, label %119, label %137

119:                                              ; preds = %113
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %121, i32 0, i32 22
  %123 = load i32, ptr %122, align 4, !tbaa !24
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %124, i32 0, i32 3
  %126 = load i32, ptr %125, align 1, !tbaa !25
  %127 = zext i32 %126 to i64
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = sub nsw i64 %127, %129
  %131 = mul nsw i64 %130, 4
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !18
  %135 = zext i32 %134 to i64
  %136 = mul nsw i64 %131, %135
  call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef %120, i32 noundef %123, i64 noundef %136)
  br label %154

137:                                              ; preds = %113, %110
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %139, i32 0, i32 22
  %141 = load i32, ptr %140, align 4, !tbaa !24
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %142, i32 0, i32 3
  %144 = load i32, ptr %143, align 1, !tbaa !25
  %145 = zext i32 %144 to i64
  %146 = load i32, ptr %11, align 4, !tbaa !9
  %147 = zext i32 %146 to i64
  %148 = sub nsw i64 %145, %147
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.libxsmm_micro_kernel_config, ptr %149, i32 0, i32 3
  %151 = load i32, ptr %150, align 4, !tbaa !18
  %152 = zext i32 %151 to i64
  %153 = mul nsw i64 %148, %152
  call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef %138, i32 noundef %141, i64 noundef %153)
  br label %154

154:                                              ; preds = %137, %119
  br label %155

155:                                              ; preds = %154, %92
  store i32 0, ptr %16, align 4
  br label %156

156:                                              ; preds = %155, %75
  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
  %157 = load i32, ptr %16, align 4
  switch i32 %157, label %159 [
    i32 0, label %158
    i32 1, label %158
  ]

158:                                              ; preds = %156, %156
  ret void

159:                                              ; preds = %156
  unreachable
}

declare i32 @libxsmm_cpuid_arm_use_bfdot() #1

declare i32 @libxsmm_cpuid_arm_use_i8dot() #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 28}
!12 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!14, !10, i64 24}
!14 = !{!"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, !15, i64 33, !15, i64 41, !7, i64 49, !10, i64 50, !10, i64 54, !10, i64 58, !16, i64 62, !16, i64 64, !7, i64 66, !7, i64 67, !7, i64 68, !7, i64 69, !16, i64 70, !16, i64 72, !16, i64 74, !16, i64 76, !16, i64 78, !16, i64 80, !10, i64 82, !10, i64 86, !10, i64 90, !7, i64 94}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!14, !10, i64 16}
!18 = !{!19, !10, i64 12}
!19 = !{!"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, !20, 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}
!20 = !{!"libxsmm_tile_config", !7, i64 0, !16, i64 2, !7, i64 4, !16, i64 6, !7, i64 8, !16, i64 10, !7, i64 12, !16, i64 14, !7, i64 16, !16, i64 18, !7, i64 20, !16, i64 22, !7, i64 24, !16, i64 26, !7, i64 28, !16, i64 30, !7, i64 32}
!21 = !{!22, !10, i64 96}
!22 = !{!"libxsmm_gp_reg_mapping_struct", !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, !10, 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}
!23 = !{!22, !10, i64 92}
!24 = !{!22, !10, i64 88}
!25 = !{!14, !10, i64 12}


; 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_k_strides = external hidden unnamed_addr constant [44 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

declare i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_rv64_setup_k_strides(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #1 {
  %7 = tail call i32 @libxsmm_cpuid_arm_use_bfdot() #2
  %8 = tail call i32 @libxsmm_cpuid_arm_use_i8dot() #2
  %9 = getelementptr inbounds i8, ptr %0, i64 28
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp ugt i32 %10, 3000
  br i1 %11, label %12, label %32

12:                                               ; preds = %6
  %13 = getelementptr inbounds i8, ptr %3, i64 24
  %14 = load i32, ptr %13, align 1, !tbaa !11
  %15 = and i32 %14, 2
  %.not = icmp eq i32 %15, 0
  %16 = getelementptr inbounds i8, ptr %3, i64 16
  %17 = load i32, ptr %16, align 1, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %2, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !16
  br i1 %.not, label %23, label %20

20:                                               ; preds = %12
  %21 = sub i32 %17, %5
  %22 = mul i32 %21, %19
  br label %37

23:                                               ; preds = %12
  %24 = mul i32 %19, %17
  %25 = getelementptr inbounds i8, ptr %1, i64 96
  %26 = load i32, ptr %25, align 4, !tbaa !19
  %27 = sext i32 %24 to i64
  tail call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef nonnull %0, i32 noundef %26, i64 noundef %27) #2
  %28 = load i32, ptr %16, align 1, !tbaa !15
  %29 = sub i32 %28, %5
  %30 = load i32, ptr %18, align 4, !tbaa !16
  %31 = mul i32 %29, %30
  br label %37

32:                                               ; preds = %6
  %33 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %34 = icmp ugt i32 %33, 1
  %35 = load i32, ptr @libxsmm_verbosity, align 4
  %36 = select i1 %34, i32 %35, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90005, ptr noundef nonnull @__func__.libxsmm_generator_gemm_rv64_setup_k_strides, ptr noundef nonnull @.str, i32 noundef 619, i32 noundef %36) #2
  br label %88

37:                                               ; preds = %20, %23
  %.0 = phi i32 [ %22, %20 ], [ %31, %23 ]
  %38 = getelementptr inbounds i8, ptr %1, i64 92
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = sext i32 %.0 to i64
  tail call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef nonnull %0, i32 noundef %39, i64 noundef %40) #2
  %.not37 = icmp eq i32 %7, 0
  br i1 %.not37, label %58, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %3, i64 29
  %43 = tail call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef nonnull %42) #2
  %44 = icmp eq i32 %43, 2
  br i1 %44, label %45, label %58

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %1, i64 88
  %47 = load i32, ptr %46, align 4, !tbaa !23
  %48 = getelementptr inbounds i8, ptr %3, i64 12
  %49 = load i32, ptr %48, align 1, !tbaa !24
  %50 = zext i32 %49 to i64
  %51 = zext i32 %4 to i64
  %52 = sub nsw i64 %50, %51
  %53 = shl nsw i64 %52, 1
  %54 = getelementptr inbounds i8, ptr %2, i64 12
  %55 = load i32, ptr %54, align 4, !tbaa !16
  %56 = zext i32 %55 to i64
  %57 = mul nsw i64 %53, %56
  tail call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef nonnull %0, i32 noundef %47, i64 noundef %57) #2
  br label %88

58:                                               ; preds = %41, %37
  %.not38 = icmp eq i32 %8, 0
  br i1 %.not38, label %76, label %59

59:                                               ; preds = %58
  %60 = getelementptr inbounds i8, ptr %3, i64 29
  %61 = tail call i32 @LIBXSMM_GEMM_GETENUM_AB_COMMON_PREC(ptr noundef nonnull %60) #2
  %62 = icmp eq i32 %61, 12
  br i1 %62, label %63, label %76

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %1, i64 88
  %65 = load i32, ptr %64, align 4, !tbaa !23
  %66 = getelementptr inbounds i8, ptr %3, i64 12
  %67 = load i32, ptr %66, align 1, !tbaa !24
  %68 = zext i32 %67 to i64
  %69 = zext i32 %4 to i64
  %70 = sub nsw i64 %68, %69
  %71 = shl nsw i64 %70, 2
  %72 = getelementptr inbounds i8, ptr %2, i64 12
  %73 = load i32, ptr %72, align 4, !tbaa !16
  %74 = zext i32 %73 to i64
  %75 = mul nsw i64 %71, %74
  tail call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef nonnull %0, i32 noundef %65, i64 noundef %75) #2
  br label %88

76:                                               ; preds = %59, %58
  %77 = getelementptr inbounds i8, ptr %1, i64 88
  %78 = load i32, ptr %77, align 4, !tbaa !23
  %79 = getelementptr inbounds i8, ptr %3, i64 12
  %80 = load i32, ptr %79, align 1, !tbaa !24
  %81 = zext i32 %80 to i64
  %82 = zext i32 %4 to i64
  %83 = sub nsw i64 %81, %82
  %84 = getelementptr inbounds i8, ptr %2, i64 12
  %85 = load i32, ptr %84, align 4, !tbaa !16
  %86 = zext i32 %85 to i64
  %87 = mul nsw i64 %83, %86
  tail call void @libxsmm_rv64_instruction_alu_set_imm64(ptr noundef nonnull %0, i32 noundef %78, i64 noundef %87) #2
  br label %88

88:                                               ; preds = %45, %76, %63, %32
  ret void
}

declare i32 @libxsmm_cpuid_arm_use_bfdot() local_unnamed_addr #0

declare i32 @libxsmm_cpuid_arm_use_i8dot() 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, !10, i64 28}
!6 = !{!"libxsmm_generated_code", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"libxsmm_gemm_descriptor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !8, i64 28, !8, i64 29, !8, i64 32, !13, i64 33, !13, i64 41, !8, i64 49, !10, i64 50, !10, i64 54, !10, i64 58, !14, i64 62, !14, i64 64, !8, i64 66, !8, i64 67, !8, i64 68, !8, 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, !8, i64 94}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!12, !10, i64 16}
!16 = !{!17, !10, i64 12}
!17 = !{!"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, !8, 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, !8, i64 364, !8, i64 380, !8, i64 396, !8, i64 412, !8, i64 428, !8, i64 444, !10, i64 460, !8, i64 464, !18, 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, !7, i64 592, !10, i64 600, !10, i64 604, !10, i64 608, !10, i64 612, !7, 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}
!18 = !{!"libxsmm_tile_config", !8, i64 0, !14, i64 2, !8, i64 4, !14, i64 6, !8, i64 8, !14, i64 10, !8, i64 12, !14, i64 14, !8, i64 16, !14, i64 18, !8, i64 20, !14, i64 22, !8, i64 24, !14, i64 26, !8, i64 28, !14, i64 30, !8, i64 32}
!19 = !{!20, !10, i64 96}
!20 = !{!"libxsmm_gp_reg_mapping_struct", !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, !10, 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}
!21 = !{!10, !10, i64 0}
!22 = !{!20, !10, i64 92}
!23 = !{!20, !10, i64 88}
!24 = !{!12, !10, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass