; LLVM IR from gzc/CLRS :: C32-String-Matching (BM)

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @max(i32 noundef, i32 noundef) #0

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

18:                                               ; preds = %26, %4
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 256
  br i1 %20, label %21, label %29

21:                                               ; preds = %18
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [256 x i32], ptr %9, i64 0, i64 %24
  store i32 %22, ptr %25, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %21
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %10, align 4, !tbaa !9
  br label %18, !llvm.loop !11

29:                                               ; preds = %18
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %47, %29
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = sub nsw i32 %32, 1
  %34 = icmp slt i32 %31, %33
  br i1 %34, label %35, label %50

35:                                               ; preds = %30
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = sub nsw i32 %36, %37
  %39 = sub nsw i32 %38, 1
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %40, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !13
  %45 = sext i8 %44 to i64
  %46 = getelementptr inbounds [256 x i32], ptr %9, i64 0, i64 %45
  store i32 %39, ptr %46, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %35
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %10, align 4, !tbaa !9
  br label %30, !llvm.loop !14

50:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = mul i64 %52, 4
  %54 = call noalias ptr @malloc(i64 noundef %53) #5
  store ptr %54, ptr %11, align 8, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %56, i64 %59
  store i32 %55, ptr %60, align 4, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = sub nsw i32 %61, 2
  store i32 %62, ptr %10, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %103, %50
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = icmp sge i32 %64, 0
  br i1 %65, label %66, label %106

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %67 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %92, %66
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = icmp sge i32 %69, 0
  br i1 %70, label %71, label %90

71:                                               ; preds = %68
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %72, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !13
  %77 = sext i8 %76 to i32
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sub nsw i32 %79, 1
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = sub nsw i32 %80, %81
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %78, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %77, %88
  br label %90

90:                                               ; preds = %71, %68
  %91 = phi i1 [ false, %68 ], [ %89, %71 ]
  br i1 %91, label %92, label %95

92:                                               ; preds = %90
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = add nsw i32 %93, -1
  store i32 %94, ptr %12, align 4, !tbaa !9
  br label %68, !llvm.loop !15

95:                                               ; preds = %90
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sub nsw i32 %96, %97
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  store i32 %98, ptr %102, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %103

103:                                              ; preds = %95
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = add nsw i32 %104, -1
  store i32 %105, ptr %10, align 4, !tbaa !9
  br label %63, !llvm.loop !16

106:                                              ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = mul i64 %108, 4
  %110 = call noalias ptr @malloc(i64 noundef %109) #5
  store ptr %110, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %121, %106
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %124

115:                                              ; preds = %111
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  store i32 %116, ptr %120, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %115
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !9
  br label %111, !llvm.loop !17

124:                                              ; preds = %111
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = sub nsw i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %170, %124
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = icmp sge i32 %128, 0
  br i1 %129, label %130, label %173

130:                                              ; preds = %127
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = load i32, ptr %10, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  %138 = icmp eq i32 %135, %137
  br i1 %138, label %139, label %169

139:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %165, %139
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = load i32, ptr %8, align 4, !tbaa !9
  %143 = sub nsw i32 %142, 1
  %144 = load i32, ptr %10, align 4, !tbaa !9
  %145 = sub nsw i32 %143, %144
  %146 = icmp slt i32 %141, %145
  br i1 %146, label %147, label %168

147:                                              ; preds = %140
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load i32, ptr %14, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i32, ptr %148, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = load i32, ptr %8, align 4, !tbaa !9
  %154 = icmp eq i32 %152, %153
  br i1 %154, label %155, label %164

155:                                              ; preds = %147
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = sub nsw i32 %156, 1
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = sub nsw i32 %157, %158
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = load i32, ptr %14, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  store i32 %159, ptr %163, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %155, %147
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %14, align 4, !tbaa !9
  br label %140, !llvm.loop !18

168:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %169

169:                                              ; preds = %168, %130
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %10, align 4, !tbaa !9
  %172 = add nsw i32 %171, -1
  store i32 %172, ptr %10, align 4, !tbaa !9
  br label %127, !llvm.loop !19

173:                                              ; preds = %127
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %195, %173
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = load i32, ptr %8, align 4, !tbaa !9
  %177 = sub nsw i32 %176, 2
  %178 = icmp sle i32 %175, %177
  br i1 %178, label %179, label %198

179:                                              ; preds = %174
  %180 = load i32, ptr %8, align 4, !tbaa !9
  %181 = sub nsw i32 %180, 1
  %182 = load i32, ptr %10, align 4, !tbaa !9
  %183 = sub nsw i32 %181, %182
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = load i32, ptr %8, align 4, !tbaa !9
  %186 = sub nsw i32 %185, 1
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = load i32, ptr %10, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i32, ptr %187, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !9
  %192 = sub nsw i32 %186, %191
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %184, i64 %193
  store i32 %183, ptr %194, align 4, !tbaa !9
  br label %195

195:                                              ; preds = %179
  %196 = load i32, ptr %10, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %10, align 4, !tbaa !9
  br label %174, !llvm.loop !20

198:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %263, %198
  %200 = load i32, ptr %15, align 4, !tbaa !9
  %201 = load i32, ptr %6, align 4, !tbaa !9
  %202 = load i32, ptr %8, align 4, !tbaa !9
  %203 = sub nsw i32 %201, %202
  %204 = icmp sle i32 %200, %203
  br i1 %204, label %205, label %264

205:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %206 = load i32, ptr %8, align 4, !tbaa !9
  %207 = sub nsw i32 %206, 1
  store i32 %207, ptr %16, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %229, %205
  %209 = load i32, ptr %16, align 4, !tbaa !9
  %210 = icmp sge i32 %209, 0
  br i1 %210, label %211, label %227

211:                                              ; preds = %208
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = load i32, ptr %16, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i8, ptr %212, i64 %214
  %216 = load i8, ptr %215, align 1, !tbaa !13
  %217 = sext i8 %216 to i32
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = load i32, ptr %16, align 4, !tbaa !9
  %220 = load i32, ptr %15, align 4, !tbaa !9
  %221 = add nsw i32 %219, %220
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %218, i64 %222
  %224 = load i8, ptr %223, align 1, !tbaa !13
  %225 = sext i8 %224 to i32
  %226 = icmp eq i32 %217, %225
  br label %227

227:                                              ; preds = %211, %208
  %228 = phi i1 [ false, %208 ], [ %226, %211 ]
  br i1 %228, label %229, label %232

229:                                              ; preds = %227
  %230 = load i32, ptr %16, align 4, !tbaa !9
  %231 = add nsw i32 %230, -1
  store i32 %231, ptr %16, align 4, !tbaa !9
  br label %208, !llvm.loop !21

232:                                              ; preds = %227
  %233 = load i32, ptr %16, align 4, !tbaa !9
  %234 = icmp slt i32 %233, 0
  br i1 %234, label %235, label %236

235:                                              ; preds = %232
  store i32 26, ptr %17, align 4
  br label %261

236:                                              ; preds = %232
  %237 = load ptr, ptr %13, align 8, !tbaa !5
  %238 = load i32, ptr %16, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i32, ptr %237, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !9
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = load i32, ptr %16, align 4, !tbaa !9
  %244 = load i32, ptr %15, align 4, !tbaa !9
  %245 = add nsw i32 %243, %244
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds i8, ptr %242, i64 %246
  %248 = load i8, ptr %247, align 1, !tbaa !13
  %249 = sext i8 %248 to i64
  %250 = getelementptr inbounds [256 x i32], ptr %9, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !9
  %252 = load i32, ptr %8, align 4, !tbaa !9
  %253 = sub nsw i32 %252, 1
  %254 = load i32, ptr %16, align 4, !tbaa !9
  %255 = sub nsw i32 %253, %254
  %256 = sub nsw i32 %251, %255
  %257 = call i32 @max(i32 noundef %241, i32 noundef %256)
  %258 = load i32, ptr %15, align 4, !tbaa !9
  %259 = add nsw i32 %258, %257
  store i32 %259, ptr %15, align 4, !tbaa !9
  br label %260

260:                                              ; preds = %236
  store i32 0, ptr %17, align 4
  br label %261

261:                                              ; preds = %260, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %262 = load i32, ptr %17, align 4
  switch i32 %262, label %276 [
    i32 0, label %263
    i32 26, label %264
  ]

263:                                              ; preds = %261
  br label %199, !llvm.loop !22

264:                                              ; preds = %261, %199
  %265 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %265) #4
  %266 = load i32, ptr %15, align 4, !tbaa !9
  %267 = load i32, ptr %6, align 4, !tbaa !9
  %268 = load i32, ptr %8, align 4, !tbaa !9
  %269 = sub nsw i32 %267, %268
  %270 = icmp sgt i32 %266, %269
  br i1 %270, label %271, label %272

271:                                              ; preds = %264
  br label %274

272:                                              ; preds = %264
  %273 = load i32, ptr %15, align 4, !tbaa !9
  br label %274

274:                                              ; preds = %272, %271
  %275 = phi i32 [ -1, %271 ], [ %273, %272 ]
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %9) #4
  ret i32 %275

276:                                              ; preds = %261
  unreachable
}

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 = { nounwind }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}


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

; Function Attrs: nounwind uwtable
declare dso_local i32 @max(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @BM_match(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #0 {
vector.ph:
  %4 = alloca [256 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #4
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %3, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  store <4 x i32> %broadcast.splat, ptr %4, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %5, align 16, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %4, i64 32
  %7 = getelementptr inbounds i8, ptr %4, i64 48
  store <4 x i32> %broadcast.splat, ptr %6, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %7, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %4, i64 64
  %9 = getelementptr inbounds i8, ptr %4, i64 80
  store <4 x i32> %broadcast.splat, ptr %8, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %9, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %4, i64 96
  %11 = getelementptr inbounds i8, ptr %4, i64 112
  store <4 x i32> %broadcast.splat, ptr %10, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %11, align 16, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %4, i64 128
  %13 = getelementptr inbounds i8, ptr %4, i64 144
  store <4 x i32> %broadcast.splat, ptr %12, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %4, i64 160
  %15 = getelementptr inbounds i8, ptr %4, i64 176
  store <4 x i32> %broadcast.splat, ptr %14, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %15, align 16, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %4, i64 192
  %17 = getelementptr inbounds i8, ptr %4, i64 208
  store <4 x i32> %broadcast.splat, ptr %16, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %17, align 16, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %4, i64 224
  %19 = getelementptr inbounds i8, ptr %4, i64 240
  store <4 x i32> %broadcast.splat, ptr %18, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %19, align 16, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %4, i64 256
  %21 = getelementptr inbounds i8, ptr %4, i64 272
  store <4 x i32> %broadcast.splat, ptr %20, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %21, align 16, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %4, i64 288
  %23 = getelementptr inbounds i8, ptr %4, i64 304
  store <4 x i32> %broadcast.splat, ptr %22, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %23, align 16, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %4, i64 320
  %25 = getelementptr inbounds i8, ptr %4, i64 336
  store <4 x i32> %broadcast.splat, ptr %24, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %25, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %4, i64 352
  %27 = getelementptr inbounds i8, ptr %4, i64 368
  store <4 x i32> %broadcast.splat, ptr %26, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %27, align 16, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %4, i64 384
  %29 = getelementptr inbounds i8, ptr %4, i64 400
  store <4 x i32> %broadcast.splat, ptr %28, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %29, align 16, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %4, i64 416
  %31 = getelementptr inbounds i8, ptr %4, i64 432
  store <4 x i32> %broadcast.splat, ptr %30, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %31, align 16, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %4, i64 448
  %33 = getelementptr inbounds i8, ptr %4, i64 464
  store <4 x i32> %broadcast.splat, ptr %32, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %33, align 16, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %4, i64 480
  %35 = getelementptr inbounds i8, ptr %4, i64 496
  store <4 x i32> %broadcast.splat, ptr %34, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %35, align 16, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %4, i64 512
  %37 = getelementptr inbounds i8, ptr %4, i64 528
  store <4 x i32> %broadcast.splat, ptr %36, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %37, align 16, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %4, i64 544
  %39 = getelementptr inbounds i8, ptr %4, i64 560
  store <4 x i32> %broadcast.splat, ptr %38, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %39, align 16, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %4, i64 576
  %41 = getelementptr inbounds i8, ptr %4, i64 592
  store <4 x i32> %broadcast.splat, ptr %40, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %41, align 16, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %4, i64 608
  %43 = getelementptr inbounds i8, ptr %4, i64 624
  store <4 x i32> %broadcast.splat, ptr %42, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %43, align 16, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %4, i64 640
  %45 = getelementptr inbounds i8, ptr %4, i64 656
  store <4 x i32> %broadcast.splat, ptr %44, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %45, align 16, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %4, i64 672
  %47 = getelementptr inbounds i8, ptr %4, i64 688
  store <4 x i32> %broadcast.splat, ptr %46, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %47, align 16, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %4, i64 704
  %49 = getelementptr inbounds i8, ptr %4, i64 720
  store <4 x i32> %broadcast.splat, ptr %48, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %49, align 16, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %4, i64 736
  %51 = getelementptr inbounds i8, ptr %4, i64 752
  store <4 x i32> %broadcast.splat, ptr %50, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %51, align 16, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %4, i64 768
  %53 = getelementptr inbounds i8, ptr %4, i64 784
  store <4 x i32> %broadcast.splat, ptr %52, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %53, align 16, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %4, i64 800
  %55 = getelementptr inbounds i8, ptr %4, i64 816
  store <4 x i32> %broadcast.splat, ptr %54, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %55, align 16, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %4, i64 832
  %57 = getelementptr inbounds i8, ptr %4, i64 848
  store <4 x i32> %broadcast.splat, ptr %56, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %57, align 16, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %4, i64 864
  %59 = getelementptr inbounds i8, ptr %4, i64 880
  store <4 x i32> %broadcast.splat, ptr %58, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %59, align 16, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %4, i64 896
  %61 = getelementptr inbounds i8, ptr %4, i64 912
  store <4 x i32> %broadcast.splat, ptr %60, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %61, align 16, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %4, i64 928
  %63 = getelementptr inbounds i8, ptr %4, i64 944
  store <4 x i32> %broadcast.splat, ptr %62, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %63, align 16, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %4, i64 960
  %65 = getelementptr inbounds i8, ptr %4, i64 976
  store <4 x i32> %broadcast.splat, ptr %64, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %65, align 16, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %4, i64 992
  %67 = getelementptr inbounds i8, ptr %4, i64 1008
  store <4 x i32> %broadcast.splat, ptr %66, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %67, align 16, !tbaa !5
  %68 = add i32 %3, -1
  %69 = icmp sgt i32 %3, 1
  br i1 %69, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %vector.ph
  %wide.trip.count = zext nneg i32 %68 to i64
  %70 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %71 = icmp ult i64 %70, 3
  br i1 %71, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv151 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next152.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %72 = trunc nuw nsw i64 %indvars.iv151 to i32
  %73 = xor i32 %72, -1
  %74 = add nsw i32 %73, %3
  %75 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv151
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = sext i8 %76 to i64
  %78 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %77
  store i32 %74, ptr %78, align 4, !tbaa !5
  %indvars.iv.next152 = or disjoint i64 %indvars.iv151, 1
  %79 = trunc nuw nsw i64 %indvars.iv.next152 to i32
  %80 = xor i32 %79, -1
  %81 = add nsw i32 %80, %3
  %82 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next152
  %83 = load i8, ptr %82, align 1, !tbaa !9
  %84 = sext i8 %83 to i64
  %85 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %84
  store i32 %81, ptr %85, align 4, !tbaa !5
  %indvars.iv.next152.1 = or disjoint i64 %indvars.iv151, 2
  %86 = trunc nuw nsw i64 %indvars.iv.next152.1 to i32
  %87 = xor i32 %86, -1
  %88 = add nsw i32 %87, %3
  %89 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next152.1
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = sext i8 %90 to i64
  %92 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %91
  store i32 %88, ptr %92, align 4, !tbaa !5
  %indvars.iv.next152.2 = or disjoint i64 %indvars.iv151, 3
  %93 = trunc nuw nsw i64 %indvars.iv.next152.2 to i32
  %94 = xor i32 %93, -1
  %95 = add nsw i32 %94, %3
  %96 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next152.2
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = sext i8 %97 to i64
  %99 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %98
  store i32 %95, ptr %99, align 4, !tbaa !5
  %indvars.iv.next152.3 = add nuw nsw i64 %indvars.iv151, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !10

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv151.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next152.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv151.epil = phi i64 [ %indvars.iv.next152.epil, %.lr.ph.epil ], [ %indvars.iv151.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %100 = trunc nuw nsw i64 %indvars.iv151.epil to i32
  %101 = xor i32 %100, -1
  %102 = add nsw i32 %101, %3
  %103 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv151.epil
  %104 = load i8, ptr %103, align 1, !tbaa !9
  %105 = sext i8 %104 to i64
  %106 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %105
  store i32 %102, ptr %106, align 4, !tbaa !5
  %indvars.iv.next152.epil = add nuw nsw i64 %indvars.iv151.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !12

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %vector.ph
  %107 = sext i32 %3 to i64
  %108 = shl nsw i64 %107, 2
  %109 = tail call noalias ptr @malloc(i64 noundef %108) #5
  %110 = sext i32 %68 to i64
  %111 = getelementptr inbounds i32, ptr %109, i64 %110
  store i32 %3, ptr %111, align 4, !tbaa !5
  br i1 %69, label %.preheader112.preheader, label %._crit_edge123

.preheader112.preheader:                          ; preds = %._crit_edge
  %112 = add nsw i32 %3, -2
  %113 = zext nneg i32 %112 to i64
  br label %.preheader112

.preheader112:                                    ; preds = %.preheader112.preheader, %.critedge
  %indvars.iv155 = phi i64 [ %113, %.preheader112.preheader ], [ %indvars.iv.next156, %.critedge ]
  %114 = trunc nuw nsw i64 %indvars.iv155 to i32
  %115 = sub i32 %68, %114
  %116 = sext i32 %115 to i64
  %invariant.gep = getelementptr i8, ptr %2, i64 %116
  br label %117

117:                                              ; preds = %.preheader112, %122
  %indvars.iv157 = phi i64 [ %indvars.iv155, %.preheader112 ], [ %indvars.iv.next158, %122 ]
  %118 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv157
  %119 = load i8, ptr %118, align 1, !tbaa !9
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv157
  %120 = load i8, ptr %gep, align 1, !tbaa !9
  %121 = icmp eq i8 %119, %120
  br i1 %121, label %122, label %.critedge

122:                                              ; preds = %117
  %indvars.iv.next158 = add nsw i64 %indvars.iv157, -1
  %123 = icmp sgt i64 %indvars.iv157, 0
  br i1 %123, label %117, label %.critedge, !llvm.loop !14

.critedge:                                        ; preds = %122, %117
  %.097.lcssa.in = phi i64 [ %indvars.iv.next158, %122 ], [ %indvars.iv157, %117 ]
  %.097.lcssa = trunc i64 %.097.lcssa.in to i32
  %124 = sub nsw i32 %114, %.097.lcssa
  %125 = getelementptr inbounds i32, ptr %109, i64 %indvars.iv155
  store i32 %124, ptr %125, align 4, !tbaa !5
  %indvars.iv.next156 = add nsw i64 %indvars.iv155, -1
  %126 = icmp sgt i64 %indvars.iv155, 0
  br i1 %126, label %.preheader112, label %._crit_edge123, !llvm.loop !15

._crit_edge123:                                   ; preds = %.critedge, %._crit_edge
  %127 = tail call noalias ptr @malloc(i64 noundef %108) #5
  %128 = icmp slt i32 %3, 1
  br i1 %128, label %.preheader107.thread, label %.lr.ph126.preheader

.lr.ph126.preheader:                              ; preds = %._crit_edge123
  %wide.trip.count166 = zext nneg i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 8
  br i1 %min.iters.check, label %.lr.ph126.preheader248, label %vector.ph209

.lr.ph126.preheader248:                           ; preds = %middle.block207, %.lr.ph126.preheader
  %indvars.iv162.ph = phi i64 [ 0, %.lr.ph126.preheader ], [ %n.vec, %middle.block207 ]
  br label %.lr.ph126

vector.ph209:                                     ; preds = %.lr.ph126.preheader
  %n.vec = and i64 %wide.trip.count166, 2147483640
  %broadcast.splatinsert213 = insertelement <4 x i32> poison, i32 %3, i64 0
  %broadcast.splat214 = shufflevector <4 x i32> %broadcast.splatinsert213, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body211

vector.body211:                                   ; preds = %vector.body211, %vector.ph209
  %index212 = phi i64 [ 0, %vector.ph209 ], [ %index.next215, %vector.body211 ]
  %129 = getelementptr inbounds i32, ptr %127, i64 %index212
  %130 = getelementptr inbounds i8, ptr %129, i64 16
  store <4 x i32> %broadcast.splat214, ptr %129, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat214, ptr %130, align 4, !tbaa !5
  %index.next215 = add nuw i64 %index212, 8
  %131 = icmp eq i64 %index.next215, %n.vec
  br i1 %131, label %middle.block207, label %vector.body211, !llvm.loop !16

middle.block207:                                  ; preds = %vector.body211
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count166
  br i1 %cmp.n, label %.preheader111, label %.lr.ph126.preheader248

.preheader111:                                    ; preds = %.lr.ph126, %middle.block207
  br i1 %128, label %.preheader107.thread, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %.preheader111
  %132 = zext i32 %68 to i64
  %wide.trip.count184 = zext nneg i32 %3 to i64
  %broadcast.splatinsert226 = insertelement <4 x i32> poison, i32 %3, i64 0
  %broadcast.splat227 = shufflevector <4 x i32> %broadcast.splatinsert226, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %.lr.ph130

.lr.ph126:                                        ; preds = %.lr.ph126.preheader248, %.lr.ph126
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %.lr.ph126 ], [ %indvars.iv162.ph, %.lr.ph126.preheader248 ]
  %133 = getelementptr inbounds i32, ptr %127, i64 %indvars.iv162
  store i32 %3, ptr %133, align 4, !tbaa !5
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond167.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count166
  br i1 %exitcond167.not, label %.preheader111, label %.lr.ph126, !llvm.loop !19

.preheader109:                                    ; preds = %.loopexit
  %.not131 = icmp eq i32 %3, 1
  br i1 %.not131, label %.preheader107, label %.lr.ph133.preheader

.lr.ph133.preheader:                              ; preds = %.preheader109
  %xtraiter249 = and i64 %132, 1
  %134 = icmp eq i32 %68, 1
  br i1 %134, label %.preheader107.loopexit.unr-lcssa, label %.lr.ph133.preheader.new

.lr.ph133.preheader.new:                          ; preds = %.lr.ph133.preheader
  %unroll_iter252 = and i64 %132, 4294967294
  br label %.lr.ph133

.lr.ph130:                                        ; preds = %.lr.ph130.preheader, %.loopexit
  %indvars.iv178 = phi i64 [ %132, %.lr.ph130.preheader ], [ %indvars.iv.next179, %.loopexit ]
  %indvars.iv176 = phi i64 [ 0, %.lr.ph130.preheader ], [ %indvars.iv.next177, %.loopexit ]
  %135 = getelementptr inbounds i32, ptr %109, i64 %indvars.iv178
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = add nuw nsw i64 %indvars.iv178, 1
  %138 = zext i32 %136 to i64
  %139 = icmp ne i64 %137, %138
  %.not = icmp eq i64 %indvars.iv178, %132
  %or.cond = or i1 %139, %.not
  br i1 %or.cond, label %.loopexit, label %.lr.ph128.preheader

.lr.ph128.preheader:                              ; preds = %.lr.ph130
  %140 = trunc i64 %indvars.iv178 to i32
  %141 = sub i32 %68, %140
  %min.iters.check218 = icmp ult i64 %indvars.iv176, 8
  br i1 %min.iters.check218, label %.lr.ph128.preheader247, label %vector.ph219

vector.ph219:                                     ; preds = %.lr.ph128.preheader
  %n.vec221 = and i64 %indvars.iv176, 9223372036854775800
  br label %vector.body223

vector.body223:                                   ; preds = %pred.store.continue241, %vector.ph219
  %index224 = phi i64 [ 0, %vector.ph219 ], [ %index.next242, %pred.store.continue241 ]
  %142 = or disjoint i64 %index224, 4
  %143 = getelementptr inbounds i32, ptr %127, i64 %index224
  %144 = getelementptr inbounds i8, ptr %143, i64 16
  %wide.load = load <4 x i32>, ptr %143, align 4, !tbaa !5
  %wide.load225 = load <4 x i32>, ptr %144, align 4, !tbaa !5
  %145 = icmp eq <4 x i32> %wide.load, %broadcast.splat227
  %146 = icmp eq <4 x i32> %wide.load225, %broadcast.splat227
  %147 = extractelement <4 x i1> %145, i64 0
  br i1 %147, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body223
  %148 = getelementptr inbounds i32, ptr %127, i64 %index224
  store i32 %141, ptr %148, align 4, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body223
  %149 = extractelement <4 x i1> %145, i64 1
  br i1 %149, label %pred.store.if228, label %pred.store.continue229

pred.store.if228:                                 ; preds = %pred.store.continue
  %150 = or disjoint i64 %index224, 1
  %151 = getelementptr inbounds i32, ptr %127, i64 %150
  store i32 %141, ptr %151, align 4, !tbaa !5
  br label %pred.store.continue229

pred.store.continue229:                           ; preds = %pred.store.if228, %pred.store.continue
  %152 = extractelement <4 x i1> %145, i64 2
  br i1 %152, label %pred.store.if230, label %pred.store.continue231

pred.store.if230:                                 ; preds = %pred.store.continue229
  %153 = or disjoint i64 %index224, 2
  %154 = getelementptr inbounds i32, ptr %127, i64 %153
  store i32 %141, ptr %154, align 4, !tbaa !5
  br label %pred.store.continue231

pred.store.continue231:                           ; preds = %pred.store.if230, %pred.store.continue229
  %155 = extractelement <4 x i1> %145, i64 3
  br i1 %155, label %pred.store.if232, label %pred.store.continue233

pred.store.if232:                                 ; preds = %pred.store.continue231
  %156 = or disjoint i64 %index224, 3
  %157 = getelementptr inbounds i32, ptr %127, i64 %156
  store i32 %141, ptr %157, align 4, !tbaa !5
  br label %pred.store.continue233

pred.store.continue233:                           ; preds = %pred.store.if232, %pred.store.continue231
  %158 = extractelement <4 x i1> %146, i64 0
  br i1 %158, label %pred.store.if234, label %pred.store.continue235

pred.store.if234:                                 ; preds = %pred.store.continue233
  %159 = getelementptr inbounds i32, ptr %127, i64 %142
  store i32 %141, ptr %159, align 4, !tbaa !5
  br label %pred.store.continue235

pred.store.continue235:                           ; preds = %pred.store.if234, %pred.store.continue233
  %160 = extractelement <4 x i1> %146, i64 1
  br i1 %160, label %pred.store.if236, label %pred.store.continue237

pred.store.if236:                                 ; preds = %pred.store.continue235
  %161 = or disjoint i64 %index224, 5
  %162 = getelementptr inbounds i32, ptr %127, i64 %161
  store i32 %141, ptr %162, align 4, !tbaa !5
  br label %pred.store.continue237

pred.store.continue237:                           ; preds = %pred.store.if236, %pred.store.continue235
  %163 = extractelement <4 x i1> %146, i64 2
  br i1 %163, label %pred.store.if238, label %pred.store.continue239

pred.store.if238:                                 ; preds = %pred.store.continue237
  %164 = or disjoint i64 %index224, 6
  %165 = getelementptr inbounds i32, ptr %127, i64 %164
  store i32 %141, ptr %165, align 4, !tbaa !5
  br label %pred.store.continue239

pred.store.continue239:                           ; preds = %pred.store.if238, %pred.store.continue237
  %166 = extractelement <4 x i1> %146, i64 3
  br i1 %166, label %pred.store.if240, label %pred.store.continue241

pred.store.if240:                                 ; preds = %pred.store.continue239
  %167 = or disjoint i64 %index224, 7
  %168 = getelementptr inbounds i32, ptr %127, i64 %167
  store i32 %141, ptr %168, align 4, !tbaa !5
  br label %pred.store.continue241

pred.store.continue241:                           ; preds = %pred.store.if240, %pred.store.continue239
  %index.next242 = add nuw i64 %index224, 8
  %169 = icmp eq i64 %index.next242, %n.vec221
  br i1 %169, label %middle.block216, label %vector.body223, !llvm.loop !20

middle.block216:                                  ; preds = %pred.store.continue241
  %cmp.n243 = icmp eq i64 %indvars.iv176, %n.vec221
  br i1 %cmp.n243, label %.loopexit, label %.lr.ph128.preheader247

.lr.ph128.preheader247:                           ; preds = %middle.block216, %.lr.ph128.preheader
  %indvars.iv168.ph = phi i64 [ 0, %.lr.ph128.preheader ], [ %n.vec221, %middle.block216 ]
  br label %.lr.ph128

.lr.ph128:                                        ; preds = %.lr.ph128.preheader247, %174
  %indvars.iv168 = phi i64 [ %indvars.iv.next169, %174 ], [ %indvars.iv168.ph, %.lr.ph128.preheader247 ]
  %170 = getelementptr inbounds i32, ptr %127, i64 %indvars.iv168
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp eq i32 %171, %3
  br i1 %172, label %173, label %174

173:                                              ; preds = %.lr.ph128
  store i32 %141, ptr %170, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %.lr.ph128, %173
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond175.not = icmp eq i64 %indvars.iv.next169, %indvars.iv176
  br i1 %exitcond175.not, label %.loopexit, label %.lr.ph128, !llvm.loop !21

.loopexit:                                        ; preds = %174, %middle.block216, %.lr.ph130
  %indvars.iv.next179 = add nsw i64 %indvars.iv178, -1
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next177, %wide.trip.count184
  br i1 %exitcond185.not, label %.preheader109, label %.lr.ph130, !llvm.loop !22

.preheader107.loopexit.unr-lcssa:                 ; preds = %.lr.ph133, %.lr.ph133.preheader
  %indvars.iv186.unr = phi i64 [ 0, %.lr.ph133.preheader ], [ %indvars.iv.next187.1, %.lr.ph133 ]
  %lcmp.mod251.not = icmp eq i64 %xtraiter249, 0
  br i1 %lcmp.mod251.not, label %.preheader107, label %.lr.ph133.epil

.lr.ph133.epil:                                   ; preds = %.preheader107.loopexit.unr-lcssa
  %175 = getelementptr inbounds i32, ptr %109, i64 %indvars.iv186.unr
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = sub nsw i32 %68, %176
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i32, ptr %127, i64 %178
  %180 = trunc i64 %indvars.iv186.unr to i32
  %181 = sub i32 %68, %180
  store i32 %181, ptr %179, align 4, !tbaa !5
  br label %.preheader107

.preheader107:                                    ; preds = %.lr.ph133.epil, %.preheader107.loopexit.unr-lcssa, %.preheader109
  %182 = sub nsw i32 %1, %3
  %.not102140 = icmp slt i32 %182, 0
  %brmerge = or i1 %.not102140, %128
  br i1 %brmerge, label %.thread, label %.preheader.us

.preheader107.thread:                             ; preds = %._crit_edge123, %.preheader111
  %183 = sub nsw i32 %1, %3
  br label %.thread

.preheader.us:                                    ; preds = %.preheader107, %190
  %.092141.us = phi i32 [ %204, %190 ], [ 0, %.preheader107 ]
  %184 = sext i32 %.092141.us to i64
  %invariant.gep201 = getelementptr i8, ptr %0, i64 %184
  br label %185

185:                                              ; preds = %.preheader.us, %205
  %indvars.iv192.in = phi i64 [ %107, %.preheader.us ], [ %indvars.iv192, %205 ]
  %indvars.iv192 = add nsw i64 %indvars.iv192.in, -1
  %186 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv192
  %187 = load i8, ptr %186, align 1, !tbaa !9
  %gep202 = getelementptr i8, ptr %invariant.gep201, i64 %indvars.iv192
  %188 = load i8, ptr %gep202, align 1, !tbaa !9
  %189 = icmp eq i8 %187, %188
  br i1 %189, label %205, label %190

190:                                              ; preds = %185
  %191 = trunc nuw nsw i64 %indvars.iv192 to i32
  %192 = and i64 %indvars.iv192, 4294967295
  %193 = getelementptr inbounds i32, ptr %127, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %.092141.us, %191
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i8, ptr %0, i64 %196
  %198 = load i8, ptr %197, align 1, !tbaa !9
  %199 = sext i8 %198 to i64
  %200 = getelementptr inbounds [256 x i32], ptr %4, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %reass.sub = sub i32 %191, %3
  %.neg.us = add i32 %reass.sub, 1
  %202 = add i32 %.neg.us, %201
  %203 = tail call i32 @max(i32 noundef %194, i32 noundef %202)
  %204 = add nsw i32 %203, %.092141.us
  %.not102.us = icmp sgt i32 %204, %182
  br i1 %.not102.us, label %.thread, label %.preheader.us

205:                                              ; preds = %185
  %206 = icmp sgt i64 %indvars.iv192.in, 1
  br i1 %206, label %185, label %.thread, !llvm.loop !23

.lr.ph133:                                        ; preds = %.lr.ph133, %.lr.ph133.preheader.new
  %indvars.iv186 = phi i64 [ 0, %.lr.ph133.preheader.new ], [ %indvars.iv.next187.1, %.lr.ph133 ]
  %niter253 = phi i64 [ 0, %.lr.ph133.preheader.new ], [ %niter253.next.1, %.lr.ph133 ]
  %207 = getelementptr inbounds i32, ptr %109, i64 %indvars.iv186
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = sub nsw i32 %68, %208
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i32, ptr %127, i64 %210
  %212 = trunc i64 %indvars.iv186 to i32
  %213 = sub i32 %68, %212
  store i32 %213, ptr %211, align 4, !tbaa !5
  %indvars.iv.next187 = or disjoint i64 %indvars.iv186, 1
  %214 = getelementptr inbounds i32, ptr %109, i64 %indvars.iv.next187
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = sub nsw i32 %68, %215
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %127, i64 %217
  %219 = trunc i64 %indvars.iv.next187 to i32
  %220 = sub i32 %68, %219
  store i32 %220, ptr %218, align 4, !tbaa !5
  %indvars.iv.next187.1 = add nuw nsw i64 %indvars.iv186, 2
  %niter253.next.1 = add i64 %niter253, 2
  %niter253.ncmp.1 = icmp eq i64 %niter253.next.1, %unroll_iter252
  br i1 %niter253.ncmp.1, label %.preheader107.loopexit.unr-lcssa, label %.lr.ph133, !llvm.loop !24

.thread:                                          ; preds = %190, %205, %.preheader107, %.preheader107.thread
  %221 = phi i32 [ %182, %.preheader107 ], [ %183, %.preheader107.thread ], [ %182, %205 ], [ %182, %190 ]
  %.092117 = phi i32 [ 0, %.preheader107 ], [ 0, %.preheader107.thread ], [ %.092141.us, %205 ], [ %204, %190 ]
  tail call void @free(ptr noundef %127) #4
  %222 = icmp sgt i32 %.092117, %221
  %223 = select i1 %222, i32 -1, i32 %.092117
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  ret i32 %223
}

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

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !11, !18, !17}
!20 = distinct !{!20, !11, !17, !18}
!21 = distinct !{!21, !11, !18, !17}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass