; LLVM IR from fast-pack/simdcomp :: tests (unit_chars)

; 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 [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [4 x i8], align 1
  %12 = alloca [4 x i8], align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [4 x i8], align 1
  %17 = alloca [4 x i8], align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 640000, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %18 = call noalias ptr @malloc(i64 noundef 512) #7
  store ptr %18, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = mul i64 %20, 4
  %22 = call noalias ptr @malloc(i64 noundef %21) #7
  store ptr %22, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %23 = call noalias ptr @malloc(i64 noundef 512) #7
  store ptr %23, ptr %6, align 8, !tbaa !9
  %24 = call i64 @time(ptr noundef null) #6
  %25 = trunc i64 %24 to i32
  call void @srand(i32 noundef %25) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %240, %0
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = icmp sle i32 %27, 387420489
  br i1 %28, label %29, label %243

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %30)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %58, %29
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %61

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %37 = call i32 @rand() #6
  %38 = srem i32 %37, 256
  %39 = trunc i32 %38 to i8
  %40 = getelementptr inbounds [4 x i8], ptr %8, i64 0, i64 0
  store i8 %39, ptr %40, align 1, !tbaa !11
  %41 = call i32 @rand() #6
  %42 = srem i32 %41, 256
  %43 = trunc i32 %42 to i8
  %44 = getelementptr inbounds [4 x i8], ptr %8, i64 0, i64 1
  store i8 %43, ptr %44, align 1, !tbaa !11
  %45 = call i32 @rand() #6
  %46 = srem i32 %45, 256
  %47 = trunc i32 %46 to i8
  %48 = getelementptr inbounds [4 x i8], ptr %8, i64 0, i64 2
  store i8 %47, ptr %48, align 1, !tbaa !11
  %49 = call i32 @rand() #6
  %50 = srem i32 %49, 256
  %51 = trunc i32 %50 to i8
  %52 = getelementptr inbounds [4 x i8], ptr %8, i64 0, i64 3
  store i8 %51, ptr %52, align 1, !tbaa !11
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %53, i64 %55
  %57 = getelementptr inbounds [4 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %56, ptr align 1 %57, i64 4, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %58

58:                                               ; preds = %36
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !5
  br label %32, !llvm.loop !12

61:                                               ; preds = %32
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %233, %61
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = mul nsw i32 %63, 128
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %236

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = mul nsw i32 %69, 128
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %68, i64 %71
  %73 = call i32 @maxbits(ptr noundef %72)
  store i32 %73, ptr %10, align 4, !tbaa !5
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = mul nsw i32 %75, 128
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %74, i64 %77
  %79 = load ptr, ptr %4, align 8, !tbaa !9
  %80 = load i32, ptr %10, align 4, !tbaa !5
  call void @simdpackwithoutmask(ptr noundef %78, ptr noundef %79, i32 noundef %80)
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !5
  call void @simdunpack(ptr noundef %81, ptr noundef %82, i32 noundef %83)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %138, %67
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 128
  br i1 %86, label %87, label %141

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %88 = getelementptr inbounds [4 x i8], ptr %11, i64 0, i64 0
  %89 = load ptr, ptr %6, align 8, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %89, i64 %91
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %88, ptr align 4 %92, i64 4, i1 false)
  %93 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 0
  %94 = load ptr, ptr %5, align 8, !tbaa !9
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = mul nsw i32 %95, 128
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = add nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %94, i64 %99
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %93, ptr align 4 %100, i64 4, i1 false)
  %101 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 0
  %102 = load i8, ptr %101, align 1, !tbaa !11
  %103 = zext i8 %102 to i32
  %104 = getelementptr inbounds [4 x i8], ptr %11, i64 0, i64 0
  %105 = load i8, ptr %104, align 1, !tbaa !11
  %106 = zext i8 %105 to i32
  %107 = icmp ne i32 %103, %106
  br i1 %107, label %132, label %108

108:                                              ; preds = %87
  %109 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 1
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = zext i8 %110 to i32
  %112 = getelementptr inbounds [4 x i8], ptr %11, i64 0, i64 1
  %113 = load i8, ptr %112, align 1, !tbaa !11
  %114 = zext i8 %113 to i32
  %115 = icmp ne i32 %111, %114
  br i1 %115, label %132, label %116

116:                                              ; preds = %108
  %117 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 2
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = zext i8 %118 to i32
  %120 = getelementptr inbounds [4 x i8], ptr %11, i64 0, i64 2
  %121 = load i8, ptr %120, align 1, !tbaa !11
  %122 = zext i8 %121 to i32
  %123 = icmp ne i32 %119, %122
  br i1 %123, label %132, label %124

124:                                              ; preds = %116
  %125 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 3
  %126 = load i8, ptr %125, align 1, !tbaa !11
  %127 = zext i8 %126 to i32
  %128 = getelementptr inbounds [4 x i8], ptr %11, i64 0, i64 3
  %129 = load i8, ptr %128, align 1, !tbaa !11
  %130 = zext i8 %129 to i32
  %131 = icmp ne i32 %127, %130
  br i1 %131, label %132, label %134

132:                                              ; preds = %124, %116, %108, %87
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 -2, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %135

134:                                              ; preds = %124
  store i32 0, ptr %13, align 4
  br label %135

135:                                              ; preds = %134, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %136 = load i32, ptr %13, align 4
  switch i32 %136, label %230 [
    i32 0, label %137
  ]

137:                                              ; preds = %135
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %9, align 4, !tbaa !5
  br label %84, !llvm.loop !14

141:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %142 = load i32, ptr %14, align 4, !tbaa !5
  %143 = load ptr, ptr %5, align 8, !tbaa !9
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = mul nsw i32 %144, 128
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %143, i64 %146
  %148 = call i32 @simdmaxbitsd1(i32 noundef %142, ptr noundef %147)
  store i32 %148, ptr %15, align 4, !tbaa !5
  %149 = load i32, ptr %14, align 4, !tbaa !5
  %150 = load ptr, ptr %5, align 8, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !5
  %152 = mul nsw i32 %151, 128
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %150, i64 %153
  %155 = load ptr, ptr %4, align 8, !tbaa !9
  %156 = load i32, ptr %15, align 4, !tbaa !5
  call void @simdpackwithoutmaskd1(i32 noundef %149, ptr noundef %154, ptr noundef %155, i32 noundef %156)
  %157 = load i32, ptr %14, align 4, !tbaa !5
  %158 = load ptr, ptr %4, align 8, !tbaa !9
  %159 = load ptr, ptr %6, align 8, !tbaa !9
  %160 = load i32, ptr %15, align 4, !tbaa !5
  call void @simdunpackd1(i32 noundef %157, ptr noundef %158, ptr noundef %159, i32 noundef %160)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %215, %141
  %162 = load i32, ptr %9, align 4, !tbaa !5
  %163 = icmp slt i32 %162, 128
  br i1 %163, label %164, label %218

164:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %165 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 0
  %166 = load ptr, ptr %6, align 8, !tbaa !9
  %167 = load i32, ptr %9, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %165, ptr align 4 %169, i64 4, i1 false)
  %170 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %171 = load ptr, ptr %5, align 8, !tbaa !9
  %172 = load i32, ptr %7, align 4, !tbaa !5
  %173 = mul nsw i32 %172, 128
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = add nsw i32 %173, %174
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds i32, ptr %171, i64 %176
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %170, ptr align 4 %177, i64 4, i1 false)
  %178 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 0
  %179 = load i8, ptr %178, align 1, !tbaa !11
  %180 = zext i8 %179 to i32
  %181 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 0
  %182 = load i8, ptr %181, align 1, !tbaa !11
  %183 = zext i8 %182 to i32
  %184 = icmp ne i32 %180, %183
  br i1 %184, label %209, label %185

185:                                              ; preds = %164
  %186 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 1
  %187 = load i8, ptr %186, align 1, !tbaa !11
  %188 = zext i8 %187 to i32
  %189 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 1
  %190 = load i8, ptr %189, align 1, !tbaa !11
  %191 = zext i8 %190 to i32
  %192 = icmp ne i32 %188, %191
  br i1 %192, label %209, label %193

193:                                              ; preds = %185
  %194 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 2
  %195 = load i8, ptr %194, align 1, !tbaa !11
  %196 = zext i8 %195 to i32
  %197 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 2
  %198 = load i8, ptr %197, align 1, !tbaa !11
  %199 = zext i8 %198 to i32
  %200 = icmp ne i32 %196, %199
  br i1 %200, label %209, label %201

201:                                              ; preds = %193
  %202 = getelementptr inbounds [4 x i8], ptr %17, i64 0, i64 3
  %203 = load i8, ptr %202, align 1, !tbaa !11
  %204 = zext i8 %203 to i32
  %205 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 3
  %206 = load i8, ptr %205, align 1, !tbaa !11
  %207 = zext i8 %206 to i32
  %208 = icmp ne i32 %204, %207
  br i1 %208, label %209, label %211

209:                                              ; preds = %201, %193, %185, %164
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %212

211:                                              ; preds = %201
  store i32 0, ptr %13, align 4
  br label %212

212:                                              ; preds = %211, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %213 = load i32, ptr %13, align 4
  switch i32 %213, label %227 [
    i32 0, label %214
  ]

214:                                              ; preds = %212
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %9, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %9, align 4, !tbaa !5
  br label %161, !llvm.loop !15

218:                                              ; preds = %161
  %219 = load ptr, ptr %5, align 8, !tbaa !9
  %220 = load i32, ptr %7, align 4, !tbaa !5
  %221 = mul nsw i32 %220, 128
  %222 = add nsw i32 %221, 128
  %223 = sub nsw i32 %222, 1
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds i32, ptr %219, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  store i32 %226, ptr %14, align 4, !tbaa !5
  store i32 0, ptr %13, align 4
  br label %227

227:                                              ; preds = %218, %212
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %228 = load i32, ptr %13, align 4
  switch i32 %228, label %230 [
    i32 0, label %229
  ]

229:                                              ; preds = %227
  store i32 0, ptr %13, align 4
  br label %230

230:                                              ; preds = %229, %227, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %231 = load i32, ptr %13, align 4
  switch i32 %231, label %237 [
    i32 0, label %232
  ]

232:                                              ; preds = %230
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %7, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %7, align 4, !tbaa !5
  br label %62, !llvm.loop !16

236:                                              ; preds = %62
  store i32 0, ptr %13, align 4
  br label %237

237:                                              ; preds = %236, %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %238 = load i32, ptr %13, align 4
  switch i32 %238, label %248 [
    i32 0, label %239
  ]

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %3, align 4, !tbaa !5
  %242 = mul nsw i32 %241, 3
  store i32 %242, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !17

243:                                              ; preds = %26
  %244 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %244) #6
  %245 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %245) #6
  %246 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %246) #6
  %247 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %248

248:                                              ; preds = %243, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %249 = load i32, ptr %1, align 4
  ret i32 %249
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

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

; Function Attrs: nounwind
declare i32 @rand() #3

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

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

declare i32 @maxbits(ptr noundef) #4

declare void @simdpackwithoutmask(ptr noundef, ptr noundef, i32 noundef) #4

declare void @simdunpack(ptr noundef, ptr noundef, i32 noundef) #4

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

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 = { nounwind allocsize(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 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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 [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noalias dereferenceable_or_null(512) ptr @malloc(i64 noundef 512) #6
  %2 = tail call noalias dereferenceable_or_null(2560000) ptr @malloc(i64 noundef 2560000) #6
  %3 = tail call noalias dereferenceable_or_null(512) ptr @malloc(i64 noundef 512) #6
  %4 = tail call i64 @time(ptr noundef null) #7
  %5 = trunc i64 %4 to i32
  tail call void @srand(i32 noundef %5) #7
  br label %6

6:                                                ; preds = %0, %.thread109
  %.077116 = phi i32 [ 1, %0 ], [ %35, %.thread109 ]
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.077116)
  br label %8

8:                                                ; preds = %6, %8
  %indvars.iv = phi i64 [ 0, %6 ], [ %indvars.iv.next, %8 ]
  %9 = tail call i32 @rand() #7
  %10 = trunc i32 %9 to i8
  %11 = tail call i32 @rand() #7
  %12 = trunc i32 %11 to i8
  %13 = tail call i32 @rand() #7
  %14 = trunc i32 %13 to i8
  %15 = tail call i32 @rand() #7
  %16 = trunc i32 %15 to i8
  %17 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  store i8 %10, ptr %17, align 4
  %.sroa.437.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 1
  store i8 %12, ptr %.sroa.437.0..sroa_idx, align 1
  %.sroa.538.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 2
  store i8 %14, ptr %.sroa.538.0..sroa_idx, align 2
  %.sroa.639.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 3
  store i8 %16, ptr %.sroa.639.0..sroa_idx, align 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 640000
  br i1 %exitcond.not, label %.preheader, label %8, !llvm.loop !5

.preheader:                                       ; preds = %8, %34
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %34 ], [ 0, %8 ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %34 ], [ 0, %8 ]
  %18 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv126
  %19 = tail call i32 @maxbits(ptr noundef %18) #7
  tail call void @simdpackwithoutmask(ptr noundef %18, ptr noundef %1, i32 noundef %19) #7
  tail call void @simdunpack(ptr noundef %1, ptr noundef %3, i32 noundef %19) #7
  br label %21

20:                                               ; preds = %25
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next119, 128
  br i1 %exitcond121.not, label %26, label %21, !llvm.loop !7

21:                                               ; preds = %.preheader, %20
  %indvars.iv118 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next119, %20 ]
  %22 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv118
  %.sroa.022.0.copyload = load i8, ptr %22, align 4
  %23 = or disjoint i64 %indvars.iv118, %indvars.iv126
  %24 = getelementptr inbounds i32, ptr %2, i64 %23
  %.sroa.018.0.copyload = load i8, ptr %24, align 4
  %.not91 = icmp eq i8 %.sroa.018.0.copyload, %.sroa.022.0.copyload
  br i1 %.not91, label %25, label %.loopexit

25:                                               ; preds = %21
  %.sroa.621.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 3
  %.sroa.621.0.copyload = load i8, ptr %.sroa.621.0..sroa_idx, align 1
  %.sroa.520.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 2
  %.sroa.520.0.copyload = load i8, ptr %.sroa.520.0..sroa_idx, align 2
  %.sroa.625.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 3
  %.sroa.625.0.copyload = load i8, ptr %.sroa.625.0..sroa_idx, align 1
  %.sroa.524.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 2
  %.sroa.524.0.copyload = load i8, ptr %.sroa.524.0..sroa_idx, align 2
  %.sroa.419.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 1
  %.sroa.419.0.copyload = load i8, ptr %.sroa.419.0..sroa_idx, align 1
  %.sroa.423.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 1
  %.sroa.423.0.copyload = load i8, ptr %.sroa.423.0..sroa_idx, align 1
  %.not92 = icmp eq i8 %.sroa.419.0.copyload, %.sroa.423.0.copyload
  %.not93 = icmp eq i8 %.sroa.520.0.copyload, %.sroa.524.0.copyload
  %or.cond = select i1 %.not92, i1 %.not93, i1 false
  %.not94 = icmp eq i8 %.sroa.621.0.copyload, %.sroa.625.0.copyload
  %or.cond95 = select i1 %or.cond, i1 %.not94, i1 false
  br i1 %or.cond95, label %20, label %.loopexit

26:                                               ; preds = %20
  %27 = tail call i32 @simdmaxbitsd1(i32 noundef 0, ptr noundef nonnull %18) #7
  tail call void @simdpackwithoutmaskd1(i32 noundef 0, ptr noundef nonnull %18, ptr noundef %1, i32 noundef %27) #7
  tail call void @simdunpackd1(i32 noundef 0, ptr noundef %1, ptr noundef nonnull %3, i32 noundef %27) #7
  br label %29

28:                                               ; preds = %33
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next123, 128
  br i1 %exitcond125.not, label %34, label %29, !llvm.loop !8

29:                                               ; preds = %26, %28
  %indvars.iv122 = phi i64 [ 0, %26 ], [ %indvars.iv.next123, %28 ]
  %30 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv122
  %.sroa.05.0.copyload = load i8, ptr %30, align 4
  %31 = or disjoint i64 %indvars.iv122, %indvars.iv126
  %32 = getelementptr inbounds i32, ptr %2, i64 %31
  %.sroa.0.0.copyload = load i8, ptr %32, align 4
  %.not = icmp eq i8 %.sroa.0.0.copyload, %.sroa.05.0.copyload
  br i1 %.not, label %33, label %.loopexit

33:                                               ; preds = %29
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 3
  %.sroa.6.0.copyload = load i8, ptr %.sroa.6.0..sroa_idx, align 1
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 2
  %.sroa.5.0.copyload = load i8, ptr %.sroa.5.0..sroa_idx, align 2
  %.sroa.68.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 3
  %.sroa.68.0.copyload = load i8, ptr %.sroa.68.0..sroa_idx, align 1
  %.sroa.57.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 2
  %.sroa.57.0.copyload = load i8, ptr %.sroa.57.0..sroa_idx, align 2
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 1
  %.sroa.4.0.copyload = load i8, ptr %.sroa.4.0..sroa_idx, align 1
  %.sroa.46.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 1
  %.sroa.46.0.copyload = load i8, ptr %.sroa.46.0..sroa_idx, align 1
  %.not88 = icmp eq i8 %.sroa.4.0.copyload, %.sroa.46.0.copyload
  %.not89 = icmp eq i8 %.sroa.5.0.copyload, %.sroa.57.0.copyload
  %or.cond96 = select i1 %.not88, i1 %.not89, i1 false
  %.not90 = icmp eq i8 %.sroa.6.0.copyload, %.sroa.68.0.copyload
  %or.cond97 = select i1 %or.cond96, i1 %.not90, i1 false
  br i1 %or.cond97, label %28, label %.loopexit

34:                                               ; preds = %28
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 128
  %exitcond133 = icmp eq i64 %indvars.iv.next129, 5000
  br i1 %exitcond133, label %.thread109, label %.preheader, !llvm.loop !9

.thread109:                                       ; preds = %34
  %35 = mul nuw nsw i32 %.077116, 3
  %36 = icmp ult i32 %.077116, 129140164
  br i1 %36, label %6, label %37, !llvm.loop !10

37:                                               ; preds = %.thread109
  tail call void @free(ptr noundef %1) #7
  tail call void @free(ptr noundef nonnull %2) #7
  tail call void @free(ptr noundef nonnull %3) #7
  br label %.loopexit

.loopexit:                                        ; preds = %25, %21, %33, %29, %37
  %.str.1.sink = phi ptr [ @.str.2, %37 ], [ @.str.1, %29 ], [ @.str.1, %33 ], [ @.str.1, %21 ], [ @.str.1, %25 ]
  %.9 = phi i32 [ 0, %37 ], [ -3, %29 ], [ -3, %33 ], [ -2, %21 ], [ -2, %25 ]
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
  ret i32 %.9
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

declare i32 @maxbits(ptr noundef) local_unnamed_addr #4

declare void @simdpackwithoutmask(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @simdunpack(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 "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 = { 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 #4 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 allocsize(0) }
attributes #7 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass