; 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 }>
%struct.libxsmm_gemm_ext_param = type { %struct.libxsmm_matrix_op_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg, %struct.libxsmm_matrix_arg }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_ref_apply_postop(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.libxsmm_meltw_unary_param, align 8
  %9 = alloca %struct.libxsmm_descriptor_blob, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %struct.libxsmm_meltw_unary_param, align 8
  %12 = alloca %struct.libxsmm_descriptor_blob, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %struct.libxsmm_meltw_unary_param, align 8
  %15 = alloca %struct.libxsmm_descriptor_blob, align 1
  %16 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %18, i32 0, i32 61
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = icmp ugt i32 %20, 0
  br i1 %21, label %22, label %71

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %23, i32 0, i32 8
  %25 = getelementptr inbounds [3 x i8], ptr %24, i64 0, i64 0
  %26 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %25)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 1, !tbaa !15
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 1, !tbaa !18
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %33, i32 0, i32 5
  %35 = load i32, ptr %34, align 1, !tbaa !19
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %36, i32 0, i32 5
  %38 = load i32, ptr %37, align 1, !tbaa !19
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %39, i32 0, i32 62
  %41 = load i32, ptr %40, align 8, !tbaa !20
  %42 = icmp ugt i32 %41, 0
  %43 = zext i1 %42 to i64
  %44 = select i1 %42, i32 1, i32 0
  %45 = trunc i32 %44 to i16
  %46 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef %9, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %26, i32 noundef %29, i32 noundef %32, i32 noundef %35, i32 noundef %38, i32 noundef 0, i32 noundef 0, i16 noundef zeroext %45, i16 noundef zeroext 5, i8 noundef zeroext 1)
  store ptr %46, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %47, i32 0, i32 66
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  %50 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %8, i32 0, i32 1
  %51 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %50, i32 0, i32 0
  store ptr %49, ptr %51, align 8, !tbaa !22
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.libxsmm_gemm_ext_param, ptr %52, i32 0, i32 3
  %54 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !26
  %56 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %8, i32 0, i32 2
  %57 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %56, i32 0, i32 0
  store ptr %55, ptr %57, align 8, !tbaa !28
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %58, i32 0, i32 62
  %60 = load i32, ptr %59, align 8, !tbaa !20
  %61 = icmp ugt i32 %60, 0
  br i1 %61, label %62, label %69

62:                                               ; preds = %22
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.libxsmm_gemm_ext_param, ptr %63, i32 0, i32 3
  %65 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !29
  %67 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %8, i32 0, i32 2
  %68 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %67, i32 0, i32 1
  store ptr %66, ptr %68, align 8, !tbaa !30
  br label %69

69:                                               ; preds = %62, %22
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libxsmm_reference_unary_elementwise(ptr noundef %8, ptr noundef %70)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #3
  br label %143

71:                                               ; preds = %3
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %72, i32 0, i32 63
  %74 = load i32, ptr %73, align 4, !tbaa !31
  %75 = icmp ugt i32 %74, 0
  br i1 %75, label %76, label %106

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %77, i32 0, i32 8
  %79 = getelementptr inbounds [3 x i8], ptr %78, i64 0, i64 0
  %80 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %79)
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 1, !tbaa !15
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 1, !tbaa !18
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %87, i32 0, i32 5
  %89 = load i32, ptr %88, align 1, !tbaa !19
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %90, i32 0, i32 5
  %92 = load i32, ptr %91, align 1, !tbaa !19
  %93 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef %12, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %80, i32 noundef %83, i32 noundef %86, i32 noundef %89, i32 noundef %92, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext 9, i8 noundef zeroext 1)
  store ptr %93, ptr %13, align 8, !tbaa !5
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %94, i32 0, i32 66
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %11, i32 0, i32 1
  %98 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %97, i32 0, i32 0
  store ptr %96, ptr %98, align 8, !tbaa !22
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.libxsmm_gemm_ext_param, ptr %99, i32 0, i32 3
  %101 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %11, i32 0, i32 2
  %104 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %103, i32 0, i32 0
  store ptr %102, ptr %104, align 8, !tbaa !28
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  call void @libxsmm_reference_unary_elementwise(ptr noundef %11, ptr noundef %105)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #3
  br label %142

106:                                              ; preds = %71
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %107, i32 0, i32 65
  %109 = load i32, ptr %108, align 4, !tbaa !32
  %110 = icmp ugt i32 %109, 0
  br i1 %110, label %111, label %141

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 128, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %112, i32 0, i32 8
  %114 = getelementptr inbounds [3 x i8], ptr %113, i64 0, i64 0
  %115 = call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef %114)
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 1, !tbaa !15
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 1, !tbaa !18
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %122, i32 0, i32 5
  %124 = load i32, ptr %123, align 1, !tbaa !19
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.libxsmm_gemm_descriptor, ptr %125, i32 0, i32 5
  %127 = load i32, ptr %126, align 1, !tbaa !19
  %128 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef %15, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %115, i32 noundef %118, i32 noundef %121, i32 noundef %124, i32 noundef %127, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext 1, i8 noundef zeroext 1)
  store ptr %128, ptr %16, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %129, i32 0, i32 66
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  %132 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %14, i32 0, i32 1
  %133 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %132, i32 0, i32 0
  store ptr %131, ptr %133, align 8, !tbaa !22
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.libxsmm_gemm_ext_param, ptr %134, i32 0, i32 3
  %136 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !26
  %138 = getelementptr inbounds %struct.libxsmm_meltw_unary_param, ptr %14, i32 0, i32 2
  %139 = getelementptr inbounds %struct.libxsmm_matrix_arg, ptr %138, i32 0, i32 0
  store ptr %137, ptr %139, align 8, !tbaa !28
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  call void @libxsmm_reference_unary_elementwise(ptr noundef %14, ptr noundef %140)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr %14) #3
  br label %141

141:                                              ; preds = %111, %106
  br label %142

142:                                              ; preds = %141, %76
  br label %143

143:                                              ; preds = %142, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) #1

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, !11, i64 324}
!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 0}
!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 = !{!16, !11, i64 4}
!19 = !{!16, !11, i64 20}
!20 = !{!10, !11, i64 328}
!21 = !{!10, !6, i64 344}
!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 = !{!27, !6, i64 128}
!27 = !{!"libxsmm_gemm_ext_param", !24, i64 0, !25, i64 32, !25, i64 80, !25, i64 128, !25, i64 176, !25, i64 224, !25, i64 272, !25, i64 320}
!28 = !{!23, !6, i64 80}
!29 = !{!27, !6, i64 136}
!30 = !{!23, !6, i64 88}
!31 = !{!10, !11, i64 332}
!32 = !{!10, !11, i64 340}


; 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] }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #3
  %13 = getelementptr inbounds i8, ptr %2, i64 29
  %14 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %13) #3
  %15 = load i32, ptr %2, align 1, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %2, i64 4
  %17 = load i32, ptr %16, align 1, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %2, i64 20
  %19 = load i32, ptr %18, align 1, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %0, i64 328
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %.not33 = icmp ne i32 %21, 0
  %22 = zext i1 %.not33 to i16
  %23 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef nonnull %5, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %14, i32 noundef %15, i32 noundef %17, i32 noundef %19, i32 noundef %19, i32 noundef 0, i32 noundef 0, i16 noundef zeroext %22, i16 noundef zeroext 5, i8 noundef zeroext 1) #3
  %24 = getelementptr inbounds i8, ptr %0, i64 344
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr %25, ptr %26, align 8, !tbaa !21
  %27 = getelementptr inbounds i8, ptr %1, i64 128
  %28 = load ptr, ptr %27, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %4, i64 80
  store ptr %28, ptr %29, align 8, !tbaa !27
  %30 = load i32, ptr %20, align 8, !tbaa !19
  %.not34 = icmp eq i32 %30, 0
  br i1 %.not34, label %35, label %31

31:                                               ; preds = %12
  %32 = getelementptr inbounds i8, ptr %1, i64 136
  %33 = load ptr, ptr %32, align 8, !tbaa !28
  %34 = getelementptr inbounds i8, ptr %4, i64 88
  store ptr %33, ptr %34, align 8, !tbaa !29
  br label %35

35:                                               ; preds = %31, %12
  call void @libxsmm_reference_unary_elementwise(ptr noundef nonnull %4, ptr noundef %23) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #3
  br label %72

36:                                               ; preds = %3
  %37 = getelementptr inbounds i8, ptr %0, i64 332
  %38 = load i32, ptr %37, align 4, !tbaa !30
  %.not31 = icmp eq i32 %38, 0
  br i1 %.not31, label %54, label %39

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %7) #3
  %40 = getelementptr inbounds i8, ptr %2, i64 29
  %41 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %40) #3
  %42 = load i32, ptr %2, align 1, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %2, i64 4
  %44 = load i32, ptr %43, align 1, !tbaa !17
  %45 = getelementptr inbounds i8, ptr %2, i64 20
  %46 = load i32, ptr %45, align 1, !tbaa !18
  %47 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef nonnull %7, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %41, i32 noundef %42, i32 noundef %44, i32 noundef %46, i32 noundef %46, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext 9, i8 noundef zeroext 1) #3
  %48 = getelementptr inbounds i8, ptr %0, i64 344
  %49 = load ptr, ptr %48, align 8, !tbaa !20
  %50 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %49, ptr %50, align 8, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %1, i64 128
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr %52, ptr %53, align 8, !tbaa !27
  call void @libxsmm_reference_unary_elementwise(ptr noundef nonnull %6, ptr noundef %47) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #3
  br label %72

54:                                               ; preds = %36
  %55 = getelementptr inbounds i8, ptr %0, i64 340
  %56 = load i32, ptr %55, align 4, !tbaa !31
  %.not32 = icmp eq i32 %56, 0
  br i1 %.not32, label %72, label %57

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %9) #3
  %58 = getelementptr inbounds i8, ptr %2, i64 29
  %59 = tail call i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef nonnull %58) #3
  %60 = load i32, ptr %2, align 1, !tbaa !14
  %61 = getelementptr inbounds i8, ptr %2, i64 4
  %62 = load i32, ptr %61, align 1, !tbaa !17
  %63 = getelementptr inbounds i8, ptr %2, i64 20
  %64 = load i32, ptr %63, align 1, !tbaa !18
  %65 = call ptr @libxsmm_meltw_descriptor_init2(ptr noundef nonnull %9, i32 noundef 1, i32 noundef 15, i32 noundef 15, i32 noundef 1, i32 noundef %59, i32 noundef %60, i32 noundef %62, i32 noundef %64, i32 noundef %64, i32 noundef 0, i32 noundef 0, i16 noundef zeroext 0, i16 noundef zeroext 1, i8 noundef zeroext 1) #3
  %66 = getelementptr inbounds i8, ptr %0, i64 344
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = getelementptr inbounds i8, ptr %8, i64 32
  store ptr %67, ptr %68, align 8, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %1, i64 128
  %70 = load ptr, ptr %69, align 8, !tbaa !25
  %71 = getelementptr inbounds i8, ptr %8, i64 80
  store ptr %70, ptr %71, align 8, !tbaa !27
  call void @libxsmm_reference_unary_elementwise(ptr noundef nonnull %8, ptr noundef %65) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #3
  br label %72

72:                                               ; preds = %39, %57, %54, %35
  ret void
}

declare i32 @LIBXSMM_GEMM_GETENUM_C_PREC(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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, !7, i64 324}
!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 0}
!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 4}
!18 = !{!15, !7, i64 20}
!19 = !{!6, !7, i64 328}
!20 = !{!6, !12, i64 344}
!21 = !{!22, !12, i64 32}
!22 = !{!"libxsmm_meltw_unary_param", !23, i64 0, !24, i64 32, !24, i64 80}
!23 = !{!"libxsmm_matrix_op_arg", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!24 = !{!"libxsmm_matrix_arg", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!25 = !{!26, !12, i64 128}
!26 = !{!"libxsmm_gemm_ext_param", !23, i64 0, !24, i64 32, !24, i64 80, !24, i64 128, !24, i64 176, !24, i64 224, !24, i64 272, !24, i64 320}
!27 = !{!22, !12, i64 80}
!28 = !{!26, !12, i64 136}
!29 = !{!22, !12, i64 88}
!30 = !{!6, !7, i64 332}
!31 = !{!6, !7, i64 340}


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