; LLVM IR from cruppstahl/upscaledb :: 3rdparty/simdcomp/src (unit)

; 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.11 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.test_simdpackedsearch_advanced = external hidden unnamed_addr constant [37 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @uint32_cmp(ptr noundef, ptr noundef) #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_set1_epi32(i32 noundef) #3

declare i32 @simdsearchd1(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

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

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

16:                                               ; preds = %393, %0
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = icmp ule i32 %17, 32
  br i1 %18, label %19, label %396

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %20 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %20, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %42, %19
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = icmp ult i32 %22, 128
  br i1 %23, label %24, label %45

24:                                               ; preds = %21
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = mul i32 1431655765, %25
  %27 = add i32 %26, -1
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %29
  store i32 %27, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = icmp ult i32 %31, 32
  br i1 %32, label %33, label %41

33:                                               ; preds = %24
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = shl i32 1, %34
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = urem i32 %39, %35
  store i32 %40, ptr %38, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %33, %24
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = add i32 %43, 1
  store i32 %44, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !10

45:                                               ; preds = %21
  %46 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 0
  call void @qsort(ptr noundef %46, i64 noundef 128, i64 noundef 4, ptr noundef @uint32_cmp)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %64, %45
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = icmp ult i32 %48, 128
  br i1 %49, label %50, label %67

50:                                               ; preds = %47
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = add i32 %54, %55
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %58
  store i32 %56, ptr %59, align 4, !tbaa !5
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr %9, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %50
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = add i32 %65, 1
  store i32 %66, ptr %6, align 4, !tbaa !5
  br label %47, !llvm.loop !12

67:                                               ; preds = %47
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %92, %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = icmp ult i32 %69, 128
  br i1 %70, label %71, label %95

71:                                               ; preds = %68
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = zext 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 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sub i32 %76, 1
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = icmp ult i32 %75, %80
  br i1 %81, label %82, label %91

82:                                               ; preds = %71
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sub i32 %83, 1
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %89
  store i32 %87, ptr %90, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %82, %71
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = add i32 %93, 1
  store i32 %94, ptr %6, align 4, !tbaa !5
  br label %68, !llvm.loop !13

95:                                               ; preds = %68
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 0
  %98 = call i32 @simdmaxbitsd1(i32 noundef %96, ptr noundef %97)
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = icmp ule i32 %98, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %95
  br label %103

102:                                              ; preds = %95
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.11, i32 noundef 397, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

103:                                              ; preds = %101
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %111, %103
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = icmp ult i32 %105, 128
  br i1 %106, label %107, label %114

107:                                              ; preds = %104
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %109
  store i32 0, ptr %110, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %107
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = add i32 %112, 1
  store i32 %113, ptr %6, align 4, !tbaa !5
  br label %104, !llvm.loop !14

114:                                              ; preds = %104
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 0
  %117 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %118 = load i32, ptr %5, align 4, !tbaa !5
  call void @simdpackwithoutmaskd1(i32 noundef %115, ptr noundef %116, ptr noundef %117, i32 noundef %118)
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %121 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 0
  %122 = load i32, ptr %5, align 4, !tbaa !5
  call void @simdunpackd1(i32 noundef %119, ptr noundef %120, ptr noundef %121, i32 noundef %122)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %139, %114
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = icmp ult i32 %124, 128
  br i1 %125, label %126, label %142

126:                                              ; preds = %123
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = zext 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 = load i32, ptr %6, align 4, !tbaa !5
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = icmp eq i32 %130, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %126
  br label %138

137:                                              ; preds = %126
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.11, i32 noundef 407, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = add i32 %140, 1
  store i32 %141, ptr %6, align 4, !tbaa !5
  br label %123, !llvm.loop !15

142:                                              ; preds = %123
  %143 = load i32, ptr %5, align 4, !tbaa !5
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, i32 noundef %143)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %209, %142
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = icmp ult i32 %146, 128
  br i1 %147, label %148, label %212

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %149 = load i32, ptr %7, align 4, !tbaa !5
  %150 = call <2 x i64> @_mm_set1_epi32(i32 noundef %149)
  store <2 x i64> %150, ptr %8, align 16, !tbaa !9
  %151 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = load i32, ptr %6, align 4, !tbaa !5
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = call i32 @simdsearchd1(ptr noundef %8, ptr noundef %151, i32 noundef %152, i32 noundef %156, ptr noundef %4)
  store i32 %157, ptr %10, align 4, !tbaa !5
  %158 = load i32, ptr %10, align 4, !tbaa !5
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %161 = load i32, ptr %5, align 4, !tbaa !5
  %162 = load i32, ptr %6, align 4, !tbaa !5
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = call i32 @simdsearchwithlengthd1(i32 noundef %159, ptr noundef %160, i32 noundef %161, i32 noundef 128, i32 noundef %165, ptr noundef %4)
  %167 = icmp eq i32 %158, %166
  br i1 %167, label %168, label %169

168:                                              ; preds = %148
  br label %170

169:                                              ; preds = %148
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.11, i32 noundef 418, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

170:                                              ; preds = %168
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = icmp eq i32 %174, %178
  br i1 %179, label %180, label %181

180:                                              ; preds = %170
  br label %182

181:                                              ; preds = %170
  call void @__assert_fail(ptr noundef @.str.29, ptr noundef @.str.11, i32 noundef 419, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

182:                                              ; preds = %180
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = icmp sgt i32 %183, 0
  br i1 %184, label %185, label %199

185:                                              ; preds = %182
  %186 = load i32, ptr %10, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = load i32, ptr %6, align 4, !tbaa !5
  %192 = zext i32 %191 to i64
  %193 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = icmp ult i32 %190, %194
  br i1 %195, label %196, label %197

196:                                              ; preds = %185
  br label %198

197:                                              ; preds = %185
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.11, i32 noundef 421, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

198:                                              ; preds = %196
  br label %199

199:                                              ; preds = %198, %182
  %200 = load i32, ptr %4, align 4, !tbaa !5
  %201 = load i32, ptr %6, align 4, !tbaa !5
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = icmp eq i32 %200, %204
  br i1 %205, label %206, label %207

206:                                              ; preds = %199
  br label %208

207:                                              ; preds = %199
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.11, i32 noundef 422, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

208:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %6, align 4, !tbaa !5
  %211 = add i32 %210, 1
  store i32 %211, ptr %6, align 4, !tbaa !5
  br label %145, !llvm.loop !16

212:                                              ; preds = %145
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %291, %212
  %214 = load i32, ptr %6, align 4, !tbaa !5
  %215 = icmp ult i32 %214, 128
  br i1 %215, label %216, label %294

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %217 = load i32, ptr %6, align 4, !tbaa !5
  %218 = zext i32 %217 to i64
  %219 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = icmp eq i32 %220, 0
  br i1 %221, label %222, label %223

222:                                              ; preds = %216
  store i32 25, ptr %12, align 4
  br label %288

223:                                              ; preds = %216
  %224 = load i32, ptr %7, align 4, !tbaa !5
  %225 = call <2 x i64> @_mm_set1_epi32(i32 noundef %224)
  store <2 x i64> %225, ptr %8, align 16, !tbaa !9
  %226 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %227 = load i32, ptr %5, align 4, !tbaa !5
  %228 = load i32, ptr %6, align 4, !tbaa !5
  %229 = zext i32 %228 to i64
  %230 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = sub i32 %231, 1
  %233 = call i32 @simdsearchd1(ptr noundef %8, ptr noundef %226, i32 noundef %227, i32 noundef %232, ptr noundef %4)
  store i32 %233, ptr %11, align 4, !tbaa !5
  %234 = load i32, ptr %11, align 4, !tbaa !5
  %235 = load i32, ptr %7, align 4, !tbaa !5
  %236 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %237 = load i32, ptr %5, align 4, !tbaa !5
  %238 = load i32, ptr %6, align 4, !tbaa !5
  %239 = zext i32 %238 to i64
  %240 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = sub i32 %241, 1
  %243 = call i32 @simdsearchwithlengthd1(i32 noundef %235, ptr noundef %236, i32 noundef %237, i32 noundef 128, i32 noundef %242, ptr noundef %4)
  %244 = icmp eq i32 %234, %243
  br i1 %244, label %245, label %246

245:                                              ; preds = %223
  br label %247

246:                                              ; preds = %223
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.11, i32 noundef 431, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

247:                                              ; preds = %245
  %248 = load i32, ptr %11, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = load i32, ptr %6, align 4, !tbaa !5
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = sub i32 %255, 1
  %257 = icmp uge i32 %251, %256
  br i1 %257, label %258, label %259

258:                                              ; preds = %247
  br label %260

259:                                              ; preds = %247
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.11, i32 noundef 432, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

260:                                              ; preds = %258
  %261 = load i32, ptr %11, align 4, !tbaa !5
  %262 = icmp sgt i32 %261, 0
  br i1 %262, label %263, label %278

263:                                              ; preds = %260
  %264 = load i32, ptr %11, align 4, !tbaa !5
  %265 = sub nsw i32 %264, 1
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %266
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = load i32, ptr %6, align 4, !tbaa !5
  %270 = zext i32 %269 to i64
  %271 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = sub i32 %272, 1
  %274 = icmp ult i32 %268, %273
  br i1 %274, label %275, label %276

275:                                              ; preds = %263
  br label %277

276:                                              ; preds = %263
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.11, i32 noundef 434, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

277:                                              ; preds = %275
  br label %278

278:                                              ; preds = %277, %260
  %279 = load i32, ptr %4, align 4, !tbaa !5
  %280 = load i32, ptr %11, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = icmp eq i32 %279, %283
  br i1 %284, label %285, label %286

285:                                              ; preds = %278
  br label %287

286:                                              ; preds = %278
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.11, i32 noundef 435, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

287:                                              ; preds = %285
  store i32 0, ptr %12, align 4
  br label %288

288:                                              ; preds = %287, %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %289 = load i32, ptr %12, align 4
  switch i32 %289, label %398 [
    i32 0, label %290
    i32 25, label %291
  ]

290:                                              ; preds = %288
  br label %291

291:                                              ; preds = %290, %288
  %292 = load i32, ptr %6, align 4, !tbaa !5
  %293 = add i32 %292, 1
  store i32 %293, ptr %6, align 4, !tbaa !5
  br label %213, !llvm.loop !17

294:                                              ; preds = %213
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %389, %294
  %296 = load i32, ptr %6, align 4, !tbaa !5
  %297 = icmp ult i32 %296, 128
  br i1 %297, label %298, label %392

298:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %299 = load i32, ptr %6, align 4, !tbaa !5
  %300 = zext i32 %299 to i64
  %301 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %300
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = add i32 %302, 1
  %304 = icmp eq i32 %303, 0
  br i1 %304, label %305, label %306

305:                                              ; preds = %298
  store i32 28, ptr %12, align 4
  br label %386

306:                                              ; preds = %298
  %307 = load i32, ptr %7, align 4, !tbaa !5
  %308 = call <2 x i64> @_mm_set1_epi32(i32 noundef %307)
  store <2 x i64> %308, ptr %8, align 16, !tbaa !9
  %309 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %310 = load i32, ptr %5, align 4, !tbaa !5
  %311 = load i32, ptr %6, align 4, !tbaa !5
  %312 = zext i32 %311 to i64
  %313 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %312
  %314 = load i32, ptr %313, align 4, !tbaa !5
  %315 = add i32 %314, 1
  %316 = call i32 @simdsearchd1(ptr noundef %8, ptr noundef %309, i32 noundef %310, i32 noundef %315, ptr noundef %4)
  store i32 %316, ptr %13, align 4, !tbaa !5
  %317 = load i32, ptr %13, align 4, !tbaa !5
  %318 = load i32, ptr %7, align 4, !tbaa !5
  %319 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 0
  %320 = load i32, ptr %5, align 4, !tbaa !5
  %321 = load i32, ptr %6, align 4, !tbaa !5
  %322 = zext i32 %321 to i64
  %323 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = add i32 %324, 1
  %326 = call i32 @simdsearchwithlengthd1(i32 noundef %318, ptr noundef %319, i32 noundef %320, i32 noundef 128, i32 noundef %325, ptr noundef %4)
  %327 = icmp eq i32 %317, %326
  br i1 %327, label %328, label %329

328:                                              ; preds = %306
  br label %330

329:                                              ; preds = %306
  call void @__assert_fail(ptr noundef @.str.35, ptr noundef @.str.11, i32 noundef 445, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

330:                                              ; preds = %328
  %331 = load i32, ptr %13, align 4, !tbaa !5
  %332 = icmp eq i32 %331, 128
  br i1 %332, label %333, label %344

333:                                              ; preds = %330
  %334 = load i32, ptr %6, align 4, !tbaa !5
  %335 = zext i32 %334 to i64
  %336 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !5
  %338 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 127
  %339 = load i32, ptr %338, align 4, !tbaa !5
  %340 = icmp eq i32 %337, %339
  br i1 %340, label %341, label %342

341:                                              ; preds = %333
  br label %343

342:                                              ; preds = %333
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.11, i32 noundef 447, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

343:                                              ; preds = %341
  br label %385

344:                                              ; preds = %330
  %345 = load i32, ptr %13, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %346
  %348 = load i32, ptr %347, align 4, !tbaa !5
  %349 = load i32, ptr %6, align 4, !tbaa !5
  %350 = zext i32 %349 to i64
  %351 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %350
  %352 = load i32, ptr %351, align 4, !tbaa !5
  %353 = add i32 %352, 1
  %354 = icmp uge i32 %348, %353
  br i1 %354, label %355, label %356

355:                                              ; preds = %344
  br label %357

356:                                              ; preds = %344
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.11, i32 noundef 449, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

357:                                              ; preds = %355
  %358 = load i32, ptr %13, align 4, !tbaa !5
  %359 = icmp sgt i32 %358, 0
  br i1 %359, label %360, label %375

360:                                              ; preds = %357
  %361 = load i32, ptr %13, align 4, !tbaa !5
  %362 = sub nsw i32 %361, 1
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %363
  %365 = load i32, ptr %364, align 4, !tbaa !5
  %366 = load i32, ptr %6, align 4, !tbaa !5
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %367
  %369 = load i32, ptr %368, align 4, !tbaa !5
  %370 = add i32 %369, 1
  %371 = icmp ult i32 %365, %370
  br i1 %371, label %372, label %373

372:                                              ; preds = %360
  br label %374

373:                                              ; preds = %360
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.11, i32 noundef 451, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

374:                                              ; preds = %372
  br label %375

375:                                              ; preds = %374, %357
  %376 = load i32, ptr %4, align 4, !tbaa !5
  %377 = load i32, ptr %13, align 4, !tbaa !5
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %378
  %380 = load i32, ptr %379, align 4, !tbaa !5
  %381 = icmp eq i32 %376, %380
  br i1 %381, label %382, label %383

382:                                              ; preds = %375
  br label %384

383:                                              ; preds = %375
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.11, i32 noundef 452, ptr noundef @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #7
  unreachable

384:                                              ; preds = %382
  br label %385

385:                                              ; preds = %384, %343
  store i32 0, ptr %12, align 4
  br label %386

386:                                              ; preds = %385, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %387 = load i32, ptr %12, align 4
  switch i32 %387, label %398 [
    i32 0, label %388
    i32 28, label %389
  ]

388:                                              ; preds = %386
  br label %389

389:                                              ; preds = %388, %386
  %390 = load i32, ptr %6, align 4, !tbaa !5
  %391 = add i32 %390, 1
  store i32 %391, ptr %6, align 4, !tbaa !5
  br label %295, !llvm.loop !18

392:                                              ; preds = %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %393

393:                                              ; preds = %392
  %394 = load i32, ptr %5, align 4, !tbaa !5
  %395 = add i32 %394, 1
  store i32 %395, ptr %5, align 4, !tbaa !5
  br label %16, !llvm.loop !19

396:                                              ; preds = %16
  %397 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %1) #6
  ret i32 0

398:                                              ; preds = %386, %288
  unreachable
}

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare i32 @simdsearchwithlengthd1(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "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 uwtable "min-legal-vector-width"="128" "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 = { nounwind }
attributes #7 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}


; 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.11 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.test_simdpackedsearch_advanced = external hidden unnamed_addr constant [37 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @uint32_cmp(ptr noundef, ptr noundef) #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_set1_epi32(i32 noundef) local_unnamed_addr #4

declare i32 @simdsearchd1(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @test_simdpackedsearch_advanced() local_unnamed_addr #6 {
  %1 = alloca [128 x i32], align 16
  %2 = alloca [128 x i32], align 16
  %3 = alloca [128 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca <2 x i64>, align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %6 = tail call <2 x i64> @_mm_set1_epi32(i32 noundef 0)
  store <2 x i64> %6, ptr %5, align 16, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %1, i64 508
  br label %vector.ph

vector.ph:                                        ; preds = %181, %0
  %.0111 = phi i32 [ 0, %0 ], [ %182, %181 ]
  %.not97 = icmp eq i32 %.0111, 32
  %notmask = shl nsw i32 -1, %.0111
  %8 = xor i32 %notmask, -1
  %9 = select i1 %.not97, i32 -1, i32 %8
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %9, 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 ]
  %10 = mul <4 x i32> %vec.ind, <i32 1431655765, i32 1431655765, i32 1431655765, i32 1431655765>
  %11 = mul <4 x i32> %vec.ind, <i32 1431655765, i32 1431655765, i32 1431655765, i32 1431655765>
  %12 = add <4 x i32> %10, <i32 -1, i32 -1, i32 -1, i32 -1>
  %13 = add <4 x i32> %11, <i32 1431655763, i32 1431655763, i32 1431655763, i32 1431655763>
  %14 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %index
  %15 = and <4 x i32> %12, %broadcast.splat
  %16 = and <4 x i32> %13, %broadcast.splat
  %17 = getelementptr inbounds i8, ptr %14, i64 16
  store <4 x i32> %15, ptr %14, align 16, !tbaa !5
  store <4 x i32> %16, ptr %17, 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>
  %18 = icmp eq i64 %index.next, 128
  br i1 %18, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  call void @qsort(ptr noundef nonnull %1, i64 noundef 128, i64 noundef 4, ptr noundef nonnull @uint32_cmp) #9
  br label %19

19:                                               ; preds = %19, %middle.block
  %indvars.iv113 = phi i64 [ 0, %middle.block ], [ %indvars.iv.next114.3, %19 ]
  %.087103 = phi i32 [ 0, %middle.block ], [ %31, %19 ]
  %20 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv113
  %21 = load i32, ptr %20, align 16, !tbaa !5
  %22 = add i32 %21, %.087103
  store i32 %22, ptr %20, align 16, !tbaa !5
  %indvars.iv.next114 = or disjoint i64 %indvars.iv113, 1
  %23 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next114
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = add i32 %24, %22
  store i32 %25, ptr %23, align 4, !tbaa !5
  %indvars.iv.next114.1 = or disjoint i64 %indvars.iv113, 2
  %26 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next114.1
  %27 = load i32, ptr %26, align 8, !tbaa !5
  %28 = add i32 %27, %25
  store i32 %28, ptr %26, align 8, !tbaa !5
  %indvars.iv.next114.2 = or disjoint i64 %indvars.iv113, 3
  %29 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next114.2
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add i32 %30, %28
  store i32 %31, ptr %29, align 4, !tbaa !5
  %indvars.iv.next114.3 = add nuw nsw i64 %indvars.iv113, 4
  %exitcond116.not.3 = icmp eq i64 %indvars.iv.next114.3, 128
  br i1 %exitcond116.not.3, label %.preheader100.preheader, label %19, !llvm.loop !14

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

.preheader100:                                    ; preds = %43, %.preheader100.preheader
  %32 = phi i32 [ %.pre, %.preheader100.preheader ], [ %44, %43 ]
  %indvars.iv117 = phi i64 [ 1, %.preheader100.preheader ], [ %indvars.iv.next118.1, %43 ]
  %33 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv117
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = icmp ult i32 %34, %32
  br i1 %35, label %36, label %37

36:                                               ; preds = %.preheader100
  store i32 %32, ptr %33, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %.preheader100, %36
  %38 = phi i32 [ %34, %.preheader100 ], [ %32, %36 ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next118, 128
  br i1 %exitcond120.not, label %45, label %.preheader100.1, !llvm.loop !15

.preheader100.1:                                  ; preds = %37
  %39 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next118
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp ult i32 %40, %38
  br i1 %41, label %42, label %43

42:                                               ; preds = %.preheader100.1
  store i32 %38, ptr %39, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %42, %.preheader100.1
  %44 = phi i32 [ %40, %.preheader100.1 ], [ %38, %42 ]
  %indvars.iv.next118.1 = add nuw nsw i64 %indvars.iv117, 2
  br label %.preheader100

45:                                               ; preds = %37
  %46 = call i32 @simdmaxbitsd1(i32 noundef 0, ptr noundef nonnull %1) #9
  %.not = icmp ugt i32 %46, %.0111
  br i1 %.not, label %47, label %.preheader99.preheader

.preheader99.preheader:                           ; preds = %45
  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 0, ptr noundef nonnull %1, ptr noundef nonnull %3, i32 noundef %.0111) #9
  call void @simdunpackd1(i32 noundef 0, ptr noundef nonnull %3, ptr noundef nonnull %2, i32 noundef %.0111) #9
  br label %67

47:                                               ; preds = %45
  call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.11, i32 noundef 397, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

48:                                               ; preds = %67
  %indvars.iv.next125 = or disjoint i64 %indvars.iv124, 1
  %49 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next125
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next125
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp eq i32 %50, %52
  br i1 %53, label %54, label %73

54:                                               ; preds = %48
  %indvars.iv.next125.1 = or disjoint i64 %indvars.iv124, 2
  %55 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next125.1
  %56 = load i32, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next125.1
  %58 = load i32, ptr %57, align 8, !tbaa !5
  %59 = icmp eq i32 %56, %58
  br i1 %59, label %60, label %73

60:                                               ; preds = %54
  %indvars.iv.next125.2 = or disjoint i64 %indvars.iv124, 3
  %61 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv.next125.2
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next125.2
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp eq i32 %62, %64
  br i1 %65, label %66, label %73

66:                                               ; preds = %60
  %indvars.iv.next125.3 = add nuw nsw i64 %indvars.iv124, 4
  %exitcond127.not.3 = icmp eq i64 %indvars.iv.next125.3, 128
  br i1 %exitcond127.not.3, label %74, label %67, !llvm.loop !16

67:                                               ; preds = %66, %.preheader99.preheader
  %indvars.iv124 = phi i64 [ 0, %.preheader99.preheader ], [ %indvars.iv.next125.3, %66 ]
  %68 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv124
  %69 = load i32, ptr %68, align 16, !tbaa !5
  %70 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv124
  %71 = load i32, ptr %70, align 16, !tbaa !5
  %72 = icmp eq i32 %69, %71
  br i1 %72, label %48, label %73

73:                                               ; preds = %60, %54, %48, %67
  call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.11, i32 noundef 407, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

74:                                               ; preds = %66
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i32 noundef %.0111)
  br label %77

76:                                               ; preds = %102
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next129, 128
  br i1 %exitcond131.not, label %.preheader98, label %77, !llvm.loop !17

77:                                               ; preds = %74, %76
  %indvars.iv128 = phi i64 [ 0, %74 ], [ %indvars.iv.next129, %76 ]
  %78 = call <2 x i64> @_mm_set1_epi32(i32 noundef 0)
  store <2 x i64> %78, ptr %5, align 16, !tbaa !9
  %79 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv128
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call i32 @simdsearchd1(ptr noundef nonnull %5, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef %80, ptr noundef nonnull %4) #9
  %82 = load i32, ptr %79, align 4, !tbaa !5
  %83 = call i32 @simdsearchwithlengthd1(i32 noundef 0, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef 128, i32 noundef %82, ptr noundef nonnull %4) #9
  %84 = icmp eq i32 %81, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %77
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.11, i32 noundef 418, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

86:                                               ; preds = %77
  %87 = sext i32 %81 to i64
  %88 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %79, align 4, !tbaa !5
  %91 = icmp eq i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %86
  call void @__assert_fail(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.11, i32 noundef 419, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

93:                                               ; preds = %86
  %94 = icmp sgt i32 %81, 0
  br i1 %94, label %95, label %102

95:                                               ; preds = %93
  %96 = add nsw i32 %81, -1
  %97 = zext nneg i32 %96 to i64
  %98 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp ult i32 %99, %89
  br i1 %100, label %102, label %101

101:                                              ; preds = %95
  call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.11, i32 noundef 421, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

102:                                              ; preds = %95, %93
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = icmp eq i32 %103, %89
  br i1 %104, label %76, label %105

105:                                              ; preds = %102
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.11, i32 noundef 422, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

.preheader98:                                     ; preds = %76, %139
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %139 ], [ 0, %76 ]
  %106 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv132
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %139, label %109

109:                                              ; preds = %.preheader98
  %110 = call <2 x i64> @_mm_set1_epi32(i32 noundef 0)
  store <2 x i64> %110, ptr %5, align 16, !tbaa !9
  %111 = load i32, ptr %106, align 4, !tbaa !5
  %112 = add i32 %111, -1
  %113 = call i32 @simdsearchd1(ptr noundef nonnull %5, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef %112, ptr noundef nonnull %4) #9
  %114 = load i32, ptr %106, align 4, !tbaa !5
  %115 = add i32 %114, -1
  %116 = call i32 @simdsearchwithlengthd1(i32 noundef 0, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef 128, i32 noundef %115, ptr noundef nonnull %4) #9
  %117 = icmp eq i32 %113, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %109
  call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.11, i32 noundef 431, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

119:                                              ; preds = %109
  %120 = sext i32 %113 to i64
  %121 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %106, align 4, !tbaa !5
  %124 = add i32 %123, -1
  %.not96 = icmp ult i32 %122, %124
  br i1 %.not96, label %125, label %126

125:                                              ; preds = %119
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.11, i32 noundef 432, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

126:                                              ; preds = %119
  %127 = icmp sgt i32 %113, 0
  br i1 %127, label %128, label %135

128:                                              ; preds = %126
  %129 = add nsw i32 %113, -1
  %130 = zext nneg i32 %129 to i64
  %131 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = icmp ult i32 %132, %124
  br i1 %133, label %135, label %134

134:                                              ; preds = %128
  call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.11, i32 noundef 434, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

135:                                              ; preds = %128, %126
  %136 = load i32, ptr %4, align 4, !tbaa !5
  %137 = icmp eq i32 %136, %122
  br i1 %137, label %139, label %138

138:                                              ; preds = %135
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.11, i32 noundef 435, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

139:                                              ; preds = %135, %.preheader98
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next133, 128
  br i1 %exitcond135.not, label %.preheader, label %.preheader98, !llvm.loop !18

.preheader:                                       ; preds = %139, %180
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %180 ], [ 0, %139 ]
  %140 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %indvars.iv136
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = icmp eq i32 %141, -1
  br i1 %142, label %180, label %143

143:                                              ; preds = %.preheader
  %144 = call <2 x i64> @_mm_set1_epi32(i32 noundef 0)
  store <2 x i64> %144, ptr %5, align 16, !tbaa !9
  %145 = load i32, ptr %140, align 4, !tbaa !5
  %146 = add i32 %145, 1
  %147 = call i32 @simdsearchd1(ptr noundef nonnull %5, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef %146, ptr noundef nonnull %4) #9
  %148 = load i32, ptr %140, align 4, !tbaa !5
  %149 = add i32 %148, 1
  %150 = call i32 @simdsearchwithlengthd1(i32 noundef 0, ptr noundef nonnull %3, i32 noundef %.0111, i32 noundef 128, i32 noundef %149, ptr noundef nonnull %4) #9
  %151 = icmp eq i32 %147, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %143
  call void @__assert_fail(ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.11, i32 noundef 445, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

153:                                              ; preds = %143
  %154 = icmp eq i32 %147, 128
  br i1 %154, label %155, label %160

155:                                              ; preds = %153
  %156 = load i32, ptr %140, align 4, !tbaa !5
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = icmp eq i32 %156, %157
  br i1 %158, label %180, label %159

159:                                              ; preds = %155
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.11, i32 noundef 447, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

160:                                              ; preds = %153
  %161 = sext i32 %147 to i64
  %162 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr %140, align 4, !tbaa !5
  %165 = add i32 %164, 1
  %.not95 = icmp ult i32 %163, %165
  br i1 %.not95, label %166, label %167

166:                                              ; preds = %160
  call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.11, i32 noundef 449, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

167:                                              ; preds = %160
  %168 = icmp sgt i32 %147, 0
  br i1 %168, label %169, label %176

169:                                              ; preds = %167
  %170 = add nsw i32 %147, -1
  %171 = zext nneg i32 %170 to i64
  %172 = getelementptr inbounds [128 x i32], ptr %1, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = icmp ult i32 %173, %165
  br i1 %174, label %176, label %175

175:                                              ; preds = %169
  call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.11, i32 noundef 451, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

176:                                              ; preds = %169, %167
  %177 = load i32, ptr %4, align 4, !tbaa !5
  %178 = icmp eq i32 %177, %163
  br i1 %178, label %180, label %179

179:                                              ; preds = %176
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.11, i32 noundef 452, ptr noundef nonnull @__PRETTY_FUNCTION__.test_simdpackedsearch_advanced) #10
  unreachable

180:                                              ; preds = %155, %176, %.preheader
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next137, 128
  br i1 %exitcond139.not, label %181, label %.preheader, !llvm.loop !19

181:                                              ; preds = %180
  %182 = add nuw nsw i32 %.0111, 1
  %exitcond140.not = icmp eq i32 %182, 33
  br i1 %exitcond140.not, label %183, label %vector.ph, !llvm.loop !20

183:                                              ; preds = %181
  %184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %1) #9
  ret i32 0
}

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #7

declare i32 @simdsearchwithlengthd1(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 #4 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "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 = { 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 #6 = { nounwind uwtable "min-legal-vector-width"="128" "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 #7 = { nofree "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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}


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