; 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_descriptor_blob = type { [96 x i8] }
%struct.libxsmm_mateltwise_kernel_config_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, 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, 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, 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_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 }
%struct.libxsmm_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }

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

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

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

declare void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext) #2

declare void @libxsmm_aarch64_instruction_alu_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #2

declare ptr @libxsmm_meltw_descriptor_init2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext) #2

declare void @libxsmm_generator_mateltwise_aarch64_init_micro_kernel_config_fullvector(ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @libxsmm_cpuid_arm_use_bfdot() #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_vnni_store_C_from_scratch_aarch64(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %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 %struct.libxsmm_descriptor_blob, align 1
  %14 = alloca ptr, align 8
  %15 = alloca %struct.libxsmm_mateltwise_kernel_config_struct, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 80, ptr %12, align 4, !tbaa !9
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %19, i32 0, i32 8
  %21 = getelementptr inbounds [3 x i8], ptr %20, i64 0, i64 0
  %22 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %21)
  %23 = icmp eq i32 2, %22
  br i1 %23, label %24, label %184

24:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 96, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 1, !tbaa !11
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 1, !tbaa !15
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 1, !tbaa !11
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %34, i32 0, i32 5
  %36 = load i32, ptr %35, align 1, !tbaa !16
  %37 = call i32 @libxsmm_cpuid_arm_use_bfdot()
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %45

39:                                               ; preds = %24
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 1, !tbaa !15
  %43 = urem i32 %42, 4
  %44 = icmp eq i32 %43, 0
  br label %45

45:                                               ; preds = %39, %24
  %46 = phi i1 [ false, %24 ], [ %44, %39 ]
  %47 = zext i1 %46 to i64
  %48 = select i1 %46, i32 54, i32 28
  %49 = trunc i32 %48 to i16
  %50 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef %13, i32 noundef 2, i32 noundef 15, i32 noundef 15, i32 noundef 2, i32 noundef 2, i32 noundef %27, i32 noundef %30, i32 noundef %33, i32 noundef %36, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext %49, i8 noundef zeroext 1)
  store ptr %50, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 516, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %51, i32 0, i32 23
  %53 = load i32, ptr %52, align 4, !tbaa !17
  store i32 %53, ptr %16, align 4, !tbaa !9
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libxsmm_generator_mateltwise_aarch64_init_micro_kernel_config_fullvector(ptr noundef %54, ptr noundef %15, ptr noundef %55)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %57, i32 0, i32 5
  %59 = load i32, ptr %58, align 4, !tbaa !19
  call void @libxsmm_generator_gemm_getval_stack_var_aarch64(ptr noundef %56, i32 noundef 18, i32 noundef %59)
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load i32, ptr %16, align 4, !tbaa !9
  call void @libxsmm_generator_gemm_getval_stack_var_aarch64(ptr noundef %60, i32 noundef 6, i32 noundef %61)
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr %16, align 4, !tbaa !9
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %64, i32 0, i32 24
  %66 = load i32, ptr %65, align 4, !tbaa !20
  %67 = load i32, ptr %16, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %62, i32 noundef 4096, i32 noundef %63, i32 noundef %66, i32 noundef %67, i64 noundef 2048)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef %68, i32 noundef 1358954502, i32 noundef 63, i32 noundef 63, i32 noundef 128, i8 noundef zeroext 0)
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef %69, i32 noundef 285212678, i32 noundef 63, i32 noundef 32, i32 noundef 0, i8 noundef zeroext 0)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %72, i32 0, i32 5
  %74 = load i32, ptr %73, align 4, !tbaa !19
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %70, i32 noundef -1191182330, i32 noundef 63, i32 noundef 63, i32 noundef %71, i32 noundef %74)
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = load i32, ptr %16, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %75, i32 noundef -1191182330, i32 noundef 63, i32 noundef 63, i32 noundef %76, i32 noundef %77)
  %78 = call i32 @libxsmm_cpuid_arm_use_bfdot()
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %134

80:                                               ; preds = %45
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 1, !tbaa !15
  %84 = urem i32 %83, 4
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %134

86:                                               ; preds = %80
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %87, i32 0, i32 6
  %89 = load i32, ptr %88, align 4, !tbaa !21
  %90 = icmp uge i32 %89, 2301
  br i1 %90, label %91, label %116

91:                                               ; preds = %86
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %92, i32 0, i32 6
  %94 = load i32, ptr %93, align 4, !tbaa !21
  %95 = icmp ult i32 %94, 2401
  br i1 %95, label %96, label %116

96:                                               ; preds = %91
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4, !tbaa !23
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %103, i32 0, i32 5
  %105 = load i32, ptr %104, align 4, !tbaa !19
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %106, i32 0, i32 24
  %108 = load i32, ptr %107, align 4, !tbaa !20
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %109, i32 0, i32 25
  %111 = load i32, ptr %110, align 4, !tbaa !24
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %112, i32 0, i32 26
  %114 = load i32, ptr %113, align 4, !tbaa !25
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_sve_microkernel(ptr noundef %97, ptr noundef %98, i32 noundef %101, i32 noundef %102, i32 noundef %105, i32 noundef %108, i32 noundef %111, i32 noundef %114, ptr noundef %15, ptr noundef %115, i32 noundef 0)
  br label %133

116:                                              ; preds = %91, %86
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = load i32, ptr %16, align 4, !tbaa !9
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %120, i32 0, i32 5
  %122 = load i32, ptr %121, align 4, !tbaa !19
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %123, i32 0, i32 24
  %125 = load i32, ptr %124, align 4, !tbaa !20
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %126, i32 0, i32 25
  %128 = load i32, ptr %127, align 4, !tbaa !24
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %129, i32 0, i32 26
  %131 = load i32, ptr %130, align 4, !tbaa !25
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_asimd_microkernel(ptr noundef %117, ptr noundef %118, i32 noundef %119, i32 noundef %122, i32 noundef %125, i32 noundef %128, i32 noundef %131, ptr noundef %15, ptr noundef %132, i32 noundef 0)
  br label %133

133:                                              ; preds = %116, %96
  br label %182

134:                                              ; preds = %80, %45
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %135, i32 0, i32 6
  %137 = load i32, ptr %136, align 4, !tbaa !21
  %138 = icmp uge i32 %137, 2301
  br i1 %138, label %139, label %164

139:                                              ; preds = %134
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %141, align 4, !tbaa !21
  %143 = icmp ult i32 %142, 2401
  br i1 %143, label %144, label %164

144:                                              ; preds = %139
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !23
  %150 = load i32, ptr %16, align 4, !tbaa !9
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %151, i32 0, i32 5
  %153 = load i32, ptr %152, align 4, !tbaa !19
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %154, i32 0, i32 24
  %156 = load i32, ptr %155, align 4, !tbaa !20
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %157, i32 0, i32 25
  %159 = load i32, ptr %158, align 4, !tbaa !24
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %160, i32 0, i32 26
  %162 = load i32, ptr %161, align 4, !tbaa !25
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_sve_microkernel(ptr noundef %145, ptr noundef %146, i32 noundef %149, i32 noundef %150, i32 noundef %153, i32 noundef %156, i32 noundef %159, i32 noundef %162, ptr noundef %15, ptr noundef %163, i32 noundef 0)
  br label %181

164:                                              ; preds = %139, %134
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = load i32, ptr %16, align 4, !tbaa !9
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %168, i32 0, i32 5
  %170 = load i32, ptr %169, align 4, !tbaa !19
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %171, i32 0, i32 24
  %173 = load i32, ptr %172, align 4, !tbaa !20
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %174, i32 0, i32 25
  %176 = load i32, ptr %175, align 4, !tbaa !24
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %177, i32 0, i32 26
  %179 = load i32, ptr %178, align 4, !tbaa !25
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_asimd_microkernel(ptr noundef %165, ptr noundef %166, i32 noundef %167, i32 noundef %170, i32 noundef %173, i32 noundef %176, i32 noundef %179, ptr noundef %15, ptr noundef %180, i32 noundef 0)
  br label %181

181:                                              ; preds = %164, %144
  br label %182

182:                                              ; preds = %181, %133
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef %183, i32 noundef 285212678, i32 noundef 63, i32 noundef 63, i32 noundef 128, i8 noundef zeroext 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 516, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #3
  br label %193

184:                                              ; preds = %5
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %187 = icmp ult i32 1, %186
  br i1 %187, label %188, label %190

188:                                              ; preds = %184
  %189 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %191

190:                                              ; preds = %184
  br label %191

191:                                              ; preds = %190, %188
  %192 = phi i32 [ %189, %188 ], [ 1, %190 ]
  call void @libxsmm_handle_error(ptr noundef %185, i32 noundef 90033, ptr noundef @__func__.libxsmm_generator_gemm_vnni_store_C_from_scratch_aarch64, ptr noundef @.str.1, i32 noundef 413, i32 noundef %192)
  store i32 1, ptr %17, align 4
  br label %194

193:                                              ; preds = %182
  store i32 0, ptr %17, align 4
  br label %194

194:                                              ; preds = %193, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %195 = load i32, ptr %17, align 4
  switch i32 %195, label %197 [
    i32 0, label %196
    i32 1, label %196
  ]

196:                                              ; preds = %194, %194
  ret void

197:                                              ; preds = %194
  unreachable
}

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) #2

declare void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_sve_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_asimd_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_sve_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_asimd_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 0}
!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, !7, i64 28, !7, i64 29, !7, i64 32, !13, i64 33, !13, 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}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !10, i64 4}
!16 = !{!12, !10, i64 20}
!17 = !{!18, !10, i64 92}
!18 = !{!"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}
!19 = !{!18, !10, i64 20}
!20 = !{!18, !10, i64 96}
!21 = !{!22, !10, i64 28}
!22 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!23 = !{!18, !10, i64 0}
!24 = !{!18, !10, i64 100}
!25 = !{!18, !10, i64 104}


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

%struct.libxsmm_descriptor_blob = type { [96 x i8] }
%struct.libxsmm_mateltwise_kernel_config_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, 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, 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, i8 }

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

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

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

declare void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #2

declare void @libxsmm_aarch64_instruction_alu_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @libxsmm_meltw_descriptor_init2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

declare void @libxsmm_generator_mateltwise_aarch64_init_micro_kernel_config_fullvector(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @libxsmm_cpuid_arm_use_bfdot() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_gemm_vnni_store_C_from_scratch_aarch64(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readnone %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca %struct.libxsmm_descriptor_blob, align 1
  %7 = alloca %struct.libxsmm_mateltwise_kernel_config_struct, align 4
  %8 = getelementptr inbounds i8, ptr %4, i64 29
  %9 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %8) #3
  %10 = icmp eq i32 %9, 2
  br i1 %10, label %11, label %79

11:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #3
  %12 = load i32, ptr %4, align 1, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %4, i64 4
  %14 = load i32, ptr %13, align 1, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %4, i64 20
  %16 = load i32, ptr %15, align 1, !tbaa !13
  %17 = tail call i32 @libxsmm_cpuid_arm_use_bfdot() #3
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %24

19:                                               ; preds = %11
  %20 = load i32, ptr %13, align 1, !tbaa !12
  %21 = and i32 %20, 3
  %22 = icmp eq i32 %21, 0
  %23 = select i1 %22, i16 54, i16 28
  br label %24

24:                                               ; preds = %19, %11
  %25 = phi i16 [ 28, %11 ], [ %23, %19 ]
  %26 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef nonnull %6, i32 noundef 2, i32 noundef 15, i32 noundef 15, i32 noundef 2, i32 noundef 2, i32 noundef %12, i32 noundef %14, i32 noundef %12, i32 noundef %16, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext %25, i8 noundef zeroext 1) #3
  call void @llvm.lifetime.start.p0(i64 516, ptr nonnull %7) #3
  %27 = getelementptr inbounds i8, ptr %2, i64 92
  %28 = load i32, ptr %27, align 4, !tbaa !14
  call void @libxsmm_generator_mateltwise_aarch64_init_micro_kernel_config_fullvector(ptr noundef %0, ptr noundef nonnull %7, ptr noundef %26) #3
  %29 = getelementptr inbounds i8, ptr %2, i64 20
  %30 = load i32, ptr %29, align 4, !tbaa !16
  call void @libxsmm_generator_gemm_getval_stack_var_aarch64(ptr noundef %0, i32 noundef 18, i32 noundef %30)
  call void @libxsmm_generator_gemm_getval_stack_var_aarch64(ptr noundef %0, i32 noundef 6, i32 noundef %28)
  %31 = getelementptr inbounds i8, ptr %2, i64 96
  %32 = load i32, ptr %31, align 4, !tbaa !17
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %0, i32 noundef 4096, i32 noundef %28, i32 noundef %32, i32 noundef %28, i64 noundef 2048) #3
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef %0, i32 noundef 1358954502, i32 noundef 63, i32 noundef 63, i32 noundef 128, i8 noundef zeroext 0) #3
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef %0, i32 noundef 285212678, i32 noundef 63, i32 noundef 32, i32 noundef 0, i8 noundef zeroext 0) #3
  %33 = load i32, ptr %29, align 4, !tbaa !16
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %0, i32 noundef -1191182330, i32 noundef 63, i32 noundef 63, i32 noundef 80, i32 noundef %33) #3
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %0, i32 noundef -1191182330, i32 noundef 63, i32 noundef 63, i32 noundef 32, i32 noundef %28) #3
  %34 = call i32 @libxsmm_cpuid_arm_use_bfdot() #3
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %59

36:                                               ; preds = %24
  %37 = load i32, ptr %13, align 1, !tbaa !12
  %38 = and i32 %37, 3
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %59

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %0, i64 28
  %42 = load i32, ptr %41, align 4, !tbaa !18
  %43 = add i32 %42, -2301
  %or.cond = icmp ult i32 %43, 100
  br i1 %or.cond, label %44, label %52

44:                                               ; preds = %40
  %45 = load i32, ptr %2, align 4, !tbaa !21
  %46 = load i32, ptr %29, align 4, !tbaa !16
  %47 = load i32, ptr %31, align 4, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %2, i64 100
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %2, i64 104
  %51 = load i32, ptr %50, align 4, !tbaa !23
  call void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_sve_microkernel(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %45, i32 noundef %28, i32 noundef %46, i32 noundef %47, i32 noundef %49, i32 noundef %51, ptr noundef nonnull %7, ptr noundef %26, i32 noundef 0) #3
  br label %78

52:                                               ; preds = %40
  %53 = load i32, ptr %29, align 4, !tbaa !16
  %54 = load i32, ptr %31, align 4, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %2, i64 100
  %56 = load i32, ptr %55, align 4, !tbaa !22
  %57 = getelementptr inbounds i8, ptr %2, i64 104
  %58 = load i32, ptr %57, align 4, !tbaa !23
  call void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_asimd_microkernel(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %28, i32 noundef %53, i32 noundef %54, i32 noundef %56, i32 noundef %58, ptr noundef nonnull %7, ptr noundef %26, i32 noundef 0) #3
  br label %78

59:                                               ; preds = %36, %24
  %60 = getelementptr inbounds i8, ptr %0, i64 28
  %61 = load i32, ptr %60, align 4, !tbaa !18
  %62 = add i32 %61, -2301
  %or.cond67 = icmp ult i32 %62, 100
  br i1 %or.cond67, label %63, label %71

63:                                               ; preds = %59
  %64 = load i32, ptr %2, align 4, !tbaa !21
  %65 = load i32, ptr %29, align 4, !tbaa !16
  %66 = load i32, ptr %31, align 4, !tbaa !17
  %67 = getelementptr inbounds i8, ptr %2, i64 100
  %68 = load i32, ptr %67, align 4, !tbaa !22
  %69 = getelementptr inbounds i8, ptr %2, i64 104
  %70 = load i32, ptr %69, align 4, !tbaa !23
  call void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_sve_microkernel(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %64, i32 noundef %28, i32 noundef %65, i32 noundef %66, i32 noundef %68, i32 noundef %70, ptr noundef nonnull %7, ptr noundef %26, i32 noundef 0) #3
  br label %78

71:                                               ; preds = %59
  %72 = load i32, ptr %29, align 4, !tbaa !16
  %73 = load i32, ptr %31, align 4, !tbaa !17
  %74 = getelementptr inbounds i8, ptr %2, i64 100
  %75 = load i32, ptr %74, align 4, !tbaa !22
  %76 = getelementptr inbounds i8, ptr %2, i64 104
  %77 = load i32, ptr %76, align 4, !tbaa !23
  call void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_asimd_microkernel(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %28, i32 noundef %72, i32 noundef %73, i32 noundef %75, i32 noundef %77, ptr noundef nonnull %7, ptr noundef %26, i32 noundef 0) #3
  br label %78

78:                                               ; preds = %63, %71, %44, %52
  call void @libxsmm_aarch64_instruction_alu_compute_imm12(ptr noundef nonnull %0, i32 noundef 285212678, i32 noundef 63, i32 noundef 63, i32 noundef 128, i8 noundef zeroext 0) #3
  call void @llvm.lifetime.end.p0(i64 516, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #3
  br label %84

79:                                               ; preds = %5
  %80 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !24
  %81 = icmp ugt i32 %80, 1
  %82 = load i32, ptr @libxsmm_verbosity, align 4
  %83 = select i1 %81, i32 %82, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90033, ptr noundef nonnull @__func__.libxsmm_generator_gemm_vnni_store_C_from_scratch_aarch64, ptr noundef nonnull @.str.1, i32 noundef 413, i32 noundef %83) #3
  br label %84

84:                                               ; preds = %78, %79
  ret void
}

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_sve_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_norm_to_vnni4_16bit_aarch64_asimd_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_sve_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_norm_to_vnni2_16bit_aarch64_asimd_microkernel(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !7, i64 0}
!6 = !{!"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, !10, i64 33, !10, 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}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 20}
!14 = !{!15, !7, i64 92}
!15 = !{!"libxsmm_gp_reg_mapping_struct", !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, !7, 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}
!16 = !{!15, !7, i64 20}
!17 = !{!15, !7, i64 96}
!18 = !{!19, !7, i64 28}
!19 = !{!"libxsmm_generated_code", !20, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!15, !7, i64 0}
!22 = !{!15, !7, i64 100}
!23 = !{!15, !7, i64 104}
!24 = !{!7, !7, i64 0}


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