; LLVM IR from ermig1979/Simd :: src/Simd/SimdBaseHistogram.ll (ZN4Simd4Base9HistogramEPKhmmmPj)

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base9HistogramEPKhmmmPj(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [4 x [256 x i32]], align 16
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i64 %3, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4096, ptr %11) #4
  %16 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %16, i8 0, i64 4096, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %17 = load i64, ptr %7, align 8, !tbaa !9
  %18 = call noundef i64 @_ZN4Simd7AlignLoEmm(i64 noundef %17, i64 noundef 4)
  store i64 %18, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %96, %5
  %20 = load i64, ptr %13, align 8, !tbaa !9
  %21 = load i64, ptr %8, align 8, !tbaa !9
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %99

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %70, %24
  %26 = load i64, ptr %14, align 8, !tbaa !9
  %27 = load i64, ptr %12, align 8, !tbaa !9
  %28 = icmp ult i64 %26, %27
  br i1 %28, label %29, label %73

29:                                               ; preds = %25
  %30 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 0
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load i64, ptr %14, align 8, !tbaa !9
  %33 = add i64 %32, 0
  %34 = getelementptr inbounds i8, ptr %31, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = zext i8 %35 to i64
  %37 = getelementptr inbounds [256 x i32], ptr %30, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !12
  %39 = add i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !12
  %40 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 1
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load i64, ptr %14, align 8, !tbaa !9
  %43 = add i64 %42, 1
  %44 = getelementptr inbounds i8, ptr %41, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = zext i8 %45 to i64
  %47 = getelementptr inbounds [256 x i32], ptr %40, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !12
  %49 = add i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !12
  %50 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 2
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i64, ptr %14, align 8, !tbaa !9
  %53 = add i64 %52, 2
  %54 = getelementptr inbounds i8, ptr %51, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = zext i8 %55 to i64
  %57 = getelementptr inbounds [256 x i32], ptr %50, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !12
  %59 = add i32 %58, 1
  store i32 %59, ptr %57, align 4, !tbaa !12
  %60 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 3
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i64, ptr %14, align 8, !tbaa !9
  %63 = add i64 %62, 3
  %64 = getelementptr inbounds i8, ptr %61, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !11
  %66 = zext i8 %65 to i64
  %67 = getelementptr inbounds [256 x i32], ptr %60, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !12
  %69 = add i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !12
  br label %70

70:                                               ; preds = %29
  %71 = load i64, ptr %14, align 8, !tbaa !9
  %72 = add i64 %71, 4
  store i64 %72, ptr %14, align 8, !tbaa !9
  br label %25, !llvm.loop !14

73:                                               ; preds = %25
  br label %74

74:                                               ; preds = %89, %73
  %75 = load i64, ptr %14, align 8, !tbaa !9
  %76 = load i64, ptr %7, align 8, !tbaa !9
  %77 = icmp ult i64 %75, %76
  br i1 %77, label %78, label %92

78:                                               ; preds = %74
  %79 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 0
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i64, ptr %14, align 8, !tbaa !9
  %82 = add i64 %81, 0
  %83 = getelementptr inbounds i8, ptr %80, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = zext i8 %84 to i64
  %86 = getelementptr inbounds [256 x i32], ptr %79, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !12
  %88 = add i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !12
  br label %89

89:                                               ; preds = %78
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = add i64 %90, 1
  store i64 %91, ptr %14, align 8, !tbaa !9
  br label %74, !llvm.loop !16

92:                                               ; preds = %74
  %93 = load i64, ptr %9, align 8, !tbaa !9
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 %93
  store ptr %95, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %96

96:                                               ; preds = %92
  %97 = load i64, ptr %13, align 8, !tbaa !9
  %98 = add i64 %97, 1
  store i64 %98, ptr %13, align 8, !tbaa !9
  br label %19, !llvm.loop !17

99:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %127, %99
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = icmp ult i64 %101, 256
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %130

104:                                              ; preds = %100
  %105 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 0
  %106 = load i64, ptr %15, align 8, !tbaa !9
  %107 = getelementptr inbounds [256 x i32], ptr %105, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !12
  %109 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 1
  %110 = load i64, ptr %15, align 8, !tbaa !9
  %111 = getelementptr inbounds [256 x i32], ptr %109, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !12
  %113 = add i32 %108, %112
  %114 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 2
  %115 = load i64, ptr %15, align 8, !tbaa !9
  %116 = getelementptr inbounds [256 x i32], ptr %114, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !12
  %118 = add i32 %113, %117
  %119 = getelementptr inbounds [4 x [256 x i32]], ptr %11, i64 0, i64 3
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = getelementptr inbounds [256 x i32], ptr %119, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !12
  %123 = add i32 %118, %122
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load i64, ptr %15, align 8, !tbaa !9
  %126 = getelementptr inbounds i32, ptr %124, i64 %125
  store i32 %123, ptr %126, align 4, !tbaa !12
  br label %127

127:                                              ; preds = %104
  %128 = load i64, ptr %15, align 8, !tbaa !9
  %129 = add i64 %128, 1
  store i64 %129, ptr %15, align 8, !tbaa !9
  br label %100, !llvm.loop !18

130:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr %11) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd7AlignLoEmm(i64 noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 mustprogress 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4Simd4Base9HistogramEPKhmmmPj(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #2 {
  %6 = alloca [4 x [256 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %6) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %6, i8 0, i64 4096, i1 false)
  %7 = tail call noundef i64 @_ZN4Simd7AlignLoEmm(i64 noundef %1, i64 noundef 4)
  %.not = icmp eq i64 %2, 0
  br i1 %.not, label %.preheader, label %.preheader33.lr.ph

.preheader33.lr.ph:                               ; preds = %5
  %.not46 = icmp eq i64 %7, 0
  %8 = getelementptr inbounds i8, ptr %6, i64 1024
  %9 = getelementptr inbounds i8, ptr %6, i64 2048
  %10 = getelementptr inbounds i8, ptr %6, i64 3072
  br i1 %.not46, label %.preheader33.lr.ph.split, label %.preheader33.us

.preheader33.us:                                  ; preds = %.preheader33.lr.ph, %._crit_edge.us
  %.03038.us = phi i64 [ %12, %._crit_edge.us ], [ 0, %.preheader33.lr.ph ]
  %.03137.us = phi ptr [ %11, %._crit_edge.us ], [ %0, %.preheader33.lr.ph ]
  br label %21

._crit_edge.us:                                   ; preds = %.lr.ph36.us, %..preheader32_crit_edge.us
  %11 = getelementptr inbounds i8, ptr %.03137.us, i64 %3
  %12 = add nuw i64 %.03038.us, 1
  %exitcond.not = icmp eq i64 %12, %2
  br i1 %exitcond.not, label %.preheader, label %.preheader33.us, !llvm.loop !5

.lr.ph36.us:                                      ; preds = %..preheader32_crit_edge.us, %.lr.ph36.us
  %.135.us = phi i64 [ %19, %.lr.ph36.us ], [ %49, %..preheader32_crit_edge.us ]
  %13 = getelementptr inbounds i8, ptr %.03137.us, i64 %.135.us
  %14 = load i8, ptr %13, align 1, !tbaa !7
  %15 = zext i8 %14 to i64
  %16 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !10
  %18 = add i32 %17, 1
  store i32 %18, ptr %16, align 4, !tbaa !10
  %19 = add nuw i64 %.135.us, 1
  %20 = icmp ult i64 %19, %1
  br i1 %20, label %.lr.ph36.us, label %._crit_edge.us, !llvm.loop !12

21:                                               ; preds = %.preheader33.us, %21
  %.02934.us = phi i64 [ 0, %.preheader33.us ], [ %49, %21 ]
  %22 = getelementptr inbounds i8, ptr %.03137.us, i64 %.02934.us
  %23 = load i8, ptr %22, align 1, !tbaa !7
  %24 = zext i8 %23 to i64
  %25 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !10
  %27 = add i32 %26, 1
  store i32 %27, ptr %25, align 4, !tbaa !10
  %28 = or disjoint i64 %.02934.us, 1
  %29 = getelementptr inbounds i8, ptr %.03137.us, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !7
  %31 = zext i8 %30 to i64
  %32 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !10
  %34 = add i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !10
  %35 = or disjoint i64 %.02934.us, 2
  %36 = getelementptr inbounds i8, ptr %.03137.us, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !7
  %38 = zext i8 %37 to i64
  %39 = getelementptr inbounds [256 x i32], ptr %9, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !10
  %41 = add i32 %40, 1
  store i32 %41, ptr %39, align 4, !tbaa !10
  %42 = or disjoint i64 %.02934.us, 3
  %43 = getelementptr inbounds i8, ptr %.03137.us, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !7
  %45 = zext i8 %44 to i64
  %46 = getelementptr inbounds [256 x i32], ptr %10, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !10
  %48 = add i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !10
  %49 = add nuw i64 %.02934.us, 4
  %50 = icmp ult i64 %49, %7
  br i1 %50, label %21, label %..preheader32_crit_edge.us, !llvm.loop !13

..preheader32_crit_edge.us:                       ; preds = %21
  %51 = icmp ult i64 %49, %1
  br i1 %51, label %.lr.ph36.us, label %._crit_edge.us

.preheader33.lr.ph.split:                         ; preds = %.preheader33.lr.ph
  %.not47 = icmp eq i64 %1, 0
  br i1 %.not47, label %.preheader, label %.preheader33.us39.preheader

.preheader33.us39.preheader:                      ; preds = %.preheader33.lr.ph.split
  %xtraiter = and i64 %1, 3
  %52 = icmp ult i64 %1, 4
  %unroll_iter = and i64 %1, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader33.us39

.preheader33.us39:                                ; preds = %.preheader33.us39.preheader, %._crit_edge.us44
  %.03038.us40 = phi i64 [ %89, %._crit_edge.us44 ], [ 0, %.preheader33.us39.preheader ]
  %.03137.us41 = phi ptr [ %88, %._crit_edge.us44 ], [ %0, %.preheader33.us39.preheader ]
  br i1 %52, label %._crit_edge.us44.unr-lcssa, label %.preheader33.us39.new

.preheader33.us39.new:                            ; preds = %.preheader33.us39, %.preheader33.us39.new
  %.135.us42 = phi i64 [ %80, %.preheader33.us39.new ], [ 0, %.preheader33.us39 ]
  %niter = phi i64 [ %niter.next.3, %.preheader33.us39.new ], [ 0, %.preheader33.us39 ]
  %53 = getelementptr inbounds i8, ptr %.03137.us41, i64 %.135.us42
  %54 = load i8, ptr %53, align 1, !tbaa !7
  %55 = zext i8 %54 to i64
  %56 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !10
  %58 = add i32 %57, 1
  store i32 %58, ptr %56, align 4, !tbaa !10
  %59 = or disjoint i64 %.135.us42, 1
  %60 = getelementptr inbounds i8, ptr %.03137.us41, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !7
  %62 = zext i8 %61 to i64
  %63 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !10
  %65 = add i32 %64, 1
  store i32 %65, ptr %63, align 4, !tbaa !10
  %66 = or disjoint i64 %.135.us42, 2
  %67 = getelementptr inbounds i8, ptr %.03137.us41, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !7
  %69 = zext i8 %68 to i64
  %70 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !10
  %72 = add i32 %71, 1
  store i32 %72, ptr %70, align 4, !tbaa !10
  %73 = or disjoint i64 %.135.us42, 3
  %74 = getelementptr inbounds i8, ptr %.03137.us41, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !7
  %76 = zext i8 %75 to i64
  %77 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !10
  %79 = add i32 %78, 1
  store i32 %79, ptr %77, align 4, !tbaa !10
  %80 = add nuw i64 %.135.us42, 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.us44.unr-lcssa, label %.preheader33.us39.new, !llvm.loop !12

._crit_edge.us44.unr-lcssa:                       ; preds = %.preheader33.us39.new, %.preheader33.us39
  %.135.us42.unr = phi i64 [ 0, %.preheader33.us39 ], [ %80, %.preheader33.us39.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us44, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us44.unr-lcssa, %.epil.preheader
  %.135.us42.epil = phi i64 [ %87, %.epil.preheader ], [ %.135.us42.unr, %._crit_edge.us44.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us44.unr-lcssa ]
  %81 = getelementptr inbounds i8, ptr %.03137.us41, i64 %.135.us42.epil
  %82 = load i8, ptr %81, align 1, !tbaa !7
  %83 = zext i8 %82 to i64
  %84 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !10
  %86 = add i32 %85, 1
  store i32 %86, ptr %84, align 4, !tbaa !10
  %87 = add nuw i64 %.135.us42.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.us44, label %.epil.preheader, !llvm.loop !14

._crit_edge.us44:                                 ; preds = %.epil.preheader, %._crit_edge.us44.unr-lcssa
  %88 = getelementptr inbounds i8, ptr %.03137.us41, i64 %3
  %89 = add nuw i64 %.03038.us40, 1
  %exitcond51.not = icmp eq i64 %89, %2
  br i1 %exitcond51.not, label %.preheader, label %.preheader33.us39, !llvm.loop !5

.preheader:                                       ; preds = %._crit_edge.us, %._crit_edge.us44, %.preheader33.lr.ph.split, %5
  %90 = getelementptr inbounds i8, ptr %6, i64 1024
  %91 = getelementptr inbounds i8, ptr %6, i64 2048
  %92 = getelementptr inbounds i8, ptr %6, i64 3072
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader
  %index = phi i64 [ 0, %.preheader ], [ %index.next, %vector.body ]
  %93 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %index
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %wide.load = load <4 x i32>, ptr %93, align 16, !tbaa !10
  %wide.load55 = load <4 x i32>, ptr %94, align 16, !tbaa !10
  %95 = getelementptr inbounds [256 x i32], ptr %90, i64 0, i64 %index
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %wide.load56 = load <4 x i32>, ptr %95, align 16, !tbaa !10
  %wide.load57 = load <4 x i32>, ptr %96, align 16, !tbaa !10
  %97 = add <4 x i32> %wide.load56, %wide.load
  %98 = add <4 x i32> %wide.load57, %wide.load55
  %99 = getelementptr inbounds [256 x i32], ptr %91, i64 0, i64 %index
  %100 = getelementptr inbounds i8, ptr %99, i64 16
  %wide.load58 = load <4 x i32>, ptr %99, align 16, !tbaa !10
  %wide.load59 = load <4 x i32>, ptr %100, align 16, !tbaa !10
  %101 = add <4 x i32> %97, %wide.load58
  %102 = add <4 x i32> %98, %wide.load59
  %103 = getelementptr inbounds [256 x i32], ptr %92, i64 0, i64 %index
  %104 = getelementptr inbounds i8, ptr %103, i64 16
  %wide.load60 = load <4 x i32>, ptr %103, align 16, !tbaa !10
  %wide.load61 = load <4 x i32>, ptr %104, align 16, !tbaa !10
  %105 = add <4 x i32> %101, %wide.load60
  %106 = add <4 x i32> %102, %wide.load61
  %107 = getelementptr inbounds i32, ptr %4, i64 %index
  %108 = getelementptr inbounds i8, ptr %107, i64 16
  store <4 x i32> %105, ptr %107, align 4, !tbaa !10
  store <4 x i32> %106, ptr %108, align 4, !tbaa !10
  %index.next = add nuw i64 %index, 8
  %109 = icmp eq i64 %index.next, 256
  br i1 %109, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %6) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd7AlignLoEmm(i64 noundef, i64 noundef) local_unnamed_addr #3

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


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