; LLVM IR from xirc/cp-algorithm :: atcoder/abc215/D/main.ll (Z5solvev)

; 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 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector.3" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.7" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@M = external dso_local global i32, align 4
@A = external dso_local global %"class.std::vector", align 8

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0) #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %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.std::set", align 8
  %8 = alloca ptr, 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 ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca %"class.std::vector.3", align 8
  %16 = alloca i8, align 1
  %17 = alloca %"class.std::allocator.7", align 1
  %18 = alloca %"class.std::vector.3", align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.std::allocator.7", align 1
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.std::_Bit_reference", align 8
  %27 = alloca i8, align 1
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::_Bit_reference", align 8
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::_Bit_reference", align 8
  %32 = alloca i1, align 1
  %33 = alloca %"class.std::initializer_list", align 8
  %34 = alloca [1 x i32], align 4
  %35 = alloca %"class.std::allocator", align 1
  %36 = alloca i32, align 4
  %37 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %38 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  %40 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = call ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %43, ptr %45)
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @M, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  store i32 %50, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr @A, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %53 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  br label %55

55:                                               ; preds = %67, %1
  %56 = 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) #5
  br i1 %56, label %58, label %57

57:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %73

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %11, align 4, !tbaa !5
  %61 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %62 unwind label %69

62:                                               ; preds = %58
  %63 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %64 = extractvalue { ptr, i8 } %61, 0
  store ptr %64, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %66 = extractvalue { ptr, i8 } %61, 1
  store i8 %66, ptr %65, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %67

67:                                               ; preds = %62
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %55

69:                                               ; preds = %58
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %12, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %278

73:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #5
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i8 1, ptr %16, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %76, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %77 unwind label %108

77:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #5
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 1, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %18, i64 noundef %80, ptr noundef nonnull align 1 dereferenceable(1) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %81 unwind label %112

81:                                               ; preds = %77
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef 0)
          to label %83 unwind label %116

83:                                               ; preds = %81
  %84 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %85 = extractvalue { ptr, i64 } %82, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %87 = extractvalue { ptr, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %21, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %89 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %18, i64 noundef 1)
          to label %90 unwind label %120

90:                                               ; preds = %83
  %91 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %92 = extractvalue { ptr, i64 } %89, 0
  store ptr %92, ptr %91, align 8
  %93 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %94 = extractvalue { ptr, i64 } %89, 1
  store i64 %94, ptr %93, align 8
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %22, i1 noundef zeroext false) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %96 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %18, i64 noundef 0)
          to label %97 unwind label %124

97:                                               ; preds = %90
  %98 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %99 = extractvalue { ptr, i64 } %96, 0
  store ptr %99, ptr %98, align 8
  %100 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %101 = extractvalue { ptr, i64 } %96, 1
  store i64 %101, ptr %100, align 8
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %95) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 2, ptr %24, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %224, %97
  %104 = load i32, ptr %24, align 4, !tbaa !5
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = icmp sle i32 %104, %105
  br i1 %106, label %129, label %107

107:                                              ; preds = %103
  store i32 4, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %229

108:                                              ; preds = %73
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %12, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %277

112:                                              ; preds = %77
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %12, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  br label %276

116:                                              ; preds = %81
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %275

120:                                              ; preds = %83
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %12, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %13, align 4
  br label %128

124:                                              ; preds = %90
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %12, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %275

129:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %130 = load i32, ptr %24, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %18, i64 noundef %131)
          to label %133 unwind label %141

133:                                              ; preds = %129
  %134 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %135 = extractvalue { ptr, i64 } %132, 0
  store ptr %135, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %137 = extractvalue { ptr, i64 } %132, 1
  store i64 %137, ptr %136, align 8
  %138 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  %139 = xor i1 %138, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br i1 %139, label %140, label %145

140:                                              ; preds = %133
  br label %224

141:                                              ; preds = %129
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %12, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %228

145:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #5
  %146 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %147 unwind label %157

147:                                              ; preds = %145
  %148 = icmp ugt i64 %146, 0
  %149 = zext i1 %148 to i8
  store i8 %149, ptr %27, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %150 = load i32, ptr %24, align 4, !tbaa !5
  %151 = mul nsw i32 2, %150
  store i32 %151, ptr %28, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %181, %147
  %153 = load i32, ptr %28, align 4, !tbaa !5
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %161, label %156

156:                                              ; preds = %152
  store i32 7, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %194

157:                                              ; preds = %145
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %12, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %13, align 4
  br label %227

161:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  %162 = load i32, ptr %28, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %18, i64 noundef %163)
          to label %165 unwind label %185

165:                                              ; preds = %161
  %166 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 0
  %167 = extractvalue { ptr, i64 } %164, 0
  store ptr %167, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 1
  %169 = extractvalue { ptr, i64 } %164, 1
  store i64 %169, ptr %168, align 8
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %29, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  %171 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %172 unwind label %189

172:                                              ; preds = %165
  %173 = icmp ugt i64 %171, 0
  %174 = zext i1 %173 to i32
  %175 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %176 = trunc i8 %175 to i1
  %177 = zext i1 %176 to i32
  %178 = or i32 %177, %174
  %179 = icmp ne i32 %178, 0
  %180 = zext i1 %179 to i8
  store i8 %180, ptr %27, align 1, !tbaa !11
  br label %181

181:                                              ; preds = %172
  %182 = load i32, ptr %24, align 4, !tbaa !5
  %183 = load i32, ptr %28, align 4, !tbaa !5
  %184 = add nsw i32 %183, %182
  store i32 %184, ptr %28, align 4, !tbaa !5
  br label %152, !llvm.loop !15

185:                                              ; preds = %161
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %12, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  br label %193

189:                                              ; preds = %165
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %12, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %13, align 4
  br label %193

193:                                              ; preds = %189, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %227

194:                                              ; preds = %156
  %195 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %196 = trunc i8 %195 to i1
  br i1 %196, label %197, label %223

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %198 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %198, ptr %30, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %214, %197
  %200 = load i32, ptr %30, align 4, !tbaa !5
  %201 = load i32, ptr %3, align 4, !tbaa !5
  %202 = icmp sle i32 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  store i32 10, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %222

204:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %205 = load i32, ptr %30, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %206)
          to label %208 unwind label %218

208:                                              ; preds = %204
  %209 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 0
  %210 = extractvalue { ptr, i64 } %207, 0
  store ptr %210, ptr %209, align 8
  %211 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 1
  %212 = extractvalue { ptr, i64 } %207, 1
  store i64 %212, ptr %211, align 8
  %213 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %31, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  br label %214

214:                                              ; preds = %208
  %215 = load i32, ptr %24, align 4, !tbaa !5
  %216 = load i32, ptr %30, align 4, !tbaa !5
  %217 = add nsw i32 %216, %215
  store i32 %217, ptr %30, align 4, !tbaa !5
  br label %199, !llvm.loop !17

218:                                              ; preds = %204
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %12, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %227

222:                                              ; preds = %203
  br label %223

223:                                              ; preds = %222, %194
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  br label %224

224:                                              ; preds = %223, %140
  %225 = load i32, ptr %24, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %24, align 4, !tbaa !5
  br label %103, !llvm.loop !18

227:                                              ; preds = %218, %193, %157
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #5
  br label %228

228:                                              ; preds = %227, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %275

229:                                              ; preds = %107
  store i1 false, ptr %32, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 1, ptr %34, align 4, !tbaa !5
  %230 = getelementptr inbounds %"class.std::initializer_list", ptr %33, i32 0, i32 0
  store ptr %34, ptr %230, align 8, !tbaa !19
  %231 = getelementptr inbounds %"class.std::initializer_list", ptr %33, i32 0, i32 1
  store i64 1, ptr %231, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  %232 = getelementptr inbounds { ptr, i64 }, ptr %33, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8
  %234 = getelementptr inbounds { ptr, i64 }, ptr %33, i32 0, i32 1
  %235 = load i64, ptr %234, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %233, i64 %235, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %236 unwind label %242

236:                                              ; preds = %229
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  store i32 2, ptr %36, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %267, %236
  %238 = load i32, ptr %36, align 4, !tbaa !5
  %239 = load i32, ptr @M, align 4, !tbaa !5
  %240 = icmp sle i32 %238, %239
  br i1 %240, label %246, label %241

241:                                              ; preds = %237
  store i32 13, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %271

242:                                              ; preds = %229
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %12, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %275

246:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #5
  %247 = load i32, ptr %36, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %248)
          to label %250 unwind label %258

250:                                              ; preds = %246
  %251 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 0
  %252 = extractvalue { ptr, i64 } %249, 0
  store ptr %252, ptr %251, align 8
  %253 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 1
  %254 = extractvalue { ptr, i64 } %249, 1
  store i64 %254, ptr %253, align 8
  %255 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %37) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  br i1 %255, label %256, label %266

256:                                              ; preds = %250
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %257 unwind label %262

257:                                              ; preds = %256
  br label %266

258:                                              ; preds = %246
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %12, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  br label %270

262:                                              ; preds = %256
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %12, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %13, align 4
  br label %270

266:                                              ; preds = %257, %250
  br label %267

267:                                              ; preds = %266
  %268 = load i32, ptr %36, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %36, align 4, !tbaa !5
  br label %237, !llvm.loop !23

270:                                              ; preds = %262, %258
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %275

271:                                              ; preds = %241
  store i1 true, ptr %32, align 1
  store i32 1, ptr %25, align 4
  %272 = load i1, ptr %32, align 1
  br i1 %272, label %274, label %273

273:                                              ; preds = %271
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %274

274:                                              ; preds = %273, %271
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

275:                                              ; preds = %270, %242, %228, %128, %116
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #5
  br label %276

276:                                              ; preds = %275, %112
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  br label %277

277:                                              ; preds = %276, %108
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  br label %278

278:                                              ; preds = %277, %69
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %12, align 8
  %281 = load i32, ptr %13, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) #4

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

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

; 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)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; 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)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSSt16initializer_listIiE", !10, i64 0, !21, i64 8}
!21 = !{!"long", !7, i64 0}
!22 = !{!20, !21, i64 8}
!23 = distinct !{!23, !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.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 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.7" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@M = external dso_local global i32, align 4
@A = external dso_local global %"class.std::vector", align 8

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.std::set", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.3", align 8
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::allocator.7", align 1
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::allocator.7", align 1
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca [1 x i32], align 4
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %25 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %26 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  %27 = tail call ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %25, ptr %26)
  store ptr %27, ptr %2, align 8
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @M, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = load i32, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %31 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  store ptr %31, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %32 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @A) #5
  store ptr %32, ptr %5, align 8
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %33, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %39, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  %34 = add nsw i32 %30, 1
  %35 = sext i32 %34 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  store i8 1, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %44 unwind label %67

.lr.ph:                                           ; preds = %1, %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %6, align 4, !tbaa !5
  %38 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %39 unwind label %42

39:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %41, label %.lr.ph, label %._crit_edge

42:                                               ; preds = %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %152

44:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  store i8 1, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %45 unwind label %69

45:                                               ; preds = %44
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %46 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef 0)
          to label %47 unwind label %71

47:                                               ; preds = %45
  %48 = extractvalue { ptr, i64 } %46, 0
  store ptr %48, ptr %13, align 8
  %49 = getelementptr inbounds i8, ptr %13, i64 8
  %50 = extractvalue { ptr, i64 } %46, 1
  store i64 %50, ptr %49, align 8
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %52 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef 1)
          to label %53 unwind label %73

53:                                               ; preds = %47
  %54 = extractvalue { ptr, i64 } %52, 0
  store ptr %54, ptr %14, align 8
  %55 = getelementptr inbounds i8, ptr %14, i64 8
  %56 = extractvalue { ptr, i64 } %52, 1
  store i64 %56, ptr %55, align 8
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext false) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  %58 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef 0)
          to label %59 unwind label %75

59:                                               ; preds = %53
  %60 = extractvalue { ptr, i64 } %58, 0
  store ptr %60, ptr %15, align 8
  %61 = getelementptr inbounds i8, ptr %15, i64 8
  %62 = extractvalue { ptr, i64 } %58, 1
  store i64 %62, ptr %61, align 8
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %57) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  store i32 2, ptr %16, align 4, !tbaa !5
  %.not56 = icmp slt i32 %30, 2
  br i1 %.not56, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %59
  %64 = getelementptr inbounds i8, ptr %17, i64 8
  %65 = getelementptr inbounds i8, ptr %19, i64 8
  %66 = getelementptr inbounds i8, ptr %20, i64 8
  br label %78

._crit_edge60:                                    ; preds = %.loopexit, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #5
  store i32 1, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %21, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %127 unwind label %130

67:                                               ; preds = %._crit_edge
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %151

69:                                               ; preds = %44
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %150

71:                                               ; preds = %45
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %149

73:                                               ; preds = %47
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %53
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %77

77:                                               ; preds = %75, %73
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %149

78:                                               ; preds = %.lr.ph59, %.loopexit
  %storemerge57 = phi i32 [ 2, %.lr.ph59 ], [ %125, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %79 = sext i32 %storemerge57 to i64
  %80 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %79)
          to label %81 unwind label %85

81:                                               ; preds = %78
  %82 = extractvalue { ptr, i64 } %80, 0
  store ptr %82, ptr %17, align 8
  %83 = extractvalue { ptr, i64 } %80, 1
  store i64 %83, ptr %64, align 8
  %84 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br i1 %84, label %87, label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %81
  %.pre = load i32, ptr %16, align 4, !tbaa !5
  br label %.loopexit

85:                                               ; preds = %78
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br label %126

87:                                               ; preds = %81
  %88 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %89 unwind label %94

89:                                               ; preds = %87
  %90 = icmp ne i64 %88, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #5
  %91 = load i32, ptr %16, align 4
  %92 = shl nsw i32 %91, 1
  store i32 %92, ptr %18, align 4, !tbaa !5
  %.not3346 = icmp sgt i32 %92, %30
  br i1 %.not3346, label %._crit_edge51, label %.lr.ph50

._crit_edge51:                                    ; preds = %103, %89
  %93 = phi i32 [ %91, %89 ], [ %106, %103 ]
  %.025.in.lcssa = phi i1 [ %90, %89 ], [ %105, %103 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  %.not3452 = icmp sle i32 %93, %30
  %or.cond.not = select i1 %.025.in.lcssa, i1 %.not3452, i1 false
  br i1 %or.cond.not, label %.lr.ph55, label %.loopexit

94:                                               ; preds = %87
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %126

.lr.ph50:                                         ; preds = %89, %103
  %.025.in48 = phi i1 [ %105, %103 ], [ %90, %89 ]
  %storemerge3247 = phi i32 [ %108, %103 ], [ %92, %89 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #5
  %96 = sext i32 %storemerge3247 to i64
  %97 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %96)
          to label %98 unwind label %109

98:                                               ; preds = %.lr.ph50
  %99 = extractvalue { ptr, i64 } %97, 0
  store ptr %99, ptr %19, align 8
  %100 = extractvalue { ptr, i64 } %97, 1
  store i64 %100, ptr %65, align 8
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  %102 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %103 unwind label %111

103:                                              ; preds = %98
  %104 = icmp ne i64 %102, 0
  %105 = or i1 %.025.in48, %104
  %106 = load i32, ptr %16, align 4
  %107 = load i32, ptr %18, align 4, !tbaa !5
  %108 = add nsw i32 %107, %106
  store i32 %108, ptr %18, align 4, !tbaa !5
  %.not33 = icmp sgt i32 %108, %30
  br i1 %.not33, label %._crit_edge51, label %.lr.ph50, !llvm.loop !11

109:                                              ; preds = %.lr.ph50
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #5
  br label %113

111:                                              ; preds = %98
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %113

113:                                              ; preds = %111, %109
  %.pn35 = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  br label %126

.lr.ph55:                                         ; preds = %._crit_edge51, %116
  %.02453 = phi i32 [ %121, %116 ], [ %93, %._crit_edge51 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #5
  %114 = sext i32 %.02453 to i64
  %115 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %114)
          to label %116 unwind label %122

116:                                              ; preds = %.lr.ph55
  %117 = extractvalue { ptr, i64 } %115, 0
  store ptr %117, ptr %20, align 8
  %118 = extractvalue { ptr, i64 } %115, 1
  store i64 %118, ptr %66, align 8
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  %120 = load i32, ptr %16, align 4, !tbaa !5
  %121 = add nsw i32 %120, %.02453
  %.not34 = icmp sgt i32 %121, %30
  br i1 %.not34, label %.loopexit, label %.lr.ph55, !llvm.loop !13

122:                                              ; preds = %.lr.ph55
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  br label %126

.loopexit:                                        ; preds = %116, %..loopexit_crit_edge, %._crit_edge51
  %124 = phi i32 [ %.pre, %..loopexit_crit_edge ], [ %93, %._crit_edge51 ], [ %120, %116 ]
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %16, align 4, !tbaa !5
  %.not.not = icmp slt i32 %124, %30
  br i1 %.not.not, label %78, label %._crit_edge60, !llvm.loop !14

126:                                              ; preds = %94, %113, %122, %85
  %.pn35.pn.pn = phi { ptr, i32 } [ %86, %85 ], [ %.pn35, %113 ], [ %123, %122 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  br label %149

127:                                              ; preds = %._crit_edge60
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #5
  store i32 2, ptr %23, align 4, !tbaa !5
  %128 = load i32, ptr @M, align 4, !tbaa !5
  %.not2961 = icmp slt i32 %128, 2
  br i1 %.not2961, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %127
  %129 = getelementptr inbounds i8, ptr %24, i64 8
  br label %132

._crit_edge65:                                    ; preds = %144, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  ret void

130:                                              ; preds = %._crit_edge60
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  br label %149

132:                                              ; preds = %.lr.ph64, %144
  %storemerge2862 = phi i32 [ 2, %.lr.ph64 ], [ %146, %144 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #5
  %133 = sext i32 %storemerge2862 to i64
  %134 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %133)
          to label %135 unwind label %140

135:                                              ; preds = %132
  %136 = extractvalue { ptr, i64 } %134, 0
  store ptr %136, ptr %24, align 8
  %137 = extractvalue { ptr, i64 } %134, 1
  store i64 %137, ptr %129, align 8
  %138 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #5
  br i1 %138, label %139, label %144

139:                                              ; preds = %135
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %144 unwind label %142

140:                                              ; preds = %132
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #5
  br label %148

142:                                              ; preds = %139
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %148

144:                                              ; preds = %135, %139
  %145 = load i32, ptr %23, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %23, align 4, !tbaa !5
  %147 = load i32, ptr @M, align 4, !tbaa !5
  %.not29.not = icmp slt i32 %145, %147
  br i1 %.not29.not, label %132, label %._crit_edge65, !llvm.loop !15

148:                                              ; preds = %142, %140
  %.pn30 = phi { ptr, i32 } [ %143, %142 ], [ %141, %140 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %149

149:                                              ; preds = %148, %130, %126, %77, %71
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %126 ], [ %.pn30, %148 ], [ %131, %130 ], [ %.pn, %77 ], [ %72, %71 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  br label %150

150:                                              ; preds = %149, %69
  %.pn35.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn, %149 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  br label %151

151:                                              ; preds = %150, %67
  %.pn35.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn, %150 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %152

152:                                              ; preds = %151, %42
  %.pn42 = phi { ptr, i32 } [ %43, %42 ], [ %.pn35.pn.pn.pn.pn.pn, %151 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn42
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; 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 #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

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


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