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

; 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_mateltwise_gp_reg_mapping_struct = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.libxsmm_meltw_descriptor = type <{ i32, i32, i32, i32, i32, i32, i8, i8, i8, i16, i16, i8 }>

@__func__.libxsmm_generator_transform_rv64_microkernel = external hidden unnamed_addr constant [45 x i8], align 1
@.str = external hidden unnamed_addr constant [91 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4

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

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

declare void @libxsmm_rv64_instruction_alu_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_rv64_microkernel(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 80, ptr %12, align 4, !tbaa !9
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %14, i32 0, i32 1
  store i32 18, ptr %15, align 4, !tbaa !11
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %16, i32 0, i32 6
  store i32 19, ptr %17, align 4, !tbaa !13
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %18, i32 0, i32 24
  store i32 20, ptr %19, align 4, !tbaa !14
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %20, i32 0, i32 25
  store i32 21, ptr %21, align 4, !tbaa !15
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %22, i32 0, i32 35
  store i32 22, ptr %23, align 4, !tbaa !16
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %24, i32 0, i32 36
  store i32 23, ptr %25, align 4, !tbaa !17
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 4, !tbaa !18
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = load i32, ptr %11, align 4, !tbaa !9
  call void @libxsmm_rv64_instruction_alu_move(ptr noundef %26, i32 noundef 12291, i32 noundef %29, i32 noundef %32, i32 noundef %33)
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !18
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %38, i32 0, i32 6
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = load i32, ptr %12, align 4, !tbaa !9
  call void @libxsmm_rv64_instruction_alu_move(ptr noundef %34, i32 noundef 12291, i32 noundef %37, i32 noundef %40, i32 noundef %41)
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %42, i32 0, i32 10
  %44 = load i16, ptr %43, align 1, !tbaa !19
  %45 = zext i16 %44 to i32
  %46 = icmp eq i32 %45, 29
  br i1 %46, label %53, label %47

47:                                               ; preds = %5
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %48, i32 0, i32 10
  %50 = load i16, ptr %49, align 1, !tbaa !19
  %51 = zext i16 %50 to i32
  %52 = icmp eq i32 %51, 30
  br i1 %52, label %53, label %88

53:                                               ; preds = %47, %5
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 1, !tbaa !22
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 1, !tbaa !23
  %60 = icmp ugt i32 %56, %59
  br i1 %60, label %61, label %70

61:                                               ; preds = %53
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %64 = icmp ult i32 1, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %61
  %66 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %68

67:                                               ; preds = %61
  br label %68

68:                                               ; preds = %67, %65
  %69 = phi i32 [ %66, %65 ], [ 1, %67 ]
  call void @libxsmm_handle_error(ptr noundef %62, i32 noundef 90007, ptr noundef @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef @.str, i32 noundef 98, i32 noundef %69)
  store i32 1, ptr %13, align 4
  br label %211

70:                                               ; preds = %53
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 1, !tbaa !24
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 1, !tbaa !25
  %77 = icmp ugt i32 %73, %76
  br i1 %77, label %78, label %87

78:                                               ; preds = %70
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %81 = icmp ult i32 1, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %78
  %83 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %85

84:                                               ; preds = %78
  br label %85

85:                                               ; preds = %84, %82
  %86 = phi i32 [ %83, %82 ], [ 1, %84 ]
  call void @libxsmm_handle_error(ptr noundef %79, i32 noundef 90008, ptr noundef @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef @.str, i32 noundef 102, i32 noundef %86)
  store i32 1, ptr %13, align 4
  br label %211

87:                                               ; preds = %70
  br label %191

88:                                               ; preds = %47
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %89, i32 0, i32 10
  %91 = load i16, ptr %90, align 1, !tbaa !19
  %92 = zext i16 %91 to i32
  %93 = icmp eq i32 %92, 28
  br i1 %93, label %118, label %94

94:                                               ; preds = %88
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %95, i32 0, i32 10
  %97 = load i16, ptr %96, align 1, !tbaa !19
  %98 = zext i16 %97 to i32
  %99 = icmp eq i32 %98, 32
  br i1 %99, label %118, label %100

100:                                              ; preds = %94
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %101, i32 0, i32 10
  %103 = load i16, ptr %102, align 1, !tbaa !19
  %104 = zext i16 %103 to i32
  %105 = icmp eq i32 %104, 40
  br i1 %105, label %118, label %106

106:                                              ; preds = %100
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %107, i32 0, i32 10
  %109 = load i16, ptr %108, align 1, !tbaa !19
  %110 = zext i16 %109 to i32
  %111 = icmp eq i32 %110, 39
  br i1 %111, label %118, label %112

112:                                              ; preds = %106
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %113, i32 0, i32 10
  %115 = load i16, ptr %114, align 1, !tbaa !19
  %116 = zext i16 %115 to i32
  %117 = icmp eq i32 %116, 41
  br i1 %117, label %118, label %189

118:                                              ; preds = %112, %106, %100, %94, %88
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 1, !tbaa !22
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 1, !tbaa !23
  %125 = icmp ugt i32 %121, %124
  br i1 %125, label %126, label %135

126:                                              ; preds = %118
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %129 = icmp ult i32 1, %128
  br i1 %129, label %130, label %132

130:                                              ; preds = %126
  %131 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %133

132:                                              ; preds = %126
  br label %133

133:                                              ; preds = %132, %130
  %134 = phi i32 [ %131, %130 ], [ 1, %132 ]
  call void @libxsmm_handle_error(ptr noundef %127, i32 noundef 90007, ptr noundef @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef @.str, i32 noundef 111, i32 noundef %134)
  store i32 1, ptr %13, align 4
  br label %211

135:                                              ; preds = %118
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %136, i32 0, i32 10
  %138 = load i16, ptr %137, align 1, !tbaa !19
  %139 = zext i16 %138 to i32
  %140 = icmp eq i32 %139, 39
  br i1 %140, label %147, label %141

141:                                              ; preds = %135
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %142, i32 0, i32 10
  %144 = load i16, ptr %143, align 1, !tbaa !19
  %145 = zext i16 %144 to i32
  %146 = icmp eq i32 %145, 41
  br i1 %146, label %147, label %170

147:                                              ; preds = %141, %135
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 1, !tbaa !22
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %151, i32 0, i32 0
  %153 = load i32, ptr %152, align 1, !tbaa !22
  %154 = urem i32 %153, 2
  %155 = add i32 %150, %154
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 1, !tbaa !25
  %159 = icmp ugt i32 %155, %158
  br i1 %159, label %160, label %169

160:                                              ; preds = %147
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %163 = icmp ult i32 1, %162
  br i1 %163, label %164, label %166

164:                                              ; preds = %160
  %165 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %167

166:                                              ; preds = %160
  br label %167

167:                                              ; preds = %166, %164
  %168 = phi i32 [ %165, %164 ], [ 1, %166 ]
  call void @libxsmm_handle_error(ptr noundef %161, i32 noundef 90008, ptr noundef @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef @.str, i32 noundef 117, i32 noundef %168)
  store i32 1, ptr %13, align 4
  br label %211

169:                                              ; preds = %147
  br label %188

170:                                              ; preds = %141
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 1, !tbaa !22
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_meltw_descriptor, ptr %174, i32 0, i32 3
  %176 = load i32, ptr %175, align 1, !tbaa !25
  %177 = icmp ugt i32 %173, %176
  br i1 %177, label %178, label %187

178:                                              ; preds = %170
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %181 = icmp ult i32 1, %180
  br i1 %181, label %182, label %184

182:                                              ; preds = %178
  %183 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %185

184:                                              ; preds = %178
  br label %185

185:                                              ; preds = %184, %182
  %186 = phi i32 [ %183, %182 ], [ 1, %184 ]
  call void @libxsmm_handle_error(ptr noundef %179, i32 noundef 90008, ptr noundef @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef @.str, i32 noundef 122, i32 noundef %186)
  store i32 1, ptr %13, align 4
  br label %211

187:                                              ; preds = %170
  br label %188

188:                                              ; preds = %187, %169
  br label %190

189:                                              ; preds = %112
  br label %190

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

191:                                              ; preds = %190, %87
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %194, i32 0, i32 1
  %196 = load i32, ptr %195, align 4, !tbaa !11
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %197, i32 0, i32 6
  %199 = load i32, ptr %198, align 4, !tbaa !13
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %200, i32 0, i32 24
  %202 = load i32, ptr %201, align 4, !tbaa !14
  %203 = load ptr, ptr %8, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %203, i32 0, i32 25
  %205 = load i32, ptr %204, align 4, !tbaa !15
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.libxsmm_mateltwise_gp_reg_mapping_struct, ptr %206, i32 0, i32 35
  %208 = load i32, ptr %207, align 4, !tbaa !16
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libxsmm_generator_transform_norm_to_normt_mbit_scalar_rv64_microkernel(ptr noundef %192, ptr noundef %193, i32 noundef %196, i32 noundef %199, i32 noundef %202, i32 noundef %205, i32 noundef %208, ptr noundef %209, ptr noundef %210)
  store i32 0, ptr %13, align 4
  br label %211

211:                                              ; preds = %191, %185, %167, %133, %85, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %212 = load i32, ptr %13, align 4
  switch i32 %212, label %214 [
    i32 0, label %213
    i32 1, label %213
  ]

213:                                              ; preds = %211, %211
  ret void

214:                                              ; preds = %211
  unreachable
}

declare void @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!12, !10, i64 4}
!12 = !{!"libxsmm_mateltwise_gp_reg_mapping_struct", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144}
!13 = !{!12, !10, i64 24}
!14 = !{!12, !10, i64 96}
!15 = !{!12, !10, i64 100}
!16 = !{!12, !10, i64 140}
!17 = !{!12, !10, i64 144}
!18 = !{!12, !10, i64 0}
!19 = !{!20, !21, i64 29}
!20 = !{!"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, !21, i64 27, !21, i64 29, !7, i64 31}
!21 = !{!"short", !7, i64 0}
!22 = !{!20, !10, i64 0}
!23 = !{!20, !10, i64 8}
!24 = !{!20, !10, i64 4}
!25 = !{!20, !10, i64 12}


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

@__func__.libxsmm_generator_transform_rv64_microkernel = external hidden unnamed_addr constant [45 x i8], align 1
@.str = external hidden unnamed_addr constant [91 x i8], align 1
@libxsmm_ninit = external local_unnamed_addr global i32, align 4
@libxsmm_verbosity = external local_unnamed_addr global i32, align 4

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

declare void @libxsmm_rv64_instruction_alu_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_transform_rv64_microkernel(ptr noundef %0, ptr noundef %1, ptr nocapture noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 18, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 19, ptr %7, align 4, !tbaa !10
  %8 = getelementptr inbounds i8, ptr %2, i64 96
  store i32 20, ptr %8, align 4, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %2, i64 100
  store i32 21, ptr %9, align 4, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %2, i64 140
  store i32 22, ptr %10, align 4, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %2, i64 144
  store i32 23, ptr %11, align 4, !tbaa !14
  %12 = load i32, ptr %2, align 4, !tbaa !15
  tail call void @libxsmm_rv64_instruction_alu_move(ptr noundef %0, i32 noundef 12291, i32 noundef %12, i32 noundef 18, i32 noundef 32) #2
  %13 = load i32, ptr %2, align 4, !tbaa !15
  %14 = load i32, ptr %7, align 4, !tbaa !10
  tail call void @libxsmm_rv64_instruction_alu_move(ptr noundef %0, i32 noundef 12291, i32 noundef %13, i32 noundef %14, i32 noundef 80) #2
  %15 = getelementptr inbounds i8, ptr %4, i64 29
  %16 = load i16, ptr %15, align 1, !tbaa !16
  switch i16 %16, label %69 [
    i16 29, label %17
    i16 30, label %17
    i16 28, label %38
    i16 32, label %38
    i16 40, label %38
    i16 39, label %38
    i16 41, label %38
  ]

17:                                               ; preds = %5, %5
  %18 = load i32, ptr %4, align 1, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %4, i64 8
  %20 = load i32, ptr %19, align 1, !tbaa !20
  %21 = icmp ugt i32 %18, %20
  br i1 %21, label %22, label %27

22:                                               ; preds = %17
  %23 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %24 = icmp ugt i32 %23, 1
  %25 = load i32, ptr @libxsmm_verbosity, align 4
  %26 = select i1 %24, i32 %25, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90007, ptr noundef nonnull @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef nonnull @.str, i32 noundef 98, i32 noundef %26) #2
  br label %75

27:                                               ; preds = %17
  %28 = getelementptr inbounds i8, ptr %4, i64 4
  %29 = load i32, ptr %28, align 1, !tbaa !22
  %30 = getelementptr inbounds i8, ptr %4, i64 12
  %31 = load i32, ptr %30, align 1, !tbaa !23
  %32 = icmp ugt i32 %29, %31
  br i1 %32, label %33, label %69

33:                                               ; preds = %27
  %34 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %35 = icmp ugt i32 %34, 1
  %36 = load i32, ptr @libxsmm_verbosity, align 4
  %37 = select i1 %35, i32 %36, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90008, ptr noundef nonnull @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef nonnull @.str, i32 noundef 102, i32 noundef %37) #2
  br label %75

38:                                               ; preds = %5, %5, %5, %5, %5
  %39 = load i32, ptr %4, align 1, !tbaa !19
  %40 = getelementptr inbounds i8, ptr %4, i64 8
  %41 = load i32, ptr %40, align 1, !tbaa !20
  %42 = icmp ugt i32 %39, %41
  br i1 %42, label %43, label %48

43:                                               ; preds = %38
  %44 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %45 = icmp ugt i32 %44, 1
  %46 = load i32, ptr @libxsmm_verbosity, align 4
  %47 = select i1 %45, i32 %46, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90007, ptr noundef nonnull @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef nonnull @.str, i32 noundef 111, i32 noundef %47) #2
  br label %75

48:                                               ; preds = %38
  switch i16 %16, label %60 [
    i16 39, label %49
    i16 41, label %49
  ]

49:                                               ; preds = %48, %48
  %50 = and i32 %39, 1
  %51 = add i32 %50, %39
  %52 = getelementptr inbounds i8, ptr %4, i64 12
  %53 = load i32, ptr %52, align 1, !tbaa !23
  %54 = icmp ugt i32 %51, %53
  br i1 %54, label %55, label %69

55:                                               ; preds = %49
  %56 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %57 = icmp ugt i32 %56, 1
  %58 = load i32, ptr @libxsmm_verbosity, align 4
  %59 = select i1 %57, i32 %58, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90008, ptr noundef nonnull @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef nonnull @.str, i32 noundef 117, i32 noundef %59) #2
  br label %75

60:                                               ; preds = %48
  %61 = getelementptr inbounds i8, ptr %4, i64 12
  %62 = load i32, ptr %61, align 1, !tbaa !23
  %63 = icmp ugt i32 %39, %62
  br i1 %63, label %64, label %69

64:                                               ; preds = %60
  %65 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !21
  %66 = icmp ugt i32 %65, 1
  %67 = load i32, ptr @libxsmm_verbosity, align 4
  %68 = select i1 %66, i32 %67, i32 1
  tail call void @libxsmm_handle_error(ptr noundef %0, i32 noundef 90008, ptr noundef nonnull @__func__.libxsmm_generator_transform_rv64_microkernel, ptr noundef nonnull @.str, i32 noundef 122, i32 noundef %68) #2
  br label %75

69:                                               ; preds = %5, %60, %49, %27
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !10
  %72 = load i32, ptr %8, align 4, !tbaa !11
  %73 = load i32, ptr %9, align 4, !tbaa !12
  %74 = load i32, ptr %10, align 4, !tbaa !13
  tail call void @libxsmm_generator_transform_norm_to_normt_mbit_scalar_rv64_microkernel(ptr noundef %0, ptr noundef %1, i32 noundef %70, i32 noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, ptr noundef %3, ptr noundef nonnull %4)
  br label %75

75:                                               ; preds = %69, %64, %55, %43, %33, %22
  ret void
}

declare void @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, 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, !7, i64 4}
!6 = !{!"libxsmm_mateltwise_gp_reg_mapping_struct", !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, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !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, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 24}
!11 = !{!6, !7, i64 96}
!12 = !{!6, !7, i64 100}
!13 = !{!6, !7, i64 140}
!14 = !{!6, !7, i64 144}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !18, i64 29}
!17 = !{!"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, !18, i64 27, !18, i64 29, !8, i64 31}
!18 = !{!"short", !8, i64 0}
!19 = !{!17, !7, i64 0}
!20 = !{!17, !7, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!17, !7, i64 4}
!23 = !{!17, !7, i64 12}


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