; LLVM IR from reyadussalahin/problem-solving :: dynamic_programming/non_classical/codeforces/F917B/Solution.ll (Z3dfsiii)

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

@g = external dso_local global [128 x %"class.std::vector"], align 16
@w = external dso_local global [128 x %"class.std::vector"], align 16
@dp = external dso_local global [128 x [128 x [32 x i32]]], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %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
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  %13 = load i32, ptr %5, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %14
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [128 x [32 x i32]], ptr %15, i64 0, i64 %17
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = icmp ne i32 %22, -1
  br i1 %23, label %24, label %35

24:                                               ; preds = %3
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %26
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [128 x [32 x i32]], ptr %27, i64 0, i64 %29
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [32 x i32], ptr %30, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %4, align 4
  br label %186

35:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %37
  %39 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #3
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %42
  %44 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #3
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %147, %35
  %47 = load i32, ptr %10, align 4, !tbaa !5
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 2, ptr %11, align 4
  br label %150

51:                                               ; preds = %46
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %53
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #3
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp sge i32 %58, %59
  br i1 %60, label %61, label %133

61:                                               ; preds = %51
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [128 x [32 x i32]], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [32 x i32], ptr %67, i64 0, i64 %69
  store i32 1, ptr %70, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %128, %61
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %11, align 4
  br label %131

76:                                               ; preds = %71
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %78
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %81) #3
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %85
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88) #3
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp sge i32 %83, %90
  br i1 %91, label %92, label %127

92:                                               ; preds = %76
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %94
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #3
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %101
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #3
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %108
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %111) #3
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = call noundef i32 @_Z3dfsiii(i32 noundef %99, i32 noundef %106, i32 noundef %113)
  %115 = load i32, ptr %5, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %116
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [128 x [32 x i32]], ptr %117, i64 0, i64 %119
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [32 x i32], ptr %120, i64 0, i64 %122
  store i32 %114, ptr %123, align 4, !tbaa !5
  %124 = icmp ne i32 %114, 0
  br i1 %124, label %126, label %125

125:                                              ; preds = %92
  store i32 5, ptr %11, align 4
  br label %131

126:                                              ; preds = %92
  br label %127

127:                                              ; preds = %126, %76
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %12, align 4, !tbaa !5
  br label %71, !llvm.loop !9

131:                                              ; preds = %125, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132, %51
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %135
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [128 x [32 x i32]], ptr %136, i64 0, i64 %138
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [32 x i32], ptr %139, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %146

145:                                              ; preds = %133
  store i32 2, ptr %11, align 4
  br label %150

146:                                              ; preds = %133
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %10, align 4, !tbaa !5
  br label %46, !llvm.loop !11

150:                                              ; preds = %145, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %153
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [128 x [32 x i32]], ptr %154, i64 0, i64 %156
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [32 x i32], ptr %157, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = icmp ne i32 %161, -1
  br i1 %162, label %163, label %174

163:                                              ; preds = %151
  %164 = load i32, ptr %5, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %165
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [128 x [32 x i32]], ptr %166, i64 0, i64 %168
  %170 = load i32, ptr %7, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [32 x i32], ptr %169, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  br label %184

174:                                              ; preds = %151
  %175 = load i32, ptr %5, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %176
  %178 = load i32, ptr %6, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [128 x [32 x i32]], ptr %177, i64 0, i64 %179
  %181 = load i32, ptr %7, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [32 x i32], ptr %180, i64 0, i64 %182
  store i32 0, ptr %183, align 4, !tbaa !5
  br label %184

184:                                              ; preds = %174, %163
  %185 = phi i32 [ %173, %163 ], [ 0, %174 ]
  store i32 %185, ptr %4, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %186

186:                                              ; preds = %184, %24
  %187 = load i32, ptr %4, align 4
  ret i32 %187
}

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

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

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 = !{!"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::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 }

@g = external dso_local global [128 x %"class.std::vector"], align 16
@w = external dso_local global [128 x %"class.std::vector"], align 16
@dp = external dso_local local_unnamed_addr global [128 x [128 x [32 x i32]]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef range(i32 0, -1) i32 @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = sext i32 %0 to i64
  %5 = sext i32 %1 to i64
  %6 = sext i32 %2 to i64
  %7 = getelementptr inbounds [128 x [128 x [32 x i32]]], ptr @dp, i64 0, i64 %4, i64 %5, i64 %6
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp eq i32 %8, -1
  br i1 %.not, label %9, label %.thread56

9:                                                ; preds = %3
  %10 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %4
  %11 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #1
  %12 = trunc i64 %11 to i32
  %13 = getelementptr inbounds [128 x %"class.std::vector"], ptr @g, i64 0, i64 %5
  %14 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #1
  %15 = icmp sgt i32 %12, 0
  br i1 %15, label %.lr.ph60, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %9
  %.pr55.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %._crit_edge

.lr.ph60:                                         ; preds = %9
  %16 = trunc i64 %14 to i32
  %17 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %4
  %18 = icmp sgt i32 %16, 0
  %19 = getelementptr inbounds [128 x %"class.std::vector"], ptr @w, i64 0, i64 %5
  %wide.trip.count72 = and i64 %11, 2147483647
  br i1 %18, label %.lr.ph60.split.us.preheader, label %.lr.ph60.split

.lr.ph60.split.us.preheader:                      ; preds = %.lr.ph60
  %wide.trip.count67 = and i64 %14, 2147483647
  br label %.lr.ph60.split.us

.lr.ph60.split.us:                                ; preds = %.lr.ph60.split.us.preheader, %.thread.us
  %indvars.iv69 = phi i64 [ 0, %.lr.ph60.split.us.preheader ], [ %indvars.iv.next70, %.thread.us ]
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv69) #1
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %.not50.us = icmp slt i32 %21, %2
  br i1 %.not50.us, label %..loopexit_crit_edge.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph60.split.us
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %.lr.ph.us, %35
  %indvars.iv64 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next65, %35 ]
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv64) #1
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv69) #1
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not51.us = icmp slt i32 %24, %26
  br i1 %.not51.us, label %35, label %27

27:                                               ; preds = %22
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv69) #1
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv64) #1
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv64) #1
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = tail call noundef i32 @_Z3dfsiii(i32 noundef %29, i32 noundef %31, i32 noundef %33)
  store i32 %34, ptr %7, align 4, !tbaa !5
  %.not52.us = icmp eq i32 %34, 0
  br i1 %.not52.us, label %.thread.us, label %35

35:                                               ; preds = %27, %22
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next65, %wide.trip.count67
  br i1 %exitcond68.not, label %..loopexit_crit_edge.us, label %22, !llvm.loop !9

..loopexit_crit_edge.us:                          ; preds = %35, %.lr.ph60.split.us
  %.pr.us = load i32, ptr %7, align 4, !tbaa !5
  %36 = icmp eq i32 %.pr.us, 1
  br i1 %36, label %.thread56, label %.thread.us

.thread.us:                                       ; preds = %27, %..loopexit_crit_edge.us
  %.pr5576 = phi i32 [ %.pr.us, %..loopexit_crit_edge.us ], [ 0, %27 ]
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %._crit_edge, label %.lr.ph60.split.us, !llvm.loop !11

.lr.ph60.split:                                   ; preds = %.lr.ph60, %.thread
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread ], [ 0, %.lr.ph60 ]
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #1
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %.not50 = icmp slt i32 %38, %2
  br i1 %.not50, label %39, label %.thread56.sink.split

39:                                               ; preds = %.lr.ph60.split
  %.pr.pre = load i32, ptr %7, align 4, !tbaa !5
  %40 = icmp eq i32 %.pr.pre, 1
  br i1 %40, label %.thread56, label %.thread

.thread:                                          ; preds = %39
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count72
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph60.split, !llvm.loop !11

._crit_edge:                                      ; preds = %.thread, %.thread.us, %.._crit_edge_crit_edge
  %.pr55 = phi i32 [ %.pr55.pre, %.._crit_edge_crit_edge ], [ %.pr5576, %.thread.us ], [ %.pr.pre, %.thread ]
  %.not53 = icmp eq i32 %.pr55, -1
  br i1 %.not53, label %.thread56.sink.split, label %.thread56

.thread56.sink.split:                             ; preds = %.lr.ph60.split, %._crit_edge
  %.sink = phi i32 [ 0, %._crit_edge ], [ 1, %.lr.ph60.split ]
  store i32 %.sink, ptr %7, align 4, !tbaa !5
  br label %.thread56

.thread56:                                        ; preds = %39, %..loopexit_crit_edge.us, %.thread56.sink.split, %._crit_edge, %3
  %.047 = phi i32 [ %8, %3 ], [ %.pr55, %._crit_edge ], [ %.sink, %.thread56.sink.split ], [ 1, %..loopexit_crit_edge.us ], [ 1, %39 ]
  ret i32 %.047
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 #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" }
attributes #1 = { 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}


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