; LLVM IR from upupming/algorithm :: acwing/日常刷题/数位DP/1083. Windy数.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 [15 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z2dpi(i32 noundef %0) #2 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
  %15 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %1
  store i32 0, ptr %2, align 4
  br label %132

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

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

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = srem i32 %24, 10
  store i32 %25, 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 %26 unwind label %29

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

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

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

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

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

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %42 = load i32, ptr %10, 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) #4
  %45 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %45, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %49 = sub i64 %48, 1
  %50 = icmp eq i64 %47, %49
  %51 = zext i1 %50 to i32
  store i32 %51, ptr %13, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %75, %41
  %53 = load i32, ptr %13, align 4, !tbaa !5
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 7, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %78

57:                                               ; preds = %52
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sub nsw i32 %58, %59
  %61 = call i32 @llvm.abs.i32(i32 %60, i1 true)
  %62 = icmp sge i32 %61, 2
  br i1 %62, label %63, label %74

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

74:                                               ; preds = %63, %57
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %13, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %13, align 4, !tbaa !5
  br label %52, !llvm.loop !11

78:                                               ; preds = %56
  %79 = load i32, ptr %12, align 4, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sub nsw i32 %79, %80
  %82 = call i32 @llvm.abs.i32(i32 %81, i1 true)
  %83 = icmp slt i32 %82, 2
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  store i32 4, ptr %11, align 4
  br label %93

85:                                               ; preds = %78
  %86 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %86, ptr %5, align 4, !tbaa !5
  %87 = load i32, ptr %10, 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 %11, align 4
  br label %93

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

95:                                               ; preds = %93
  br label %96

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

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

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %127, %100
  %102 = load i32, ptr %14, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %105 = sub i64 %104, 1
  %106 = icmp ule i64 %103, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %101
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %130

108:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %123, %108
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = icmp sle i32 %110, 9
  br i1 %111, label %113, label %112

112:                                              ; preds = %109
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %126

113:                                              ; preds = %109
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [15 x i32], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = load i32, ptr %4, align 4, !tbaa !5
  %122 = add nsw i32 %121, %120
  store i32 %122, ptr %4, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %113
  %124 = load i32, ptr %15, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %15, align 4, !tbaa !5
  br label %109, !llvm.loop !13

126:                                              ; preds = %112
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %14, align 4, !tbaa !5
  br label %101, !llvm.loop !14

130:                                              ; preds = %107
  %131 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %131, ptr %2, align 4
  store i32 1, ptr %11, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %132

132:                                              ; preds = %130, %18
  %133 = load i32, ptr %2, align 4
  ret i32 %133

134:                                              ; preds = %29
  %135 = load ptr, ptr %8, align 8
  %136 = load i32, ptr %9, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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)) #2 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)) #3 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) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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 = !{!"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}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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 [15 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z2dpi(i32 noundef %0) local_unnamed_addr #2 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 %70, label %5

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

6:                                                ; preds = %5, %9
  %.03745 = phi i32 [ %0, %5 ], [ %8, %9 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %7 = srem i32 %.03745, 10
  %8 = sdiv i32 %.03745, 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) #5
  %.03745.off = add i32 %.03745, 9
  %.not = icmp ult i32 %.03745.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) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %11

12:                                               ; preds = %9
  %13 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %14 = and i64 %13, 4294967295
  br label %15

15:                                               ; preds = %._crit_edge, %12
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge ], [ %14, %12 ]
  %.039 = phi i32 [ %20, %._crit_edge ], [ -10, %12 ]
  %.038 = phi i32 [ %spec.select, %._crit_edge ], [ 0, %12 ]
  %indvars.iv.next57 = add nsw i64 %indvars.iv56, -1
  %indvars = trunc i64 %indvars.iv.next57 to i32
  %16 = icmp sgt i32 %indvars, -1
  br i1 %16, label %17, label %61

17:                                               ; preds = %15
  %18 = and i64 %indvars.iv.next57, 2147483647
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %18) #5
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %22 = add i64 %21, -1
  %23 = icmp eq i64 %22, %18
  %24 = zext i1 %23 to i32
  %25 = icmp sgt i32 %20, %24
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17
  %26 = zext i1 %23 to i64
  %wide.trip.count = zext i32 %20 to i64
  %27 = sub nsw i64 %wide.trip.count, %26
  %xtraiter = and i64 %27, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph
  %28 = zext i1 %23 to i32
  %29 = sub i32 %28, %.039
  %30 = call i32 @llvm.abs.i32(i32 %29, i1 true)
  %31 = icmp ugt i32 %30, 1
  br i1 %31, label %32, label %.prol.loopexit.unr-lcssa

32:                                               ; preds = %.prol.preheader
  %33 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %indvars.iv56, i64 %26
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = add nsw i32 %34, %.038
  br label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %32, %.prol.preheader
  %.2.prol = phi i32 [ %35, %32 ], [ %.038, %.prol.preheader ]
  %indvars.iv.next.prol = select i1 %23, i64 2, i64 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph
  %.2.lcssa.unr = phi i32 [ poison, %.lr.ph ], [ %.2.prol, %.prol.loopexit.unr-lcssa ]
  %indvars.iv.unr = phi i64 [ %26, %.lr.ph ], [ %indvars.iv.next.prol, %.prol.loopexit.unr-lcssa ]
  %.146.unr = phi i32 [ %.038, %.lr.ph ], [ %.2.prol, %.prol.loopexit.unr-lcssa ]
  %36 = add nsw i64 %wide.trip.count, -1
  %37 = icmp eq i64 %36, %26
  br i1 %37, label %._crit_edge, label %.lr.ph.new

._crit_edge:                                      ; preds = %.prol.loopexit, %60, %17
  %.1.lcssa = phi i32 [ %.038, %17 ], [ %.2.lcssa.unr, %.prol.loopexit ], [ %.2.1, %60 ]
  %38 = sub nsw i32 %20, %.039
  %39 = call i32 @llvm.abs.i32(i32 %38, i1 true)
  %40 = icmp ugt i32 %39, 1
  %41 = icmp eq i32 %indvars, 0
  %42 = zext i1 %41 to i32
  %spec.select = add nsw i32 %.1.lcssa, %42
  br i1 %40, label %15, label %61, !llvm.loop !11

.lr.ph.new:                                       ; preds = %.prol.loopexit, %60
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %60 ], [ %indvars.iv.unr, %.prol.loopexit ]
  %.146 = phi i32 [ %.2.1, %60 ], [ %.146.unr, %.prol.loopexit ]
  %43 = trunc i64 %indvars.iv to i32
  %44 = sub i32 %43, %.039
  %45 = call i32 @llvm.abs.i32(i32 %44, i1 true)
  %46 = icmp ugt i32 %45, 1
  br i1 %46, label %47, label %51

47:                                               ; preds = %.lr.ph.new
  %48 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %indvars.iv56, i64 %indvars.iv
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, %.146
  br label %51

51:                                               ; preds = %.lr.ph.new, %47
  %.2 = phi i32 [ %50, %47 ], [ %.146, %.lr.ph.new ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = trunc i64 %indvars.iv.next to i32
  %53 = sub i32 %52, %.039
  %54 = call i32 @llvm.abs.i32(i32 %53, i1 true)
  %55 = icmp ugt i32 %54, 1
  br i1 %55, label %56, label %60

56:                                               ; preds = %51
  %57 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %indvars.iv56, i64 %indvars.iv.next
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add nsw i32 %58, %.2
  br label %60

60:                                               ; preds = %56, %51
  %.2.1 = phi i32 [ %59, %56 ], [ %.2, %51 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.new, !llvm.loop !12

61:                                               ; preds = %15, %._crit_edge
  %.5 = phi i32 [ %.1.lcssa, %._crit_edge ], [ %.038, %15 ]
  %62 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %.not4450 = icmp eq i64 %62, 1
  br i1 %.not4450, label %._crit_edge53, label %.preheader

.preheader:                                       ; preds = %61, %.preheader
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %.preheader ], [ 1, %61 ]
  %.651 = phi i32 [ %op.rdx68, %.preheader ], [ %.5, %61 ]
  %63 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %indvars.iv64, i64 1
  %64 = load <8 x i32>, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds [15 x [15 x i32]], ptr @f, i64 0, i64 %indvars.iv64, i64 9
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %64)
  %op.rdx = add i32 %67, %66
  %op.rdx68 = add i32 %op.rdx, %.651
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %68 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %69 = add i64 %68, -1
  %.not44.not = icmp ugt i64 %69, %indvars.iv64
  br i1 %.not44.not, label %.preheader, label %._crit_edge53, !llvm.loop !13

._crit_edge53:                                    ; preds = %.preheader, %61
  %.6.lcssa = phi i32 [ %.5, %61 ], [ %op.rdx68, %.preheader ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  br label %70

70:                                               ; preds = %1, %._crit_edge53
  %.034 = phi i32 [ %.6.lcssa, %._crit_edge53 ], [ 0, %1 ]
  ret i32 %.034
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 #2 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 #3 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 #3 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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}
!13 = distinct !{!13, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass