; LLVM IR from Mohammed-Shoaib/Coding-Problems :: Google/Code Jam/2021/Qualification Round/D.ll (Z14ternary_searchiiiRSt6vectorIiSaIiEE)

; 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.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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 %"class.__gnu_cxx::__normal_iterator.0", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca i32, align 4
  %18 = 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
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = sub nsw i32 %19, %20
  store i32 %21, ptr %12, align 4, !tbaa !5
  %22 = load i32, ptr %12, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %37

24:                                               ; preds = %4
  %25 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %26 = load ptr, ptr %8, align 8, !tbaa !9
  %27 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #3
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %30) #3
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #3
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %13, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8
  %35 = call ptr @_ZNSt6vectorIiSaIiEE6insertEN9__gnu_cxx17__normal_iteratorIPKiS1_EERS4_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %34, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  store i32 1, ptr %17, align 4
  br label %113

37:                                               ; preds = %4
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %56

40:                                               ; preds = %37
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %49

43:                                               ; preds = %40
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %44, i32 noundef %46, i32 noundef %47, ptr noundef nonnull align 8 dereferenceable(24) %48)
  br label %55

49:                                               ; preds = %40
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  %54 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %50, i32 noundef %51, i32 noundef %53, ptr noundef nonnull align 8 dereferenceable(24) %54)
  br label %55

55:                                               ; preds = %49, %43
  store i32 1, ptr %17, align 4
  br label %113

56:                                               ; preds = %37
  br label %57

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %58 = load i32, ptr %12, align 4, !tbaa !5
  %59 = sdiv i32 %58, 3
  store i32 %59, ptr %18, align 4, !tbaa !5
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = load i32, ptr %18, align 4, !tbaa !5
  %62 = add nsw i32 %60, %61
  store i32 %62, ptr %9, align 4, !tbaa !5
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = load i32, ptr %18, align 4, !tbaa !5
  %65 = mul nsw i32 2, %64
  %66 = add nsw i32 %63, %65
  %67 = load i32, ptr %18, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 0
  %69 = zext i1 %68 to i32
  %70 = add nsw i32 %66, %69
  store i32 %70, ptr %10, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !9
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #3
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !9
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #3
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = call noundef i32 @_Z5queryiii(i32 noundef %71, i32 noundef %76, i32 noundef %81)
  store i32 %82, ptr %11, align 4, !tbaa !5
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = load ptr, ptr %8, align 8, !tbaa !9
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #3
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp eq i32 %83, %88
  br i1 %89, label %90, label %95

90:                                               ; preds = %57
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %91, i32 noundef %92, i32 noundef %93, ptr noundef nonnull align 8 dereferenceable(24) %94)
  br label %112

95:                                               ; preds = %57
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = icmp eq i32 %96, %97
  br i1 %98, label %99, label %105

99:                                               ; preds = %95
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %100, i32 noundef %102, i32 noundef %103, ptr noundef nonnull align 8 dereferenceable(24) %104)
  br label %111

105:                                              ; preds = %95
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %106, i32 noundef %108, i32 noundef %109, ptr noundef nonnull align 8 dereferenceable(24) %110)
  br label %111

111:                                              ; preds = %105, %99
  br label %112

112:                                              ; preds = %111, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  store i32 0, ptr %17, align 4
  br label %113

113:                                              ; preds = %112, %55, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %114 = load i32, ptr %17, align 4
  switch i32 %114, label %116 [
    i32 0, label %115
    i32 1, label %115
  ]

115:                                              ; preds = %113, %113
  ret void

116:                                              ; preds = %113
  unreachable
}

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

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

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

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

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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14ternary_searchiiiRSt6vectorIiSaIiEE(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  %9 = icmp eq i32 %2, %1
  br i1 %9, label %tailrecurse.outer43._crit_edge, label %.lr.ph.lr.ph.preheader

.lr.ph.lr.ph.preheader:                           ; preds = %4
  %10 = sub nsw i32 %2, %1
  br label %.lr.ph.lr.ph

.lr.ph.lr.ph:                                     ; preds = %.lr.ph.lr.ph.preheader, %tailrecurse.outer.backedge
  %11 = phi i32 [ %45, %tailrecurse.outer.backedge ], [ %10, %.lr.ph.lr.ph.preheader ]
  %.tr41.ph70 = phi i32 [ %.tr41.ph.be, %tailrecurse.outer.backedge ], [ %2, %.lr.ph.lr.ph.preheader ]
  %.tr40.ph69 = phi i32 [ %.tr40.ph.be, %tailrecurse.outer.backedge ], [ %1, %.lr.ph.lr.ph.preheader ]
  %.tr40.ph69.fr = freeze i32 %.tr40.ph69
  %smin = tail call i32 @llvm.smin.i32(i32 %.tr40.ph69.fr, i32 0)
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.lr.ph, %.split56.us
  %12 = phi i32 [ %11, %.lr.ph.lr.ph ], [ %16, %.split56.us ]
  %.tr40.ph4465 = phi i32 [ %.tr40.ph69.fr, %.lr.ph.lr.ph ], [ %15, %.split56.us ]
  %13 = icmp sgt i32 %.tr40.ph4465, 0
  br i1 %13, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %14 = icmp eq i32 %12, 1
  br i1 %14, label %.split56.us, label %.split.us

.split56.us:                                      ; preds = %.lr.ph.split.us
  %15 = add nsw i32 %.tr40.ph4465, -1
  %16 = sub nsw i32 %.tr41.ph70, %15
  %17 = icmp eq i32 %.tr41.ph70, %15
  br i1 %17, label %tailrecurse.outer43._crit_edge, label %.lr.ph

tailrecurse.outer43._crit_edge:                   ; preds = %tailrecurse.outer.backedge, %.split56.us, %tailrecurse, %4
  %.tr40.ph44.lcssa50 = phi i32 [ %2, %4 ], [ %smin, %tailrecurse ], [ %.tr41.ph70, %.split56.us ], [ %.tr40.ph.be, %tailrecurse.outer.backedge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %18 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %18, ptr %8, align 8
  %19 = sext i32 %.tr40.ph44.lcssa50 to i64
  %20 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %19) #4
  store ptr %20, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %21 = load ptr, ptr %6, align 8
  %22 = call ptr @_ZNSt6vectorIiSaIiEE6insertEN9__gnu_cxx17__normal_iteratorIPKiS1_EERS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %21, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  ret void

.lr.ph.split:                                     ; preds = %.lr.ph, %tailrecurse
  %23 = phi i32 [ %26, %tailrecurse ], [ %12, %.lr.ph ]
  %.tr4151 = phi i32 [ %25, %tailrecurse ], [ %.tr41.ph70, %.lr.ph ]
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %tailrecurse, label %.split.us

tailrecurse:                                      ; preds = %.lr.ph.split
  %25 = add nsw i32 %.tr4151, 1
  %26 = sub nsw i32 %25, %smin
  %27 = icmp eq i32 %25, %smin
  br i1 %27, label %tailrecurse.outer43._crit_edge, label %.lr.ph.split

.split.us:                                        ; preds = %.lr.ph.split.us, %.lr.ph.split
  %.tr40.ph446577 = phi i32 [ %smin, %.lr.ph.split ], [ %.tr40.ph4465, %.lr.ph.split.us ]
  %.us-phi53 = phi i32 [ %.tr4151, %.lr.ph.split ], [ %.tr41.ph70, %.lr.ph.split.us ]
  %.us-phi54 = phi i32 [ %23, %.lr.ph.split ], [ %12, %.lr.ph.split.us ]
  %28 = sdiv i32 %.us-phi54, 3
  %29 = add nsw i32 %28, %.tr40.ph446577
  %30 = shl nsw i32 %28, 1
  %31 = add nsw i32 %30, %.tr40.ph446577
  %.off = add i32 %.us-phi54, 2
  %32 = icmp ult i32 %.off, 5
  %33 = zext i1 %32 to i32
  %34 = add nsw i32 %31, %33
  %35 = sext i32 %29 to i64
  %36 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %35) #4
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sext i32 %34 to i64
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %38) #4
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = tail call noundef i32 @_Z5queryiii(i32 noundef %0, i32 noundef %37, i32 noundef %40)
  %42 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %35) #4
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp eq i32 %41, %43
  br i1 %44, label %tailrecurse.outer.backedge, label %47

tailrecurse.outer.backedge:                       ; preds = %.split.us, %49, %51
  %.tr40.ph.be = phi i32 [ %52, %51 ], [ %50, %49 ], [ %.tr40.ph446577, %.split.us ]
  %.tr41.ph.be = phi i32 [ %.us-phi53, %51 ], [ %34, %49 ], [ %29, %.split.us ]
  store i32 %0, ptr %5, align 4, !tbaa !5
  %45 = sub nsw i32 %.tr41.ph.be, %.tr40.ph.be
  %46 = icmp eq i32 %.tr41.ph.be, %.tr40.ph.be
  br i1 %46, label %tailrecurse.outer43._crit_edge, label %.lr.ph.lr.ph

47:                                               ; preds = %.split.us
  %48 = icmp eq i32 %41, %0
  br i1 %48, label %49, label %51

49:                                               ; preds = %47
  %50 = add nsw i32 %29, 1
  br label %tailrecurse.outer.backedge

51:                                               ; preds = %47
  %52 = add nsw i32 %34, 1
  br label %tailrecurse.outer.backedge
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3

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


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