; LLVM IR from upupming/algorithm :: acwing/日常刷题/数位DP/1085. 不要62.ll (Z2dpi)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@f = external dso_local global [15 x [10 x i32]], align 16

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

; 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
define dso_local noundef i32 @_Z2dpi(i32 noundef %0) #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %1
  store i32 1, ptr %2, align 4
  br label %102

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #3
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %19

19:                                               ; preds = %25, %18
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = srem i32 %23, 10
  store i32 %24, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %25 unwind label %28

25:                                               ; preds = %22
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sdiv i32 %26, 10
  store i32 %27, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %19, !llvm.loop !9

28:                                               ; preds = %22
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %104

32:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %33 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %34 = sub i64 %33, 1
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %36 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %36, ptr %11, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %96, %32
  %38 = load i32, ptr %11, align 4, !tbaa !5
  %39 = icmp sge i32 %38, 0
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  store i32 4, ptr %12, align 4
  br label %99

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %43) #3
  %45 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %45, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %72, %41
  %47 = load i32, ptr %14, align 4, !tbaa !5
  %48 = load i32, ptr %13, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %75

51:                                               ; preds = %46
  %52 = load i32, ptr %14, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 4
  br i1 %53, label %60, label %54

54:                                               ; preds = %51
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 6
  br i1 %56, label %57, label %61

57:                                               ; preds = %54
  %58 = load i32, ptr %14, align 4, !tbaa !5
  %59 = icmp eq i32 %58, 2
  br i1 %59, label %60, label %61

60:                                               ; preds = %57, %51
  br label %72

61:                                               ; preds = %57, %54
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %64
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [10 x i32], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = add nsw i32 %70, %69
  store i32 %71, ptr %4, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %61, %60
  %73 = load i32, ptr %14, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %14, align 4, !tbaa !5
  br label %46, !llvm.loop !11

75:                                               ; preds = %50
  %76 = load i32, ptr %13, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 4
  br i1 %77, label %84, label %78

78:                                               ; preds = %75
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 6
  br i1 %80, label %81, label %85

81:                                               ; preds = %78
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = icmp eq i32 %82, 2
  br i1 %83, label %84, label %85

84:                                               ; preds = %81, %75
  store i32 4, ptr %12, align 4
  br label %93

85:                                               ; preds = %81, %78
  %86 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %86, ptr %5, align 4, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %92

89:                                               ; preds = %85
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %4, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %89, %85
  store i32 0, ptr %12, align 4
  br label %93

93:                                               ; preds = %92, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  %94 = load i32, ptr %12, align 4
  switch i32 %94, label %99 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %11, align 4, !tbaa !5
  br label %37, !llvm.loop !12

99:                                               ; preds = %93, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %101, ptr %2, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %102

102:                                              ; preds = %100, %17
  %103 = load i32, ptr %2, align 4
  ret i32 %103

104:                                              ; preds = %28
  %105 = load ptr, ptr %8, align 8
  %106 = load i32, ptr %9, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!"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 = distinct !{!12, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@f = external dso_local local_unnamed_addr global [15 x [10 x i32]], align 16

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

; 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
define dso_local noundef i32 @_Z2dpi(i32 noundef %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = icmp eq i32 %0, 0
  br i1 %4, label %78, label %5

5:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %6

6:                                                ; preds = %5, %9
  %.03342 = phi i32 [ %0, %5 ], [ %8, %9 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %7 = srem i32 %.03342, 10
  %8 = sdiv i32 %.03342, 10
  store i32 %7, ptr %3, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %9 unwind label %10

9:                                                ; preds = %6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %.03342.off = add i32 %.03342, 9
  %.not = icmp ult i32 %.03342.off, 19
  br i1 %.not, label %12, label %6, !llvm.loop !9

10:                                               ; preds = %6
  %11 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %11

12:                                               ; preds = %9
  %13 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %14 = trunc i64 %13 to i32
  %.03245 = add i32 %14, -1
  %15 = icmp sgt i32 %.03245, -1
  br i1 %15, label %.lr.ph51.preheader, label %.thread

.lr.ph51.preheader:                               ; preds = %12
  %16 = zext nneg i32 %.03245 to i64
  %17 = and i64 %13, 4294967295
  br label %.lr.ph51

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %._crit_edge.thread.thread
  %indvars.iv87 = phi i64 [ %17, %.lr.ph51.preheader ], [ %indvars.iv.next88, %._crit_edge.thread.thread ]
  %indvars.iv85 = phi i64 [ %16, %.lr.ph51.preheader ], [ %indvars.iv.next86, %._crit_edge.thread.thread ]
  %.03447 = phi i32 [ 0, %.lr.ph51.preheader ], [ %spec.select, %._crit_edge.thread.thread ]
  %.03546 = phi i32 [ 0, %.lr.ph51.preheader ], [ %19, %._crit_edge.thread.thread ]
  %.03546.fr = freeze i32 %.03546
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv85) #4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge.thread.thread

.lr.ph:                                           ; preds = %.lr.ph51
  %21 = icmp eq i32 %.03546.fr, 6
  %wide.trip.count83 = zext nneg i32 %19 to i64
  br i1 %21, label %.lr.ph.split.preheader, label %23

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %xtraiter = and i64 %wide.trip.count83, 3
  %22 = icmp ult i32 %19, 4
  br i1 %22, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.split.preheader.new

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

23:                                               ; preds = %.lr.ph
  %24 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 0
  %25 = load i32, ptr %24, align 8, !tbaa !5
  %26 = add nsw i32 %25, %.03447
  %exitcond.peel.not = icmp eq i32 %19, 1
  br i1 %exitcond.peel.not, label %._crit_edge.thread.thread, label %27

27:                                               ; preds = %23
  %28 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 1
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, %26
  %exitcond.peel63.not = icmp eq i32 %19, 2
  br i1 %exitcond.peel63.not, label %._crit_edge.thread.thread, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 2
  %33 = load i32, ptr %32, align 8, !tbaa !5
  %34 = add nsw i32 %33, %30
  %exitcond.peel68.not = icmp eq i32 %19, 3
  br i1 %exitcond.peel68.not, label %._crit_edge.thread.thread, label %35

35:                                               ; preds = %31
  %36 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 3
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, %34
  switch i32 %19, label %.lr.ph.split.us.peel.next74.preheader [
    i32 4, label %.thread
    i32 5, label %._crit_edge.thread.thread
  ]

.lr.ph.split.us.peel.next74.preheader:            ; preds = %35
  %39 = add nsw i64 %wide.trip.count83, -5
  %min.iters.check = icmp ult i64 %39, 8
  br i1 %min.iters.check, label %.lr.ph.split.us.peel.next74.preheader103, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.split.us.peel.next74.preheader
  %n.vec = and i64 %39, -8
  %ind.end = or disjoint i64 %n.vec, 5
  %40 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %38, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %40, %vector.ph ], [ %43, %vector.body ]
  %vec.phi101 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %44, %vector.body ]
  %offset.idx = or disjoint i64 %index, 5
  %41 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %offset.idx
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load = load <4 x i32>, ptr %41, align 4, !tbaa !5
  %wide.load102 = load <4 x i32>, ptr %42, align 4, !tbaa !5
  %43 = add <4 x i32> %wide.load, %vec.phi
  %44 = add <4 x i32> %wide.load102, %vec.phi101
  %index.next = add nuw i64 %index, 8
  %45 = icmp eq i64 %index.next, %n.vec
  br i1 %45, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %44, %43
  %46 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %39, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.split.us.peel.next74.preheader103

.lr.ph.split.us.peel.next74.preheader103:         ; preds = %middle.block, %.lr.ph.split.us.peel.next74.preheader
  %indvars.iv.ph = phi i64 [ 5, %.lr.ph.split.us.peel.next74.preheader ], [ %ind.end, %middle.block ]
  %.143.us.ph = phi i32 [ %38, %.lr.ph.split.us.peel.next74.preheader ], [ %46, %middle.block ]
  br label %.lr.ph.split.us.peel.next74

.lr.ph.split.us.peel.next74:                      ; preds = %.lr.ph.split.us.peel.next74.preheader103, %.lr.ph.split.us.peel.next74
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split.us.peel.next74 ], [ %indvars.iv.ph, %.lr.ph.split.us.peel.next74.preheader103 ]
  %.143.us = phi i32 [ %49, %.lr.ph.split.us.peel.next74 ], [ %.143.us.ph, %.lr.ph.split.us.peel.next74.preheader103 ]
  %47 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, %.143.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count83
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.us.peel.next74, !llvm.loop !15

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph.split.3, %.lr.ph.split.preheader
  %.2.lcssa.ph = phi i32 [ poison, %.lr.ph.split.preheader ], [ %72, %.lr.ph.split.3 ]
  %indvars.iv80.unr = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next81.3, %.lr.ph.split.3 ]
  %.143.unr = phi i32 [ %.03447, %.lr.ph.split.preheader ], [ %72, %.lr.ph.split.3 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.split.epil

.lr.ph.split.epil:                                ; preds = %._crit_edge.loopexit.unr-lcssa, %55
  %indvars.iv80.epil = phi i64 [ %indvars.iv.next81.epil, %55 ], [ %indvars.iv80.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.143.epil = phi i32 [ %.2.epil, %55 ], [ %.143.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %55 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %50 = trunc nuw nsw i64 %indvars.iv80.epil to i32
  switch i32 %50, label %51 [
    i32 4, label %55
    i32 2, label %55
  ]

51:                                               ; preds = %.lr.ph.split.epil
  %52 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv80.epil
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, %.143.epil
  br label %55

55:                                               ; preds = %51, %.lr.ph.split.epil, %.lr.ph.split.epil
  %.2.epil = phi i32 [ %.143.epil, %.lr.ph.split.epil ], [ %54, %51 ], [ %.143.epil, %.lr.ph.split.epil ]
  %indvars.iv.next81.epil = add nuw nsw i64 %indvars.iv80.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.split.epil, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph.split.us.peel.next74, %._crit_edge.loopexit.unr-lcssa, %55, %middle.block
  %.1.lcssa = phi i32 [ %46, %middle.block ], [ %.2.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %.2.epil, %55 ], [ %49, %.lr.ph.split.us.peel.next74 ]
  %56 = icmp eq i32 %19, 4
  br i1 %56, label %.thread, label %._crit_edge.thread

.lr.ph.split:                                     ; preds = %.lr.ph.split.3, %.lr.ph.split.preheader.new
  %indvars.iv80 = phi i64 [ 0, %.lr.ph.split.preheader.new ], [ %indvars.iv.next81.3, %.lr.ph.split.3 ]
  %.143 = phi i32 [ %.03447, %.lr.ph.split.preheader.new ], [ %72, %.lr.ph.split.3 ]
  %niter = phi i64 [ 0, %.lr.ph.split.preheader.new ], [ %niter.next.3, %.lr.ph.split.3 ]
  %57 = trunc nuw nsw i64 %indvars.iv80 to i32
  %cond = icmp eq i32 %57, 4
  br i1 %cond, label %.lr.ph.split.1, label %58

58:                                               ; preds = %.lr.ph.split
  %59 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv80
  %60 = load i32, ptr %59, align 8, !tbaa !5
  %61 = add nsw i32 %60, %.143
  br label %.lr.ph.split.1

.lr.ph.split.1:                                   ; preds = %.lr.ph.split, %58
  %.2 = phi i32 [ %61, %58 ], [ %.143, %.lr.ph.split ]
  %indvars.iv.next81 = or disjoint i64 %indvars.iv80, 1
  %62 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv.next81
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %.2
  %indvars.iv.next81.1 = or disjoint i64 %indvars.iv80, 2
  %65 = trunc nuw nsw i64 %indvars.iv.next81.1 to i32
  %cond110 = icmp eq i32 %65, 2
  br i1 %cond110, label %.lr.ph.split.3, label %66

66:                                               ; preds = %.lr.ph.split.1
  %67 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv.next81.1
  %68 = load i32, ptr %67, align 8, !tbaa !5
  %69 = add nsw i32 %68, %64
  br label %.lr.ph.split.3

.lr.ph.split.3:                                   ; preds = %.lr.ph.split.1, %66
  %.2.2 = phi i32 [ %69, %66 ], [ %64, %.lr.ph.split.1 ]
  %indvars.iv.next81.2 = or disjoint i64 %indvars.iv80, 3
  %70 = getelementptr inbounds [15 x [10 x i32]], ptr @f, i64 0, i64 %indvars.iv87, i64 %indvars.iv.next81.2
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, %.2.2
  %indvars.iv.next81.3 = add nuw nsw i64 %indvars.iv80, 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.split, !llvm.loop !18

._crit_edge.thread:                               ; preds = %._crit_edge
  %73 = icmp eq i32 %.03546.fr, 6
  %74 = icmp eq i32 %19, 2
  %or.cond3 = and i1 %73, %74
  br i1 %or.cond3, label %.thread, label %._crit_edge.thread.thread

._crit_edge.thread.thread:                        ; preds = %35, %.lr.ph51, %23, %27, %31, %._crit_edge.thread
  %.1.lcssa9398 = phi i32 [ %.1.lcssa, %._crit_edge.thread ], [ %.03447, %.lr.ph51 ], [ %26, %23 ], [ %30, %27 ], [ %34, %31 ], [ %38, %35 ]
  %75 = icmp eq i64 %indvars.iv85, 0
  %76 = zext i1 %75 to i32
  %spec.select = add nsw i32 %.1.lcssa9398, %76
  %indvars.iv.next86 = add nsw i64 %indvars.iv85, -1
  %77 = icmp sgt i64 %indvars.iv85, 0
  %indvars.iv.next88 = add nsw i64 %indvars.iv87, -1
  br i1 %77, label %.lr.ph51, label %.thread, !llvm.loop !19

.thread:                                          ; preds = %._crit_edge.thread.thread, %._crit_edge.thread, %._crit_edge, %35, %12
  %.5 = phi i32 [ 0, %12 ], [ %38, %35 ], [ %.1.lcssa, %._crit_edge ], [ %.1.lcssa, %._crit_edge.thread ], [ %spec.select, %._crit_edge.thread.thread ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  br label %78

78:                                               ; preds = %1, %.thread
  %.030 = phi i32 [ %.5, %.thread ], [ 1, %1 ]
  ret i32 %.030
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !14}
!12 = !{!"llvm.loop.peeled.count", i32 5}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10, !12, !14, !13}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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