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

; 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.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx = external hidden unnamed_addr constant <{ [8 x i8], [8 x i8] }>, align 16
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.4 = external hidden unnamed_addr constant <{ [8 x i8], [8 x i8] }>, align 16
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_perm_imm = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext, i32 noundef) #2

declare void @libxsmm_generator_transform_Xway_full_load_avx_avx512(ptr noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef, i8 noundef signext, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare void @libxsmm_generator_transform_Xway_full_store_avx_avx512(ptr noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [8 x i32], align 16
  %21 = alloca [16 x i8], align 16
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca [16 x i8], align 16
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca [8 x i8], align 1
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca [8 x i8], align 1
  %31 = alloca i32, align 4
  %32 = alloca [8 x i32], align 16
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = icmp ult i32 %33, 8
  %35 = zext i1 %34 to i64
  %36 = select i1 %34, i32 1, i32 0
  store i32 %36, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = icmp ult i32 %37, 8
  %39 = zext i1 %38 to i64
  %40 = select i1 %38, i32 1, i32 0
  store i32 %40, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %41 = load i32, ptr %15, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %47

43:                                               ; preds = %7
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %44, i32 0, i32 6
  %46 = load i32, ptr %45, align 4, !tbaa !11
  br label %48

47:                                               ; preds = %7
  br label %48

48:                                               ; preds = %47, %43
  %49 = phi i32 [ %46, %43 ], [ 1879384108, %47 ]
  store i32 %49, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %50 = load i32, ptr %16, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %56

52:                                               ; preds = %48
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %54, align 4, !tbaa !11
  br label %57

56:                                               ; preds = %48
  br label %57

57:                                               ; preds = %56, %52
  %58 = phi i32 [ %55, %52 ], [ 1879384110, %56 ]
  store i32 %58, ptr %18, align 4, !tbaa !9
  %59 = load i32, ptr %15, align 4, !tbaa !9
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %80

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 32, i1 false)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %74, %61
  %63 = load i32, ptr %19, align 4, !tbaa !9
  %64 = icmp ult i32 %63, 8
  br i1 %64, label %65, label %77

65:                                               ; preds = %62
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = icmp ult i32 %66, %67
  %69 = zext i1 %68 to i64
  %70 = select i1 %68, i32 -1, i32 0
  %71 = load i32, ptr %19, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds [8 x i32], ptr %20, i64 0, i64 %72
  store i32 %70, ptr %73, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %65
  %75 = load i32, ptr %19, align 4, !tbaa !9
  %76 = add i32 %75, 1
  store i32 %76, ptr %19, align 4, !tbaa !9
  br label %62, !llvm.loop !13

77:                                               ; preds = %62
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds [8 x i32], ptr %20, i64 0, i64 0
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %78, ptr noundef %79, ptr noundef @.str.1, i8 noundef signext 121, i32 noundef 8)
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %80

80:                                               ; preds = %77, %57
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %82, i32 0, i32 128
  %84 = load i8, ptr %83, align 4, !tbaa !15
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %86, i32 0, i32 2
  %88 = load i32, ptr %87, align 1, !tbaa !16
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 4, !tbaa !19
  %92 = mul i32 %88, %91
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %15, align 4, !tbaa !9
  call void @libxsmm_generator_transform_Xway_full_load_avx_avx512(ptr noundef %81, i8 noundef signext %84, i32 noundef %85, i32 noundef 0, i32 noundef %92, i32 noundef %93, i32 noundef 8, i32 noundef %94, i32 noundef %95, i32 noundef 8)
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 1, !tbaa !16
  %101 = zext i32 %100 to i64
  %102 = load ptr, ptr %13, 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 !19
  %105 = zext i32 %104 to i64
  %106 = mul nsw i64 %101, %105
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = mul nsw i64 %106, %108
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %96, i32 noundef 30000, i32 noundef %97, i64 noundef %109)
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 8, ptr %23, align 4, !tbaa !9
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %111, i32 0, i32 128
  %113 = load i8, ptr %112, align 4, !tbaa !15
  %114 = getelementptr inbounds [16 x i8], ptr %21, i64 0, i64 0
  %115 = load i32, ptr %22, align 4, !tbaa !9
  %116 = load i32, ptr %23, align 4, !tbaa !9
  call void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef %110, i8 noundef signext %113, ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef 1, i32 noundef 805574164, i32 noundef 805574165, i32 noundef 8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.4, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 8, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !9
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %118, i32 0, i32 128
  %120 = load i8, ptr %119, align 4, !tbaa !15
  %121 = getelementptr inbounds [16 x i8], ptr %24, i64 0, i64 0
  %122 = load i32, ptr %25, align 4, !tbaa !9
  %123 = load i32, ptr %26, align 4, !tbaa !9
  call void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef %117, i8 noundef signext %120, ptr noundef %121, i32 noundef %122, i32 noundef %123, i32 noundef 2, i32 noundef 814028308, i32 noundef 814028309, i32 noundef 8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %27, ptr align 1 @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.5, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 8, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %30, ptr align 1 @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_perm_imm, i64 8, i1 false)
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %125, i32 0, i32 128
  %127 = load i8, ptr %126, align 4, !tbaa !15
  %128 = load i32, ptr %28, align 4, !tbaa !9
  %129 = getelementptr inbounds [8 x i8], ptr %27, i64 0, i64 0
  %130 = load i32, ptr %29, align 4, !tbaa !9
  %131 = getelementptr inbounds [8 x i8], ptr %30, i64 0, i64 0
  call void @libxsmm_generator_transform_08way_permute128_network_avx(ptr noundef %124, i8 noundef signext %127, i32 noundef %128, ptr noundef %129, i32 noundef 4, i32 noundef %130, i32 noundef 1879912454, ptr noundef %131)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  %132 = load i32, ptr %16, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %153

134:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #5
  call void @llvm.memset.p0.i64(ptr align 16 %32, i8 0, i64 32, i1 false)
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %147, %134
  %136 = load i32, ptr %31, align 4, !tbaa !9
  %137 = icmp ult i32 %136, 8
  br i1 %137, label %138, label %150

138:                                              ; preds = %135
  %139 = load i32, ptr %31, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = icmp ult i32 %139, %140
  %142 = zext i1 %141 to i64
  %143 = select i1 %141, i32 -1, i32 0
  %144 = load i32, ptr %31, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds [8 x i32], ptr %32, i64 0, i64 %145
  store i32 %143, ptr %146, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %138
  %148 = load i32, ptr %31, align 4, !tbaa !9
  %149 = add i32 %148, 1
  store i32 %149, ptr %31, align 4, !tbaa !9
  br label %135, !llvm.loop !20

150:                                              ; preds = %135
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds [8 x i32], ptr %32, i64 0, i64 0
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %151, ptr noundef %152, ptr noundef @.str.3, i8 noundef signext 121, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %153

153:                                              ; preds = %150, %80
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %155, i32 0, i32 128
  %157 = load i8, ptr %156, align 4, !tbaa !15
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %159, i32 0, i32 3
  %161 = load i32, ptr %160, align 1, !tbaa !21
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %162, i32 0, i32 5
  %164 = load i32, ptr %163, align 4, !tbaa !22
  %165 = mul i32 %161, %164
  %166 = load i32, ptr %18, align 4, !tbaa !9
  %167 = load i32, ptr %16, align 4, !tbaa !9
  %168 = load i32, ptr %11, align 4, !tbaa !9
  call void @libxsmm_generator_transform_Xway_full_store_avx_avx512(ptr noundef %154, i8 noundef signext %157, i32 noundef %158, i32 noundef 8, i32 noundef %165, i32 noundef %166, i32 noundef %167, i32 noundef 0, i32 noundef %168)
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load i32, ptr %10, align 4, !tbaa !9
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %171, i32 0, i32 5
  %173 = load i32, ptr %172, align 4, !tbaa !22
  %174 = zext i32 %173 to i64
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = mul nsw i64 %174, %176
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %169, i32 noundef 30000, i32 noundef %170, i64 noundef %177)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  ret void
}

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 24}
!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !7, i64 512}
!16 = !{!17, !10, i64 8}
!17 = !{!"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, !18, i64 27, !18, i64 29, !7, i64 31}
!18 = !{!"short", !7, i64 0}
!19 = !{!12, !10, i64 8}
!20 = distinct !{!20, !14}
!21 = !{!17, !10, i64 12}
!22 = !{!12, !10, i64 20}


; 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.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx = external hidden unnamed_addr constant <{ [8 x i8], [8 x i8] }>, align 16
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.4 = external hidden unnamed_addr constant <{ [8 x i8], [8 x i8] }>, align 16
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_perm_imm = external hidden unnamed_addr constant [8 x i8], align 1

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

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

; 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_x86_instruction_alu_imm(ptr noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_Xway_full_load_avx_avx512(ptr noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef, i8 noundef signext, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_generator_transform_Xway_full_store_avx_avx512(ptr noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6) local_unnamed_addr #0 {
  %8 = alloca [8 x i32], align 16
  %9 = alloca [16 x i8], align 16
  %10 = alloca [16 x i8], align 16
  %11 = alloca [8 x i8], align 8
  %12 = alloca [8 x i8], align 8
  %13 = alloca [8 x i32], align 16
  %14 = icmp ult i32 %3, 8
  %15 = zext i1 %14 to i32
  %16 = icmp ult i32 %4, 8
  br i1 %14, label %20, label %17

17:                                               ; preds = %7
  %18 = getelementptr inbounds i8, ptr %5, i64 24
  %19 = load i32, ptr %18, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %7, %17
  %21 = phi i32 [ %19, %17 ], [ 1879384108, %7 ]
  br i1 %16, label %25, label %22

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %5, i64 24
  %24 = load i32, ptr %23, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %20, %22
  %26 = phi i32 [ %24, %22 ], [ 1879384110, %20 ]
  br i1 %14, label %27, label %42

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %28 = icmp ne i32 %3, 0
  %29 = sext i1 %28 to i32
  store i32 %29, ptr %8, align 16, !tbaa !10
  %30 = insertelement <4 x i32> poison, i32 %3, i64 0
  %31 = shufflevector <4 x i32> %30, <4 x i32> poison, <4 x i32> zeroinitializer
  %32 = icmp ugt <4 x i32> %31, <i32 1, i32 2, i32 3, i32 4>
  %33 = getelementptr inbounds i8, ptr %8, i64 4
  %34 = sext <4 x i1> %32 to <4 x i32>
  store <4 x i32> %34, ptr %33, align 4, !tbaa !10
  %35 = icmp ugt i32 %3, 5
  %36 = sext i1 %35 to i32
  %37 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 %36, ptr %37, align 4, !tbaa !10
  %38 = icmp eq i32 %3, 7
  %39 = sext i1 %38 to i32
  %40 = getelementptr inbounds i8, ptr %8, i64 24
  store i32 %39, ptr %40, align 8, !tbaa !10
  %41 = getelementptr inbounds i8, ptr %8, i64 28
  store i32 0, ptr %41, align 4, !tbaa !10
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %0, ptr noundef nonnull %8, ptr noundef nonnull @.str.1, i8 noundef signext 121, i32 noundef 8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %42

42:                                               ; preds = %27, %25
  %43 = getelementptr inbounds i8, ptr %5, i64 512
  %44 = load i8, ptr %43, align 4, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %6, i64 8
  %46 = load i32, ptr %45, align 1, !tbaa !12
  %47 = getelementptr inbounds i8, ptr %5, i64 8
  %48 = load i32, ptr %47, align 4, !tbaa !15
  %49 = mul i32 %48, %46
  call void @libxsmm_generator_transform_Xway_full_load_avx_avx512(ptr noundef %0, i8 noundef signext %44, i32 noundef %1, i32 noundef 0, i32 noundef %49, i32 noundef %21, i32 noundef 8, i32 noundef %4, i32 noundef %15, i32 noundef 8) #4
  %50 = load i32, ptr %45, align 1, !tbaa !12
  %51 = zext i32 %50 to i64
  %52 = load i32, ptr %47, align 4, !tbaa !15
  %53 = zext i32 %52 to i64
  %54 = zext i32 %4 to i64
  %55 = mul nuw i64 %51, %54
  %56 = mul i64 %55, %53
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %1, i64 noundef %56) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx, i64 16, i1 false)
  %57 = load i8, ptr %43, align 4, !tbaa !11
  call void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef %0, i8 noundef signext %57, ptr noundef nonnull %9, i32 noundef 0, i32 noundef 8, i32 noundef 1, i32 noundef 805574164, i32 noundef 805574165, i32 noundef 8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.4, i64 16, i1 false)
  %58 = load i8, ptr %43, align 4, !tbaa !11
  call void @libxsmm_generator_transform_Xway_unpack_network_avx_avx512(ptr noundef %0, i8 noundef signext %58, ptr noundef nonnull %10, i32 noundef 8, i32 noundef 0, i32 noundef 2, i32 noundef 814028308, i32 noundef 814028309, i32 noundef 8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %59 = load i64, ptr @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_in_idx.5, align 1
  store i64 %59, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %60 = load i64, ptr @__const.libxsmm_generator_transform_norm_to_normt_32bit_8x8_shufflenetwork_avx.l_perm_imm, align 1
  store i64 %60, ptr %12, align 8
  %61 = load i8, ptr %43, align 4, !tbaa !11
  call void @libxsmm_generator_transform_08way_permute128_network_avx(ptr noundef %0, i8 noundef signext %61, i32 noundef 0, ptr noundef nonnull %11, i32 noundef 4, i32 noundef 8, i32 noundef 1879912454, ptr noundef nonnull %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br i1 %16, label %62, label %77

62:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  %63 = icmp ne i32 %4, 0
  %64 = sext i1 %63 to i32
  store i32 %64, ptr %13, align 16, !tbaa !10
  %65 = insertelement <4 x i32> poison, i32 %4, i64 0
  %66 = shufflevector <4 x i32> %65, <4 x i32> poison, <4 x i32> zeroinitializer
  %67 = icmp ugt <4 x i32> %66, <i32 1, i32 2, i32 3, i32 4>
  %68 = getelementptr inbounds i8, ptr %13, i64 4
  %69 = sext <4 x i1> %67 to <4 x i32>
  store <4 x i32> %69, ptr %68, align 4, !tbaa !10
  %70 = icmp ugt i32 %4, 5
  %71 = sext i1 %70 to i32
  %72 = getelementptr inbounds i8, ptr %13, i64 20
  store i32 %71, ptr %72, align 4, !tbaa !10
  %73 = icmp eq i32 %4, 7
  %74 = sext i1 %73 to i32
  %75 = getelementptr inbounds i8, ptr %13, i64 24
  store i32 %74, ptr %75, align 8, !tbaa !10
  %76 = getelementptr inbounds i8, ptr %13, i64 28
  store i32 0, ptr %76, align 4, !tbaa !10
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %0, ptr noundef nonnull %13, ptr noundef nonnull @.str.3, i8 noundef signext 121, i32 noundef 0) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  br label %77

77:                                               ; preds = %62, %42
  %78 = zext i1 %16 to i32
  %79 = load i8, ptr %43, align 4, !tbaa !11
  %80 = getelementptr inbounds i8, ptr %6, i64 12
  %81 = load i32, ptr %80, align 1, !tbaa !16
  %82 = getelementptr inbounds i8, ptr %5, i64 20
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = mul i32 %83, %81
  call void @libxsmm_generator_transform_Xway_full_store_avx_avx512(ptr noundef %0, i8 noundef signext %79, i32 noundef %2, i32 noundef 8, i32 noundef %84, i32 noundef %26, i32 noundef %78, i32 noundef 0, i32 noundef %3) #4
  %85 = load i32, ptr %82, align 4, !tbaa !17
  %86 = zext i32 %85 to i64
  %87 = mul nuw nsw i64 %86, %54
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %2, i64 noundef %87) #4
  ret void
}

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 24}
!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 = !{!7, !7, i64 0}
!11 = !{!6, !8, i64 512}
!12 = !{!13, !7, i64 8}
!13 = !{!"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, !14, i64 27, !14, i64 29, !8, i64 31}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !7, i64 8}
!16 = !{!13, !7, i64 12}
!17 = !{!6, !7, i64 20}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass