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

; 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_meltw_descriptor = type <{ i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i8 }>
%struct.libxsmm_mateltwise_kernel_config_struct = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }

@.str = external hidden unnamed_addr constant [90 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@__func__.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel = external hidden unnamed_addr constant [71 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_x86_instruction_push_reg(ptr noundef, i32 noundef) #1

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

declare void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef, ptr noundef) #1

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

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

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

declare void @libxsmm_x86_instruction_pop_reg(ptr 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

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

25:                                               ; preds = %8
  %26 = load i32, ptr %19, align 4, !tbaa !9
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = icmp eq i32 %26, %27
  br i1 %28, label %37, label %29

29:                                               ; preds = %25
  %30 = load i32, ptr %19, align 4, !tbaa !9
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = icmp eq i32 %30, %31
  br i1 %32, label %37, label %33

33:                                               ; preds = %29
  %34 = load i32, ptr %19, align 4, !tbaa !9
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = icmp eq i32 %34, %35
  br i1 %36, label %37, label %46

37:                                               ; preds = %33, %29, %25, %8
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %40 = icmp ult i32 1, %39
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %44

43:                                               ; preds = %37
  br label %44

44:                                               ; preds = %43, %41
  %45 = phi i32 [ %42, %41 ], [ 1, %43 ]
  call void @libxsmm_handle_error(ptr noundef %38, i32 noundef 90044, ptr noundef @__func__.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel, ptr noundef @.str, i32 noundef 837, i32 noundef %45)
  store i32 1, ptr %21, align 4
  br label %225

46:                                               ; preds = %33
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 1, !tbaa !11
  %50 = urem i32 %49, 4
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %61

52:                                               ; preds = %46
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %55 = icmp ult i32 1, %54
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  %57 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %59

58:                                               ; preds = %52
  br label %59

59:                                               ; preds = %58, %56
  %60 = phi i32 [ %57, %56 ], [ 1, %58 ]
  call void @libxsmm_handle_error(ptr noundef %53, i32 noundef 90000, ptr noundef @__func__.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel, ptr noundef @.str, i32 noundef 842, i32 noundef %60)
  store i32 1, ptr %21, align 4
  br label %225

61:                                               ; preds = %46
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !14
  %65 = icmp eq i32 %64, 8
  br i1 %65, label %66, label %67

66:                                               ; preds = %61
  store i32 -1568407413, ptr %17, align 4, !tbaa !9
  store i32 -1568407413, ptr %18, align 4, !tbaa !9
  br label %89

67:                                               ; preds = %61
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 4, !tbaa !14
  %71 = icmp eq i32 %70, 4
  br i1 %71, label %72, label %73

72:                                               ; preds = %67
  store i32 -1610350453, ptr %17, align 4, !tbaa !9
  store i32 -1610350453, ptr %18, align 4, !tbaa !9
  br label %88

73:                                               ; preds = %67
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = icmp eq i32 %76, 2
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  store i32 -1610334069, ptr %17, align 4, !tbaa !9
  store i32 -1610334069, ptr %18, align 4, !tbaa !9
  br label %87

79:                                               ; preds = %73
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 4, !tbaa !14
  %83 = icmp eq i32 %82, 1
  br i1 %83, label %84, label %85

84:                                               ; preds = %79
  store i32 -1610350454, ptr %17, align 4, !tbaa !9
  store i32 -1610350454, ptr %18, align 4, !tbaa !9
  br label %86

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %85, %84
  br label %87

87:                                               ; preds = %86, %78
  br label %88

88:                                               ; preds = %87, %72
  br label %89

89:                                               ; preds = %88, %66
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i32, ptr %19, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_push_reg(ptr noundef %90, i32 noundef %91)
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %93, i32 0, i32 14
  %95 = load i32, ptr %94, align 4, !tbaa !16
  %96 = load i32, ptr %14, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %92, i32 noundef %95, i32 noundef %96, i64 noundef 0)
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef %97, ptr noundef %98)
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load i32, ptr %14, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %99, i32 noundef 30000, i32 noundef %100, i64 noundef 4)
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %102, i32 0, i32 14
  %104 = load i32, ptr %103, align 4, !tbaa !16
  %105 = load i32, ptr %13, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %101, i32 noundef %104, i32 noundef %105, i64 noundef 0)
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load i32, ptr %13, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %108, i32 noundef 30000, i32 noundef %109, i64 noundef 1)
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %145, %89
  %111 = load i32, ptr %20, align 4, !tbaa !9
  %112 = icmp ult i32 %111, 4
  br i1 %112, label %113, label %148

113:                                              ; preds = %110
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 4, !tbaa !14
  %120 = load i32, ptr %20, align 4, !tbaa !9
  %121 = mul i32 %119, %120
  %122 = load i32, ptr %19, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_mem(ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef 127, i32 noundef 0, i32 noundef %121, i32 noundef %122, i32 noundef 0)
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %126, i32 0, i32 5
  %128 = load i32, ptr %127, align 4, !tbaa !17
  %129 = load i32, ptr %20, align 4, !tbaa !9
  %130 = urem i32 %129, 2
  %131 = mul i32 %128, %130
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %132, i32 0, i32 5
  %134 = load i32, ptr %133, align 4, !tbaa !17
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %135, i32 0, i32 3
  %137 = load i32, ptr %136, align 1, !tbaa !18
  %138 = mul i32 %134, %137
  %139 = mul i32 %138, 2
  %140 = load i32, ptr %20, align 4, !tbaa !9
  %141 = udiv i32 %140, 2
  %142 = mul i32 %139, %141
  %143 = add i32 %131, %142
  %144 = load i32, ptr %19, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_alu_mem(ptr noundef %123, i32 noundef %124, i32 noundef %125, i32 noundef 127, i32 noundef 0, i32 noundef %143, i32 noundef %144, i32 noundef 1)
  br label %145

145:                                              ; preds = %113
  %146 = load i32, ptr %20, align 4, !tbaa !9
  %147 = add i32 %146, 1
  store i32 %147, ptr %20, align 4, !tbaa !9
  br label %110, !llvm.loop !19

148:                                              ; preds = %110
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = load ptr, ptr %15, 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 !14
  %154 = zext i32 %153 to i64
  %155 = mul nsw i64 %154, 4
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %149, i32 noundef 30000, i32 noundef %150, i64 noundef %155)
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %158, i32 0, i32 5
  %160 = load i32, ptr %159, align 4, !tbaa !17
  %161 = zext i32 %160 to i64
  %162 = mul nsw i64 %161, 2
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %156, i32 noundef 30000, i32 noundef %157, i64 noundef %162)
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = load ptr, ptr %16, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 1, !tbaa !21
  call void @libxsmm_generator_mateltwise_footer_m_loop(ptr noundef %163, ptr noundef %164, ptr noundef %165, i32 noundef %166, i32 noundef %169)
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %172, i32 0, i32 2
  %174 = load i32, ptr %173, align 1, !tbaa !22
  %175 = zext i32 %174 to i64
  %176 = mul nsw i64 4, %175
  %177 = load ptr, ptr %15, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 4, !tbaa !14
  %180 = zext i32 %179 to i64
  %181 = mul nsw i64 %176, %180
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %182, i32 0, i32 2
  %184 = load i32, ptr %183, align 4, !tbaa !14
  %185 = zext i32 %184 to i64
  %186 = load ptr, ptr %16, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 1, !tbaa !21
  %189 = zext i32 %188 to i64
  %190 = mul nsw i64 %185, %189
  %191 = mul nsw i64 %190, 4
  %192 = sub nsw i64 %181, %191
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %170, i32 noundef 30000, i32 noundef %171, i64 noundef %192)
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = load i32, ptr %12, align 4, !tbaa !9
  %195 = load ptr, ptr %16, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %195, i32 0, i32 3
  %197 = load i32, ptr %196, align 1, !tbaa !18
  %198 = zext i32 %197 to i64
  %199 = mul nsw i64 4, %198
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %200, i32 0, i32 5
  %202 = load i32, ptr %201, align 4, !tbaa !17
  %203 = zext i32 %202 to i64
  %204 = mul nsw i64 %199, %203
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %205, i32 0, i32 5
  %207 = load i32, ptr %206, align 4, !tbaa !17
  %208 = zext i32 %207 to i64
  %209 = load ptr, ptr %16, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 1, !tbaa !21
  %212 = zext i32 %211 to i64
  %213 = mul nsw i64 %208, %212
  %214 = mul nsw i64 %213, 2
  %215 = sub nsw i64 %204, %214
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %193, i32 noundef 30000, i32 noundef %194, i64 noundef %215)
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = load ptr, ptr %10, align 8, !tbaa !5
  %218 = load ptr, ptr %15, align 8, !tbaa !5
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = load ptr, ptr %16, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %220, i32 0, i32 1
  %222 = load i32, ptr %221, align 1, !tbaa !11
  call void @libxsmm_generator_mateltwise_footer_n_loop(ptr noundef %216, ptr noundef %217, ptr noundef %218, i32 noundef %219, i32 noundef %222)
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = load i32, ptr %19, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_pop_reg(ptr noundef %223, i32 noundef %224)
  store i32 0, ptr %21, align 4
  br label %225

225:                                              ; preds = %148, %59, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  %226 = load i32, ptr %21, align 4
  switch i32 %226, label %228 [
    i32 0, label %227
    i32 1, label %227
  ]

227:                                              ; preds = %225, %225
  ret void

228:                                              ; preds = %225
  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 4}
!12 = !{!"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, !13, i64 27, !13, i64 29, !7, i64 31}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !10, i64 8}
!15 = !{!"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}
!16 = !{!15, !10, i64 56}
!17 = !{!15, !10, i64 20}
!18 = !{!12, !10, i64 12}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !10, i64 0}
!22 = !{!12, !10, i64 8}


; 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 [90 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_vnni4_to_vnni2_mbit_scalar_sse_microkernel = external hidden unnamed_addr constant [71 x i8], align 1
@switch.table.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel = private unnamed_addr constant [8 x i32] [i32 -1610350454, i32 -1610334069, i32 9999, i32 -1610350453, i32 9999, i32 9999, i32 9999, i32 -1568407413], 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_x86_instruction_push_reg(ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, ptr nocapture noundef readonly %7) local_unnamed_addr #1 {
  %9 = icmp eq i32 %4, 15
  %10 = icmp eq i32 %5, 15
  %or.cond = or i1 %9, %10
  %11 = icmp eq i32 %2, 15
  %or.cond84 = or i1 %11, %or.cond
  %12 = icmp eq i32 %3, 15
  %or.cond85 = or i1 %12, %or.cond84
  br i1 %or.cond85, label %13, label %18

13:                                               ; preds = %8
  %14 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !5
  %15 = icmp ugt i32 %14, 1
  %16 = load i32, ptr @libxsmm_verbosity, align 4
  %17 = select i1 %15, i32 %16, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90044, ptr noundef nonnull @__func__.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel, ptr noundef nonnull @.str, i32 noundef 837, i32 noundef %17) #2
  br label %83

18:                                               ; preds = %8
  %19 = getelementptr inbounds i8, ptr %7, i64 4
  %20 = load i32, ptr %19, align 1, !tbaa !9
  %21 = and i32 %20, 3
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %27, label %22

22:                                               ; preds = %18
  %23 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !5
  %24 = icmp ugt i32 %23, 1
  %25 = load i32, ptr @libxsmm_verbosity, align 4
  %26 = select i1 %24, i32 %25, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel, ptr noundef nonnull @.str, i32 noundef 842, i32 noundef %26) #2
  br label %83

27:                                               ; preds = %18
  %28 = getelementptr inbounds i8, ptr %6, i64 8
  %29 = load i32, ptr %28, align 4, !tbaa !12
  %switch.tableidx = add i32 %29, -1
  %30 = icmp ult i32 %switch.tableidx, 8
  br i1 %30, label %switch.lookup, label %.fold.split

switch.lookup:                                    ; preds = %27
  %31 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [8 x i32], ptr @switch.table.libxsmm_generator_transform_vnni4_to_vnni2_mbit_scalar_sse_microkernel, i64 0, i64 %31
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %.fold.split

.fold.split:                                      ; preds = %27, %switch.lookup
  %.077 = phi i32 [ %switch.load, %switch.lookup ], [ 9999, %27 ]
  tail call void @libxsmm_x86_instruction_push_reg(ptr noundef %0, i32 noundef 15) #2
  %32 = getelementptr inbounds i8, ptr %6, i64 56
  %33 = load i32, ptr %32, align 4, !tbaa !14
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef %33, i32 noundef %5, i64 noundef 0) #2
  tail call void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef %0, ptr noundef %1) #2
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %5, i64 noundef 4) #2
  %34 = load i32, ptr %32, align 4, !tbaa !14
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef %34, i32 noundef %4, i64 noundef 0) #2
  tail call void @libxsmm_x86_instruction_register_jump_back_label(ptr noundef %0, ptr noundef %1) #2
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %4, i64 noundef 1) #2
  %35 = getelementptr inbounds i8, ptr %6, i64 20
  %36 = getelementptr inbounds i8, ptr %7, i64 12
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef 15, i32 noundef 0) #2
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %3, i32 noundef 127, i32 noundef 0, i32 noundef 0, i32 noundef 15, i32 noundef 1) #2
  %37 = load i32, ptr %28, align 4, !tbaa !12
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %37, i32 noundef 15, i32 noundef 0) #2
  %38 = load i32, ptr %35, align 4, !tbaa !15
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %3, i32 noundef 127, i32 noundef 0, i32 noundef %38, i32 noundef 15, i32 noundef 1) #2
  %39 = load i32, ptr %28, align 4, !tbaa !12
  %40 = shl i32 %39, 1
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %40, i32 noundef 15, i32 noundef 0) #2
  %41 = load i32, ptr %35, align 4, !tbaa !15
  %42 = load i32, ptr %36, align 1, !tbaa !16
  %43 = shl i32 %41, 1
  %44 = mul i32 %43, %42
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %3, i32 noundef 127, i32 noundef 0, i32 noundef %44, i32 noundef 15, i32 noundef 1) #2
  %45 = load i32, ptr %28, align 4, !tbaa !12
  %46 = mul i32 %45, 3
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %46, i32 noundef 15, i32 noundef 0) #2
  %47 = load i32, ptr %35, align 4, !tbaa !15
  %48 = load i32, ptr %36, align 1, !tbaa !16
  %49 = shl i32 %47, 1
  %50 = mul i32 %49, %48
  %51 = add i32 %50, %47
  tail call void @libxsmm_x86_instruction_alu_mem(ptr noundef %0, i32 noundef %.077, i32 noundef %3, i32 noundef 127, i32 noundef 0, i32 noundef %51, i32 noundef 15, i32 noundef 1) #2
  %52 = load i32, ptr %28, align 4, !tbaa !12
  %53 = zext i32 %52 to i64
  %54 = shl nuw nsw i64 %53, 2
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %2, i64 noundef %54) #2
  %55 = load i32, ptr %35, align 4, !tbaa !15
  %56 = zext i32 %55 to i64
  %57 = shl nuw nsw i64 %56, 1
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %3, i64 noundef %57) #2
  %58 = load i32, ptr %7, align 1, !tbaa !17
  tail call void @libxsmm_generator_mateltwise_footer_m_loop(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, i32 noundef %4, i32 noundef %58) #2
  %59 = getelementptr inbounds i8, ptr %7, i64 8
  %60 = load i32, ptr %59, align 1, !tbaa !18
  %61 = zext i32 %60 to i64
  %62 = shl nuw nsw i64 %61, 2
  %63 = load i32, ptr %28, align 4, !tbaa !12
  %64 = zext i32 %63 to i64
  %65 = mul nuw nsw i64 %62, %64
  %66 = load i32, ptr %7, align 1, !tbaa !17
  %67 = zext i32 %66 to i64
  %68 = shl nuw nsw i64 %64, 2
  %69 = mul i64 %68, %67
  %70 = sub nsw i64 %65, %69
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %2, i64 noundef %70) #2
  %71 = load i32, ptr %36, align 1, !tbaa !16
  %72 = zext i32 %71 to i64
  %73 = shl nuw nsw i64 %72, 2
  %74 = load i32, ptr %35, align 4, !tbaa !15
  %75 = zext i32 %74 to i64
  %76 = mul nuw nsw i64 %73, %75
  %77 = load i32, ptr %7, align 1, !tbaa !17
  %78 = zext i32 %77 to i64
  %79 = shl nuw nsw i64 %75, 1
  %80 = mul i64 %79, %78
  %81 = sub nsw i64 %76, %80
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %3, i64 noundef %81) #2
  %82 = load i32, ptr %19, align 1, !tbaa !9
  tail call void @libxsmm_generator_mateltwise_footer_n_loop(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, i32 noundef %5, i32 noundef %82) #2
  tail call void @libxsmm_x86_instruction_pop_reg(ptr noundef %0, i32 noundef 15) #2
  br label %83

83:                                               ; preds = %.fold.split, %22, %13
  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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"libxsmm_meltw_descriptor", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !11, i64 27, !11, i64 29, !7, i64 31}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"libxsmm_mateltwise_kernel_config_struct", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !6, i64 192, !6, i64 196, !6, i64 200, !6, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !6, i64 224, !6, i64 228, !6, i64 232, !6, i64 236, !6, i64 240, !6, i64 244, !6, i64 248, !6, i64 252, !6, i64 256, !6, i64 260, !6, i64 264, !6, i64 268, !6, i64 272, !6, i64 276, !6, i64 280, !6, i64 284, !6, i64 288, !6, i64 292, !6, i64 296, !6, i64 300, !6, i64 304, !6, i64 308, !6, i64 312, !6, i64 316, !6, i64 320, !6, i64 324, !6, i64 328, !6, i64 332, !6, i64 336, !6, i64 340, !6, i64 344, !6, i64 348, !6, i64 352, !6, i64 356, !6, i64 360, !6, i64 364, !6, i64 368, !6, i64 372, !6, i64 376, !6, i64 380, !6, i64 384, !6, i64 388, !6, i64 392, !6, i64 396, !6, i64 400, !6, i64 404, !6, i64 408, !6, i64 412, !6, i64 416, !6, i64 420, !6, i64 424, !6, i64 428, !6, i64 432, !6, i64 436, !6, i64 440, !6, i64 444, !6, i64 448, !6, i64 452, !6, i64 456, !6, i64 460, !6, i64 464, !6, i64 468, !6, i64 472, !6, i64 476, !6, i64 480, !6, i64 484, !6, i64 488, !6, i64 492, !6, i64 496, !6, i64 500, !6, i64 504, !6, i64 508, !7, i64 512}
!14 = !{!13, !6, i64 56}
!15 = !{!13, !6, i64 20}
!16 = !{!10, !6, i64 12}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !6, i64 8}


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