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

; 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_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_meltw_descriptor = type <{ i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i8 }>

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

declare void @libxsmm_aarch64_instruction_asimd_compute(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext, 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 void @libxsmm_generator_loop_header_aarch64(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

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

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

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

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

28:                                               ; preds = %10
  store i32 6, ptr %21, align 4, !tbaa !9
  store i32 6, ptr %22, align 4, !tbaa !9
  br label %51

29:                                               ; preds = %10
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %30, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = icmp eq i32 %32, 4
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  store i32 4, ptr %21, align 4, !tbaa !9
  store i32 4, ptr %22, align 4, !tbaa !9
  br label %50

35:                                               ; preds = %29
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = icmp eq i32 %38, 2
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  store i32 2, ptr %21, align 4, !tbaa !9
  store i32 2, ptr %22, align 4, !tbaa !9
  br label %49

41:                                               ; preds = %35
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %47

46:                                               ; preds = %41
  store i32 0, ptr %21, align 4, !tbaa !9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %48

47:                                               ; preds = %41
  store i32 0, ptr %21, align 4, !tbaa !9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %47, %46
  br label %49

49:                                               ; preds = %48, %40
  br label %50

50:                                               ; preds = %49, %34
  br label %51

51:                                               ; preds = %50, %28
  %52 = load i32, ptr %20, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %69

54:                                               ; preds = %51
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 1, !tbaa !13
  %58 = urem i32 %57, 2
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %69

60:                                               ; preds = %54
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %63 = icmp ult i32 1, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %60
  %65 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %67

66:                                               ; preds = %60
  br label %67

67:                                               ; preds = %66, %64
  %68 = phi i32 [ %65, %64 ], [ 1, %66 ]
  call void @libxsmm_handle_error(ptr noundef %61, i32 noundef 90000, ptr noundef @__func__.libxsmm_generator_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel, ptr noundef @.str, i32 noundef 479, i32 noundef %68)
  store i32 1, ptr %23, align 4
  br label %228

69:                                               ; preds = %54, %51
  %70 = load ptr, ptr %19, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 1, !tbaa !13
  %73 = icmp uge i32 %72, 2
  br i1 %73, label %74, label %189

74:                                               ; preds = %69
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 1, !tbaa !13
  %81 = udiv i32 %80, 2
  %82 = mul i32 %81, 2
  call void @libxsmm_generator_loop_header_aarch64(ptr noundef %75, ptr noundef %76, i32 noundef %77, i32 noundef %82)
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 1, !tbaa !16
  call void @libxsmm_generator_loop_header_aarch64(ptr noundef %83, ptr noundef %84, i32 noundef %85, i32 noundef %88)
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = load i32, ptr %21, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %89, i32 noundef 1027604486, i32 noundef %90, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef %91)
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %94, i32 0, i32 5
  %96 = load i32, ptr %95, align 4, !tbaa !17
  %97 = load i32, ptr %22, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %92, i32 noundef 1006633990, i32 noundef %93, i32 noundef 127, i32 noundef %96, i32 noundef 0, i32 noundef %97)
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 4, !tbaa !11
  %105 = zext i32 %104 to i64
  %106 = load ptr, ptr %19, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %106, i32 0, i32 2
  %108 = load i32, ptr %107, align 1, !tbaa !18
  %109 = zext i32 %108 to i64
  %110 = mul nsw i64 %105, %109
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %98, i32 noundef 4096, i32 noundef %99, i32 noundef %100, i32 noundef %101, i64 noundef %110)
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = load i32, ptr %13, align 4, !tbaa !9
  %113 = load i32, ptr %21, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %111, i32 noundef 1027604486, i32 noundef %112, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef %113)
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %116, i32 0, i32 5
  %118 = load i32, ptr %117, align 4, !tbaa !17
  %119 = load i32, ptr %22, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %114, i32 noundef 1006633990, i32 noundef %115, i32 noundef 127, i32 noundef %118, i32 noundef 0, i32 noundef %119)
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = load ptr, ptr %18, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = zext i32 %126 to i64
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 1, !tbaa !18
  %131 = zext i32 %130 to i64
  %132 = sub nsw i64 %131, 1
  %133 = mul nsw i64 %127, %132
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %120, i32 noundef 4097, i32 noundef %121, i32 noundef %122, i32 noundef %123, i64 noundef %133)
  %134 = load ptr, ptr %11, align 8, !tbaa !5
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = load i32, ptr %15, align 4, !tbaa !9
  call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %134, ptr noundef %135, i32 noundef %136, i32 noundef 1)
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = load i32, ptr %17, align 4, !tbaa !9
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %141, i32 0, i32 2
  %143 = load i32, ptr %142, align 1, !tbaa !18
  %144 = zext i32 %143 to i64
  %145 = mul nsw i64 2, %144
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %146, i32 0, i32 2
  %148 = load i32, ptr %147, align 4, !tbaa !11
  %149 = zext i32 %148 to i64
  %150 = mul nsw i64 %145, %149
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 4, !tbaa !11
  %154 = zext i32 %153 to i64
  %155 = load ptr, ptr %19, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 1, !tbaa !16
  %158 = zext i32 %157 to i64
  %159 = mul nsw i64 %154, %158
  %160 = sub nsw i64 %150, %159
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %137, i32 noundef 4096, i32 noundef %138, i32 noundef %139, i32 noundef %140, i64 noundef %160)
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = load ptr, ptr %19, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %165, i32 0, i32 3
  %167 = load i32, ptr %166, align 1, !tbaa !19
  %168 = zext i32 %167 to i64
  %169 = mul nsw i64 2, %168
  %170 = load ptr, ptr %18, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %170, i32 0, i32 5
  %172 = load i32, ptr %171, align 4, !tbaa !17
  %173 = zext i32 %172 to i64
  %174 = mul nsw i64 %169, %173
  %175 = load ptr, ptr %18, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %175, i32 0, i32 5
  %177 = load i32, ptr %176, align 4, !tbaa !17
  %178 = zext i32 %177 to i64
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %179, i32 0, i32 0
  %181 = load i32, ptr %180, align 1, !tbaa !16
  %182 = zext i32 %181 to i64
  %183 = mul nsw i64 %178, %182
  %184 = mul nsw i64 %183, 2
  %185 = sub nsw i64 %174, %184
  call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %161, i32 noundef 4096, i32 noundef %162, i32 noundef %163, i32 noundef %164, i64 noundef %185)
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = load i32, ptr %16, align 4, !tbaa !9
  call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %186, ptr noundef %187, i32 noundef %188, i32 noundef 2)
  br label %189

189:                                              ; preds = %74, %69
  %190 = load ptr, ptr %19, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %190, i32 0, i32 1
  %192 = load i32, ptr %191, align 1, !tbaa !13
  %193 = urem i32 %192, 2
  %194 = icmp eq i32 %193, 1
  br i1 %194, label %195, label %227

195:                                              ; preds = %189
  %196 = load i32, ptr %20, align 4, !tbaa !9
  %197 = icmp eq i32 %196, 1
  br i1 %197, label %198, label %227

198:                                              ; preds = %195
  %199 = load ptr, ptr %11, align 8, !tbaa !5
  call void @libxsmm_aarch64_instruction_asimd_compute(ptr noundef %199, i32 noundef 773856275, i32 noundef 1, i32 noundef 1, i8 noundef zeroext 0, i32 noundef 1, i32 noundef 1)
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = load i32, ptr %15, align 4, !tbaa !9
  %203 = load ptr, ptr %19, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %203, i32 0, i32 0
  %205 = load i32, ptr %204, align 1, !tbaa !16
  call void @libxsmm_generator_loop_header_aarch64(ptr noundef %200, ptr noundef %201, i32 noundef %202, i32 noundef %205)
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = load ptr, ptr %18, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 4, !tbaa !11
  %211 = load i32, ptr %21, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %206, i32 noundef 1010828294, i32 noundef %207, i32 noundef 127, i32 noundef %210, i32 noundef 0, i32 noundef %211)
  %212 = load ptr, ptr %11, align 8, !tbaa !5
  %213 = load i32, ptr %14, align 4, !tbaa !9
  %214 = load ptr, ptr %18, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %214, i32 0, i32 5
  %216 = load i32, ptr %215, align 4, !tbaa !17
  %217 = load i32, ptr %22, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %212, i32 noundef 1006633990, i32 noundef %213, i32 noundef 127, i32 noundef %216, i32 noundef 0, i32 noundef %217)
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = load ptr, ptr %18, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %220, i32 0, i32 5
  %222 = load i32, ptr %221, align 4, !tbaa !17
  %223 = load i32, ptr %22, align 4, !tbaa !9
  call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %218, i32 noundef 1006633990, i32 noundef %219, i32 noundef 127, i32 noundef %222, i32 noundef 1, i32 noundef %223)
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = load ptr, ptr %12, align 8, !tbaa !5
  %226 = load i32, ptr %15, align 4, !tbaa !9
  call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %224, ptr noundef %225, i32 noundef %226, i32 noundef 1)
  br label %227

227:                                              ; preds = %198, %195, %189
  store i32 0, ptr %23, align 4
  br label %228

228:                                              ; preds = %227, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  %229 = load i32, ptr %23, align 4
  switch i32 %229, label %231 [
    i32 0, label %230
    i32 1, label %230
  ]

230:                                              ; preds = %228, %228
  ret void

231:                                              ; preds = %228
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"libxsmm_mateltwise_kernel_config_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, !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, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !7, i64 512}
!13 = !{!14, !10, i64 4}
!14 = !{!"libxsmm_meltw_descriptor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !15, i64 27, !15, i64 29, !7, i64 31}
!15 = !{!"short", !7, i64 0}
!16 = !{!14, !10, i64 0}
!17 = !{!12, !10, i64 20}
!18 = !{!14, !10, i64 8}
!19 = !{!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 [100 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_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel = external hidden unnamed_addr constant [80 x i8], align 1
@switch.table.libxsmm_generator_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel = private unnamed_addr constant [8 x i32] [i32 0, i32 2, i32 0, i32 4, i32 0, i32 0, i32 0, i32 6], align 4

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

declare void @libxsmm_aarch64_instruction_asimd_compute(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, ptr nocapture noundef readonly %7, ptr nocapture noundef readonly %8, i32 noundef %9) local_unnamed_addr #1 {
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %switch.tableidx = add i32 %12, -1
  %13 = icmp ult i32 %switch.tableidx, 8
  br i1 %13, label %switch.lookup, label %15

switch.lookup:                                    ; preds = %10
  %14 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [8 x i32], ptr @switch.table.libxsmm_generator_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel, i64 0, i64 %14
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %15

15:                                               ; preds = %10, %switch.lookup
  %.0 = phi i32 [ %switch.load, %switch.lookup ], [ 0, %10 ]
  %16 = icmp ne i32 %9, 0
  %17 = getelementptr inbounds i8, ptr %8, i64 4
  %18 = load i32, ptr %17, align 1, !tbaa !10
  %19 = and i32 %18, 1
  %.not = icmp eq i32 %19, 0
  %or.cond90 = select i1 %16, i1 true, i1 %.not
  br i1 %or.cond90, label %._crit_edge, label %20

20:                                               ; preds = %15
  %21 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !13
  %22 = icmp ugt i32 %21, 1
  %23 = load i32, ptr @libxsmm_verbosity, align 4
  %24 = select i1 %22, i32 %23, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_generator_transform_norm_to_vnni2_mbit_scalar_aarch64_asimd_microkernel, ptr noundef nonnull @.str, i32 noundef 479, i32 noundef %24) #2
  br label %77

._crit_edge:                                      ; preds = %15
  %25 = icmp ugt i32 %18, 1
  br i1 %25, label %26, label %66

26:                                               ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %8, i64 4
  %28 = and i32 %18, -2
  tail call void @libxsmm_generator_loop_header_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %5, i32 noundef %28) #2
  %29 = load i32, ptr %8, align 1, !tbaa !14
  tail call void @libxsmm_generator_loop_header_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %4, i32 noundef %29) #2
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1027604486, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef %.0) #2
  %30 = getelementptr inbounds i8, ptr %7, i64 20
  %31 = load i32, ptr %30, align 4, !tbaa !15
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1006633990, i32 noundef %3, i32 noundef 127, i32 noundef %31, i32 noundef 0, i32 noundef %.0) #2
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds i8, ptr %8, i64 8
  %35 = load i32, ptr %34, align 1, !tbaa !16
  %36 = zext i32 %35 to i64
  %37 = mul nuw nsw i64 %36, %33
  tail call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %0, i32 noundef 4096, i32 noundef %2, i32 noundef %6, i32 noundef %2, i64 noundef %37) #2
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1027604486, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef %.0) #2
  %38 = load i32, ptr %30, align 4, !tbaa !15
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1006633990, i32 noundef %3, i32 noundef 127, i32 noundef %38, i32 noundef 0, i32 noundef %.0) #2
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = load i32, ptr %34, align 1, !tbaa !16
  %42 = zext i32 %41 to i64
  %43 = add nsw i64 %42, -1
  %44 = mul nsw i64 %43, %40
  tail call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %0, i32 noundef 4097, i32 noundef %2, i32 noundef %6, i32 noundef %2, i64 noundef %44) #2
  tail call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %4, i32 noundef 1) #2
  %45 = load i32, ptr %34, align 1, !tbaa !16
  %46 = zext i32 %45 to i64
  %47 = shl nuw nsw i64 %46, 1
  %48 = load i32, ptr %11, align 4, !tbaa !5
  %49 = zext i32 %48 to i64
  %50 = load i32, ptr %8, align 1, !tbaa !14
  %51 = zext i32 %50 to i64
  %52 = sub nsw i64 %47, %51
  %53 = mul i64 %52, %49
  tail call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %0, i32 noundef 4096, i32 noundef %2, i32 noundef %6, i32 noundef %2, i64 noundef %53) #2
  %54 = getelementptr inbounds i8, ptr %8, i64 12
  %55 = load i32, ptr %54, align 1, !tbaa !17
  %56 = zext i32 %55 to i64
  %57 = shl nuw nsw i64 %56, 1
  %58 = load i32, ptr %30, align 4, !tbaa !15
  %59 = zext i32 %58 to i64
  %60 = mul nuw nsw i64 %57, %59
  %61 = load i32, ptr %8, align 1, !tbaa !14
  %62 = zext i32 %61 to i64
  %63 = shl nuw nsw i64 %59, 1
  %64 = mul i64 %63, %62
  %65 = sub nsw i64 %60, %64
  tail call void @libxsmm_aarch64_instruction_alu_compute_imm64(ptr noundef %0, i32 noundef 4096, i32 noundef %3, i32 noundef %6, i32 noundef %3, i64 noundef %65) #2
  tail call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %5, i32 noundef 2) #2
  %.pre89 = load i32, ptr %27, align 1, !tbaa !10
  br label %66

66:                                               ; preds = %26, %._crit_edge
  %67 = phi i32 [ %.pre89, %26 ], [ %18, %._crit_edge ]
  %68 = and i32 %67, 1
  %69 = icmp ne i32 %68, 0
  %70 = icmp eq i32 %9, 1
  %or.cond = and i1 %70, %69
  br i1 %or.cond, label %71, label %77

71:                                               ; preds = %66
  tail call void @libxsmm_aarch64_instruction_asimd_compute(ptr noundef %0, i32 noundef 773856275, i32 noundef 1, i32 noundef 1, i8 noundef zeroext 0, i32 noundef 1, i32 noundef 1) #2
  %72 = load i32, ptr %8, align 1, !tbaa !14
  tail call void @libxsmm_generator_loop_header_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %4, i32 noundef %72) #2
  %73 = load i32, ptr %11, align 4, !tbaa !5
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1010828294, i32 noundef %2, i32 noundef 127, i32 noundef %73, i32 noundef 0, i32 noundef %.0) #2
  %74 = getelementptr inbounds i8, ptr %7, i64 20
  %75 = load i32, ptr %74, align 4, !tbaa !15
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1006633990, i32 noundef %3, i32 noundef 127, i32 noundef %75, i32 noundef 0, i32 noundef %.0) #2
  %76 = load i32, ptr %74, align 4, !tbaa !15
  tail call void @libxsmm_aarch64_instruction_asimd_move(ptr noundef %0, i32 noundef 1006633990, i32 noundef %3, i32 noundef 127, i32 noundef %76, i32 noundef 1, i32 noundef %.0) #2
  tail call void @libxsmm_generator_loop_footer_aarch64(ptr noundef %0, ptr noundef %1, i32 noundef %4, i32 noundef 1) #2
  br label %77

77:                                               ; preds = %66, %71, %20
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"libxsmm_mateltwise_kernel_config_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, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !7, i64 272, !7, i64 276, !7, i64 280, !7, i64 284, !7, i64 288, !7, i64 292, !7, i64 296, !7, i64 300, !7, i64 304, !7, i64 308, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328, !7, i64 332, !7, i64 336, !7, i64 340, !7, i64 344, !7, i64 348, !7, i64 352, !7, i64 356, !7, i64 360, !7, i64 364, !7, i64 368, !7, i64 372, !7, i64 376, !7, i64 380, !7, i64 384, !7, i64 388, !7, i64 392, !7, i64 396, !7, i64 400, !7, i64 404, !7, i64 408, !7, i64 412, !7, i64 416, !7, i64 420, !7, i64 424, !7, i64 428, !7, i64 432, !7, i64 436, !7, i64 440, !7, i64 444, !7, i64 448, !7, i64 452, !7, i64 456, !7, i64 460, !7, i64 464, !7, i64 468, !7, i64 472, !7, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !8, i64 512}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 4}
!11 = !{!"libxsmm_meltw_descriptor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !12, i64 27, !12, i64 29, !8, i64 31}
!12 = !{!"short", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!11, !7, i64 0}
!15 = !{!6, !7, i64 20}
!16 = !{!11, !7, i64 8}
!17 = !{!11, !7, i64 12}


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