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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.libxsmm_meltw_descriptor = type <{ i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i8 }>

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_compute_unary_binary_aarch64_2d_reg_block(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9) #0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  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 i32 %8, ptr %19, align 4, !tbaa !9
  store i32 %9, ptr %20, align 4, !tbaa !9
  %21 = load ptr, ptr %14, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %21, i32 0, i32 11
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = zext i8 %23 to i32
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %87

26:                                               ; preds = %10
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %27, i32 0, i32 10
  %29 = load i16, ptr %28, align 1, !tbaa !14
  %30 = zext i16 %29 to i32
  switch i32 %30, label %86 [
    i32 7, label %31
    i32 17, label %31
    i32 9, label %31
    i32 8, label %31
    i32 10, label %31
    i32 11, label %31
    i32 12, label %31
    i32 4, label %31
    i32 13, label %31
    i32 14, label %31
    i32 15, label %31
    i32 16, label %31
    i32 3, label %31
    i32 5, label %42
    i32 34, label %42
    i32 36, label %42
    i32 6, label %53
    i32 35, label %53
    i32 37, label %53
    i32 25, label %64
    i32 26, label %75
  ]

31:                                               ; preds = %26, %26, %26, %26, %26, %26, %26, %26, %26, %26, %26, %26, %26
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = load i32, ptr %16, align 4, !tbaa !9
  %38 = load i32, ptr %17, align 4, !tbaa !9
  %39 = load i32, ptr %18, align 4, !tbaa !9
  %40 = load i32, ptr %19, align 4, !tbaa !9
  %41 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_unary_aarch64_2d_reg_block_op(ptr noundef %32, ptr noundef %33, ptr noundef %34, ptr noundef %35, i32 noundef %36, i32 noundef %37, i32 noundef %38, i32 noundef %39, i32 noundef %40, i32 noundef %41)
  br label %86

42:                                               ; preds = %26, %26, %26
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = load i32, ptr %16, align 4, !tbaa !9
  %49 = load i32, ptr %17, align 4, !tbaa !9
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = load i32, ptr %19, align 4, !tbaa !9
  %52 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_unary_aarch64_2d_reg_block_relu(ptr noundef %43, ptr noundef %44, ptr noundef %45, ptr noundef %46, i32 noundef %47, i32 noundef %48, i32 noundef %49, i32 noundef %50, i32 noundef %51, i32 noundef %52)
  br label %86

53:                                               ; preds = %26, %26, %26
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = load i32, ptr %17, align 4, !tbaa !9
  %61 = load i32, ptr %18, align 4, !tbaa !9
  %62 = load i32, ptr %19, align 4, !tbaa !9
  %63 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_unary_aarch64_2d_reg_block_relu_inv(ptr noundef %54, ptr noundef %55, ptr noundef %56, ptr noundef %57, i32 noundef %58, i32 noundef %59, i32 noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63)
  br label %86

64:                                               ; preds = %26
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = load i32, ptr %16, align 4, !tbaa !9
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = load i32, ptr %18, align 4, !tbaa !9
  %73 = load i32, ptr %19, align 4, !tbaa !9
  %74 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_unary_aarch64_2d_reg_block_dropout(ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74)
  br label %86

75:                                               ; preds = %26
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = load i32, ptr %17, align 4, !tbaa !9
  %83 = load i32, ptr %18, align 4, !tbaa !9
  %84 = load i32, ptr %19, align 4, !tbaa !9
  %85 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_unary_aarch64_2d_reg_block_dropout_inv(ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef %79, i32 noundef %80, i32 noundef %81, i32 noundef %82, i32 noundef %83, i32 noundef %84, i32 noundef %85)
  br label %86

86:                                               ; preds = %75, %64, %53, %42, %31, %26
  br label %123

87:                                               ; preds = %10
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %88, i32 0, i32 11
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = zext i8 %90 to i32
  %92 = icmp eq i32 %91, 2
  br i1 %92, label %93, label %104

93:                                               ; preds = %87
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = load i32, ptr %15, align 4, !tbaa !9
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = load i32, ptr %18, align 4, !tbaa !9
  %102 = load i32, ptr %19, align 4, !tbaa !9
  %103 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_binary_aarch64_2d_reg_block(ptr noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97, i32 noundef %98, i32 noundef %99, i32 noundef %100, i32 noundef %101, i32 noundef %102, i32 noundef %103)
  br label %122

104:                                              ; preds = %87
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %105, i32 0, i32 11
  %107 = load i8, ptr %106, align 1, !tbaa !11
  %108 = zext i8 %107 to i32
  %109 = icmp eq i32 %108, 3
  br i1 %109, label %110, label %121

110:                                              ; preds = %104
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = load i32, ptr %17, align 4, !tbaa !9
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = load i32, ptr %19, align 4, !tbaa !9
  %120 = load i32, ptr %20, align 4, !tbaa !9
  call void @libxsmm_compute_ternary_aarch64_2d_reg_block(ptr noundef %111, ptr noundef %112, ptr noundef %113, ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117, i32 noundef %118, i32 noundef %119, i32 noundef %120)
  br label %121

121:                                              ; preds = %110, %104
  br label %122

122:                                              ; preds = %121, %93
  br label %123

123:                                              ; preds = %122, %86
  ret void
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !7, i64 31}
!12 = !{!"libxsmm_meltw_descriptor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !13, i64 27, !13, i64 29, !7, i64 31}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 29}


; 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"

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_compute_unary_binary_aarch64_2d_reg_block(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9) local_unnamed_addr #0 {
  %11 = getelementptr inbounds i8, ptr %3, i64 31
  %12 = load i8, ptr %11, align 1, !tbaa !5
  switch i8 %12, label %23 [
    i8 1, label %13
    i8 2, label %21
    i8 3, label %22
  ]

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %3, i64 29
  %15 = load i16, ptr %14, align 1, !tbaa !11
  switch i16 %15, label %23 [
    i16 7, label %16
    i16 17, label %16
    i16 9, label %16
    i16 8, label %16
    i16 10, label %16
    i16 11, label %16
    i16 12, label %16
    i16 4, label %16
    i16 13, label %16
    i16 14, label %16
    i16 15, label %16
    i16 16, label %16
    i16 3, label %16
    i16 5, label %17
    i16 34, label %17
    i16 36, label %17
    i16 6, label %18
    i16 35, label %18
    i16 37, label %18
    i16 25, label %19
    i16 26, label %20
  ]

16:                                               ; preds = %13, %13, %13, %13, %13, %13, %13, %13, %13, %13, %13, %13, %13
  tail call void @libxsmm_compute_unary_aarch64_2d_reg_block_op(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

17:                                               ; preds = %13, %13, %13
  tail call void @libxsmm_compute_unary_aarch64_2d_reg_block_relu(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

18:                                               ; preds = %13, %13, %13
  tail call void @libxsmm_compute_unary_aarch64_2d_reg_block_relu_inv(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

19:                                               ; preds = %13
  tail call void @libxsmm_compute_unary_aarch64_2d_reg_block_dropout(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

20:                                               ; preds = %13
  tail call void @libxsmm_compute_unary_aarch64_2d_reg_block_dropout_inv(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

21:                                               ; preds = %10
  tail call void @libxsmm_compute_binary_aarch64_2d_reg_block(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

22:                                               ; preds = %10
  tail call void @libxsmm_compute_ternary_aarch64_2d_reg_block(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9)
  br label %23

23:                                               ; preds = %10, %21, %22, %13, %16, %17, %18, %19, %20
  ret void
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !8, i64 31}
!6 = !{!"libxsmm_meltw_descriptor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !10, i64 27, !10, i64 29, !8, i64 31}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!6, !10, i64 29}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass