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

; 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_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }
%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 }

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

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

declare void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef, i32 noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_vnni4_to_norm_08bit_avx512_mnblock_micro_kernel(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9) #2 {
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %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 i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %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 i32 %1, ptr %12, align 4, !tbaa !9
  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 i32 %7, ptr %18, align 4, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %24 = load i32, ptr %18, align 4, !tbaa !9
  %25 = udiv i32 %24, 4
  store i32 %25, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  store i32 0, ptr %23, align 4, !tbaa !9
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %52, %10
  %27 = load i32, ptr %21, align 4, !tbaa !9
  %28 = load i32, ptr %18, align 4, !tbaa !9
  %29 = udiv i32 %28, 4
  %30 = icmp ult i32 %27, %29
  br i1 %30, label %31, label %55

31:                                               ; preds = %26
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %21, align 4, !tbaa !9
  %38 = load ptr, ptr %20, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %38, i32 0, i32 2
  %40 = load i32, ptr %39, align 1, !tbaa !13
  %41 = mul i32 %37, %40
  %42 = mul i32 %41, 4
  %43 = load ptr, ptr %19, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !16
  %46 = mul i32 %42, %45
  %47 = load ptr, ptr %19, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %47, i32 0, i32 128
  %49 = load i8, ptr %48, align 4, !tbaa !18
  %50 = load i32, ptr %21, align 4, !tbaa !9
  %51 = load i32, ptr %14, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_move(ptr noundef %32, i32 noundef %35, i32 noundef 537138704, i32 noundef %36, i32 noundef 127, i32 noundef 0, i32 noundef %46, i8 noundef signext %49, i32 noundef %50, i32 noundef %51, i32 noundef 1, i32 noundef 0)
  br label %52

52:                                               ; preds = %31
  %53 = load i32, ptr %21, align 4, !tbaa !9
  %54 = add i32 %53, 1
  store i32 %54, ptr %21, align 4, !tbaa !9
  br label %26, !llvm.loop !19

55:                                               ; preds = %26
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %17, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = mul nsw i64 %59, 4
  %61 = load ptr, ptr %19, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !16
  %64 = zext i32 %63 to i64
  %65 = mul nsw i64 %60, %64
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %56, i32 noundef 30000, i32 noundef %57, i64 noundef %65)
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %157, %55
  %67 = load i32, ptr %21, align 4, !tbaa !9
  %68 = load i32, ptr %18, align 4, !tbaa !9
  %69 = udiv i32 %68, 4
  %70 = icmp ult i32 %67, %69
  br i1 %70, label %71, label %160

71:                                               ; preds = %66
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %73, i32 0, i32 128
  %75 = load i8, ptr %74, align 4, !tbaa !18
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = load i32, ptr %21, align 4, !tbaa !9
  %78 = load i32, ptr %21, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %72, i32 noundef 805643776, i8 noundef signext %75, i32 noundef %76, i32 noundef %77, i32 noundef %78, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0)
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load ptr, ptr %19, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %80, i32 0, i32 128
  %82 = load i8, ptr %81, align 4, !tbaa !18
  %83 = load i32, ptr %21, align 4, !tbaa !9
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = load i32, ptr %21, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %79, i32 noundef 805643830, i8 noundef signext %82, i32 noundef %83, i32 noundef %84, i32 noundef %85, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 1024)
  %86 = load i32, ptr %17, align 4, !tbaa !9
  %87 = urem i32 %86, 16
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %117

89:                                               ; preds = %71
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %113, %89
  %91 = load i32, ptr %23, align 4, !tbaa !9
  %92 = icmp ult i32 %91, 4
  br i1 %92, label %93, label %116

93:                                               ; preds = %90
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %95, i32 0, i32 128
  %97 = load i8, ptr %96, align 4, !tbaa !18
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = load i32, ptr %23, align 4, !tbaa !9
  %100 = load i32, ptr %21, align 4, !tbaa !9
  %101 = mul i32 4, %100
  %102 = add i32 %99, %101
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %103, i32 0, i32 3
  %105 = load i32, ptr %104, align 1, !tbaa !21
  %106 = mul i32 %102, %105
  %107 = load ptr, ptr %19, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %107, i32 0, i32 5
  %109 = load i32, ptr %108, align 4, !tbaa !22
  %110 = mul i32 %106, %109
  %111 = load i32, ptr %21, align 4, !tbaa !9
  %112 = load i32, ptr %23, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef %94, i32 noundef -401785799, i8 noundef signext %97, i32 noundef %98, i32 noundef 127, i32 noundef 0, i32 noundef %110, i32 noundef 0, i32 noundef 255, i32 noundef %111, i32 noundef 0, i32 noundef 0, i32 noundef %112)
  br label %113

113:                                              ; preds = %93
  %114 = load i32, ptr %23, align 4, !tbaa !9
  %115 = add i32 %114, 1
  store i32 %115, ptr %23, align 4, !tbaa !9
  br label %90, !llvm.loop !23

116:                                              ; preds = %90
  br label %156

117:                                              ; preds = %71
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %152, %117
  %119 = load i32, ptr %23, align 4, !tbaa !9
  %120 = icmp ult i32 %119, 4
  br i1 %120, label %121, label %155

121:                                              ; preds = %118
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = load ptr, ptr %19, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %123, i32 0, i32 128
  %125 = load i8, ptr %124, align 4, !tbaa !18
  %126 = load i32, ptr %21, align 4, !tbaa !9
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = load i32, ptr %23, align 4, !tbaa !9
  %129 = add i32 %127, %128
  %130 = load i32, ptr %23, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %122, i32 noundef -401785799, i8 noundef signext %125, i32 noundef %126, i32 noundef 255, i32 noundef %129, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef %130)
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %132, i32 0, i32 6
  %134 = load i32, ptr %133, align 4, !tbaa !11
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = load i32, ptr %23, align 4, !tbaa !9
  %137 = load i32, ptr %21, align 4, !tbaa !9
  %138 = mul i32 4, %137
  %139 = add i32 %136, %138
  %140 = load ptr, ptr %20, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %140, i32 0, i32 3
  %142 = load i32, ptr %141, align 1, !tbaa !21
  %143 = mul i32 %139, %142
  %144 = load ptr, ptr %19, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %144, i32 0, i32 5
  %146 = load i32, ptr %145, align 4, !tbaa !22
  %147 = mul i32 %143, %146
  %148 = load i32, ptr %22, align 4, !tbaa !9
  %149 = load i32, ptr %23, align 4, !tbaa !9
  %150 = add i32 %148, %149
  %151 = load i32, ptr %14, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_vec_move(ptr noundef %131, i32 noundef %134, i32 noundef -536406417, i32 noundef %135, i32 noundef 127, i32 noundef 0, i32 noundef %147, i8 noundef signext 120, i32 noundef %150, i32 noundef %151, i32 noundef 0, i32 noundef 1)
  br label %152

152:                                              ; preds = %121
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = add i32 %153, 1
  store i32 %154, ptr %23, align 4, !tbaa !9
  br label %118, !llvm.loop !24

155:                                              ; preds = %118
  br label %156

156:                                              ; preds = %155, %116
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %21, align 4, !tbaa !9
  %159 = add i32 %158, 1
  store i32 %159, ptr %21, align 4, !tbaa !9
  br label %66, !llvm.loop !25

160:                                              ; preds = %66
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = zext i32 %163 to i64
  %165 = load ptr, ptr %19, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.libxsmm_mateltwise_kernel_config_struct, ptr %165, i32 0, i32 5
  %167 = load i32, ptr %166, align 4, !tbaa !22
  %168 = zext i32 %167 to i64
  %169 = mul nsw i64 %164, %168
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %161, i32 noundef 30000, i32 noundef %162, i64 noundef %169)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  ret void
}

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 28}
!12 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!14, !10, i64 8}
!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 = !{!17, !10, i64 8}
!17 = !{!"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}
!18 = !{!17, !7, i64 512}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !10, i64 12}
!22 = !{!17, !10, i64 20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !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"

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

declare void @libxsmm_x86_instruction_vec_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef, i32 noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_vnni4_to_norm_08bit_avx512_mnblock_micro_kernel(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr nocapture noundef readonly %8, ptr nocapture noundef readonly %9) local_unnamed_addr #1 {
  %11 = lshr i32 %7, 2
  %.not = icmp ult i32 %7, 4
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %12 = getelementptr inbounds i8, ptr %0, i64 28
  %13 = getelementptr inbounds i8, ptr %9, i64 8
  %14 = getelementptr inbounds i8, ptr %8, i64 8
  %15 = getelementptr inbounds i8, ptr %8, i64 512
  br label %16

16:                                               ; preds = %.lr.ph, %16
  %.06368 = phi i32 [ 0, %.lr.ph ], [ %24, %16 ]
  %17 = load i32, ptr %12, align 4, !tbaa !5
  %18 = load i32, ptr %13, align 1, !tbaa !11
  %19 = load i32, ptr %14, align 4, !tbaa !14
  %20 = shl i32 %.06368, 2
  %21 = mul i32 %20, %18
  %22 = mul i32 %21, %19
  %23 = load i8, ptr %15, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef %0, i32 noundef %17, i32 noundef 537138704, i32 noundef %1, i32 noundef 127, i32 noundef 0, i32 noundef %22, i8 noundef signext %23, i32 noundef %.06368, i32 noundef %3, i32 noundef 1, i32 noundef 0) #2
  %24 = add nuw nsw i32 %.06368, 1
  %exitcond.not = icmp eq i32 %24, %11
  br i1 %exitcond.not, label %._crit_edge, label %16, !llvm.loop !17

._crit_edge:                                      ; preds = %16, %10
  %25 = zext i32 %6 to i64
  %26 = shl nuw nsw i64 %25, 2
  %27 = getelementptr inbounds i8, ptr %8, i64 8
  %28 = load i32, ptr %27, align 4, !tbaa !14
  %29 = zext i32 %28 to i64
  %30 = mul nuw nsw i64 %26, %29
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %1, i64 noundef %30) #2
  br i1 %.not, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %8, i64 512
  %32 = and i32 %6, 15
  %33 = icmp eq i32 %32, 0
  %34 = getelementptr inbounds i8, ptr %0, i64 28
  %35 = getelementptr inbounds i8, ptr %9, i64 12
  %36 = getelementptr inbounds i8, ptr %8, i64 20
  br i1 %33, label %.preheader.us, label %.preheader66.preheader

.preheader66.preheader:                           ; preds = %.lr.ph73
  %37 = add nuw nsw i32 %11, 1
  %38 = add nuw nsw i32 %11, 2
  %39 = add nuw nsw i32 %11, 3
  br label %.preheader66

.preheader.us:                                    ; preds = %.lr.ph73, %.preheader.us
  %.16471.us = phi i32 [ %66, %.preheader.us ], [ 0, %.lr.ph73 ]
  %40 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef 805643776, i8 noundef signext %40, i32 noundef %4, i32 noundef %.16471.us, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0) #2
  %41 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef 805643830, i8 noundef signext %41, i32 noundef %.16471.us, i32 noundef %5, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 1024) #2
  %42 = shl nuw i32 %.16471.us, 2
  %43 = load i8, ptr %31, align 4, !tbaa !16
  %44 = load i32, ptr %35, align 1, !tbaa !19
  %45 = mul i32 %44, %42
  %46 = load i32, ptr %36, align 4, !tbaa !20
  %47 = mul i32 %45, %46
  tail call void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %43, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %47, i32 noundef 0, i32 noundef 255, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i32 noundef 0) #2
  %48 = load i8, ptr %31, align 4, !tbaa !16
  %49 = or disjoint i32 %42, 1
  %50 = load i32, ptr %35, align 1, !tbaa !19
  %51 = mul i32 %50, %49
  %52 = load i32, ptr %36, align 4, !tbaa !20
  %53 = mul i32 %51, %52
  tail call void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %48, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %53, i32 noundef 0, i32 noundef 255, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i32 noundef 1) #2
  %54 = load i8, ptr %31, align 4, !tbaa !16
  %55 = or disjoint i32 %42, 2
  %56 = load i32, ptr %35, align 1, !tbaa !19
  %57 = mul i32 %56, %55
  %58 = load i32, ptr %36, align 4, !tbaa !20
  %59 = mul i32 %57, %58
  tail call void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %54, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %59, i32 noundef 0, i32 noundef 255, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i32 noundef 2) #2
  %60 = load i8, ptr %31, align 4, !tbaa !16
  %61 = or disjoint i32 %42, 3
  %62 = load i32, ptr %35, align 1, !tbaa !19
  %63 = mul i32 %62, %61
  %64 = load i32, ptr %36, align 4, !tbaa !20
  %65 = mul i32 %63, %64
  tail call void @libxsmm_x86_instruction_vec_compute_mem_2reg_mask_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %60, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %65, i32 noundef 0, i32 noundef 255, i32 noundef %.16471.us, i32 noundef 0, i32 noundef 0, i32 noundef 3) #2
  %66 = add nuw nsw i32 %.16471.us, 1
  %exitcond80.not = icmp eq i32 %66, %11
  br i1 %exitcond80.not, label %._crit_edge74, label %.preheader.us, !llvm.loop !21

.preheader66:                                     ; preds = %.preheader66.preheader, %.preheader66
  %.16471 = phi i32 [ %97, %.preheader66 ], [ 0, %.preheader66.preheader ]
  %67 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef 805643776, i8 noundef signext %67, i32 noundef %4, i32 noundef %.16471, i32 noundef %.16471, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0) #2
  %68 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef 805643830, i8 noundef signext %68, i32 noundef %.16471, i32 noundef %5, i32 noundef %.16471, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 1024) #2
  %69 = shl nuw i32 %.16471, 2
  %70 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %70, i32 noundef %.16471, i32 noundef 255, i32 noundef %11, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0) #2
  %71 = load i32, ptr %34, align 4, !tbaa !5
  %72 = load i32, ptr %35, align 1, !tbaa !19
  %73 = mul i32 %72, %69
  %74 = load i32, ptr %36, align 4, !tbaa !20
  %75 = mul i32 %73, %74
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef %0, i32 noundef %71, i32 noundef -536406417, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %75, i8 noundef signext 120, i32 noundef %11, i32 noundef %3, i32 noundef 0, i32 noundef 1) #2
  %76 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %76, i32 noundef %.16471, i32 noundef 255, i32 noundef %37, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 1) #2
  %77 = load i32, ptr %34, align 4, !tbaa !5
  %78 = or disjoint i32 %69, 1
  %79 = load i32, ptr %35, align 1, !tbaa !19
  %80 = mul i32 %79, %78
  %81 = load i32, ptr %36, align 4, !tbaa !20
  %82 = mul i32 %80, %81
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef %0, i32 noundef %77, i32 noundef -536406417, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %82, i8 noundef signext 120, i32 noundef %37, i32 noundef %3, i32 noundef 0, i32 noundef 1) #2
  %83 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %83, i32 noundef %.16471, i32 noundef 255, i32 noundef %38, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 2) #2
  %84 = load i32, ptr %34, align 4, !tbaa !5
  %85 = or disjoint i32 %69, 2
  %86 = load i32, ptr %35, align 1, !tbaa !19
  %87 = mul i32 %86, %85
  %88 = load i32, ptr %36, align 4, !tbaa !20
  %89 = mul i32 %87, %88
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef %0, i32 noundef %84, i32 noundef -536406417, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %89, i8 noundef signext 120, i32 noundef %38, i32 noundef %3, i32 noundef 0, i32 noundef 1) #2
  %90 = load i8, ptr %31, align 4, !tbaa !16
  tail call void @libxsmm_x86_instruction_vec_compute_3reg_mask_sae_imm8(ptr noundef %0, i32 noundef -401785799, i8 noundef signext %90, i32 noundef %.16471, i32 noundef 255, i32 noundef %39, i32 noundef 0, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 3) #2
  %91 = load i32, ptr %34, align 4, !tbaa !5
  %92 = or disjoint i32 %69, 3
  %93 = load i32, ptr %35, align 1, !tbaa !19
  %94 = mul i32 %93, %92
  %95 = load i32, ptr %36, align 4, !tbaa !20
  %96 = mul i32 %94, %95
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef %0, i32 noundef %91, i32 noundef -536406417, i32 noundef %2, i32 noundef 127, i32 noundef 0, i32 noundef %96, i8 noundef signext 120, i32 noundef %39, i32 noundef %3, i32 noundef 0, i32 noundef 1) #2
  %97 = add nuw nsw i32 %.16471, 1
  %exitcond78.not = icmp eq i32 %97, %11
  br i1 %exitcond78.not, label %._crit_edge74, label %.preheader66, !llvm.loop !21

._crit_edge74:                                    ; preds = %.preheader66, %.preheader.us, %._crit_edge
  %98 = getelementptr inbounds i8, ptr %8, i64 20
  %99 = load i32, ptr %98, align 4, !tbaa !20
  %100 = zext i32 %99 to i64
  %101 = mul nuw nsw i64 %100, %25
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef %0, i32 noundef 30000, i32 noundef %2, i64 noundef %101) #2
  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, !10, i64 28}
!6 = !{!"libxsmm_generated_code", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"libxsmm_meltw_descriptor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !13, i64 27, !13, i64 29, !8, i64 31}
!13 = !{!"short", !8, 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, !8, i64 512}
!16 = !{!15, !8, i64 512}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !10, i64 12}
!20 = !{!15, !10, i64 20}
!21 = distinct !{!21, !18}


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