; LLVM IR from xirc/cp-algorithm :: codeforces/1426/1426B/main.ll (Z5solveiiRKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE)

; 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" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z5solveiiRKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE(i32 noundef %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 {
  %4 = alloca i1, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca ptr, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = srem i32 %20, 2
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  br label %142

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  store i8 0, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %46, %24
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %49

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33) #3
  store ptr %34, ptr %10, align 8, !tbaa !9
  %35 = load ptr, ptr %10, align 8, !tbaa !9
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %35, i64 noundef 0) #3
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %36, i64 noundef 1) #3
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  %40 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %39, i64 noundef 1) #3
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %40, i64 noundef 0) #3
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %38, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %30
  store i8 1, ptr %8, align 1, !tbaa !11
  br label %45

45:                                               ; preds = %44, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %9, align 4, !tbaa !5
  br label %25, !llvm.loop !13

49:                                               ; preds = %29
  %50 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %51 = trunc i8 %50 to i1
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %141

53:                                               ; preds = %49
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 2
  br i1 %55, label %56, label %57

56:                                               ; preds = %53
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %141

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %58 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %58, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  %60 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #3
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %62 = load ptr, ptr %12, align 8, !tbaa !9
  %63 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #3
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  br label %65

65:                                               ; preds = %136, %57
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #3
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  store i32 5, ptr %11, align 4
  br label %138

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %69 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  store ptr %69, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %70, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %71 = load ptr, ptr %16, align 8, !tbaa !9
  %72 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #3
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %74 = load ptr, ptr %16, align 8, !tbaa !9
  %75 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #3
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  br label %77

77:                                               ; preds = %128, %68
  %78 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #3
  br i1 %78, label %80, label %79

79:                                               ; preds = %77
  store i32 7, ptr %11, align 4
  br label %130

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %81 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  store ptr %81, ptr %19, align 8, !tbaa !9
  %82 = load ptr, ptr %15, align 8, !tbaa !9
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %82, i64 noundef 0) #3
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %83, i64 noundef 1) #3
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load ptr, ptr %19, align 8, !tbaa !9
  %87 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %86, i64 noundef 1) #3
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %87, i64 noundef 0) #3
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp ne i32 %85, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %80
  store i32 8, ptr %11, align 4
  br label %126

92:                                               ; preds = %80
  %93 = load ptr, ptr %15, align 8, !tbaa !9
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %93, i64 noundef 1) #3
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %94, i64 noundef 0) #3
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = load ptr, ptr %19, align 8, !tbaa !9
  %98 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %97, i64 noundef 0) #3
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %98, i64 noundef 1) #3
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp ne i32 %96, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %92
  store i32 8, ptr %11, align 4
  br label %126

103:                                              ; preds = %92
  %104 = load ptr, ptr %15, align 8, !tbaa !9
  %105 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %104, i64 noundef 0) #3
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %105, i64 noundef 0) #3
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = load ptr, ptr %19, align 8, !tbaa !9
  %109 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %108, i64 noundef 0) #3
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %109, i64 noundef 0) #3
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = icmp ne i32 %107, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %103
  store i32 8, ptr %11, align 4
  br label %126

114:                                              ; preds = %103
  %115 = load ptr, ptr %15, align 8, !tbaa !9
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %115, i64 noundef 1) #3
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %116, i64 noundef 1) #3
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = load ptr, ptr %19, align 8, !tbaa !9
  %120 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %119, i64 noundef 1) #3
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %120, i64 noundef 1) #3
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = icmp ne i32 %118, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %114
  store i32 8, ptr %11, align 4
  br label %126

125:                                              ; preds = %114
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %126

126:                                              ; preds = %125, %124, %113, %102, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  %127 = load i32, ptr %11, align 4
  switch i32 %127, label %130 [
    i32 8, label %128
  ]

128:                                              ; preds = %126
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  br label %77

130:                                              ; preds = %126, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %131 = load i32, ptr %11, align 4
  switch i32 %131, label %133 [
    i32 7, label %132
  ]

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

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

135:                                              ; preds = %133
  br label %136

136:                                              ; preds = %135
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  br label %65

138:                                              ; preds = %133, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %139 = load i32, ptr %11, align 4
  switch i32 %139, label %141 [
    i32 5, label %140
  ]

140:                                              ; preds = %138
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %141

141:                                              ; preds = %140, %138, %56, %52
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %142

142:                                              ; preds = %141, %23
  %143 = load i1, ptr %4, align 1
  ret i1 %143
}

; 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 nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z5solveiiRKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE(i32 noundef %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = and i32 %1, 1
  %.not = icmp eq i32 %8, 0
  %9 = icmp sgt i32 %0, 0
  %or.cond = and i1 %.not, %9
  br i1 %or.cond, label %.lr.ph.preheader, label %.critedge53

.lr.ph.preheader:                                 ; preds = %3
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  br i1 %spec.select, label %18, label %.critedge53

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.03146 = phi i1 [ false, %.lr.ph.preheader ], [ %spec.select, %.lr.ph ]
  %10 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %11 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %10, i64 noundef 0) #3
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %11, i64 noundef 1) #3
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %10, i64 noundef 1) #3
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %14, i64 noundef 0) #3
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp eq i32 %13, %16
  %spec.select = select i1 %17, i1 true, i1 %.03146
  %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 %.lr.ph, !llvm.loop !9

18:                                               ; preds = %._crit_edge
  %19 = icmp eq i32 %1, 2
  br i1 %19, label %.critedge53, label %20

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %21 = tail call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  store ptr %21, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %22 = tail call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  store ptr %22, ptr %5, align 8
  %23 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %23, label %.lr.ph51, label %.loopexit

.lr.ph51:                                         ; preds = %20, %._crit_edge49
  %24 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %25 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  store ptr %25, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %26 = call ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  store ptr %26, ptr %7, align 8
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  br i1 %27, label %.lr.ph48, label %._crit_edge49

.lr.ph48:                                         ; preds = %.lr.ph51, %.critedge
  %28 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %24, i64 noundef 0) #3
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %29, i64 noundef 1) #3
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %28, i64 noundef 1) #3
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %32, i64 noundef 0) #3
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %.not37 = icmp eq i32 %31, %34
  br i1 %.not37, label %35, label %.critedge

35:                                               ; preds = %.lr.ph48
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %24, i64 noundef 1) #3
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %36, i64 noundef 0) #3
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %28, i64 noundef 0) #3
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %39, i64 noundef 1) #3
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %.not38 = icmp eq i32 %38, %41
  br i1 %.not38, label %42, label %.critedge

42:                                               ; preds = %35
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %24, i64 noundef 0) #3
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %43, i64 noundef 0) #3
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %28, i64 noundef 0) #3
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %46, i64 noundef 0) #3
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not39 = icmp eq i32 %45, %48
  br i1 %.not39, label %49, label %.critedge

49:                                               ; preds = %42
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %24, i64 noundef 1) #3
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %50, i64 noundef 1) #3
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt5arrayIS_IiLm2EELm2EEixEm(ptr noundef nonnull align 4 dereferenceable(16) %28, i64 noundef 1) #3
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIiLm2EEixEm(ptr noundef nonnull align 4 dereferenceable(8) %53, i64 noundef 1) #3
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not40.not = icmp eq i32 %52, %55
  br i1 %.not40.not, label %58, label %.critedge

.critedge:                                        ; preds = %.lr.ph48, %35, %42, %49
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  br i1 %57, label %.lr.ph48, label %._crit_edge49

58:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %.loopexit

._crit_edge49:                                    ; preds = %.critedge, %.lr.ph51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %60 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %60, label %.lr.ph51, label %.loopexit

.loopexit:                                        ; preds = %._crit_edge49, %20, %58
  %61 = phi i1 [ true, %58 ], [ false, %20 ], [ false, %._crit_edge49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %.critedge53

.critedge53:                                      ; preds = %.loopexit, %._crit_edge, %18, %3
  %.6 = phi i1 [ false, %3 ], [ false, %._crit_edge ], [ true, %18 ], [ %61, %.loopexit ]
  ret i1 %.6
}

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorISt5arrayIS0_IiLm2EELm2EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt5arrayIS1_IiLm2EELm2EESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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"}


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