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

; 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_unary_param = type { %struct.libxsmm_matrix_op_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg }
%struct.libxsmm_matrix_op_arg = type { ptr, ptr, ptr, ptr }
%struct.libxsmm_matrix_arg = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.libxsmm_descriptor_blob = type { [96 x i8] }
%struct.libxsmm_gemm_def = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct.libxsmm_gemm_descriptor = type <{ i32, i32, i32, i32, i32, i32, i32, i8, [3 x i8], i8, i64, i64, i8, i32, i32, i32, i16, i16, i8, i8, i8, i8, i16, i16, i16, i16, i16, i16, i32, i32, i32, i8 }>

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_ref_apply_c_vnni = external hidden unnamed_addr constant [91 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

; 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) #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare ptr @libxsmm_meltw_descriptor_init2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext) #3

declare void @libxsmm_reference_unary_elementwise(ptr noundef, ptr noundef) #3

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) #3

declare i32 @libxsmm_cpuid_dot_pack_factor(i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_ref_apply_c_vnni(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca %struct.libxsmm_meltw_unary_param, align 8
  %9 = alloca %struct.libxsmm_descriptor_blob, align 1
  %10 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %11, i32 0, i32 64
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = icmp ugt i32 %13, 0
  br i1 %14, label %15, label %221

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %16, i32 0, i32 8
  %18 = getelementptr inbounds [3 x i8], ptr %17, i64 0, i64 0
  %19 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %18)
  %20 = icmp eq i32 %19, 2
  br i1 %20, label %27, label %21

21:                                               ; preds = %15
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %22, i32 0, i32 8
  %24 = getelementptr inbounds [3 x i8], ptr %23, i64 0, i64 0
  %25 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %24)
  %26 = icmp eq i32 %25, 3
  br i1 %26, label %27, label %44

27:                                               ; preds = %21, %15
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %28, i32 0, i32 8
  %30 = getelementptr inbounds [3 x i8], ptr %29, i64 0, i64 0
  %31 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %30)
  %32 = call i32 @libxsmm_cpuid_dot_pack_factor(i32 noundef %31)
  %33 = icmp eq i32 %32, 4
  br i1 %33, label %34, label %40

34:                                               ; preds = %27
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 1, !tbaa !15
  %38 = urem i32 %37, 4
  %39 = icmp eq i32 %38, 0
  br label %40

40:                                               ; preds = %34, %27
  %41 = phi i1 [ false, %27 ], [ %39, %34 ]
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, i32 54, i32 28
  br label %45

44:                                               ; preds = %21
  br label %45

45:                                               ; preds = %44, %40
  %46 = phi i32 [ %43, %40 ], [ 54, %44 ]
  %47 = trunc i32 %46 to i16
  store i16 %47, ptr %7, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 96, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %48, i32 0, i32 8
  %50 = getelementptr inbounds [3 x i8], ptr %49, i64 0, i64 0
  %51 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %50)
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %52, i32 0, i32 8
  %54 = getelementptr inbounds [3 x i8], ptr %53, i64 0, i64 0
  %55 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %54)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 1, !tbaa !19
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 1, !tbaa !15
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %62, i32 0, i32 5
  %64 = load i32, ptr %63, align 1, !tbaa !20
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %65, i32 0, i32 5
  %67 = load i32, ptr %66, align 1, !tbaa !20
  %68 = load i16, ptr %7, align 2, !tbaa !18
  %69 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef %9, i32 noundef %51, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %55, i32 noundef %58, i32 noundef %61, i32 noundef %64, i32 noundef %67, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext %68, i8 noundef zeroext 1)
  store ptr %69, ptr %10, align 8, !tbaa !5
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %70, i32 0, i32 67
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %74, i32 0, i32 5
  %76 = load i32, ptr %75, align 1, !tbaa !20
  %77 = zext i32 %76 to i64
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 1, !tbaa !15
  %81 = zext i32 %80 to i64
  %82 = mul i64 %77, %81
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %83, i32 0, i32 8
  %85 = getelementptr inbounds [3 x i8], ptr %84, i64 0, i64 0
  %86 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %85)
  %87 = icmp eq i32 0, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %45
  br label %208

89:                                               ; preds = %45
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %90, i32 0, i32 8
  %92 = getelementptr inbounds [3 x i8], ptr %91, i64 0, i64 0
  %93 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %92)
  %94 = icmp eq i32 1, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  br label %206

96:                                               ; preds = %89
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %97, i32 0, i32 8
  %99 = getelementptr inbounds [3 x i8], ptr %98, i64 0, i64 0
  %100 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %99)
  %101 = icmp eq i32 2, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  br label %204

103:                                              ; preds = %96
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %104, i32 0, i32 8
  %106 = getelementptr inbounds [3 x i8], ptr %105, i64 0, i64 0
  %107 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %106)
  %108 = icmp eq i32 3, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %103
  br label %202

110:                                              ; preds = %103
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %111, i32 0, i32 8
  %113 = getelementptr inbounds [3 x i8], ptr %112, i64 0, i64 0
  %114 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %113)
  %115 = icmp eq i32 4, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %110
  br label %200

117:                                              ; preds = %110
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %118, i32 0, i32 8
  %120 = getelementptr inbounds [3 x i8], ptr %119, i64 0, i64 0
  %121 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %120)
  %122 = icmp eq i32 5, %121
  br i1 %122, label %123, label %124

123:                                              ; preds = %117
  br label %198

124:                                              ; preds = %117
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %125, i32 0, i32 8
  %127 = getelementptr inbounds [3 x i8], ptr %126, i64 0, i64 0
  %128 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %127)
  %129 = icmp eq i32 6, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %124
  br label %196

131:                                              ; preds = %124
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %132, i32 0, i32 8
  %134 = getelementptr inbounds [3 x i8], ptr %133, i64 0, i64 0
  %135 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %134)
  %136 = icmp eq i32 7, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %131
  br label %194

138:                                              ; preds = %131
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %139, i32 0, i32 8
  %141 = getelementptr inbounds [3 x i8], ptr %140, i64 0, i64 0
  %142 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %141)
  %143 = icmp eq i32 8, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %138
  br label %192

145:                                              ; preds = %138
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %146, i32 0, i32 8
  %148 = getelementptr inbounds [3 x i8], ptr %147, i64 0, i64 0
  %149 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %148)
  %150 = icmp eq i32 9, %149
  br i1 %150, label %151, label %152

151:                                              ; preds = %145
  br label %190

152:                                              ; preds = %145
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %153, i32 0, i32 8
  %155 = getelementptr inbounds [3 x i8], ptr %154, i64 0, i64 0
  %156 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %155)
  %157 = icmp eq i32 10, %156
  br i1 %157, label %158, label %159

158:                                              ; preds = %152
  br label %188

159:                                              ; preds = %152
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %160, i32 0, i32 8
  %162 = getelementptr inbounds [3 x i8], ptr %161, i64 0, i64 0
  %163 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %162)
  %164 = icmp eq i32 11, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %159
  br label %186

166:                                              ; preds = %159
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %167, i32 0, i32 8
  %169 = getelementptr inbounds [3 x i8], ptr %168, i64 0, i64 0
  %170 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %169)
  %171 = icmp eq i32 12, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %166
  br label %184

173:                                              ; preds = %166
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %174, i32 0, i32 8
  %176 = getelementptr inbounds [3 x i8], ptr %175, i64 0, i64 0
  %177 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %176)
  %178 = icmp eq i32 13, %177
  br i1 %178, label %179, label %180

179:                                              ; preds = %173
  br label %182

180:                                              ; preds = %173
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2079, ptr noundef @__PRETTY_FUNCTION__.libxsmm_ref_apply_c_vnni) #6
  unreachable

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181, %179
  %183 = phi i32 [ 1, %179 ], [ 0, %181 ]
  br label %184

184:                                              ; preds = %182, %172
  %185 = phi i32 [ 1, %172 ], [ %183, %182 ]
  br label %186

186:                                              ; preds = %184, %165
  %187 = phi i32 [ 2, %165 ], [ %185, %184 ]
  br label %188

188:                                              ; preds = %186, %158
  %189 = phi i32 [ 2, %158 ], [ %187, %186 ]
  br label %190

190:                                              ; preds = %188, %151
  %191 = phi i32 [ 4, %151 ], [ %189, %188 ]
  br label %192

192:                                              ; preds = %190, %144
  %193 = phi i32 [ 4, %144 ], [ %191, %190 ]
  br label %194

194:                                              ; preds = %192, %137
  %195 = phi i32 [ 8, %137 ], [ %193, %192 ]
  br label %196

196:                                              ; preds = %194, %130
  %197 = phi i32 [ 8, %130 ], [ %195, %194 ]
  br label %198

198:                                              ; preds = %196, %123
  %199 = phi i32 [ 1, %123 ], [ %197, %196 ]
  br label %200

200:                                              ; preds = %198, %116
  %201 = phi i32 [ 1, %116 ], [ %199, %198 ]
  br label %202

202:                                              ; preds = %200, %109
  %203 = phi i32 [ 2, %109 ], [ %201, %200 ]
  br label %204

204:                                              ; preds = %202, %102
  %205 = phi i32 [ 2, %102 ], [ %203, %202 ]
  br label %206

206:                                              ; preds = %204, %95
  %207 = phi i32 [ 4, %95 ], [ %205, %204 ]
  br label %208

208:                                              ; preds = %206, %88
  %209 = phi i32 [ 8, %88 ], [ %207, %206 ]
  %210 = sext i32 %209 to i64
  %211 = mul i64 %82, %210
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %72, ptr align 1 %73, i64 %211, i1 false)
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %212, i32 0, i32 67
  %214 = load ptr, ptr %213, align 8, !tbaa !21
  %215 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %8, i32 0, i32 1
  %216 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %215, i32 0, i32 0
  store ptr %214, ptr %216, align 8, !tbaa !22
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %8, i32 0, i32 2
  %219 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %218, i32 0, i32 0
  store ptr %217, ptr %219, align 8, !tbaa !26
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libxsmm_reference_unary_elementwise(ptr noundef %8, ptr noundef %220)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #5
  br label %221

221:                                              ; preds = %208, %3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "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 = { "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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !11, i64 336}
!10 = !{!"libxsmm_gemm_def", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !12, i64 48, !12, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !13, i64 124, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !14, i64 264, !14, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !11, i64 320, !11, i64 324, !11, i64 328, !11, i64 332, !11, i64 336, !11, i64 340, !6, i64 344, !6, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!16, !11, i64 4}
!16 = !{!"libxsmm_gemm_descriptor", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !7, i64 28, !7, i64 29, !7, i64 32, !14, i64 33, !14, i64 41, !7, i64 49, !11, i64 50, !11, i64 54, !11, i64 58, !17, i64 62, !17, i64 64, !7, i64 66, !7, i64 67, !7, i64 68, !7, i64 69, !17, i64 70, !17, i64 72, !17, i64 74, !17, i64 76, !17, i64 78, !17, i64 80, !11, i64 82, !11, i64 86, !11, i64 90, !7, i64 94}
!17 = !{!"short", !7, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!16, !11, i64 0}
!20 = !{!16, !11, i64 20}
!21 = !{!10, !6, i64 352}
!22 = !{!23, !6, i64 32}
!23 = !{!"libxsmm_meltw_unary_param", !24, i64 0, !25, i64 32, !25, i64 80}
!24 = !{!"libxsmm_matrix_op_arg", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"libxsmm_matrix_arg", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!26 = !{!23, !6, i64 80}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.libxsmm_meltw_unary_param = type { %struct.libxsmm_matrix_op_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg }
%struct.libxsmm_matrix_op_arg = type { ptr, ptr, ptr, ptr }
%struct.libxsmm_matrix_arg = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.libxsmm_descriptor_blob = type { [96 x i8] }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_ref_apply_c_vnni = external hidden unnamed_addr constant [91 x i8], align 1

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

; 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) #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare ptr @libxsmm_meltw_descriptor_init2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #3

declare void @libxsmm_reference_unary_elementwise(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) local_unnamed_addr #3

declare i32 @libxsmm_cpuid_dot_pack_factor(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_ref_apply_c_vnni(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #4 {
  %4 = alloca %struct.libxsmm_meltw_unary_param, align 8
  %5 = alloca %struct.libxsmm_descriptor_blob, align 1
  %6 = getelementptr inbounds i8, ptr %0, i64 336
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %90, label %8

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %2, i64 29
  %10 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %11 = icmp eq i32 %10, 2
  br i1 %11, label %15, label %12

12:                                               ; preds = %8
  %13 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %14 = icmp eq i32 %13, 3
  br i1 %14, label %15, label %25

15:                                               ; preds = %12, %8
  %16 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %17 = tail call i32 @libxsmm_cpuid_dot_pack_factor(i32 noundef %16) #5
  %18 = icmp eq i32 %17, 4
  br i1 %18, label %19, label %25

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %2, i64 4
  %21 = load i32, ptr %20, align 1, !tbaa !14
  %22 = and i32 %21, 3
  %23 = icmp eq i32 %22, 0
  %24 = select i1 %23, i16 54, i16 28
  br label %25

25:                                               ; preds = %15, %19, %12
  %26 = phi i16 [ 54, %12 ], [ 28, %15 ], [ %24, %19 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #5
  %27 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %28 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %29 = load i32, ptr %2, align 1, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %2, i64 4
  %31 = load i32, ptr %30, align 1, !tbaa !14
  %32 = getelementptr inbounds i8, ptr %2, i64 20
  %33 = load i32, ptr %32, align 1, !tbaa !18
  %34 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef nonnull %5, i32 noundef %27, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %28, i32 noundef %29, i32 noundef %31, i32 noundef %33, i32 noundef %33, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext %26, i8 noundef zeroext 1) #5
  %35 = getelementptr inbounds i8, ptr %0, i64 352
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %37 = load i32, ptr %32, align 1, !tbaa !18
  %38 = zext i32 %37 to i64
  %39 = load i32, ptr %30, align 1, !tbaa !14
  %40 = zext i32 %39 to i64
  %41 = mul nuw i64 %40, %38
  %42 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %84, label %44

44:                                               ; preds = %25
  %45 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %84, label %47

47:                                               ; preds = %44
  %48 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %49 = icmp eq i32 %48, 2
  br i1 %49, label %84, label %50

50:                                               ; preds = %47
  %51 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %52 = icmp eq i32 %51, 3
  br i1 %52, label %84, label %53

53:                                               ; preds = %50
  %54 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %55 = icmp eq i32 %54, 4
  br i1 %55, label %84, label %56

56:                                               ; preds = %53
  %57 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %58 = icmp eq i32 %57, 5
  br i1 %58, label %84, label %59

59:                                               ; preds = %56
  %60 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %61 = icmp eq i32 %60, 6
  br i1 %61, label %84, label %62

62:                                               ; preds = %59
  %63 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %64 = icmp eq i32 %63, 7
  br i1 %64, label %84, label %65

65:                                               ; preds = %62
  %66 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %67 = icmp eq i32 %66, 8
  br i1 %67, label %84, label %68

68:                                               ; preds = %65
  %69 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %70 = icmp eq i32 %69, 9
  br i1 %70, label %84, label %71

71:                                               ; preds = %68
  %72 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %73 = icmp eq i32 %72, 10
  br i1 %73, label %84, label %74

74:                                               ; preds = %71
  %75 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %76 = icmp eq i32 %75, 11
  br i1 %76, label %84, label %77

77:                                               ; preds = %74
  %78 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %79 = icmp eq i32 %78, 12
  br i1 %79, label %84, label %80

80:                                               ; preds = %77
  %81 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %9) #5
  %82 = icmp eq i32 %81, 13
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 2079, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_ref_apply_c_vnni) #6
  unreachable

84:                                               ; preds = %44, %50, %56, %62, %68, %74, %80, %77, %71, %65, %59, %53, %47, %25
  %85 = phi i64 [ 8, %25 ], [ 4, %44 ], [ 2, %47 ], [ 2, %50 ], [ 1, %53 ], [ 1, %56 ], [ 8, %59 ], [ 8, %62 ], [ 4, %65 ], [ 4, %68 ], [ 2, %71 ], [ 2, %74 ], [ 1, %77 ], [ 1, %80 ]
  %86 = mul i64 %41, %85
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %36, ptr align 1 %1, i64 %86, i1 false)
  %87 = load ptr, ptr %35, align 8, !tbaa !19
  %88 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr %87, ptr %88, align 8, !tbaa !20
  %89 = getelementptr inbounds i8, ptr %4, i64 80
  store ptr %1, ptr %89, align 8, !tbaa !24
  call void @libxsmm_reference_unary_elementwise(ptr noundef nonnull %4, ptr noundef %34) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #5
  br label %90

90:                                               ; preds = %84, %3
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "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 = { "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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 336}
!6 = !{!"libxsmm_gemm_def", !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, !10, i64 48, !10, i64 56, !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, !11, i64 124, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !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, !13, i64 264, !13, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !7, i64 320, !7, i64 324, !7, i64 328, !7, i64 332, !7, i64 336, !7, i64 340, !12, i64 344, !12, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long long", !8, i64 0}
!14 = !{!15, !7, i64 4}
!15 = !{!"libxsmm_gemm_descriptor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 28, !8, i64 29, !8, i64 32, !13, i64 33, !13, i64 41, !8, i64 49, !7, i64 50, !7, i64 54, !7, i64 58, !16, i64 62, !16, i64 64, !8, i64 66, !8, i64 67, !8, i64 68, !8, i64 69, !16, i64 70, !16, i64 72, !16, i64 74, !16, i64 76, !16, i64 78, !16, i64 80, !7, i64 82, !7, i64 86, !7, i64 90, !8, i64 94}
!16 = !{!"short", !8, i64 0}
!17 = !{!15, !7, i64 0}
!18 = !{!15, !7, i64 20}
!19 = !{!6, !12, i64 352}
!20 = !{!21, !12, i64 32}
!21 = !{!"libxsmm_meltw_unary_param", !22, i64 0, !23, i64 32, !23, i64 80}
!22 = !{!"libxsmm_matrix_op_arg", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!23 = !{!"libxsmm_matrix_arg", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!24 = !{!21, !12, i64 80}


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