; LLVM IR from libxsmm/libxsmm :: src (generator_matequation_avx_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_meqn_elem = type { ptr, ptr, ptr, ptr, i32, %union.libxsmm_meqn_info, i32, i32, %struct.libxsmm_meqn_tmp_info, i32, i32, i32, %union.libxsmm_meqn_fusion_info }
%union.libxsmm_meqn_info = type { %struct.libxsmm_meqn_arg }
%struct.libxsmm_meqn_arg = type { i32, i32, i32, i32, i32, i32, i32, %struct.libxsmm_matrix_arg_attributes }
%struct.libxsmm_matrix_arg_attributes = type { i32, i32, i32, i32 }
%struct.libxsmm_meqn_tmp_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%union.libxsmm_meqn_fusion_info = type { %struct.libxsmm_meqn_xgemm_fusion_info }
%struct.libxsmm_meqn_xgemm_fusion_info = type { i32, i32, i32, i32, i32 }
%struct.libxsmm_meqn_unary_op = type { i32, i32, i32, i32 }
%struct.libxsmm_meqn_ternary_op = type { i32, i32, i32, i32, i32, i32 }
%struct.libxsmm_meqn_binary_op = type { i32, i32, i32, i32, i32, i32 }
%struct.libxsmm_meqn_fusion_knobs = type { i32 }

; 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

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @libxsmm_generator_matequation_is_eqn_node_breaking_point(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !9
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %6, i32 0, i32 4
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = icmp eq i32 %8, 1
  br i1 %9, label %10, label %93

10:                                               ; preds = %2
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %11, i32 0, i32 5
  %13 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp eq i32 %14, 7
  br i1 %15, label %91, label %16

16:                                               ; preds = %10
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %17, i32 0, i32 5
  %19 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp eq i32 %20, 8
  br i1 %21, label %91, label %22

22:                                               ; preds = %16
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %23, i32 0, i32 5
  %25 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = icmp eq i32 %26, 9
  br i1 %27, label %91, label %28

28:                                               ; preds = %22
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %29, i32 0, i32 5
  %31 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = icmp eq i32 %32, 10
  br i1 %33, label %91, label %34

34:                                               ; preds = %28
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %35, i32 0, i32 5
  %37 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = icmp eq i32 %38, 11
  br i1 %39, label %91, label %40

40:                                               ; preds = %34
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %41, i32 0, i32 5
  %43 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = icmp eq i32 %44, 5
  br i1 %45, label %91, label %46

46:                                               ; preds = %40
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %47, i32 0, i32 5
  %49 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 4, !tbaa !11
  %51 = icmp eq i32 %50, 12
  br i1 %51, label %91, label %52

52:                                               ; preds = %46
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %53, i32 0, i32 5
  %55 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 4, !tbaa !11
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %91, label %58

58:                                               ; preds = %52
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %59, i32 0, i32 5
  %61 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = icmp eq i32 %62, 51
  br i1 %63, label %91, label %64

64:                                               ; preds = %58
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %65, i32 0, i32 5
  %67 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = icmp eq i32 %68, 52
  br i1 %69, label %91, label %70

70:                                               ; preds = %64
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %71, i32 0, i32 5
  %73 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !11
  %75 = call i32 @libxsmm_meqn_is_unary_opcode_transform_kernel(i32 noundef %74)
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %91, label %77

77:                                               ; preds = %70
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %78, i32 0, i32 5
  %80 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !11
  %82 = call i32 @libxsmm_meqn_is_unary_opcode_reduce_kernel(i32 noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %91, label %84

84:                                               ; preds = %77
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %85, i32 0, i32 5
  %87 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = call i32 @libxsmm_meqn_is_unary_opcode_reduce_cols_idx_kernel(i32 noundef %88)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %84, %77, %70, %64, %58, %52, %46, %40, %34, %28, %22, %16, %10
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %91, %84
  br label %93

93:                                               ; preds = %92, %2
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %94, i32 0, i32 4
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = icmp eq i32 %96, 4
  br i1 %97, label %98, label %106

98:                                               ; preds = %93
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %99, i32 0, i32 5
  %101 = getelementptr inbounds %struct.libxsmm_meqn_ternary_op, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = icmp eq i32 %102, 3
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %104, %98
  br label %106

106:                                              ; preds = %105, %93
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %107, i32 0, i32 4
  %109 = load i32, ptr %108, align 8, !tbaa !11
  %110 = icmp eq i32 %109, 2
  br i1 %110, label %111, label %149

111:                                              ; preds = %106
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %112, i32 0, i32 5
  %114 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = icmp eq i32 %115, 27
  br i1 %116, label %147, label %117

117:                                              ; preds = %111
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %118, i32 0, i32 5
  %120 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 4, !tbaa !11
  %122 = icmp eq i32 %121, 28
  br i1 %122, label %147, label %123

123:                                              ; preds = %117
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %124, i32 0, i32 5
  %126 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %125, i32 0, i32 0
  %127 = load i32, ptr %126, align 4, !tbaa !11
  %128 = icmp eq i32 %127, 29
  br i1 %128, label %147, label %129

129:                                              ; preds = %123
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %130, i32 0, i32 5
  %132 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 4, !tbaa !11
  %134 = icmp eq i32 %133, 30
  br i1 %134, label %147, label %135

135:                                              ; preds = %129
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %136, i32 0, i32 5
  %138 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !11
  %140 = icmp eq i32 %139, 31
  br i1 %140, label %147, label %141

141:                                              ; preds = %135
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %142, i32 0, i32 5
  %144 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = icmp eq i32 %145, 32
  br i1 %146, label %147, label %148

147:                                              ; preds = %141, %135, %129, %123, %117, %111
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %147, %141
  br label %149

149:                                              ; preds = %148, %106
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef %150)
  %152 = icmp sgt i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %149
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %153, %149
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %155, i32 0, i32 4
  %157 = load i32, ptr %156, align 8, !tbaa !11
  %158 = icmp eq i32 %157, 2
  br i1 %158, label %159, label %217

159:                                              ; preds = %154
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %160, i32 0, i32 5
  %162 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %161, i32 0, i32 0
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %217

165:                                              ; preds = %159
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.libxsmm_meqn_fusion_knobs, ptr %166, i32 0, i32 0
  %168 = load i32, ptr %167, align 4, !tbaa !12
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %170, label %217

170:                                              ; preds = %165
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !11
  %174 = call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef %173)
  %175 = icmp sgt i32 %174, 0
  br i1 %175, label %176, label %192

176:                                              ; preds = %170
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !11
  %180 = call i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef %179)
  %181 = icmp sgt i32 %180, 0
  br i1 %181, label %182, label %191

182:                                              ; preds = %176
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %183, i32 0, i32 5
  %185 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !11
  %187 = and i32 %186, 8
  %188 = icmp ugt i32 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %182
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %189, %182
  br label %191

191:                                              ; preds = %190, %176
  br label %216

192:                                              ; preds = %170
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %193, i32 0, i32 1
  %195 = load ptr, ptr %194, align 8, !tbaa !11
  %196 = call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef %195)
  %197 = icmp sgt i32 %196, 0
  br i1 %197, label %198, label %214

198:                                              ; preds = %192
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %199, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !11
  %202 = call i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef %201)
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %204, label %213

204:                                              ; preds = %198
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %205, i32 0, i32 5
  %207 = getelementptr inbounds %struct.libxsmm_meqn_binary_op, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !11
  %209 = and i32 %208, 4
  %210 = icmp ugt i32 %209, 0
  br i1 %210, label %211, label %212

211:                                              ; preds = %204
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %211, %204
  br label %213

213:                                              ; preds = %212, %198
  br label %215

214:                                              ; preds = %192
  br label %215

215:                                              ; preds = %214, %213
  br label %216

216:                                              ; preds = %215, %191
  br label %217

217:                                              ; preds = %216, %165, %159, %154
  %218 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret i32 %218
}

declare i32 @libxsmm_meqn_is_unary_opcode_transform_kernel(i32 noundef) #2

declare i32 @libxsmm_meqn_is_unary_opcode_reduce_kernel(i32 noundef) #2

declare i32 @libxsmm_meqn_is_unary_opcode_reduce_cols_idx_kernel(i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"libxsmm_meqn_fusion_knobs", !10, i64 0}


; 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 i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @libxsmm_generator_matequation_is_eqn_node_breaking_point(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 1
  br i1 %5, label %6, label %18

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 36
  %8 = load i32, ptr %7, align 4, !tbaa !5
  switch i32 %8, label %9 [
    i32 7, label %17
    i32 8, label %17
    i32 9, label %17
    i32 10, label %17
    i32 11, label %17
    i32 5, label %17
    i32 12, label %17
    i32 1, label %17
    i32 51, label %17
    i32 52, label %17
  ]

9:                                                ; preds = %6
  %10 = tail call i32 @libxsmm_meqn_is_unary_opcode_transform_kernel(i32 noundef %8) #2
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %17

11:                                               ; preds = %9
  %12 = load i32, ptr %7, align 4, !tbaa !5
  %13 = tail call i32 @libxsmm_meqn_is_unary_opcode_reduce_kernel(i32 noundef %12) #2
  %.not35 = icmp eq i32 %13, 0
  br i1 %.not35, label %14, label %17

14:                                               ; preds = %11
  %15 = load i32, ptr %7, align 4, !tbaa !5
  %16 = tail call i32 @libxsmm_meqn_is_unary_opcode_reduce_cols_idx_kernel(i32 noundef %15) #2
  %.not36 = icmp eq i32 %16, 0
  br i1 %.not36, label %thread-pre-split, label %17

17:                                               ; preds = %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %14, %11, %9
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %17, %14
  %.0.ph = phi i32 [ 0, %14 ], [ 1, %17 ]
  %.pr = load i32, ptr %3, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %thread-pre-split, %2
  %19 = phi i32 [ %.pr, %thread-pre-split ], [ %4, %2 ]
  %.0 = phi i32 [ %.0.ph, %thread-pre-split ], [ 0, %2 ]
  switch i32 %19, label %26 [
    i32 4, label %.thread
    i32 2, label %23
  ]

.thread:                                          ; preds = %18
  %20 = getelementptr inbounds i8, ptr %0, i64 36
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 3
  %spec.select = select i1 %22, i32 1, i32 %.0
  br label %26

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %0, i64 36
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %.off = add i32 %25, -27
  %switch = icmp ult i32 %.off, 6
  %spec.select42 = select i1 %switch, i32 1, i32 %.0
  br label %26

26:                                               ; preds = %18, %.thread, %23
  %.2 = phi i32 [ %spec.select42, %23 ], [ %spec.select, %.thread ], [ %.0, %18 ]
  %27 = tail call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef nonnull %0)
  %.inv = icmp slt i32 %27, 1
  %spec.select39 = select i1 %.inv, i32 %.2, i32 1
  %28 = load i32, ptr %3, align 8, !tbaa !5
  %29 = icmp eq i32 %28, 2
  br i1 %29, label %30, label %57

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %0, i64 36
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %57

34:                                               ; preds = %30
  %35 = load i32, ptr %1, align 4, !tbaa !8
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %57

37:                                               ; preds = %34
  %38 = load ptr, ptr %0, align 8, !tbaa !5
  %39 = tail call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef %38)
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %45

41:                                               ; preds = %37
  %42 = load ptr, ptr %0, align 8, !tbaa !5
  %43 = tail call i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef %42)
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.sink.split, label %57

45:                                               ; preds = %37
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = tail call i32 @libxsmm_generator_matequation_is_xgemm_node(ptr noundef %47)
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %57

50:                                               ; preds = %45
  %51 = load ptr, ptr %46, align 8, !tbaa !5
  %52 = tail call i32 @libxsmm_generator_matequation_is_xgemm_node_supporting_fusion(ptr noundef %51)
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.sink.split, label %57

.sink.split:                                      ; preds = %50, %41
  %.sink45 = phi i32 [ 8, %41 ], [ 4, %50 ]
  %54 = getelementptr inbounds i8, ptr %0, i64 40
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = and i32 %55, %.sink45
  %.not37 = icmp eq i32 %56, 0
  %spec.select41 = select i1 %.not37, i32 %spec.select39, i32 1
  br label %57

57:                                               ; preds = %.sink.split, %41, %45, %50, %34, %30, %26
  %.4 = phi i32 [ %spec.select39, %41 ], [ %spec.select39, %50 ], [ %spec.select39, %45 ], [ %spec.select39, %34 ], [ %spec.select39, %30 ], [ %spec.select39, %26 ], [ %spec.select41, %.sink.split ]
  ret i32 %.4
}

declare i32 @libxsmm_meqn_is_unary_opcode_transform_kernel(i32 noundef) local_unnamed_addr #1

declare i32 @libxsmm_meqn_is_unary_opcode_reduce_kernel(i32 noundef) local_unnamed_addr #1

declare i32 @libxsmm_meqn_is_unary_opcode_reduce_cols_idx_kernel(i32 noundef) local_unnamed_addr #1

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"libxsmm_meqn_fusion_knobs", !10, i64 0}
!10 = !{!"int", !6, i64 0}


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