; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2018-19/Open 2019/Gold (walk (12:15))

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@ed = external dso_local global [28128750 x i32], align 16
@dist = external dso_local global [60000000 x i32], align 16
@co = external dso_local global i32, align 4
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7kruskalv() #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11bucket_sorti(i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %11 unwind label %19

11:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %12 unwind label %23

12:                                               ; preds = %11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %65, %12
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = load i32, ptr @N, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  %17 = icmp slt i32 %14, %16
  br i1 %17, label %28, label %18

18:                                               ; preds = %13
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %68

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %4, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %5, align 4
  br label %27

23:                                               ; preds = %11
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %4, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br label %27

27:                                               ; preds = %23, %19
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  br label %71

28:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %8, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %61, %28
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = load i32, ptr @N, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %64

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %38 = load i32, ptr @N, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = mul nsw i32 %39, %40
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = add nsw i32 %41, %42
  store i32 %43, ptr %9, align 4, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = mul nsw i32 84, %44
  %46 = sub nsw i32 2019201997, %45
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = mul nsw i64 48, %49
  %51 = sub nsw i64 %47, %50
  %52 = trunc i64 %51 to i32
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [60000000 x i32], ptr @dist, i64 0, i64 %54
  store i32 %52, ptr %55, align 4, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = load i32, ptr @co, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr @co, align 4, !tbaa !5
  %59 = sext i32 %57 to i64
  %60 = getelementptr inbounds [28128750 x i32], ptr @ed, i64 0, i64 %59
  store i32 %56, ptr %60, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %61

61:                                               ; preds = %37
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %8, align 4, !tbaa !5
  br label %31, !llvm.loop !9

64:                                               ; preds = %36
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %6, align 4, !tbaa !5
  br label %13, !llvm.loop !11

68:                                               ; preds = %18
  call void @_Z11bucket_sorti(i32 noundef 0)
  call void @_Z11bucket_sorti(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %69 = call noundef i32 @_Z7kruskalv()
  store i32 %69, ptr %10, align 4, !tbaa !5
  call void @_ZN6output2psIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %70 = load i32, ptr %1, align 4
  ret i32 %70

71:                                               ; preds = %27
  %72 = load ptr, ptr %4, align 8
  %73 = load i32, ptr %5, align 4
  %74 = insertvalue { ptr, i32 } poison, ptr %72, 0
  %75 = insertvalue { ptr, i32 } %74, i32 %73, 1
  resume { ptr, i32 } %75
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { mustprogress norecurse 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@ed = external dso_local local_unnamed_addr global [28128750 x i32], align 16
@dist = external dso_local local_unnamed_addr global [60000000 x i32], align 16
@co = external dso_local local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7kruskalv() local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11bucket_sorti(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %4 unwind label %13

4:                                                ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %5 unwind label %15

5:                                                ; preds = %4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %6 = load i32, ptr @N, align 4, !tbaa !5
  %.not25 = icmp slt i32 %6, 1
  br i1 %.not25, label %._crit_edge, label %.lr.ph28

.lr.ph28:                                         ; preds = %5
  %co.promoted22 = load i32, ptr @co, align 4, !tbaa !5
  %7 = add nuw i32 %6, 1
  %8 = zext i32 %7 to i64
  %9 = zext nneg i32 %6 to i64
  %10 = add nsw i32 %6, -2
  br label %18

..loopexit_crit_edge:                             ; preds = %scalar.ph, %middle.block
  %indvars.iv.next32.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next32, %scalar.ph ]
  %11 = trunc nsw i64 %indvars.iv.next32.lcssa to i32
  store i32 %11, ptr @co, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %..loopexit_crit_edge, %18
  %.lcssa23 = phi i32 [ %11, %..loopexit_crit_edge ], [ %.lcssa2426, %18 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond39.not = icmp eq i64 %indvars.iv.next37, %8
  %indvar.next = add i32 %indvar, 1
  br i1 %exitcond39.not, label %._crit_edge, label %18, !llvm.loop !9

._crit_edge:                                      ; preds = %.loopexit, %5
  call void @_Z11bucket_sorti(i32 noundef 0)
  call void @_Z11bucket_sorti(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %12 = call noundef i32 @_Z7kruskalv()
  store i32 %12, ptr %3, align 4, !tbaa !5
  call void @_ZN6output2psIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret i32 0

13:                                               ; preds = %0
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %17

15:                                               ; preds = %4
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  br label %17

17:                                               ; preds = %15, %13
  %.pn = phi { ptr, i32 } [ %16, %15 ], [ %14, %13 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn

18:                                               ; preds = %.lr.ph28, %.loopexit
  %indvar = phi i32 [ 0, %.lr.ph28 ], [ %indvar.next, %.loopexit ]
  %indvars.iv36 = phi i64 [ 1, %.lr.ph28 ], [ %indvars.iv.next37, %.loopexit ]
  %indvars.iv = phi i64 [ 2, %.lr.ph28 ], [ %indvars.iv.next, %.loopexit ]
  %.lcssa2426 = phi i32 [ %co.promoted22, %.lr.ph28 ], [ %.lcssa23, %.loopexit ]
  %19 = sub i32 %10, %indvar
  %20 = zext i32 %19 to i64
  %21 = add nuw nsw i64 %20, 1
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %.not1820.not = icmp ult i64 %indvars.iv36, %9
  br i1 %.not1820.not, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %18
  %22 = mul nuw nsw i64 %indvars.iv36, %8
  %23 = trunc nuw nsw i64 %indvars.iv36 to i32
  %.neg = mul i32 %23, -84
  %24 = add i32 %.neg, 2019201997
  %25 = sext i32 %.lcssa2426 to i64
  %min.iters.check = icmp ult i32 %19, 7
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %21, 8589934584
  %ind.end = add nsw i64 %n.vec, %25
  %ind.end40 = add nuw i64 %indvars.iv, %n.vec
  %26 = trunc i64 %indvars.iv to i32
  %.splatinsert = insertelement <4 x i32> poison, i32 %26, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %24, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %27 = insertelement <4 x i64> poison, i64 %22, i64 0
  %28 = insertelement <2 x i64> poison, i64 %22, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %offset.idx = add i64 %index, %25
  %offset.idx43 = add i64 %indvars.iv, %index
  %29 = add i64 %offset.idx43, 1
  %30 = add nuw nsw i64 %offset.idx43, %22
  %31 = add nuw nsw i64 %29, %22
  %32 = insertelement <2 x i64> poison, i64 %offset.idx43, i64 0
  %33 = add <2 x i64> %28, %32
  %34 = shufflevector <2 x i64> %33, <2 x i64> poison, <2 x i32> zeroinitializer
  %35 = add <2 x i64> %34, <i64 2, i64 3>
  %36 = insertelement <4 x i64> poison, i64 %30, i64 0
  %37 = insertelement <4 x i64> %36, i64 %31, i64 1
  %38 = shufflevector <2 x i64> %35, <2 x i64> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %39 = shufflevector <4 x i64> %37, <4 x i64> %38, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  %40 = insertelement <4 x i64> poison, i64 %offset.idx43, i64 0
  %41 = add <4 x i64> %27, %40
  %42 = mul <4 x i32> %vec.ind, <i32 -48, i32 -48, i32 -48, i32 -48>
  %43 = mul <4 x i32> %vec.ind, <i32 -48, i32 -48, i32 -48, i32 -48>
  %44 = add <4 x i32> %43, <i32 -192, i32 -192, i32 -192, i32 -192>
  %45 = add <4 x i32> %broadcast.splat, %42
  %46 = add <4 x i32> %broadcast.splat, %44
  %47 = getelementptr inbounds [60000000 x i32], ptr @dist, i64 0, i64 %30
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <4 x i32> %45, ptr %47, align 4, !tbaa !5
  store <4 x i32> %46, ptr %48, align 4, !tbaa !5
  %49 = getelementptr inbounds [28128750 x i32], ptr @ed, i64 0, i64 %offset.idx
  %50 = trunc <4 x i64> %39 to <4 x i32>
  %51 = trunc <4 x i64> %41 to <4 x i32>
  %52 = shufflevector <4 x i32> %51, <4 x i32> poison, <4 x i32> zeroinitializer
  %53 = add <4 x i32> %52, <i32 4, i32 5, i32 6, i32 7>
  %54 = getelementptr inbounds i8, ptr %49, i64 16
  store <4 x i32> %50, ptr %49, align 4, !tbaa !5
  store <4 x i32> %53, ptr %54, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %55 = icmp eq i64 %index.next, %n.vec
  br i1 %55, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %21, %n.vec
  br i1 %cmp.n, label %..loopexit_crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv31.ph = phi i64 [ %25, %.lr.ph ], [ %ind.end, %middle.block ]
  %indvars.iv29.ph = phi i64 [ %indvars.iv, %.lr.ph ], [ %ind.end40, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv31 = phi i64 [ %indvars.iv.next32, %scalar.ph ], [ %indvars.iv31.ph, %scalar.ph.preheader ]
  %indvars.iv29 = phi i64 [ %indvars.iv.next30, %scalar.ph ], [ %indvars.iv29.ph, %scalar.ph.preheader ]
  %56 = add nuw nsw i64 %indvars.iv29, %22
  %57 = trunc nuw i64 %indvars.iv29 to i32
  %.neg19 = mul i32 %57, -48
  %58 = add i32 %24, %.neg19
  %59 = getelementptr inbounds [60000000 x i32], ptr @dist, i64 0, i64 %56
  store i32 %58, ptr %59, align 4, !tbaa !5
  %indvars.iv.next32 = add nsw i64 %indvars.iv31, 1
  %60 = getelementptr inbounds [28128750 x i32], ptr @ed, i64 0, i64 %indvars.iv31
  %61 = trunc nuw i64 %56 to i32
  store i32 %61, ptr %60, align 4, !tbaa !5
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next30 to i32
  %exitcond.not = icmp eq i32 %7, %lftr.wideiv
  br i1 %exitcond.not, label %..loopexit_crit_edge, label %scalar.ph, !llvm.loop !14
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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


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