; LLVM IR from libxsmm/libxsmm :: src (generator_packed_gemm_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_loop_label_tracker_struct = type { [512 x i32], i32 }
%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 }
%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 }>

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_packed_gemm_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca %struct.libxsmm_micro_kernel_config, align 8
  %12 = alloca %struct.libxsmm_loop_label_tracker_struct, align 4
  %13 = alloca %struct.libxsmm_gp_reg_mapping_struct, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %17, i32 0, i32 6
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp uge i32 %19, 2501
  br i1 %20, label %21, label %26

21:                                               ; preds = %3
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %22, i32 0, i32 6
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = icmp ule i32 %24, 2999
  br label %26

26:                                               ; preds = %21, %3
  %27 = phi i1 [ false, %3 ], [ %25, %21 ]
  %28 = zext i1 %27 to i64
  %29 = select i1 %27, i32 1, i32 0
  %30 = trunc i32 %29 to i8
  store i8 %30, ptr %10, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 688, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 2052, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 132, ptr %13) #3
  store i32 28, ptr %7, align 4, !tbaa !9
  call void @libxsmm_reset_aarch64_gp_reg_mapping(ptr noundef %13)
  %31 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 0
  store i32 32, ptr %31, align 4, !tbaa !14
  %32 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 1
  store i32 32, ptr %32, align 4, !tbaa !16
  %33 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 3
  store i32 33, ptr %33, align 4, !tbaa !17
  %34 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 5
  store i32 34, ptr %34, align 4, !tbaa !18
  %35 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 6
  store i32 35, ptr %35, align 4, !tbaa !19
  %36 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 8
  store i32 36, ptr %36, align 4, !tbaa !20
  %37 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 10
  store i32 38, ptr %37, align 4, !tbaa !21
  %38 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 11
  store i32 39, ptr %38, align 4, !tbaa !22
  %39 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 12
  store i32 40, ptr %39, align 4, !tbaa !23
  %40 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 22
  store i32 41, ptr %40, align 4, !tbaa !24
  %41 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  store i32 42, ptr %41, align 4, !tbaa !25
  %42 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 24
  store i32 43, ptr %42, align 4, !tbaa !26
  %43 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 25
  store i32 44, ptr %43, align 4, !tbaa !27
  %44 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 26
  store i32 127, ptr %44, align 4, !tbaa !28
  %45 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 27
  store i32 127, ptr %45, align 4, !tbaa !29
  call void @libxsmm_reset_loop_label_tracker(ptr noundef %12)
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %46, i32 0, i32 6
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libxsmm_generator_gemm_init_micro_kernel_config_aarch64(ptr noundef %11, i32 noundef %48, ptr noundef %49)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_open_stream(ptr noundef %50, i16 noundef zeroext 15)
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %51, i32 0, i32 6
  %53 = load i32, ptr %52, align 1, !tbaa !30
  %54 = and i32 16384, %53
  %55 = icmp eq i32 %54, 16384
  br i1 %55, label %56, label %103

56:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 80, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 128, ptr %16, align 4, !tbaa !9
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 0
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !14
  %62 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %63 = load i32, ptr %62, align 4, !tbaa !25
  call void @libxsmm_aarch64_instruction_alu_compute_shifted_reg(ptr noundef %57, i32 noundef 167772167, i32 noundef %59, i32 noundef %61, i32 noundef %63, i32 noundef 0, i32 noundef 0)
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %66 = load i32, ptr %65, align 4, !tbaa !25
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !16
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %64, i32 noundef -1186988026, i32 noundef %66, i32 noundef 127, i32 noundef %67, i32 noundef %69)
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %72 = load i32, ptr %71, align 4, !tbaa !25
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 3
  %75 = load i32, ptr %74, align 4, !tbaa !17
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %70, i32 noundef -1186988026, i32 noundef %72, i32 noundef 127, i32 noundef %73, i32 noundef %75)
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %78 = load i32, ptr %77, align 4, !tbaa !25
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 5
  %81 = load i32, ptr %80, align 4, !tbaa !18
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %76, i32 noundef -1186988026, i32 noundef %78, i32 noundef 127, i32 noundef %79, i32 noundef %81)
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %82, i32 0, i32 7
  %84 = load i8, ptr %83, align 1, !tbaa !34
  %85 = zext i8 %84 to i32
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %102

87:                                               ; preds = %56
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %90 = load i32, ptr %89, align 4, !tbaa !25
  %91 = load i32, ptr %14, align 4, !tbaa !9
  %92 = add nsw i32 %91, 40
  %93 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 6
  %94 = load i32, ptr %93, align 4, !tbaa !19
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %88, i32 noundef -1186988026, i32 noundef %90, i32 noundef 127, i32 noundef %92, i32 noundef %94)
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 23
  %97 = load i32, ptr %96, align 4, !tbaa !25
  %98 = load i32, ptr %15, align 4, !tbaa !9
  %99 = add nsw i32 %98, 40
  %100 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 8
  %101 = load i32, ptr %100, align 4, !tbaa !20
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef %95, i32 noundef -1186988026, i32 noundef %97, i32 noundef 127, i32 noundef %99, i32 noundef %101)
  br label %102

102:                                              ; preds = %87, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %104

103:                                              ; preds = %26
  br label %104

104:                                              ; preds = %103, %102
  %105 = load i8, ptr %10, align 1, !tbaa !13
  %106 = icmp ne i8 %105, 0
  br i1 %106, label %107, label %109

107:                                              ; preds = %104
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_sm(ptr noundef %108, i32 noundef -721205377)
  br label %109

109:                                              ; preds = %107, %104
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %110, i32 0, i32 6
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = icmp uge i32 %112, 2201
  br i1 %113, label %114, label %123

114:                                              ; preds = %109
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %116, align 4, !tbaa !11
  %118 = icmp ule i32 %117, 2999
  br i1 %118, label %119, label %123

119:                                              ; preds = %114
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 22
  %122 = load i32, ptr %121, align 4, !tbaa !24
  call void @libxsmm_generator_set_p_register_aarch64_sve(ptr noundef %120, i32 noundef 0, i32 noundef -1, i32 noundef %122)
  br label %123

123:                                              ; preds = %119, %114, %109
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 1, !tbaa !35
  %127 = icmp uge i32 %126, 4
  br i1 %127, label %128, label %133

128:                                              ; preds = %123
  store i32 4, ptr %8, align 4, !tbaa !9
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 1, !tbaa !35
  %132 = urem i32 %131, 4
  store i32 %132, ptr %9, align 4, !tbaa !9
  store i32 6, ptr %7, align 4, !tbaa !9
  br label %137

133:                                              ; preds = %123
  store i32 0, ptr %8, align 4, !tbaa !9
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 1, !tbaa !35
  store i32 %136, ptr %9, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %133, %128
  %138 = load i32, ptr %8, align 4, !tbaa !9
  %139 = icmp eq i32 %138, 4
  br i1 %139, label %140, label %157

140:                                              ; preds = %137
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 10
  %143 = load i32, ptr %142, align 4, !tbaa !21
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 1, !tbaa !35
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = sub i32 %146, %147
  call void @libxsmm_generator_loop_header_aarch64(ptr noundef %141, ptr noundef %12, i32 noundef %143, i32 noundef %148)
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = load i32, ptr %6, align 4, !tbaa !9
  %152 = load i32, ptr %7, align 4, !tbaa !9
  %153 = load i32, ptr %8, align 4, !tbaa !9
  call void @libxsmm_generator_packed_gemm_aarch64_mloop(ptr noundef %149, ptr noundef %12, ptr noundef %13, ptr noundef %11, ptr noundef %150, i32 noundef %151, i32 noundef %152, i32 noundef %153)
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.libxsmm_gp_reg_mapping_struct, ptr %13, i32 0, i32 10
  %156 = load i32, ptr %155, align 4, !tbaa !21
  call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %154, ptr noundef %12, i32 noundef %156, i32 noundef 4)
  br label %157

157:                                              ; preds = %140, %137
  %158 = load i32, ptr %9, align 4, !tbaa !9
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %180

160:                                              ; preds = %157
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = icmp eq i32 %161, 3
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  store i32 3, ptr %8, align 4, !tbaa !9
  store i32 8, ptr %7, align 4, !tbaa !9
  br label %174

164:                                              ; preds = %160
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 2
  br i1 %166, label %167, label %168

167:                                              ; preds = %164
  store i32 2, ptr %8, align 4, !tbaa !9
  store i32 12, ptr %7, align 4, !tbaa !9
  br label %173

168:                                              ; preds = %164
  %169 = load i32, ptr %9, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 1
  br i1 %170, label %171, label %172

171:                                              ; preds = %168
  store i32 1, ptr %8, align 4, !tbaa !9
  store i32 28, ptr %7, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %171, %168
  br label %173

173:                                              ; preds = %172, %167
  br label %174

174:                                              ; preds = %173, %163
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = load i32, ptr %6, align 4, !tbaa !9
  %178 = load i32, ptr %7, align 4, !tbaa !9
  %179 = load i32, ptr %8, align 4, !tbaa !9
  call void @libxsmm_generator_packed_gemm_aarch64_mloop(ptr noundef %175, ptr noundef %12, ptr noundef %13, ptr noundef %11, ptr noundef %176, i32 noundef %177, i32 noundef %178, i32 noundef %179)
  br label %180

180:                                              ; preds = %174, %157
  %181 = load i8, ptr %10, align 1, !tbaa !13
  %182 = icmp ne i8 %181, 0
  br i1 %182, label %183, label %185

183:                                              ; preds = %180
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_sm(ptr noundef %184, i32 noundef -721205633)
  br label %185

185:                                              ; preds = %183, %180
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_close_stream(ptr noundef %186, i16 noundef zeroext 15)
  call void @llvm.lifetime.end.p0(i64 132, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 2052, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 688, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

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

declare void @libxsmm_reset_aarch64_gp_reg_mapping(ptr noundef) #2

declare void @libxsmm_reset_loop_label_tracker(ptr noundef) #2

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

declare void @libxsmm_aarch64_instruction_open_stream(ptr noundef, i16 noundef zeroext) #2

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

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

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

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

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

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

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

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

declare void @libxsmm_aarch64_instruction_close_stream(ptr noundef, i16 noundef zeroext) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = !{!7, !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"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}
!16 = !{!15, !10, i64 4}
!17 = !{!15, !10, i64 12}
!18 = !{!15, !10, i64 20}
!19 = !{!15, !10, i64 24}
!20 = !{!15, !10, i64 32}
!21 = !{!15, !10, i64 40}
!22 = !{!15, !10, i64 44}
!23 = !{!15, !10, i64 48}
!24 = !{!15, !10, i64 88}
!25 = !{!15, !10, i64 92}
!26 = !{!15, !10, i64 96}
!27 = !{!15, !10, i64 100}
!28 = !{!15, !10, i64 104}
!29 = !{!15, !10, i64 108}
!30 = !{!31, !10, i64 24}
!31 = !{!"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, !32, i64 33, !32, i64 41, !7, i64 49, !10, i64 50, !10, i64 54, !10, i64 58, !33, i64 62, !33, i64 64, !7, i64 66, !7, i64 67, !7, i64 68, !7, i64 69, !33, i64 70, !33, i64 72, !33, i64 74, !33, i64 76, !33, i64 78, !33, i64 80, !10, i64 82, !10, i64 86, !10, i64 90, !7, i64 94}
!32 = !{!"long long", !7, i64 0}
!33 = !{!"short", !7, i64 0}
!34 = !{!31, !7, i64 28}
!35 = !{!31, !10, i64 0}


; 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_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_loop_label_tracker_struct = type { [512 x i32], i32 }
%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 }

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_packed_gemm_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.libxsmm_micro_kernel_config, align 8
  %5 = alloca %struct.libxsmm_loop_label_tracker_struct, align 4
  %6 = alloca %struct.libxsmm_gp_reg_mapping_struct, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = add i32 %8, -3000
  %spec.select = icmp ult i32 %9, -499
  call void @llvm.lifetime.start.p0(i64 688, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 2052, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 132, ptr nonnull %6) #3
  call void @libxsmm_reset_aarch64_gp_reg_mapping(ptr noundef nonnull %6) #3
  store i32 32, ptr %6, align 4, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 32, ptr %10, align 4, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 33, ptr %11, align 4, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %6, i64 20
  store i32 34, ptr %12, align 4, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 35, ptr %13, align 4, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %6, i64 32
  store i32 36, ptr %14, align 4, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %6, i64 40
  store i32 38, ptr %15, align 4, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %6, i64 44
  store i32 39, ptr %16, align 4, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %6, i64 48
  store i32 40, ptr %17, align 4, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %6, i64 88
  %19 = getelementptr inbounds i8, ptr %6, i64 92
  store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, ptr %18, align 4, !tbaa !21
  %20 = getelementptr inbounds i8, ptr %6, i64 104
  store i32 127, ptr %20, align 4, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %6, i64 108
  store i32 127, ptr %21, align 4, !tbaa !23
  call void @libxsmm_reset_loop_label_tracker(ptr noundef nonnull %5) #3
  %22 = load i32, ptr %7, align 4, !tbaa !5
  call void @libxsmm_generator_gemm_init_micro_kernel_config_aarch64(ptr noundef nonnull %4, i32 noundef %22, ptr noundef %1) #3
  call void @libxsmm_aarch64_instruction_open_stream(ptr noundef %0, i16 noundef zeroext 15) #3
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = load i32, ptr %23, align 1, !tbaa !24
  %25 = and i32 %24, 16384
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %42, label %26

26:                                               ; preds = %3
  %27 = load i32, ptr %6, align 4, !tbaa !11
  %28 = load i32, ptr %19, align 4, !tbaa !28
  call void @libxsmm_aarch64_instruction_alu_compute_shifted_reg(ptr noundef nonnull %0, i32 noundef 167772167, i32 noundef %27, i32 noundef %27, i32 noundef %28, i32 noundef 0, i32 noundef 0) #3
  %29 = load i32, ptr %19, align 4, !tbaa !28
  %30 = load i32, ptr %10, align 4, !tbaa !13
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef nonnull %0, i32 noundef -1186988026, i32 noundef %29, i32 noundef 127, i32 noundef 32, i32 noundef %30) #3
  %31 = load i32, ptr %19, align 4, !tbaa !28
  %32 = load i32, ptr %11, align 4, !tbaa !14
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef nonnull %0, i32 noundef -1186988026, i32 noundef %31, i32 noundef 127, i32 noundef 80, i32 noundef %32) #3
  %33 = load i32, ptr %19, align 4, !tbaa !28
  %34 = load i32, ptr %12, align 4, !tbaa !15
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef nonnull %0, i32 noundef -1186988026, i32 noundef %33, i32 noundef 127, i32 noundef 128, i32 noundef %34) #3
  %35 = getelementptr inbounds i8, ptr %1, i64 28
  %36 = load i8, ptr %35, align 1, !tbaa !29
  %.not54 = icmp eq i8 %36, 0
  br i1 %.not54, label %42, label %37

37:                                               ; preds = %26
  %38 = load i32, ptr %19, align 4, !tbaa !28
  %39 = load i32, ptr %13, align 4, !tbaa !16
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef nonnull %0, i32 noundef -1186988026, i32 noundef %38, i32 noundef 127, i32 noundef 72, i32 noundef %39) #3
  %40 = load i32, ptr %19, align 4, !tbaa !28
  %41 = load i32, ptr %14, align 4, !tbaa !17
  call void @libxsmm_aarch64_instruction_alu_move(ptr noundef nonnull %0, i32 noundef -1186988026, i32 noundef %40, i32 noundef 127, i32 noundef 120, i32 noundef %41) #3
  br label %42

42:                                               ; preds = %26, %37, %3
  br i1 %spec.select, label %44, label %43

43:                                               ; preds = %42
  call void @libxsmm_aarch64_instruction_sm(ptr noundef nonnull %0, i32 noundef -721205377) #3
  br label %44

44:                                               ; preds = %43, %42
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = add i32 %45, -2201
  %or.cond = icmp ult i32 %46, 799
  br i1 %or.cond, label %47, label %49

47:                                               ; preds = %44
  %48 = load i32, ptr %18, align 4, !tbaa !30
  call void @libxsmm_generator_set_p_register_aarch64_sve(ptr noundef nonnull %0, i32 noundef 0, i32 noundef -1, i32 noundef %48) #3
  br label %49

49:                                               ; preds = %47, %44
  %50 = load i32, ptr %1, align 1, !tbaa !31
  %51 = icmp ugt i32 %50, 3
  %52 = and i32 %50, 3
  br i1 %51, label %53, label %57

53:                                               ; preds = %49
  %54 = load i32, ptr %15, align 4, !tbaa !18
  %55 = and i32 %50, -4
  call void @libxsmm_generator_loop_header_aarch64(ptr noundef nonnull %0, ptr noundef nonnull %5, i32 noundef %54, i32 noundef %55) #3
  call void @libxsmm_generator_packed_gemm_aarch64_mloop(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %1, i32 noundef %2, i32 noundef 6, i32 noundef 4)
  %56 = load i32, ptr %15, align 4, !tbaa !18
  call void @libxsmm_generator_loop_footer_aarch64(ptr noundef nonnull %0, ptr noundef nonnull %5, i32 noundef %56, i32 noundef 4) #3
  br label %57

57:                                               ; preds = %53, %49
  switch i32 %52, label %default.unreachable [
    i32 0, label %61
    i32 3, label %60
    i32 2, label %58
    i32 1, label %59
  ]

58:                                               ; preds = %57
  br label %60

default.unreachable:                              ; preds = %57
  unreachable

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %57, %58, %59
  %.1 = phi i32 [ 12, %58 ], [ 28, %59 ], [ 8, %57 ]
  call void @libxsmm_generator_packed_gemm_aarch64_mloop(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %1, i32 noundef %2, i32 noundef %.1, i32 noundef %52)
  br label %61

61:                                               ; preds = %57, %60
  br i1 %spec.select, label %63, label %62

62:                                               ; preds = %61
  call void @libxsmm_aarch64_instruction_sm(ptr noundef nonnull %0, i32 noundef -721205633) #3
  br label %63

63:                                               ; preds = %62, %61
  call void @libxsmm_aarch64_instruction_close_stream(ptr noundef nonnull %0, i16 noundef zeroext 15) #3
  call void @llvm.lifetime.end.p0(i64 132, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 2052, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 688, ptr nonnull %4) #3
  ret void
}

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

declare void @libxsmm_reset_aarch64_gp_reg_mapping(ptr noundef) local_unnamed_addr #2

declare void @libxsmm_reset_loop_label_tracker(ptr noundef) local_unnamed_addr #2

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

declare void @libxsmm_aarch64_instruction_open_stream(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

declare void @libxsmm_aarch64_instruction_alu_compute_shifted_reg(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) 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

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

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

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

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

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

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

declare void @libxsmm_aarch64_instruction_close_stream(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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 0}
!12 = !{!"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}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !10, i64 20}
!16 = !{!12, !10, i64 24}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 40}
!19 = !{!12, !10, i64 44}
!20 = !{!12, !10, i64 48}
!21 = !{!10, !10, i64 0}
!22 = !{!12, !10, i64 104}
!23 = !{!12, !10, i64 108}
!24 = !{!25, !10, i64 24}
!25 = !{!"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, !26, i64 33, !26, i64 41, !8, i64 49, !10, i64 50, !10, i64 54, !10, i64 58, !27, i64 62, !27, i64 64, !8, i64 66, !8, i64 67, !8, i64 68, !8, i64 69, !27, i64 70, !27, i64 72, !27, i64 74, !27, i64 76, !27, i64 78, !27, i64 80, !10, i64 82, !10, i64 86, !10, i64 90, !8, i64 94}
!26 = !{!"long long", !8, i64 0}
!27 = !{!"short", !8, i64 0}
!28 = !{!12, !10, i64 92}
!29 = !{!25, !8, i64 28}
!30 = !{!12, !10, i64 88}
!31 = !{!25, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass