; LLVM IR from libxsmm/libxsmm :: src (generator_rv64_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 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@db_bpos = external hidden constant [32 x i32], align 16
@.str.63 = external hidden unnamed_addr constant [93 x i8], align 1
@__func__.libxsmm_rv64_instruction_jump_and_link = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [86 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_rv64_instruction_jump_and_link(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %17, i32 0, i32 6
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp ult i32 %19, 3001
  br i1 %20, label %21, label %32

21:                                               ; preds = %4
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.63) #5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %26 = icmp ult i32 1, %25
  br i1 %26, label %27, label %29

27:                                               ; preds = %21
  %28 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %30

29:                                               ; preds = %21
  br label %30

30:                                               ; preds = %29, %27
  %31 = phi i32 [ %28, %27 ], [ 1, %29 ]
  call void @libxsmm_handle_error(ptr noundef %24, i32 noundef 90000, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1434, i32 noundef %31)
  br label %182

32:                                               ; preds = %4
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = icmp ule i32 %33, 31
  br i1 %34, label %46, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.64) #5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %40 = icmp ult i32 1, %39
  br i1 %40, label %41, label %43

41:                                               ; preds = %35
  %42 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %44

43:                                               ; preds = %35
  br label %44

44:                                               ; preds = %43, %41
  %45 = phi i32 [ %42, %41 ], [ 1, %43 ]
  call void @libxsmm_handle_error(ptr noundef %38, i32 noundef 90000, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1440, i32 noundef %45)
  br label %182

46:                                               ; preds = %32
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp sgt i32 %47, 1048575
  br i1 %48, label %49, label %62

49:                                               ; preds = %46
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.65, i32 noundef %51, i32 noundef %52) #5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %56 = icmp ult i32 1, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %49
  %58 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %60

59:                                               ; preds = %49
  br label %60

60:                                               ; preds = %59, %57
  %61 = phi i32 [ %58, %57 ], [ 1, %59 ]
  call void @libxsmm_handle_error(ptr noundef %54, i32 noundef 90000, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1446, i32 noundef %61)
  br label %182

62:                                               ; preds = %46
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %63, i32 0, i32 3
  %65 = load i32, ptr %64, align 8, !tbaa !13
  %66 = icmp ugt i32 %65, 1
  br i1 %66, label %67, label %182

67:                                               ; preds = %62
  %68 = load i32, ptr %6, align 4, !tbaa !9
  switch i32 %68, label %69 [
    i32 111, label %81
  ]

69:                                               ; preds = %67
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.66, i32 noundef %71) #5
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %75 = icmp ult i32 1, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %69
  %77 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %79

78:                                               ; preds = %69
  br label %79

79:                                               ; preds = %78, %76
  %80 = phi i32 [ %77, %76 ], [ 1, %78 ]
  call void @libxsmm_handle_error(ptr noundef %73, i32 noundef 90000, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1456, i32 noundef %80)
  br label %182

81:                                               ; preds = %67
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 8, !tbaa !13
  %85 = icmp ugt i32 %84, 1
  br i1 %85, label %86, label %170

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !14
  %90 = udiv i32 %89, 4
  store i32 %90, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  store ptr %93, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %94 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %94, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = icmp slt i32 %95, 0
  br i1 %96, label %97, label %103

97:                                               ; preds = %86
  store i32 1, ptr %11, align 4, !tbaa !9
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = call i32 @llvm.abs.i32(i32 %98, i1 true)
  %100 = xor i32 %99, -1
  %101 = add nsw i32 %100, 1
  %102 = and i32 %101, 524287
  store i32 %102, ptr %12, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %97, %86
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 8, !tbaa !16
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !14
  %110 = sub i32 %106, %109
  %111 = icmp ult i32 %110, 4
  br i1 %111, label %112, label %121

112:                                              ; preds = %103
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %115 = icmp ult i32 1, %114
  br i1 %115, label %116, label %118

116:                                              ; preds = %112
  %117 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %119

118:                                              ; preds = %112
  br label %119

119:                                              ; preds = %118, %116
  %120 = phi i32 [ %117, %116 ], [ 1, %118 ]
  call void @libxsmm_handle_error(ptr noundef %113, i32 noundef 90002, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1479, i32 noundef %120)
  store i32 1, ptr %16, align 4
  br label %167

121:                                              ; preds = %103
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = and i32 %122, 1023
  %124 = shl i32 %123, 9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = shl i32 %125, 19
  %127 = or i32 %124, %126
  store i32 %127, ptr %14, align 4, !tbaa !9
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = and i32 %128, 1024
  %130 = lshr i32 %129, 2
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = lshr i32 %131, 11
  %133 = and i32 %132, 255
  %134 = or i32 %130, %133
  store i32 %134, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = or i32 %135, %136
  store i32 %137, ptr %15, align 4, !tbaa !9
  %138 = load i32, ptr %6, align 4, !tbaa !9
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  store i32 %138, ptr %142, align 4, !tbaa !9
  %143 = load i32, ptr %7, align 4, !tbaa !9
  %144 = load i32, ptr getelementptr inbounds ([32 x i32], ptr @db_bpos, i64 0, i64 23), align 4, !tbaa !9
  %145 = shl i32 %143, %144
  %146 = and i32 3968, %145
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = or i32 %151, %146
  store i32 %152, ptr %150, align 4, !tbaa !9
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = load i32, ptr getelementptr inbounds ([32 x i32], ptr @db_bpos, i64 0, i64 25), align 4, !tbaa !9
  %155 = shl i32 %153, %154
  %156 = and i32 -4096, %155
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = load i32, ptr %9, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = getelementptr inbounds i32, ptr %157, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = or i32 %161, %156
  store i32 %162, ptr %160, align 4, !tbaa !9
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %163, i32 0, i32 2
  %165 = load i32, ptr %164, align 4, !tbaa !14
  %166 = add i32 %165, 4
  store i32 %166, ptr %164, align 4, !tbaa !14
  store i32 0, ptr %16, align 4
  br label %167

167:                                              ; preds = %121, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %168 = load i32, ptr %16, align 4
  switch i32 %168, label %183 [
    i32 0, label %169
    i32 1, label %182
  ]

169:                                              ; preds = %167
  br label %181

170:                                              ; preds = %81
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.67) #5
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %175 = icmp ult i32 1, %174
  br i1 %175, label %176, label %178

176:                                              ; preds = %170
  %177 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  br label %179

178:                                              ; preds = %170
  br label %179

179:                                              ; preds = %178, %176
  %180 = phi i32 [ %177, %176 ], [ 1, %178 ]
  call void @libxsmm_handle_error(ptr noundef %173, i32 noundef 90000, ptr noundef @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef @.str.1, i32 noundef 1500, i32 noundef %180)
  br label %182

181:                                              ; preds = %169
  br label %182

182:                                              ; preds = %181, %179, %167, %79, %62, %60, %44, %30
  ret void

183:                                              ; preds = %167
  unreachable
}

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 }

!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 28}
!12 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !6, i64 0}
!16 = !{!12, !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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@libxsmm_ninit = external local_unnamed_addr global i32, align 4
@libxsmm_verbosity = external local_unnamed_addr global i32, align 4
@db_bpos = external hidden local_unnamed_addr constant [32 x i32], align 16
@.str.63 = external hidden unnamed_addr constant [93 x i8], align 1
@__func__.libxsmm_rv64_instruction_jump_and_link = external hidden unnamed_addr constant [39 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_rv64_instruction_jump_and_link(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 28
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp ult i32 %6, 3001
  br i1 %7, label %8, label %15

8:                                                ; preds = %4
  %9 = load ptr, ptr @stderr, align 8, !tbaa !11
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.63) #3
  %11 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %12 = icmp ugt i32 %11, 1
  %13 = load i32, ptr @libxsmm_verbosity, align 4
  %14 = select i1 %12, i32 %13, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef nonnull @.str.1, i32 noundef 1434, i32 noundef %14) #4
  br label %84

15:                                               ; preds = %4
  %16 = icmp ult i32 %2, 32
  br i1 %16, label %24, label %17

17:                                               ; preds = %15
  %18 = load ptr, ptr @stderr, align 8, !tbaa !11
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.64) #3
  %20 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %21 = icmp ugt i32 %20, 1
  %22 = load i32, ptr @libxsmm_verbosity, align 4
  %23 = select i1 %21, i32 %22, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef nonnull @.str.1, i32 noundef 1440, i32 noundef %23) #4
  br label %84

24:                                               ; preds = %15
  %25 = icmp sgt i32 %3, 1048575
  br i1 %25, label %26, label %33

26:                                               ; preds = %24
  %27 = load ptr, ptr @stderr, align 8, !tbaa !11
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.65, i32 noundef %1, i32 noundef %3) #3
  %29 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %30 = icmp ugt i32 %29, 1
  %31 = load i32, ptr @libxsmm_verbosity, align 4
  %32 = select i1 %30, i32 %31, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef nonnull @.str.1, i32 noundef 1446, i32 noundef %32) #4
  br label %84

33:                                               ; preds = %24
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = load i32, ptr %34, align 8, !tbaa !13
  %36 = icmp ugt i32 %35, 1
  br i1 %36, label %37, label %84

37:                                               ; preds = %33
  %cond = icmp eq i32 %1, 111
  br i1 %cond, label %45, label %38

38:                                               ; preds = %37
  %39 = load ptr, ptr @stderr, align 8, !tbaa !11
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.66, i32 noundef %1) #3
  %41 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %42 = icmp ugt i32 %41, 1
  %43 = load i32, ptr @libxsmm_verbosity, align 4
  %44 = select i1 %42, i32 %43, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90000, ptr noundef nonnull @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef nonnull @.str.1, i32 noundef 1456, i32 noundef %44) #4
  br label %84

45:                                               ; preds = %37
  %46 = getelementptr inbounds i8, ptr %0, i64 12
  %47 = load i32, ptr %46, align 4, !tbaa !14
  %48 = getelementptr inbounds i8, ptr %0, i64 8
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = sub i32 %49, %47
  %51 = icmp ult i32 %50, 4
  br i1 %51, label %52, label %57

52:                                               ; preds = %45
  %53 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !12
  %54 = icmp ugt i32 %53, 1
  %55 = load i32, ptr @libxsmm_verbosity, align 4
  %56 = select i1 %54, i32 %55, i32 1
  tail call void @libxsmm_handle_error(ptr noundef nonnull %0, i32 noundef 90002, ptr noundef nonnull @__func__.libxsmm_rv64_instruction_jump_and_link, ptr noundef nonnull @.str.1, i32 noundef 1479, i32 noundef %56) #4
  br label %84

57:                                               ; preds = %45
  %58 = icmp slt i32 %3, 0
  %59 = and i32 %3, 524287
  %spec.select42 = select i1 %58, i32 %59, i32 %3
  %60 = lshr i32 %3, 12
  %spec.select = and i32 %60, 524288
  %61 = load ptr, ptr %0, align 8, !tbaa !16
  %62 = lshr i32 %47, 2
  %63 = shl nuw nsw i32 %spec.select42, 9
  %64 = and i32 %63, 523776
  %65 = or disjoint i32 %spec.select, %64
  %66 = lshr i32 %spec.select42, 2
  %67 = and i32 %66, 256
  %68 = lshr i32 %spec.select42, 11
  %69 = and i32 %68, 255
  %70 = or disjoint i32 %67, %69
  %71 = or disjoint i32 %65, %70
  %72 = zext nneg i32 %62 to i64
  %73 = getelementptr inbounds i32, ptr %61, i64 %72
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @db_bpos, i64 92), align 4, !tbaa !12
  %75 = shl i32 %2, %74
  %76 = and i32 %75, 3968
  %77 = or disjoint i32 %76, 111
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @db_bpos, i64 100), align 4, !tbaa !12
  %79 = shl i32 %71, %78
  %80 = and i32 %79, -4096
  %81 = or disjoint i32 %80, %77
  store i32 %81, ptr %73, align 4, !tbaa !12
  %82 = load i32, ptr %46, align 4, !tbaa !14
  %83 = add i32 %82, 4
  store i32 %83, ptr %46, align 4, !tbaa !14
  br label %84

84:                                               ; preds = %52, %57, %38, %33, %26, %17, %8
  ret void
}

attributes #0 = { nofree 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { cold nounwind }
attributes #4 = { 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 28}
!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 = !{!7, !7, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !10, i64 12}
!15 = !{!6, !10, i64 8}
!16 = !{!6, !7, i64 0}


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