; LLVM IR from intel/qpl :: tools/utils/generators/deflate_generator/histogram.ll (ZN9histogram11consolidateEv)

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

%class.histogram = type { [32768 x i32], [513 x i32], [32 x i32], [286 x i32] }

@_ZZN9histogram11consolidateEvE8ll_start = external hidden constant [30 x i32], align 16
@_ZL10dist_start = external hidden constant [31 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9histogram11consolidateEv(ptr noundef nonnull align 4 dereferenceable(134396) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %50, %1
  %11 = load i32, ptr %3, align 4, !tbaa !9
  %12 = icmp slt i32 %11, 30
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %53

14:                                               ; preds = %10
  %15 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 2
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [32 x i32], ptr %15, i64 0, i64 %17
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [31 x i32], ptr @_ZL10dist_start, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = sub nsw i32 %22, 1
  store i32 %23, ptr %5, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %46, %14
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = add nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [31 x i32], ptr @_ZL10dist_start, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = sub nsw i32 %30, 1
  %32 = icmp slt i32 %25, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %24
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %49

34:                                               ; preds = %24
  %35 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 0
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [32768 x i32], ptr %35, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 2
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [32 x i32], ptr %40, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = add i32 %44, %39
  store i32 %45, ptr %43, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %34
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %5, align 4, !tbaa !9
  br label %24, !llvm.loop !11

49:                                               ; preds = %33
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %3, align 4, !tbaa !9
  br label %10, !llvm.loop !13

53:                                               ; preds = %13
  %54 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 2
  %55 = getelementptr inbounds [32 x i32], ptr %54, i64 0, i64 30
  store i32 0, ptr %55, align 4, !tbaa !9
  %56 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 2
  %57 = getelementptr inbounds [32 x i32], ptr %56, i64 0, i64 31
  store i32 0, ptr %57, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %72, %53
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 257
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %75

62:                                               ; preds = %58
  %63 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 1
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [513 x i32], ptr %63, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 3
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [286 x i32], ptr %68, i64 0, i64 %70
  store i32 %67, ptr %71, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %62
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !9
  br label %58, !llvm.loop !14

75:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 257, ptr %7, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %120, %75
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 286
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %123

80:                                               ; preds = %76
  %81 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 3
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [286 x i32], ptr %81, i64 0, i64 %83
  store i32 0, ptr %84, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %85 = load i32, ptr %7, align 4, !tbaa !9
  %86 = sub nsw i32 %85, 257
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [30 x i32], ptr @_ZZN9histogram11consolidateEvE8ll_start, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = add nsw i32 %89, 257
  %91 = sub nsw i32 %90, 3
  store i32 %91, ptr %8, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %116, %80
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 257
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [30 x i32], ptr @_ZZN9histogram11consolidateEvE8ll_start, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = add nsw i32 %99, 257
  %101 = sub nsw i32 %100, 3
  %102 = icmp slt i32 %93, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %92
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %119

104:                                              ; preds = %92
  %105 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 1
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [513 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = getelementptr inbounds %class.histogram, ptr %9, i32 0, i32 3
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [286 x i32], ptr %110, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = add i32 %114, %109
  store i32 %115, ptr %113, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %104
  %117 = load i32, ptr %8, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %8, align 4, !tbaa !9
  br label %92, !llvm.loop !15

119:                                              ; preds = %103
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %7, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !9
  br label %76, !llvm.loop !16

123:                                              ; preds = %79
  call void @_ZN9histogram9normalizeEv(ptr noundef nonnull align 4 dereferenceable(134396) %9)
  ret void
}

; 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 nounwind uwtable
declare dso_local void @_ZN9histogram9normalizeEv(ptr noundef nonnull align 4 dereferenceable(134396)) #2 align 2

attributes #0 = { 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 #1 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !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"

@_ZZN9histogram11consolidateEvE8ll_start = external hidden local_unnamed_addr constant [30 x i32], align 16
@_ZL10dist_start = external hidden local_unnamed_addr constant [31 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN9histogram11consolidateEv(ptr noundef nonnull align 4 dereferenceable(134396) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 133124
  %.pre = load i32, ptr @_ZL10dist_start, align 16, !tbaa !5
  br label %140

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

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit.unr-lcssa ]
  %3 = phi i32 [ %6, %.epil.preheader ], [ %.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %4 = getelementptr inbounds [32768 x i32], ptr %0, i64 0, i64 %indvars.iv.epil
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = add i32 %3, %5
  store i32 %6, ptr %142, align 4, !tbaa !5
  %indvars.iv.next.epil = add nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !9

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %140
  %exitcond37.not = icmp eq i64 %indvars.iv.next35, 30
  br i1 %exitcond37.not, label %vector.ph, label %140, !llvm.loop !11

vector.ph:                                        ; preds = %.loopexit
  %7 = getelementptr inbounds i8, ptr %0, i64 133244
  store i32 0, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 133248
  store i32 0, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 131072
  %10 = getelementptr inbounds i8, ptr %0, i64 133252
  %11 = getelementptr inbounds i8, ptr %0, i64 131088
  %wide.load = load <4 x i32>, ptr %9, align 4, !tbaa !5
  %wide.load50 = load <4 x i32>, ptr %11, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 133268
  store <4 x i32> %wide.load, ptr %10, align 4, !tbaa !5
  store <4 x i32> %wide.load50, ptr %12, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 131104
  %14 = getelementptr inbounds i8, ptr %0, i64 131120
  %wide.load.1 = load <4 x i32>, ptr %13, align 4, !tbaa !5
  %wide.load50.1 = load <4 x i32>, ptr %14, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 133284
  %16 = getelementptr inbounds i8, ptr %0, i64 133300
  store <4 x i32> %wide.load.1, ptr %15, align 4, !tbaa !5
  store <4 x i32> %wide.load50.1, ptr %16, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 131136
  %18 = getelementptr inbounds i8, ptr %0, i64 131152
  %wide.load.2 = load <4 x i32>, ptr %17, align 4, !tbaa !5
  %wide.load50.2 = load <4 x i32>, ptr %18, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 133316
  %20 = getelementptr inbounds i8, ptr %0, i64 133332
  store <4 x i32> %wide.load.2, ptr %19, align 4, !tbaa !5
  store <4 x i32> %wide.load50.2, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 131168
  %22 = getelementptr inbounds i8, ptr %0, i64 131184
  %wide.load.3 = load <4 x i32>, ptr %21, align 4, !tbaa !5
  %wide.load50.3 = load <4 x i32>, ptr %22, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 133348
  %24 = getelementptr inbounds i8, ptr %0, i64 133364
  store <4 x i32> %wide.load.3, ptr %23, align 4, !tbaa !5
  store <4 x i32> %wide.load50.3, ptr %24, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 131200
  %26 = getelementptr inbounds i8, ptr %0, i64 131216
  %wide.load.4 = load <4 x i32>, ptr %25, align 4, !tbaa !5
  %wide.load50.4 = load <4 x i32>, ptr %26, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 133380
  %28 = getelementptr inbounds i8, ptr %0, i64 133396
  store <4 x i32> %wide.load.4, ptr %27, align 4, !tbaa !5
  store <4 x i32> %wide.load50.4, ptr %28, align 4, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %0, i64 131232
  %30 = getelementptr inbounds i8, ptr %0, i64 131248
  %wide.load.5 = load <4 x i32>, ptr %29, align 4, !tbaa !5
  %wide.load50.5 = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %0, i64 133412
  %32 = getelementptr inbounds i8, ptr %0, i64 133428
  store <4 x i32> %wide.load.5, ptr %31, align 4, !tbaa !5
  store <4 x i32> %wide.load50.5, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %0, i64 131264
  %34 = getelementptr inbounds i8, ptr %0, i64 131280
  %wide.load.6 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %wide.load50.6 = load <4 x i32>, ptr %34, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %0, i64 133444
  %36 = getelementptr inbounds i8, ptr %0, i64 133460
  store <4 x i32> %wide.load.6, ptr %35, align 4, !tbaa !5
  store <4 x i32> %wide.load50.6, ptr %36, align 4, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 131296
  %38 = getelementptr inbounds i8, ptr %0, i64 131312
  %wide.load.7 = load <4 x i32>, ptr %37, align 4, !tbaa !5
  %wide.load50.7 = load <4 x i32>, ptr %38, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %0, i64 133476
  %40 = getelementptr inbounds i8, ptr %0, i64 133492
  store <4 x i32> %wide.load.7, ptr %39, align 4, !tbaa !5
  store <4 x i32> %wide.load50.7, ptr %40, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %0, i64 131328
  %42 = getelementptr inbounds i8, ptr %0, i64 131344
  %wide.load.8 = load <4 x i32>, ptr %41, align 4, !tbaa !5
  %wide.load50.8 = load <4 x i32>, ptr %42, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %0, i64 133508
  %44 = getelementptr inbounds i8, ptr %0, i64 133524
  store <4 x i32> %wide.load.8, ptr %43, align 4, !tbaa !5
  store <4 x i32> %wide.load50.8, ptr %44, align 4, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %0, i64 131360
  %46 = getelementptr inbounds i8, ptr %0, i64 131376
  %wide.load.9 = load <4 x i32>, ptr %45, align 4, !tbaa !5
  %wide.load50.9 = load <4 x i32>, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %0, i64 133540
  %48 = getelementptr inbounds i8, ptr %0, i64 133556
  store <4 x i32> %wide.load.9, ptr %47, align 4, !tbaa !5
  store <4 x i32> %wide.load50.9, ptr %48, align 4, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %0, i64 131392
  %50 = getelementptr inbounds i8, ptr %0, i64 131408
  %wide.load.10 = load <4 x i32>, ptr %49, align 4, !tbaa !5
  %wide.load50.10 = load <4 x i32>, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %0, i64 133572
  %52 = getelementptr inbounds i8, ptr %0, i64 133588
  store <4 x i32> %wide.load.10, ptr %51, align 4, !tbaa !5
  store <4 x i32> %wide.load50.10, ptr %52, align 4, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %0, i64 131424
  %54 = getelementptr inbounds i8, ptr %0, i64 131440
  %wide.load.11 = load <4 x i32>, ptr %53, align 4, !tbaa !5
  %wide.load50.11 = load <4 x i32>, ptr %54, align 4, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %0, i64 133604
  %56 = getelementptr inbounds i8, ptr %0, i64 133620
  store <4 x i32> %wide.load.11, ptr %55, align 4, !tbaa !5
  store <4 x i32> %wide.load50.11, ptr %56, align 4, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %0, i64 131456
  %58 = getelementptr inbounds i8, ptr %0, i64 131472
  %wide.load.12 = load <4 x i32>, ptr %57, align 4, !tbaa !5
  %wide.load50.12 = load <4 x i32>, ptr %58, align 4, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %0, i64 133636
  %60 = getelementptr inbounds i8, ptr %0, i64 133652
  store <4 x i32> %wide.load.12, ptr %59, align 4, !tbaa !5
  store <4 x i32> %wide.load50.12, ptr %60, align 4, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %0, i64 131488
  %62 = getelementptr inbounds i8, ptr %0, i64 131504
  %wide.load.13 = load <4 x i32>, ptr %61, align 4, !tbaa !5
  %wide.load50.13 = load <4 x i32>, ptr %62, align 4, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %0, i64 133668
  %64 = getelementptr inbounds i8, ptr %0, i64 133684
  store <4 x i32> %wide.load.13, ptr %63, align 4, !tbaa !5
  store <4 x i32> %wide.load50.13, ptr %64, align 4, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %0, i64 131520
  %66 = getelementptr inbounds i8, ptr %0, i64 131536
  %wide.load.14 = load <4 x i32>, ptr %65, align 4, !tbaa !5
  %wide.load50.14 = load <4 x i32>, ptr %66, align 4, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %0, i64 133700
  %68 = getelementptr inbounds i8, ptr %0, i64 133716
  store <4 x i32> %wide.load.14, ptr %67, align 4, !tbaa !5
  store <4 x i32> %wide.load50.14, ptr %68, align 4, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %0, i64 131552
  %70 = getelementptr inbounds i8, ptr %0, i64 131568
  %wide.load.15 = load <4 x i32>, ptr %69, align 4, !tbaa !5
  %wide.load50.15 = load <4 x i32>, ptr %70, align 4, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %0, i64 133732
  %72 = getelementptr inbounds i8, ptr %0, i64 133748
  store <4 x i32> %wide.load.15, ptr %71, align 4, !tbaa !5
  store <4 x i32> %wide.load50.15, ptr %72, align 4, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %0, i64 131584
  %74 = getelementptr inbounds i8, ptr %0, i64 131600
  %wide.load.16 = load <4 x i32>, ptr %73, align 4, !tbaa !5
  %wide.load50.16 = load <4 x i32>, ptr %74, align 4, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %0, i64 133764
  %76 = getelementptr inbounds i8, ptr %0, i64 133780
  store <4 x i32> %wide.load.16, ptr %75, align 4, !tbaa !5
  store <4 x i32> %wide.load50.16, ptr %76, align 4, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %0, i64 131616
  %78 = getelementptr inbounds i8, ptr %0, i64 131632
  %wide.load.17 = load <4 x i32>, ptr %77, align 4, !tbaa !5
  %wide.load50.17 = load <4 x i32>, ptr %78, align 4, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %0, i64 133796
  %80 = getelementptr inbounds i8, ptr %0, i64 133812
  store <4 x i32> %wide.load.17, ptr %79, align 4, !tbaa !5
  store <4 x i32> %wide.load50.17, ptr %80, align 4, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %0, i64 131648
  %82 = getelementptr inbounds i8, ptr %0, i64 131664
  %wide.load.18 = load <4 x i32>, ptr %81, align 4, !tbaa !5
  %wide.load50.18 = load <4 x i32>, ptr %82, align 4, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %0, i64 133828
  %84 = getelementptr inbounds i8, ptr %0, i64 133844
  store <4 x i32> %wide.load.18, ptr %83, align 4, !tbaa !5
  store <4 x i32> %wide.load50.18, ptr %84, align 4, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %0, i64 131680
  %86 = getelementptr inbounds i8, ptr %0, i64 131696
  %wide.load.19 = load <4 x i32>, ptr %85, align 4, !tbaa !5
  %wide.load50.19 = load <4 x i32>, ptr %86, align 4, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %0, i64 133860
  %88 = getelementptr inbounds i8, ptr %0, i64 133876
  store <4 x i32> %wide.load.19, ptr %87, align 4, !tbaa !5
  store <4 x i32> %wide.load50.19, ptr %88, align 4, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %0, i64 131712
  %90 = getelementptr inbounds i8, ptr %0, i64 131728
  %wide.load.20 = load <4 x i32>, ptr %89, align 4, !tbaa !5
  %wide.load50.20 = load <4 x i32>, ptr %90, align 4, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %0, i64 133892
  %92 = getelementptr inbounds i8, ptr %0, i64 133908
  store <4 x i32> %wide.load.20, ptr %91, align 4, !tbaa !5
  store <4 x i32> %wide.load50.20, ptr %92, align 4, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %0, i64 131744
  %94 = getelementptr inbounds i8, ptr %0, i64 131760
  %wide.load.21 = load <4 x i32>, ptr %93, align 4, !tbaa !5
  %wide.load50.21 = load <4 x i32>, ptr %94, align 4, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %0, i64 133924
  %96 = getelementptr inbounds i8, ptr %0, i64 133940
  store <4 x i32> %wide.load.21, ptr %95, align 4, !tbaa !5
  store <4 x i32> %wide.load50.21, ptr %96, align 4, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %0, i64 131776
  %98 = getelementptr inbounds i8, ptr %0, i64 131792
  %wide.load.22 = load <4 x i32>, ptr %97, align 4, !tbaa !5
  %wide.load50.22 = load <4 x i32>, ptr %98, align 4, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %0, i64 133956
  %100 = getelementptr inbounds i8, ptr %0, i64 133972
  store <4 x i32> %wide.load.22, ptr %99, align 4, !tbaa !5
  store <4 x i32> %wide.load50.22, ptr %100, align 4, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %0, i64 131808
  %102 = getelementptr inbounds i8, ptr %0, i64 131824
  %wide.load.23 = load <4 x i32>, ptr %101, align 4, !tbaa !5
  %wide.load50.23 = load <4 x i32>, ptr %102, align 4, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %0, i64 133988
  %104 = getelementptr inbounds i8, ptr %0, i64 134004
  store <4 x i32> %wide.load.23, ptr %103, align 4, !tbaa !5
  store <4 x i32> %wide.load50.23, ptr %104, align 4, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %0, i64 131840
  %106 = getelementptr inbounds i8, ptr %0, i64 131856
  %wide.load.24 = load <4 x i32>, ptr %105, align 4, !tbaa !5
  %wide.load50.24 = load <4 x i32>, ptr %106, align 4, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %0, i64 134020
  %108 = getelementptr inbounds i8, ptr %0, i64 134036
  store <4 x i32> %wide.load.24, ptr %107, align 4, !tbaa !5
  store <4 x i32> %wide.load50.24, ptr %108, align 4, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %0, i64 131872
  %110 = getelementptr inbounds i8, ptr %0, i64 131888
  %wide.load.25 = load <4 x i32>, ptr %109, align 4, !tbaa !5
  %wide.load50.25 = load <4 x i32>, ptr %110, align 4, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %0, i64 134052
  %112 = getelementptr inbounds i8, ptr %0, i64 134068
  store <4 x i32> %wide.load.25, ptr %111, align 4, !tbaa !5
  store <4 x i32> %wide.load50.25, ptr %112, align 4, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %0, i64 131904
  %114 = getelementptr inbounds i8, ptr %0, i64 131920
  %wide.load.26 = load <4 x i32>, ptr %113, align 4, !tbaa !5
  %wide.load50.26 = load <4 x i32>, ptr %114, align 4, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %0, i64 134084
  %116 = getelementptr inbounds i8, ptr %0, i64 134100
  store <4 x i32> %wide.load.26, ptr %115, align 4, !tbaa !5
  store <4 x i32> %wide.load50.26, ptr %116, align 4, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %0, i64 131936
  %118 = getelementptr inbounds i8, ptr %0, i64 131952
  %wide.load.27 = load <4 x i32>, ptr %117, align 4, !tbaa !5
  %wide.load50.27 = load <4 x i32>, ptr %118, align 4, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %0, i64 134116
  %120 = getelementptr inbounds i8, ptr %0, i64 134132
  store <4 x i32> %wide.load.27, ptr %119, align 4, !tbaa !5
  store <4 x i32> %wide.load50.27, ptr %120, align 4, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %0, i64 131968
  %122 = getelementptr inbounds i8, ptr %0, i64 131984
  %wide.load.28 = load <4 x i32>, ptr %121, align 4, !tbaa !5
  %wide.load50.28 = load <4 x i32>, ptr %122, align 4, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %0, i64 134148
  %124 = getelementptr inbounds i8, ptr %0, i64 134164
  store <4 x i32> %wide.load.28, ptr %123, align 4, !tbaa !5
  store <4 x i32> %wide.load50.28, ptr %124, align 4, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %0, i64 132000
  %126 = getelementptr inbounds i8, ptr %0, i64 132016
  %wide.load.29 = load <4 x i32>, ptr %125, align 4, !tbaa !5
  %wide.load50.29 = load <4 x i32>, ptr %126, align 4, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %0, i64 134180
  %128 = getelementptr inbounds i8, ptr %0, i64 134196
  store <4 x i32> %wide.load.29, ptr %127, align 4, !tbaa !5
  store <4 x i32> %wide.load50.29, ptr %128, align 4, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %0, i64 132032
  %130 = getelementptr inbounds i8, ptr %0, i64 132048
  %wide.load.30 = load <4 x i32>, ptr %129, align 4, !tbaa !5
  %wide.load50.30 = load <4 x i32>, ptr %130, align 4, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %0, i64 134212
  %132 = getelementptr inbounds i8, ptr %0, i64 134228
  store <4 x i32> %wide.load.30, ptr %131, align 4, !tbaa !5
  store <4 x i32> %wide.load50.30, ptr %132, align 4, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %0, i64 132064
  %134 = getelementptr inbounds i8, ptr %0, i64 132080
  %wide.load.31 = load <4 x i32>, ptr %133, align 4, !tbaa !5
  %wide.load50.31 = load <4 x i32>, ptr %134, align 4, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %0, i64 134244
  %136 = getelementptr inbounds i8, ptr %0, i64 134260
  store <4 x i32> %wide.load.31, ptr %135, align 4, !tbaa !5
  store <4 x i32> %wide.load50.31, ptr %136, align 4, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %0, i64 132096
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %0, i64 134276
  store i32 %138, ptr %139, align 4, !tbaa !5
  %.pre49 = load i32, ptr @_ZZN9histogram11consolidateEvE8ll_start, align 16, !tbaa !5
  br label %166

140:                                              ; preds = %1, %.loopexit
  %141 = phi i32 [ %.pre, %1 ], [ %144, %.loopexit ]
  %indvars.iv34 = phi i64 [ 0, %1 ], [ %indvars.iv.next35, %.loopexit ]
  %142 = getelementptr inbounds [32 x i32], ptr %2, i64 0, i64 %indvars.iv34
  store i32 0, ptr %142, align 4, !tbaa !5
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %143 = getelementptr inbounds [31 x i32], ptr @_ZL10dist_start, i64 0, i64 %indvars.iv.next35
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = icmp slt i32 %141, %144
  br i1 %145, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %140
  %146 = add i32 %141, -1
  %147 = sext i32 %146 to i64
  %148 = sub i32 %144, %141
  %xtraiter = and i32 %148, 3
  %149 = sub i32 %141, %144
  %150 = icmp ugt i32 %149, -4
  br i1 %150, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i32 %148, -4
  br label %151

151:                                              ; preds = %151, %.lr.ph.new
  %indvars.iv = phi i64 [ %147, %.lr.ph.new ], [ %indvars.iv.next.3, %151 ]
  %152 = phi i32 [ 0, %.lr.ph.new ], [ %164, %151 ]
  %niter = phi i32 [ 0, %.lr.ph.new ], [ %niter.next.3, %151 ]
  %153 = getelementptr inbounds [32768 x i32], ptr %0, i64 0, i64 %indvars.iv
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add i32 %152, %154
  store i32 %155, ptr %142, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %156 = getelementptr inbounds [32768 x i32], ptr %0, i64 0, i64 %indvars.iv.next
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add i32 %155, %157
  store i32 %158, ptr %142, align 4, !tbaa !5
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
  %159 = getelementptr inbounds [32768 x i32], ptr %0, i64 0, i64 %indvars.iv.next.1
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = add i32 %158, %160
  store i32 %161, ptr %142, align 4, !tbaa !5
  %indvars.iv.next.2 = add nsw i64 %indvars.iv, 3
  %162 = getelementptr inbounds [32768 x i32], ptr %0, i64 0, i64 %indvars.iv.next.2
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add i32 %161, %163
  store i32 %164, ptr %142, align 4, !tbaa !5
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, 4
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %151, !llvm.loop !13

165:                                              ; preds = %._crit_edge
  tail call void @_ZN9histogram9normalizeEv(ptr noundef nonnull align 4 dereferenceable(134396) %0)
  ret void

166:                                              ; preds = %vector.ph, %._crit_edge
  %167 = phi i32 [ %.pre49, %vector.ph ], [ %171, %._crit_edge ]
  %indvars.iv45 = phi i64 [ 257, %vector.ph ], [ %indvars.iv.next46, %._crit_edge ]
  %168 = getelementptr inbounds [286 x i32], ptr %10, i64 0, i64 %indvars.iv45
  store i32 0, ptr %168, align 4, !tbaa !5
  %169 = add nsw i64 %indvars.iv45, -256
  %170 = getelementptr inbounds [30 x i32], ptr @_ZZN9histogram11consolidateEvE8ll_start, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp slt i32 %167, %171
  br i1 %172, label %.lr.ph30, label %._crit_edge

.lr.ph30:                                         ; preds = %166
  %173 = add i32 %167, 254
  %174 = sext i32 %173 to i64
  %175 = add nsw i32 %171, 253
  %176 = sext i32 %175 to i64
  br label %177

._crit_edge:                                      ; preds = %177, %166
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next46, 286
  br i1 %exitcond48.not, label %165, label %166, !llvm.loop !14

177:                                              ; preds = %.lr.ph30, %177
  %indvars.iv42 = phi i64 [ %174, %.lr.ph30 ], [ %indvars.iv.next43, %177 ]
  %178 = phi i32 [ 0, %.lr.ph30 ], [ %181, %177 ]
  %179 = getelementptr inbounds [513 x i32], ptr %9, i64 0, i64 %indvars.iv42
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = add i32 %178, %180
  store i32 %181, ptr %168, align 4, !tbaa !5
  %indvars.iv.next43 = add nsw i64 %indvars.iv42, 1
  %182 = icmp slt i64 %indvars.iv42, %176
  br i1 %182, label %177, label %._crit_edge, !llvm.loop !15
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9histogram9normalizeEv(ptr noundef nonnull align 4 dereferenceable(134396)) local_unnamed_addr #0 align 2

attributes #0 = { 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" }

!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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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