; LLVM IR from brpapa/algorithms :: solutions/live-archive/2883.ll (Z2btiPi)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13newHorseMovesi(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i32 noundef) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11hasSomePawnPi(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z2btiPi(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [8 x i32], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = call noundef zeroext i1 @_Z11hasSomePawnPi(ptr noundef %22)
  br i1 %23, label %25, label %24

24:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %146

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1073741824, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %26 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z13newHorseMovesi(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %8, i32 noundef %26)
  store ptr %8, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %30 = load ptr, ptr %7, align 8, !tbaa !9
  %31 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  br label %33

33:                                               ; preds = %138, %25
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br i1 %34, label %36, label %35

35:                                               ; preds = %33
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %144

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %52, %36
  %40 = load i32, ptr %14, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 8
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 4, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %55

43:                                               ; preds = %39
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = load i32, ptr %14, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %14, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %50
  store i32 %48, ptr %51, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %43
  %53 = load i32, ptr %14, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %14, align 4, !tbaa !5
  br label %39, !llvm.loop !11

55:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %72, %55
  %57 = load i32, ptr %15, align 4, !tbaa !5
  %58 = icmp slt i32 %57, 8
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %56
  %61 = load i32, ptr %15, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %71

67:                                               ; preds = %60
  %68 = load i32, ptr %15, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %69
  store i32 -1, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %67, %60
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %15, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %15, align 4, !tbaa !5
  br label %56, !llvm.loop !13

75:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %93, %75
  %77 = load i32, ptr %16, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 8
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %96

80:                                               ; preds = %76
  %81 = load i32, ptr %16, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp ne i32 %84, -1
  br i1 %85, label %86, label %92

86:                                               ; preds = %80
  %87 = load i32, ptr %16, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, 8
  store i32 %91, ptr %89, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %86, %80
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %16, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %16, align 4, !tbaa !5
  br label %76, !llvm.loop !14

96:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  store i8 0, ptr %17, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %116, %96
  %98 = load i32, ptr %18, align 4, !tbaa !5
  %99 = icmp slt i32 %98, 8
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %119

101:                                              ; preds = %97
  %102 = load i32, ptr %18, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sgt i32 %105, 64
  br i1 %106, label %114, label %107

107:                                              ; preds = %101
  %108 = load i32, ptr %18, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = icmp eq i32 %111, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %107, %101
  store i8 1, ptr %17, align 1, !tbaa !15
  br label %115

115:                                              ; preds = %114, %107
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %18, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %18, align 4, !tbaa !5
  br label %97, !llvm.loop !17

119:                                              ; preds = %100
  %120 = load i8, ptr %17, align 1, !tbaa !15, !range !18, !noundef !19
  %121 = trunc i8 %120 to i1
  br i1 %121, label %122, label %123

122:                                              ; preds = %119
  store i32 3, ptr %11, align 4
  br label %132

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = getelementptr inbounds [8 x i32], ptr %13, i64 0, i64 0
  %126 = invoke noundef i32 @_Z2btiPi(i32 noundef %124, ptr noundef %125)
          to label %127 unwind label %140

127:                                              ; preds = %123
  %128 = add nsw i32 1, %126
  store i32 %128, ptr %19, align 4, !tbaa !5
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %130 unwind label %140

130:                                              ; preds = %127
  %131 = load i32, ptr %129, align 4, !tbaa !5
  store i32 %131, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  store i32 0, ptr %11, align 4
  br label %132

132:                                              ; preds = %130, %122
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %133 = load i32, ptr %11, align 4
  switch i32 %133, label %135 [
    i32 0, label %134
  ]

134:                                              ; preds = %132
  store i32 0, ptr %11, align 4
  br label %135

135:                                              ; preds = %134, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %136 = load i32, ptr %11, align 4
  switch i32 %136, label %153 [
    i32 0, label %137
    i32 3, label %138
  ]

137:                                              ; preds = %135
  br label %138

138:                                              ; preds = %137, %135
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %33

140:                                              ; preds = %127, %123
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %20, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %148

144:                                              ; preds = %35
  %145 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %145, ptr %3, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %146

146:                                              ; preds = %144, %24
  %147 = load i32, ptr %3, align 4
  ret i32 %147

148:                                              ; preds = %140
  %149 = load ptr, ptr %20, align 8
  %150 = load i32, ptr %21, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152

153:                                              ; preds = %135
  unreachable
}

; 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 @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { inlinehint 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = !{i8 0, i8 2}
!19 = !{}


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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13newHorseMovesi(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, 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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11hasSomePawnPi(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z2btiPi(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca [8 x i32], align 16
  %8 = alloca i32, align 4
  %9 = tail call noundef zeroext i1 @_Z11hasSomePawnPi(ptr noundef %1)
  br i1 %9, label %10, label %113

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 1073741824, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_Z13newHorseMovesi(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %4, i32 noundef %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %11 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %11, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %12 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %12, ptr %6, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %13, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %10
  %14 = getelementptr inbounds i8, ptr %7, i64 4
  %15 = getelementptr inbounds i8, ptr %7, i64 8
  %16 = getelementptr inbounds i8, ptr %7, i64 12
  %17 = getelementptr inbounds i8, ptr %7, i64 16
  %18 = getelementptr inbounds i8, ptr %7, i64 20
  %19 = getelementptr inbounds i8, ptr %7, i64 24
  %20 = getelementptr inbounds i8, ptr %7, i64 28
  br label %.lr.ph

._crit_edge:                                      ; preds = %108, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %113

.lr.ph:                                           ; preds = %.lr.ph.preheader, %108
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %23 = load i32, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(32) %1, i64 32, i1 false), !tbaa !5
  %24 = load i32, ptr %7, align 16, !tbaa !5
  %25 = icmp eq i32 %24, %23
  br i1 %25, label %26, label %.preheader37.1

26:                                               ; preds = %.lr.ph
  store i32 -1, ptr %7, align 16, !tbaa !5
  br label %.preheader37.1

.preheader37.1:                                   ; preds = %.lr.ph, %26
  %27 = phi i32 [ %24, %.lr.ph ], [ -1, %26 ]
  %28 = load i32, ptr %14, align 4, !tbaa !5
  %29 = icmp eq i32 %28, %23
  br i1 %29, label %30, label %.preheader37.2

30:                                               ; preds = %.preheader37.1
  store i32 -1, ptr %14, align 4, !tbaa !5
  br label %.preheader37.2

.preheader37.2:                                   ; preds = %30, %.preheader37.1
  %31 = phi i32 [ -1, %30 ], [ %28, %.preheader37.1 ]
  %32 = load i32, ptr %15, align 8, !tbaa !5
  %33 = icmp eq i32 %32, %23
  br i1 %33, label %34, label %.preheader37.3

34:                                               ; preds = %.preheader37.2
  store i32 -1, ptr %15, align 8, !tbaa !5
  br label %.preheader37.3

.preheader37.3:                                   ; preds = %34, %.preheader37.2
  %35 = phi i32 [ -1, %34 ], [ %32, %.preheader37.2 ]
  %36 = load i32, ptr %16, align 4, !tbaa !5
  %37 = icmp eq i32 %36, %23
  br i1 %37, label %38, label %.preheader37.4

38:                                               ; preds = %.preheader37.3
  store i32 -1, ptr %16, align 4, !tbaa !5
  br label %.preheader37.4

.preheader37.4:                                   ; preds = %38, %.preheader37.3
  %39 = phi i32 [ -1, %38 ], [ %36, %.preheader37.3 ]
  %40 = load i32, ptr %17, align 16, !tbaa !5
  %41 = icmp eq i32 %40, %23
  br i1 %41, label %42, label %.preheader37.5

42:                                               ; preds = %.preheader37.4
  store i32 -1, ptr %17, align 16, !tbaa !5
  br label %.preheader37.5

.preheader37.5:                                   ; preds = %42, %.preheader37.4
  %43 = phi i32 [ -1, %42 ], [ %40, %.preheader37.4 ]
  %44 = load i32, ptr %18, align 4, !tbaa !5
  %45 = icmp eq i32 %44, %23
  br i1 %45, label %46, label %.preheader37.6

46:                                               ; preds = %.preheader37.5
  store i32 -1, ptr %18, align 4, !tbaa !5
  br label %.preheader37.6

.preheader37.6:                                   ; preds = %46, %.preheader37.5
  %47 = phi i32 [ -1, %46 ], [ %44, %.preheader37.5 ]
  %48 = load i32, ptr %19, align 8, !tbaa !5
  %49 = icmp eq i32 %48, %23
  br i1 %49, label %50, label %.preheader37.7

50:                                               ; preds = %.preheader37.6
  store i32 -1, ptr %19, align 8, !tbaa !5
  br label %.preheader37.7

.preheader37.7:                                   ; preds = %50, %.preheader37.6
  %51 = phi i32 [ -1, %50 ], [ %48, %.preheader37.6 ]
  %52 = load i32, ptr %20, align 4, !tbaa !5
  %53 = icmp eq i32 %52, %23
  br i1 %53, label %54, label %.preheader36.preheader

54:                                               ; preds = %.preheader37.7
  store i32 -1, ptr %20, align 4, !tbaa !5
  br label %.preheader36.preheader

.preheader36.preheader:                           ; preds = %54, %.preheader37.7
  %55 = phi i32 [ -1, %54 ], [ %52, %.preheader37.7 ]
  %.not = icmp eq i32 %27, -1
  br i1 %.not, label %.preheader36.1, label %56

56:                                               ; preds = %.preheader36.preheader
  %57 = add nsw i32 %27, 8
  store i32 %57, ptr %7, align 16, !tbaa !5
  br label %.preheader36.1

.preheader36.1:                                   ; preds = %.preheader36.preheader, %56
  %58 = phi i32 [ -1, %.preheader36.preheader ], [ %57, %56 ]
  %.not.1 = icmp eq i32 %31, -1
  br i1 %.not.1, label %.preheader36.2, label %59

59:                                               ; preds = %.preheader36.1
  %60 = add nsw i32 %31, 8
  store i32 %60, ptr %14, align 4, !tbaa !5
  br label %.preheader36.2

.preheader36.2:                                   ; preds = %59, %.preheader36.1
  %61 = phi i32 [ %60, %59 ], [ -1, %.preheader36.1 ]
  %.not.2 = icmp eq i32 %35, -1
  br i1 %.not.2, label %.preheader36.3, label %62

62:                                               ; preds = %.preheader36.2
  %63 = add nsw i32 %35, 8
  store i32 %63, ptr %15, align 8, !tbaa !5
  br label %.preheader36.3

.preheader36.3:                                   ; preds = %62, %.preheader36.2
  %64 = phi i32 [ %63, %62 ], [ -1, %.preheader36.2 ]
  %.not.3 = icmp eq i32 %39, -1
  br i1 %.not.3, label %.preheader36.4, label %65

65:                                               ; preds = %.preheader36.3
  %66 = add nsw i32 %39, 8
  store i32 %66, ptr %16, align 4, !tbaa !5
  br label %.preheader36.4

.preheader36.4:                                   ; preds = %65, %.preheader36.3
  %67 = phi i32 [ %66, %65 ], [ -1, %.preheader36.3 ]
  %.not.4 = icmp eq i32 %43, -1
  br i1 %.not.4, label %.preheader36.5, label %68

68:                                               ; preds = %.preheader36.4
  %69 = add nsw i32 %43, 8
  store i32 %69, ptr %17, align 16, !tbaa !5
  br label %.preheader36.5

.preheader36.5:                                   ; preds = %68, %.preheader36.4
  %70 = phi i32 [ %69, %68 ], [ -1, %.preheader36.4 ]
  %.not.5 = icmp eq i32 %47, -1
  br i1 %.not.5, label %.preheader36.6, label %71

71:                                               ; preds = %.preheader36.5
  %72 = add nsw i32 %47, 8
  store i32 %72, ptr %18, align 4, !tbaa !5
  br label %.preheader36.6

.preheader36.6:                                   ; preds = %71, %.preheader36.5
  %73 = phi i32 [ %72, %71 ], [ -1, %.preheader36.5 ]
  %.not.6 = icmp eq i32 %51, -1
  br i1 %.not.6, label %.preheader36.7, label %74

74:                                               ; preds = %.preheader36.6
  %75 = add nsw i32 %51, 8
  store i32 %75, ptr %19, align 8, !tbaa !5
  br label %.preheader36.7

.preheader36.7:                                   ; preds = %74, %.preheader36.6
  %76 = phi i32 [ %75, %74 ], [ -1, %.preheader36.6 ]
  %.not.7 = icmp eq i32 %55, -1
  br i1 %.not.7, label %.preheader.preheader, label %77

77:                                               ; preds = %.preheader36.7
  %78 = add nsw i32 %55, 8
  store i32 %78, ptr %20, align 4, !tbaa !5
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %77, %.preheader36.7
  %79 = phi i32 [ %78, %77 ], [ -1, %.preheader36.7 ]
  %80 = icmp sgt i32 %58, 64
  %81 = icmp eq i32 %58, %23
  %or.cond = or i1 %80, %81
  %82 = icmp sgt i32 %61, 64
  %83 = icmp eq i32 %61, %23
  %or.cond.1 = or i1 %82, %83
  %84 = icmp sgt i32 %64, 64
  %85 = icmp eq i32 %64, %23
  %or.cond.2 = or i1 %84, %85
  %86 = icmp sgt i32 %67, 64
  %87 = icmp eq i32 %67, %23
  %or.cond.3 = or i1 %86, %87
  %88 = icmp sgt i32 %70, 64
  %89 = icmp eq i32 %70, %23
  %or.cond.4 = or i1 %88, %89
  %90 = icmp sgt i32 %73, 64
  %91 = icmp eq i32 %73, %23
  %or.cond.5 = or i1 %90, %91
  %92 = icmp sgt i32 %76, 64
  %93 = icmp eq i32 %76, %23
  %or.cond.6 = or i1 %92, %93
  %94 = icmp sgt i32 %79, 64
  %95 = icmp eq i32 %79, %23
  %or.cond.7 = or i1 %94, %95
  %96 = select i1 %or.cond.7, i1 true, i1 %or.cond.6
  %97 = select i1 %96, i1 true, i1 %or.cond.5
  %98 = select i1 %97, i1 true, i1 %or.cond.4
  %99 = select i1 %98, i1 true, i1 %or.cond.3
  %100 = select i1 %99, i1 true, i1 %or.cond.2
  %101 = select i1 %100, i1 true, i1 %or.cond.1
  %.1.7 = select i1 %101, i1 true, i1 %or.cond
  br i1 %.1.7, label %108, label %102

102:                                              ; preds = %.preheader.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %103 = invoke noundef i32 @_Z2btiPi(i32 noundef %23, ptr noundef nonnull %7)
          to label %104 unwind label %111

104:                                              ; preds = %102
  %105 = add nsw i32 %103, 1
  store i32 %105, ptr %8, align 4, !tbaa !5
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %107 = load i32, ptr %106, align 4, !tbaa !5
  store i32 %107, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %108

108:                                              ; preds = %.preheader.preheader, %104
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %110 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %110, label %.lr.ph, label %._crit_edge

111:                                              ; preds = %102
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %112

113:                                              ; preds = %2, %._crit_edge
  %.0 = phi i32 [ %21, %._crit_edge ], [ 0, %2 ]
  ret i32 %.0
}

; 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 @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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 = { inlinehint 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 nounwind willreturn memory(argmem: readwrite) }
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"}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass