; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LTIME/LTIME 19/b.ll (Z3hldiii)

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

@adj_list = external dso_local global [100100 x %"class.std::vector"], align 16
@lengths = external dso_local global [100100 x %"class.std::vector"], align 16
@chain_no = external dso_local global i32, align 4
@chain_ind = external dso_local global [100100 x i32], align 16
@chain_head = external dso_local global [100100 x i32], align 16
@pos_in_base = external dso_local global [100100 x i32], align 16
@base_array = external dso_local global [100100 x i32], align 16
@ptr = external dso_local global i32, align 4
@subtree_size = external dso_local global [100100 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 void @_Z3hldiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %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
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  %12 = load i32, ptr @chain_no, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [100100 x i32], ptr @chain_head, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, -1
  br i1 %16, label %17, label %22

17:                                               ; preds = %3
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr @chain_no, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [100100 x i32], ptr @chain_head, i64 0, i64 %20
  store i32 %18, ptr %21, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %17, %3
  %23 = load i32, ptr @chain_no, align 4, !tbaa !5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100100 x i32], ptr @chain_ind, i64 0, i64 %25
  store i32 %23, ptr %26, align 4, !tbaa !5
  %27 = load i32, ptr @ptr, align 4, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100100 x i32], ptr @pos_in_base, i64 0, i64 %29
  store i32 %27, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = load i32, ptr @ptr, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @ptr, align 4, !tbaa !5
  %34 = sext i32 %32 to i64
  %35 = getelementptr inbounds [100100 x i32], ptr @base_array, i64 0, i64 %34
  store i32 %31, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 -1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, 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 %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 %41

41:                                               ; preds = %92, %22
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %95

46:                                               ; preds = %41
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %48
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51) #3
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = icmp ne i32 %53, %54
  br i1 %55, label %56, label %91

56:                                               ; preds = %46
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = icmp eq i32 %57, -1
  br i1 %58, label %75, label %59

59:                                               ; preds = %56
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %61
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #3
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100100 x i32], ptr @subtree_size, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100100 x i32], ptr @subtree_size, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp sgt i32 %69, %73
  br i1 %74, label %75, label %90

75:                                               ; preds = %59, %56
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %77
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %80) #3
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @lengths, i64 0, i64 %84
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #3
  %89 = load i32, ptr %88, align 4, !tbaa !5
  store i32 %89, ptr %8, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %75, %59
  br label %91

91:                                               ; preds = %90, %46
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %10, align 4, !tbaa !5
  br label %41, !llvm.loop !9

95:                                               ; preds = %45
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = icmp ne i32 %96, -1
  br i1 %97, label %98, label %102

98:                                               ; preds = %95
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z3hldiii(i32 noundef %99, i32 noundef %100, i32 noundef %101)
  br label %102

102:                                              ; preds = %98, %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %147, %102
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %150

108:                                              ; preds = %103
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %110
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #3
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = icmp ne i32 %115, %116
  br i1 %117, label %118, label %146

118:                                              ; preds = %108
  %119 = load i32, ptr %4, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %120
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #3
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = icmp ne i32 %125, %126
  br i1 %127, label %128, label %146

128:                                              ; preds = %118
  %129 = load i32, ptr @chain_no, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr @chain_no, align 4, !tbaa !5
  %131 = load i32, ptr %4, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %132
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %135) #3
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @lengths, i64 0, i64 %139
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %142) #3
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z3hldiii(i32 noundef %137, i32 noundef %144, i32 noundef %145)
  br label %146

146:                                              ; preds = %128, %118, %108
  br label %147

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

150:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

; 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

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}


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

@adj_list = external dso_local global [100100 x %"class.std::vector"], align 16
@lengths = external dso_local global [100100 x %"class.std::vector"], align 16
@chain_no = external dso_local local_unnamed_addr global i32, align 4
@chain_ind = external dso_local local_unnamed_addr global [100100 x i32], align 16
@chain_head = external dso_local local_unnamed_addr global [100100 x i32], align 16
@pos_in_base = external dso_local local_unnamed_addr global [100100 x i32], align 16
@base_array = external dso_local local_unnamed_addr global [100100 x i32], align 16
@ptr = external dso_local local_unnamed_addr global i32, align 4
@subtree_size = external dso_local local_unnamed_addr global [100100 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z3hldiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = load i32, ptr @chain_no, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [100100 x i32], ptr @chain_head, i64 0, i64 %5
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp eq i32 %7, -1
  br i1 %8, label %9, label %10

9:                                                ; preds = %3
  store i32 %0, ptr %6, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %9, %3
  %11 = sext i32 %0 to i64
  %12 = getelementptr inbounds [100100 x i32], ptr @chain_ind, i64 0, i64 %11
  store i32 %4, ptr %12, align 4, !tbaa !5
  %13 = load i32, ptr @ptr, align 4, !tbaa !5
  %14 = getelementptr inbounds [100100 x i32], ptr @pos_in_base, i64 0, i64 %11
  store i32 %13, ptr %14, align 4, !tbaa !5
  %15 = add nsw i32 %13, 1
  store i32 %15, ptr @ptr, align 4, !tbaa !5
  %16 = sext i32 %13 to i64
  %17 = getelementptr inbounds [100100 x i32], ptr @base_array, i64 0, i64 %16
  store i32 %1, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @adj_list, i64 0, i64 %11
  %19 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #1
  %20 = trunc i64 %19 to i32
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge52

.lr.ph:                                           ; preds = %10
  %22 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @lengths, i64 0, i64 %11
  %wide.trip.count = and i64 %19, 2147483647
  br label %23

._crit_edge:                                      ; preds = %43
  %.not = icmp eq i32 %.1, -1
  br i1 %.not, label %45, label %44

23:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %.03846 = phi i32 [ -1, %.lr.ph ], [ %.1, %43 ]
  %.03945 = phi i32 [ undef, %.lr.ph ], [ %.140, %43 ]
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #1
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %.not44 = icmp eq i32 %25, %2
  br i1 %.not44, label %43, label %26

26:                                               ; preds = %23
  %27 = icmp eq i32 %.03846, -1
  br i1 %27, label %38, label %28

28:                                               ; preds = %26
  %29 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #1
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100100 x i32], ptr @subtree_size, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %.03846 to i64
  %35 = getelementptr inbounds [100100 x i32], ptr @subtree_size, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp sgt i32 %33, %36
  br i1 %37, label %38, label %43

38:                                               ; preds = %28, %26
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #1
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv) #1
  %42 = load i32, ptr %41, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %23, %38, %28
  %.140 = phi i32 [ %42, %38 ], [ %.03945, %28 ], [ %.03945, %23 ]
  %.1 = phi i32 [ %40, %38 ], [ %.03846, %28 ], [ %.03846, %23 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %23, !llvm.loop !9

44:                                               ; preds = %._crit_edge
  tail call void @_Z3hldiii(i32 noundef %.1, i32 noundef %.140, i32 noundef %0)
  br label %45

45:                                               ; preds = %44, %._crit_edge
  %.038.lcssa62 = phi i32 [ %.1, %44 ], [ -1, %._crit_edge ]
  br i1 %21, label %.lr.ph51, label %._crit_edge52

.lr.ph51:                                         ; preds = %45
  %46 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @lengths, i64 0, i64 %11
  %wide.trip.count57 = and i64 %19, 2147483647
  br label %47

._crit_edge52:                                    ; preds = %60, %10, %45
  ret void

47:                                               ; preds = %.lr.ph51, %60
  %indvars.iv54 = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next55, %60 ]
  %48 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv54) #1
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %.not42 = icmp eq i32 %49, %.038.lcssa62
  br i1 %.not42, label %60, label %50

50:                                               ; preds = %47
  %51 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv54) #1
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %.not43 = icmp eq i32 %52, %2
  br i1 %.not43, label %60, label %53

53:                                               ; preds = %50
  %54 = load i32, ptr @chain_no, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr @chain_no, align 4, !tbaa !5
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv54) #1
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv54) #1
  %59 = load i32, ptr %58, align 4, !tbaa !5
  tail call void @_Z3hldiii(i32 noundef %57, i32 noundef %59, i32 noundef %0)
  br label %60

60:                                               ; preds = %47, %50, %53
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge52, label %47, !llvm.loop !11
}

; 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,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass