; LLVM IR from fast-pack/simdcomp :: benchmarks (benchmark)

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

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [75 x i8], align 1
@__PRETTY_FUNCTION__.benchmarkSelect = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [69 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @benchmarkSelect() #0 {
  %1 = alloca [128 x i32], align 16
  %2 = alloca [128 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [128 x i32], align 16
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 512, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 33, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %175, %0
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp ule i32 %14, 32
  br i1 %15, label %16, label %178

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %17 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %17, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %38, %16
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 128
  br i1 %20, label %21, label %41

21:                                               ; preds = %18
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = mul nsw i32 1655765, %22
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %25
  store i32 %23, ptr %26, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp ult i32 %27, 32
  br i1 %28, label %29, label %37

29:                                               ; preds = %21
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = shl i32 1, %30
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = urem i32 %35, %31
  store i32 %36, ptr %34, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %29, %21
  br label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %8, align 4, !tbaa !5
  br label %18, !llvm.loop !9

41:                                               ; preds = %18
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %59, %41
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 128
  br i1 %44, label %45, label %62

45:                                               ; preds = %42
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = add i32 %49, %50
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %53
  store i32 %51, ptr %54, align 4, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr %9, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %45
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %8, align 4, !tbaa !5
  br label %42, !llvm.loop !11

62:                                               ; preds = %42
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %87, %62
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 128
  br i1 %65, label %66, label %90

66:                                               ; preds = %63
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp ult i32 %70, %75
  br i1 %76, label %77, label %86

77:                                               ; preds = %66
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %84
  store i32 %82, ptr %85, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %77, %66
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !5
  br label %63, !llvm.loop !12

90:                                               ; preds = %63
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 0
  %93 = call i32 @simdmaxbitsd1(i32 noundef %91, ptr noundef %92)
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = icmp ule i32 %93, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  br label %98

97:                                               ; preds = %90
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 62, ptr noundef @__PRETTY_FUNCTION__.benchmarkSelect) #6
  unreachable

98:                                               ; preds = %96
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %106, %98
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 128
  br i1 %101, label %102, label %109

102:                                              ; preds = %99
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [128 x i32], ptr %10, i64 0, i64 %104
  store i32 0, ptr %105, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %102
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !5
  br label %99, !llvm.loop !13

109:                                              ; preds = %99
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 0
  %112 = getelementptr inbounds [128 x i32], ptr %10, i64 0, i64 0
  %113 = load i32, ptr %4, align 4, !tbaa !5
  call void @simdpackwithoutmaskd1(i32 noundef %110, ptr noundef %111, ptr noundef %112, i32 noundef %113)
  %114 = call i64 @clock() #5
  store i64 %114, ptr %5, align 8, !tbaa !14
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %135, %109
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = icmp slt i32 %116, 1280
  br i1 %117, label %118, label %138

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = getelementptr inbounds [128 x i32], ptr %10, i64 0, i64 0
  %121 = load i32, ptr %4, align 4, !tbaa !5
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = urem i32 %122, 128
  %124 = call i32 @simdselectd1(i32 noundef %119, ptr noundef %120, i32 noundef %121, i32 noundef %123)
  store i32 %124, ptr %11, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = srem i32 %126, 128
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = icmp eq i32 %125, %130
  br i1 %131, label %132, label %133

132:                                              ; preds = %118
  br label %134

133:                                              ; preds = %118
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 74, ptr noundef @__PRETTY_FUNCTION__.benchmarkSelect) #6
  unreachable

134:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %8, align 4, !tbaa !5
  br label %115, !llvm.loop !16

138:                                              ; preds = %115
  %139 = call i64 @clock() #5
  store i64 %139, ptr %6, align 8, !tbaa !14
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %162, %138
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = icmp slt i32 %141, 1280
  br i1 %142, label %143, label %165

143:                                              ; preds = %140
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = getelementptr inbounds [128 x i32], ptr %10, i64 0, i64 0
  %146 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 0
  %147 = load i32, ptr %4, align 4, !tbaa !5
  call void @simdunpackd1(i32 noundef %144, ptr noundef %145, ptr noundef %146, i32 noundef %147)
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = srem i32 %148, 128
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = srem i32 %153, 128
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp eq i32 %152, %157
  br i1 %158, label %159, label %160

159:                                              ; preds = %143
  br label %161

160:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 79, ptr noundef @__PRETTY_FUNCTION__.benchmarkSelect) #6
  unreachable

161:                                              ; preds = %159
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %8, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %8, align 4, !tbaa !5
  br label %140, !llvm.loop !17

165:                                              ; preds = %140
  %166 = call i64 @clock() #5
  store i64 %166, ptr %7, align 8, !tbaa !14
  %167 = load i32, ptr %4, align 4, !tbaa !5
  %168 = load i64, ptr %6, align 8, !tbaa !14
  %169 = load i64, ptr %5, align 8, !tbaa !14
  %170 = sub nsw i64 %168, %169
  %171 = load i64, ptr %7, align 8, !tbaa !14
  %172 = load i64, ptr %6, align 8, !tbaa !14
  %173 = sub nsw i64 %171, %172
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %167, i64 noundef %170, i64 noundef %173)
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %175

175:                                              ; preds = %165
  %176 = load i32, ptr %4, align 4, !tbaa !5
  %177 = add i32 %176, 1
  store i32 %177, ptr %4, align 4, !tbaa !5
  br label %13, !llvm.loop !18

178:                                              ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %1) #5
  ret void
}

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

declare i32 @printf(ptr noundef, ...) #2

declare i32 @simdmaxbitsd1(i32 noundef, ptr noundef) #2

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

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

; Function Attrs: nounwind
declare i64 @clock() #4

declare i32 @simdselectd1(i32 noundef, ptr 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

declare void @simdunpackd1(i32 noundef, ptr noundef, ptr 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 = { 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 "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; 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 [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [75 x i8], align 1
@__PRETTY_FUNCTION__.benchmarkSelect = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [69 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @benchmarkSelect() local_unnamed_addr #0 {
  %1 = alloca [128 x i32], align 16
  %2 = alloca [128 x i32], align 16
  %3 = alloca [128 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #7
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %vector.ph

vector.ph:                                        ; preds = %0, %67
  %.060 = phi i32 [ 0, %0 ], [ %72, %67 ]
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #7
  %.not50 = icmp eq i32 %.060, 32
  %notmask = shl nsw i32 -1, %.060
  %5 = xor i32 %notmask, -1
  %6 = select i1 %.not50, i32 -1, i32 %5
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %6, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %7 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %index
  %8 = mul <4 x i32> %vec.ind, <i32 1655765, i32 1655765, i32 1655765, i32 1655765>
  %9 = mul <4 x i32> %vec.ind, <i32 1655765, i32 1655765, i32 1655765, i32 1655765>
  %10 = add <4 x i32> %9, <i32 6623060, i32 6623060, i32 6623060, i32 6623060>
  %11 = and <4 x i32> %8, %broadcast.splat
  %12 = and <4 x i32> %10, %broadcast.splat
  %13 = getelementptr inbounds i8, ptr %7, i64 16
  store <4 x i32> %11, ptr %7, align 16, !tbaa !5
  store <4 x i32> %12, ptr %13, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %14 = icmp eq i64 %index.next, 128
  br i1 %14, label %.preheader52, label %vector.body, !llvm.loop !9

.preheader52:                                     ; preds = %vector.body, %.preheader52
  %indvars.iv62 = phi i64 [ %indvars.iv.next63.3, %.preheader52 ], [ 0, %vector.body ]
  %.04755 = phi i32 [ %26, %.preheader52 ], [ 33, %vector.body ]
  %15 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv62
  %16 = load i32, ptr %15, align 16, !tbaa !5
  %17 = add i32 %16, %.04755
  store i32 %17, ptr %15, align 16, !tbaa !5
  %indvars.iv.next63 = or disjoint i64 %indvars.iv62, 1
  %18 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next63
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = add i32 %19, %17
  store i32 %20, ptr %18, align 4, !tbaa !5
  %indvars.iv.next63.1 = or disjoint i64 %indvars.iv62, 2
  %21 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next63.1
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %23 = add i32 %22, %20
  store i32 %23, ptr %21, align 8, !tbaa !5
  %indvars.iv.next63.2 = or disjoint i64 %indvars.iv62, 3
  %24 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next63.2
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add i32 %25, %23
  store i32 %26, ptr %24, align 4, !tbaa !5
  %indvars.iv.next63.3 = add nuw nsw i64 %indvars.iv62, 4
  %exitcond65.not.3 = icmp eq i64 %indvars.iv.next63.3, 128
  br i1 %exitcond65.not.3, label %.preheader51.preheader, label %.preheader52, !llvm.loop !13

.preheader51.preheader:                           ; preds = %.preheader52
  %.pre = load i32, ptr %1, align 16, !tbaa !5
  br label %.preheader51

.preheader51:                                     ; preds = %38, %.preheader51.preheader
  %27 = phi i32 [ %.pre, %.preheader51.preheader ], [ %39, %38 ]
  %indvars.iv66 = phi i64 [ 1, %.preheader51.preheader ], [ %indvars.iv.next67.1, %38 ]
  %28 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv66
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp ult i32 %29, %27
  br i1 %30, label %31, label %32

31:                                               ; preds = %.preheader51
  store i32 %27, ptr %28, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %.preheader51, %31
  %33 = phi i32 [ %29, %.preheader51 ], [ %27, %31 ]
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next67, 128
  br i1 %exitcond69.not, label %40, label %.preheader51.1, !llvm.loop !14

.preheader51.1:                                   ; preds = %32
  %34 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next67
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp ult i32 %35, %33
  br i1 %36, label %37, label %38

37:                                               ; preds = %.preheader51.1
  store i32 %33, ptr %34, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %37, %.preheader51.1
  %39 = phi i32 [ %35, %.preheader51.1 ], [ %33, %37 ]
  %indvars.iv.next67.1 = add nuw nsw i64 %indvars.iv66, 2
  br label %.preheader51

40:                                               ; preds = %32
  %41 = call i32 @simdmaxbitsd1(i32 noundef 33, ptr noundef nonnull %1) #7
  %.not = icmp ugt i32 %41, %.060
  br i1 %.not, label %43, label %.preheader.preheader

.preheader.preheader:                             ; preds = %40
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false), !tbaa !5
  call void @simdpackwithoutmaskd1(i32 noundef 33, ptr noundef nonnull %1, ptr noundef nonnull %3, i32 noundef %.060) #7
  %42 = call i64 @clock() #7
  br label %46

43:                                               ; preds = %40
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 62, ptr noundef nonnull @__PRETTY_FUNCTION__.benchmarkSelect) #8
  unreachable

44:                                               ; preds = %46
  %45 = add nuw nsw i32 %.458, 1
  %exitcond73.not = icmp eq i32 %45, 1280
  br i1 %exitcond73.not, label %54, label %46, !llvm.loop !15

46:                                               ; preds = %.preheader.preheader, %44
  %.458 = phi i32 [ 0, %.preheader.preheader ], [ %45, %44 ]
  %47 = and i32 %.458, 127
  %48 = call i32 @simdselectd1(i32 noundef 33, ptr noundef nonnull %3, i32 noundef %.060, i32 noundef %47) #7
  %49 = zext nneg i32 %47 to i64
  %50 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp eq i32 %48, %51
  br i1 %52, label %44, label %53

53:                                               ; preds = %46
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 74, ptr noundef nonnull @__PRETTY_FUNCTION__.benchmarkSelect) #8
  unreachable

54:                                               ; preds = %44
  %55 = call i64 @clock() #7
  br label %58

56:                                               ; preds = %58
  %57 = add nuw nsw i32 %.559, 1
  %exitcond74.not = icmp eq i32 %57, 1280
  br i1 %exitcond74.not, label %67, label %58, !llvm.loop !16

58:                                               ; preds = %54, %56
  %.559 = phi i32 [ 0, %54 ], [ %57, %56 ]
  call void @simdunpackd1(i32 noundef 33, ptr noundef nonnull %3, ptr noundef nonnull %2, i32 noundef %.060) #7
  %59 = and i32 %.559, 127
  %60 = zext nneg i32 %59 to i64
  %61 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %60
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp eq i32 %62, %64
  br i1 %65, label %56, label %66

66:                                               ; preds = %58
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 79, ptr noundef nonnull @__PRETTY_FUNCTION__.benchmarkSelect) #8
  unreachable

67:                                               ; preds = %56
  %68 = call i64 @clock() #7
  %69 = sub nsw i64 %55, %42
  %70 = sub nsw i64 %68, %55
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.060, i64 noundef %69, i64 noundef %70)
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #7
  %72 = add nuw nsw i32 %.060, 1
  %exitcond75.not = icmp eq i32 %72, 33
  br i1 %exitcond75.not, label %73, label %vector.ph, !llvm.loop !17

73:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %1) #7
  ret void
}

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

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

declare i32 @simdmaxbitsd1(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare void @simdpackwithoutmaskd1(i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #5

declare i32 @simdselectd1(i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

declare void @simdunpackd1(i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass