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

; 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_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_RRp = external hidden unnamed_addr constant <{ [24 x i8], [8 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_BX = external hidden unnamed_addr constant <{ [24 x i8], [8 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vvvv = external hidden unnamed_addr constant [32 x i8], align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vp = external hidden unnamed_addr constant <{ [16 x i8], [16 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_vl = external hidden unnamed_addr constant [3 x i8], align 1
@__func__.libxsmm_x86_instruction_evex_compute_3reg = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_x86_instruction_evex_compute_3reg = external hidden unnamed_addr constant [243 x i8], align 1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_x86_instruction_evex_compute_3reg(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i8 noundef zeroext %8) #4 {
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca [32 x i8], align 16
  %28 = alloca [32 x i8], align 16
  %29 = alloca [32 x i8], align 16
  %30 = alloca [32 x i8], align 16
  %31 = alloca [3 x i8], align 1
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %5, ptr %15, align 4, !tbaa !9
  store i32 %6, ptr %16, align 4, !tbaa !9
  store i32 %7, ptr %17, align 4, !tbaa !9
  store i8 %8, ptr %18, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !12
  store i32 %36, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  store ptr %39, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %40 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %40, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %41 = load i32, ptr %19, align 4, !tbaa !9
  %42 = add i32 %41, 1
  store i32 %42, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %43 = load i32, ptr %19, align 4, !tbaa !9
  %44 = add i32 %43, 2
  store i32 %44, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %45 = load i32, ptr %19, align 4, !tbaa !9
  %46 = add i32 %45, 3
  store i32 %46, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %47 = load i32, ptr %19, align 4, !tbaa !9
  %48 = add i32 %47, 4
  store i32 %48, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %49 = load i32, ptr %19, align 4, !tbaa !9
  %50 = add i32 %49, 5
  store i32 %50, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_RRp, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_BX, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vvvv, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vp, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 3, ptr %31) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %31, ptr align 1 @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_vl, i64 3, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %51 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %51, ptr %32, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = icmp ugt i32 %52, 31
  br i1 %53, label %60, label %54

54:                                               ; preds = %9
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = icmp ugt i32 %55, 31
  br i1 %56, label %60, label %57

57:                                               ; preds = %54
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = icmp ugt i32 %58, 31
  br i1 %59, label %60, label %69

60:                                               ; preds = %57, %54, %9
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %63 = icmp ult i32 1, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %60
  %65 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %67

66:                                               ; preds = %60
  br label %67

67:                                               ; preds = %66, %64
  %68 = phi i32 [ %65, %64 ], [ 1, %66 ]
  call void @libxsmm_handle_error(ptr noundef %61, i32 noundef 90052, ptr noundef @__func__.libxsmm_x86_instruction_evex_compute_3reg, ptr noundef @.str, i32 noundef 1597, i32 noundef %68)
  store i32 1, ptr %33, align 4
  br label %281

69:                                               ; preds = %57
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !15
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = sub i32 %72, %75
  %77 = icmp ult i32 %76, 20
  br i1 %77, label %78, label %87

78:                                               ; preds = %69
  %79 = load ptr, ptr %10, 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 90002, ptr noundef @__func__.libxsmm_x86_instruction_evex_compute_3reg, ptr noundef @.str, i32 noundef 1602, i32 noundef %86)
  store i32 1, ptr %33, align 4
  br label %281

87:                                               ; preds = %69
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load i32, ptr %21, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  store i8 98, ptr %91, align 1, !tbaa !11
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = lshr i32 %92, 12
  %94 = and i32 %93, 15
  %95 = trunc i32 %94 to i8
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = load i32, ptr %22, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  store i8 %95, ptr %99, align 1, !tbaa !11
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = lshr i32 %100, 16
  %102 = and i32 %101, 135
  %103 = trunc i32 %102 to i8
  %104 = load ptr, ptr %20, align 8, !tbaa !5
  %105 = load i32, ptr %23, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %104, i64 %106
  store i8 %103, ptr %107, align 1, !tbaa !11
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = load i32, ptr %24, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds i8, ptr %108, i64 %110
  store i8 0, ptr %111, align 1, !tbaa !11
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = trunc i32 %112 to i8
  %114 = load ptr, ptr %20, align 8, !tbaa !5
  %115 = load i32, ptr %25, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds i8, ptr %114, i64 %116
  store i8 %113, ptr %117, align 1, !tbaa !11
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = icmp ult i32 %118, 32
  br i1 %119, label %120, label %127

120:                                              ; preds = %87
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = icmp ult i32 %121, 32
  br i1 %122, label %123, label %127

123:                                              ; preds = %120
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = icmp ult i32 %124, 32
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  br label %128

127:                                              ; preds = %123, %120, %87
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str, i32 noundef 1621, ptr noundef @__PRETTY_FUNCTION__.libxsmm_x86_instruction_evex_compute_3reg) #6
  unreachable

128:                                              ; preds = %126
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds [32 x i8], ptr %27, i64 0, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !11
  %133 = zext i8 %132 to i32
  %134 = load ptr, ptr %20, align 8, !tbaa !5
  %135 = load i32, ptr %22, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i8, ptr %134, i64 %136
  %138 = load i8, ptr %137, align 1, !tbaa !11
  %139 = zext i8 %138 to i32
  %140 = or i32 %139, %133
  %141 = trunc i32 %140 to i8
  store i8 %141, ptr %137, align 1, !tbaa !11
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !11
  %146 = zext i8 %145 to i32
  %147 = load ptr, ptr %20, align 8, !tbaa !5
  %148 = load i32, ptr %22, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %147, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !11
  %152 = zext i8 %151 to i32
  %153 = or i32 %152, %146
  %154 = trunc i32 %153 to i8
  store i8 %154, ptr %150, align 1, !tbaa !11
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [32 x i8], ptr %29, i64 0, i64 %156
  %158 = load i8, ptr %157, align 1, !tbaa !11
  %159 = zext i8 %158 to i32
  %160 = load ptr, ptr %20, align 8, !tbaa !5
  %161 = load i32, ptr %23, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  %164 = load i8, ptr %163, align 1, !tbaa !11
  %165 = zext i8 %164 to i32
  %166 = or i32 %165, %159
  %167 = trunc i32 %166 to i8
  store i8 %167, ptr %163, align 1, !tbaa !11
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds [32 x i8], ptr %30, i64 0, i64 %169
  %171 = load i8, ptr %170, align 1, !tbaa !11
  %172 = zext i8 %171 to i32
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = load i32, ptr %24, align 4, !tbaa !9
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds i8, ptr %173, i64 %175
  %177 = load i8, ptr %176, align 1, !tbaa !11
  %178 = zext i8 %177 to i32
  %179 = or i32 %178, %172
  %180 = trunc i32 %179 to i8
  store i8 %180, ptr %176, align 1, !tbaa !11
  %181 = load i8, ptr %18, align 1, !tbaa !11
  %182 = zext i8 %181 to i32
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %190

184:                                              ; preds = %128
  %185 = load i32, ptr %32, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds [3 x i8], ptr %31, i64 0, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !11
  %189 = zext i8 %188 to i32
  br label %195

190:                                              ; preds = %128
  %191 = load i8, ptr %18, align 1, !tbaa !11
  %192 = zext i8 %191 to i32
  %193 = shl i32 %192, 4
  %194 = and i32 96, %193
  br label %195

195:                                              ; preds = %190, %184
  %196 = phi i32 [ %189, %184 ], [ %194, %190 ]
  %197 = trunc i32 %196 to i8
  %198 = zext i8 %197 to i32
  %199 = load ptr, ptr %20, align 8, !tbaa !5
  %200 = load i32, ptr %24, align 4, !tbaa !9
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds i8, ptr %199, i64 %201
  %203 = load i8, ptr %202, align 1, !tbaa !11
  %204 = zext i8 %203 to i32
  %205 = or i32 %204, %198
  %206 = trunc i32 %205 to i8
  store i8 %206, ptr %202, align 1, !tbaa !11
  %207 = load i32, ptr %17, align 4, !tbaa !9
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %212

209:                                              ; preds = %195
  %210 = load i32, ptr %16, align 4, !tbaa !9
  %211 = icmp ne i32 %210, 0
  br label %212

212:                                              ; preds = %209, %195
  %213 = phi i1 [ false, %195 ], [ %211, %209 ]
  %214 = zext i1 %213 to i64
  %215 = select i1 %213, i32 128, i32 0
  %216 = load i32, ptr %16, align 4, !tbaa !9
  %217 = and i32 %216, 7
  %218 = or i32 %215, %217
  %219 = trunc i32 %218 to i8
  %220 = zext i8 %219 to i32
  %221 = load ptr, ptr %20, align 8, !tbaa !5
  %222 = load i32, ptr %24, align 4, !tbaa !9
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds i8, ptr %221, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !11
  %226 = zext i8 %225 to i32
  %227 = or i32 %226, %220
  %228 = trunc i32 %227 to i8
  store i8 %228, ptr %224, align 1, !tbaa !11
  %229 = load i8, ptr %18, align 1, !tbaa !11
  %230 = zext i8 %229 to i32
  %231 = icmp eq i32 %230, 0
  %232 = zext i1 %231 to i64
  %233 = select i1 %231, i32 0, i32 16
  %234 = trunc i32 %233 to i8
  %235 = zext i8 %234 to i32
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = load i32, ptr %24, align 4, !tbaa !9
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds i8, ptr %236, i64 %238
  %240 = load i8, ptr %239, align 1, !tbaa !11
  %241 = zext i8 %240 to i32
  %242 = or i32 %241, %235
  %243 = trunc i32 %242 to i8
  store i8 %243, ptr %239, align 1, !tbaa !11
  %244 = load ptr, ptr %20, align 8, !tbaa !5
  %245 = load i32, ptr %26, align 4, !tbaa !9
  %246 = zext i32 %245 to i64
  %247 = getelementptr inbounds i8, ptr %244, i64 %246
  store i8 -64, ptr %247, align 1, !tbaa !11
  %248 = load i32, ptr %15, align 4, !tbaa !9
  %249 = shl i32 %248, 3
  %250 = trunc i32 %249 to i8
  %251 = zext i8 %250 to i32
  %252 = and i32 %251, 56
  %253 = trunc i32 %252 to i8
  %254 = zext i8 %253 to i32
  %255 = load ptr, ptr %20, align 8, !tbaa !5
  %256 = load i32, ptr %26, align 4, !tbaa !9
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds i8, ptr %255, i64 %257
  %259 = load i8, ptr %258, align 1, !tbaa !11
  %260 = zext i8 %259 to i32
  %261 = or i32 %260, %254
  %262 = trunc i32 %261 to i8
  store i8 %262, ptr %258, align 1, !tbaa !11
  %263 = load i32, ptr %13, align 4, !tbaa !9
  %264 = trunc i32 %263 to i8
  %265 = zext i8 %264 to i32
  %266 = and i32 %265, 7
  %267 = trunc i32 %266 to i8
  %268 = zext i8 %267 to i32
  %269 = load ptr, ptr %20, align 8, !tbaa !5
  %270 = load i32, ptr %26, align 4, !tbaa !9
  %271 = zext i32 %270 to i64
  %272 = getelementptr inbounds i8, ptr %269, i64 %271
  %273 = load i8, ptr %272, align 1, !tbaa !11
  %274 = zext i8 %273 to i32
  %275 = or i32 %274, %268
  %276 = trunc i32 %275 to i8
  store i8 %276, ptr %272, align 1, !tbaa !11
  %277 = load i32, ptr %19, align 4, !tbaa !9
  %278 = add i32 %277, 6
  %279 = load ptr, ptr %10, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %279, i32 0, i32 2
  store i32 %278, ptr %280, align 4, !tbaa !12
  store i32 0, ptr %33, align 4
  br label %281

281:                                              ; preds = %212, %85, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %282 = load i32, ptr %33, align 4
  switch i32 %282, label %284 [
    i32 0, label %283
    i32 1, label %283
  ]

283:                                              ; preds = %281, %281
  ret void

284:                                              ; preds = %281
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 12}
!13 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!14 = !{!13, !6, i64 0}
!15 = !{!13, !10, i64 8}


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

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@libxsmm_ninit = external local_unnamed_addr global i32, align 4
@libxsmm_verbosity = external local_unnamed_addr global i32, align 4
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_RRp = external hidden unnamed_addr constant <{ [24 x i8], [8 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_BX = external hidden unnamed_addr constant <{ [24 x i8], [8 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vvvv = external hidden unnamed_addr constant [32 x i8], align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vp = external hidden unnamed_addr constant <{ [16 x i8], [16 x i8] }>, align 16
@__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_vl = external hidden unnamed_addr constant [3 x i8], align 1
@__func__.libxsmm_x86_instruction_evex_compute_3reg = external hidden unnamed_addr constant [42 x i8], align 1

declare void @libxsmm_handle_error(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_x86_instruction_evex_compute_3reg(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i8 noundef zeroext %8) local_unnamed_addr #1 {
  %10 = getelementptr inbounds i8, ptr %0, i64 12
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = load ptr, ptr %0, align 8, !tbaa !11
  %13 = add i32 %11, 1
  %14 = add i32 %11, 2
  %15 = add i32 %11, 3
  %16 = add i32 %11, 4
  %17 = add i32 %11, 5
  %18 = or i32 %4, %3
  %19 = or i32 %18, %5
  %or.cond3.not = icmp ult i32 %19, 32
  br i1 %or.cond3.not, label %25, label %20

20:                                               ; preds = %9
  %21 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %22 = icmp ugt i32 %21, 1
  %23 = load i32, ptr @libxsmm_verbosity, align 4
  %24 = select i1 %22, i32 %23, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90052, ptr noundef nonnull @__func__.libxsmm_x86_instruction_evex_compute_3reg, ptr noundef nonnull @.str, i32 noundef 1597, i32 noundef %24) #2
  br label %96

25:                                               ; preds = %9
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !13
  %28 = sub i32 %27, %11
  %29 = icmp ult i32 %28, 20
  br i1 %29, label %30, label %35

30:                                               ; preds = %25
  %31 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %32 = icmp ugt i32 %31, 1
  %33 = load i32, ptr @libxsmm_verbosity, align 4
  %34 = select i1 %32, i32 %33, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90002, ptr noundef nonnull @__func__.libxsmm_x86_instruction_evex_compute_3reg, ptr noundef nonnull @.str, i32 noundef 1602, i32 noundef %34) #2
  br label %96

35:                                               ; preds = %25
  %36 = zext i32 %11 to i64
  %37 = getelementptr inbounds i8, ptr %12, i64 %36
  store i8 98, ptr %37, align 1, !tbaa !14
  %38 = lshr i32 %1, 12
  %39 = trunc i32 %38 to i8
  %40 = and i8 %39, 15
  %41 = zext i32 %13 to i64
  %42 = getelementptr inbounds i8, ptr %12, i64 %41
  %43 = lshr i32 %1, 16
  %44 = trunc i32 %43 to i8
  %45 = and i8 %44, -121
  %46 = zext i32 %14 to i64
  %47 = getelementptr inbounds i8, ptr %12, i64 %46
  %48 = zext i32 %15 to i64
  %49 = getelementptr inbounds i8, ptr %12, i64 %48
  %50 = trunc i32 %1 to i8
  %51 = zext i32 %16 to i64
  %52 = getelementptr inbounds i8, ptr %12, i64 %51
  store i8 %50, ptr %52, align 1, !tbaa !14
  %53 = zext nneg i32 %5 to i64
  %54 = getelementptr inbounds [32 x i8], ptr @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_RRp, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !14
  %56 = or i8 %55, %40
  %57 = zext nneg i32 %3 to i64
  %58 = getelementptr inbounds [32 x i8], ptr @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_BX, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !14
  %60 = or i8 %59, %56
  store i8 %60, ptr %42, align 1, !tbaa !14
  %61 = zext nneg i32 %4 to i64
  %62 = getelementptr inbounds [32 x i8], ptr @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vvvv, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !14
  %64 = or i8 %63, %45
  store i8 %64, ptr %47, align 1, !tbaa !14
  %65 = getelementptr inbounds [32 x i8], ptr @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_evex_vp, i64 0, i64 %61
  %66 = load i8, ptr %65, align 1, !tbaa !14
  %67 = icmp eq i8 %8, 0
  br i1 %67, label %68, label %72

68:                                               ; preds = %35
  %69 = zext i32 %2 to i64
  %70 = getelementptr inbounds [3 x i8], ptr @__const.libxsmm_x86_instruction_evex_compute_3reg.tbl_vl, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !14
  br label %75

72:                                               ; preds = %35
  %73 = shl i8 %8, 4
  %74 = and i8 %73, 96
  br label %75

75:                                               ; preds = %72, %68
  %76 = phi i8 [ 0, %68 ], [ 16, %72 ]
  %77 = phi i8 [ %71, %68 ], [ %74, %72 ]
  %78 = icmp ne i32 %7, 0
  %79 = icmp ne i32 %6, 0
  %80 = and i1 %79, %78
  %81 = select i1 %80, i32 128, i32 0
  %82 = and i32 %6, 7
  %83 = or disjoint i32 %81, %82
  %84 = trunc nuw i32 %83 to i8
  %85 = or disjoint i8 %76, %84
  %86 = or i8 %85, %77
  %87 = or i8 %86, %66
  store i8 %87, ptr %49, align 1, !tbaa !14
  %88 = zext i32 %17 to i64
  %89 = getelementptr inbounds i8, ptr %12, i64 %88
  %90 = shl nuw nsw i32 %5, 3
  %91 = and i32 %3, 7
  %92 = or disjoint i32 %90, %91
  %93 = trunc nuw i32 %92 to i8
  %94 = or i8 %93, -64
  store i8 %94, ptr %89, align 1, !tbaa !14
  %95 = add i32 %11, 6
  store i32 %95, ptr %10, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %75, %30, %20
  ret void
}

attributes #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 = { 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 = { 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, !10, i64 12}
!6 = !{!"libxsmm_generated_code", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!8, !8, i64 0}


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