; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #826 (Div. 3)/E - Sending a Sequence Over the Network.l_acc3d5be (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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = 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.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = add nsw i64 %22, 1
  %24 = call ptr @llvm.stacksave.p0()
  store ptr %24, ptr %2, align 8
  %25 = alloca i64, i64 %23, align 16
  store i64 %23, ptr %3, align 8
  %26 = getelementptr inbounds i64, ptr %25, i64 0
  store i64 0, ptr %26, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 1, ptr %4, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %36, %0
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp sle i64 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %39

32:                                               ; preds = %27
  %33 = load i64, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds i64, ptr %25, i64 %33
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %36

36:                                               ; preds = %32
  %37 = load i64, ptr %4, align 8, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %4, align 8, !tbaa !5
  br label %27, !llvm.loop !9

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #5
  %40 = load i64, ptr %1, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %42 unwind label %55

42:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %43 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef 0)
          to label %44 unwind label %59

44:                                               ; preds = %42
  %45 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %46 = extractvalue { ptr, i64 } %43, 0
  store ptr %46, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %48 = extractvalue { ptr, i64 } %43, 1
  store i64 %48, ptr %47, align 8
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 1, ptr %11, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %174, %44
  %51 = load i64, ptr %11, align 8, !tbaa !5
  %52 = load i64, ptr %1, align 8, !tbaa !5
  %53 = icmp sle i64 %51, %52
  br i1 %53, label %63, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %178

55:                                               ; preds = %39
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %199

59:                                               ; preds = %42
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %8, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br label %198

63:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %64 = load i64, ptr %11, align 8, !tbaa !5
  %65 = load i64, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds i64, ptr %25, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = sub nsw i64 %64, %67
  %69 = sub nsw i64 %68, 1
  store i64 %69, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %70 = load i64, ptr %11, align 8, !tbaa !5
  %71 = load i64, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds i64, ptr %25, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = add nsw i64 %70, %73
  store i64 %74, ptr %13, align 8, !tbaa !5
  %75 = load i64, ptr %12, align 8, !tbaa !5
  %76 = icmp sge i64 %75, 0
  br i1 %76, label %77, label %122

77:                                               ; preds = %63
  %78 = load i64, ptr %11, align 8, !tbaa !5
  %79 = icmp ne i64 %78, 1
  br i1 %79, label %80, label %122

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %81 = load i64, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %81)
          to label %83 unwind label %108

83:                                               ; preds = %80
  %84 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %85 = extractvalue { ptr, i64 } %82, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %87 = extractvalue { ptr, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  %88 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br i1 %88, label %98, label %89

89:                                               ; preds = %83
  %90 = load i64, ptr %12, align 8, !tbaa !5
  %91 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %90)
          to label %92 unwind label %112

92:                                               ; preds = %89
  %93 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %94 = extractvalue { ptr, i64 } %91, 0
  store ptr %94, ptr %93, align 8
  %95 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %96 = extractvalue { ptr, i64 } %91, 1
  store i64 %96, ptr %95, align 8
  %97 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  br label %98

98:                                               ; preds = %92, %83
  %99 = phi i1 [ true, %83 ], [ %97, %92 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %100)
          to label %102 unwind label %116

102:                                              ; preds = %98
  %103 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %104 = extractvalue { ptr, i64 } %101, 0
  store ptr %104, ptr %103, align 8
  %105 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %106 = extractvalue { ptr, i64 } %101, 1
  store i64 %106, ptr %105, align 8
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext %99) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %122

108:                                              ; preds = %80
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %8, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %9, align 4
  br label %121

112:                                              ; preds = %89
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  br label %120

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

120:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %121

121:                                              ; preds = %120, %108
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %177

122:                                              ; preds = %102, %77, %63
  %123 = load i64, ptr %13, align 8, !tbaa !5
  %124 = load i64, ptr %1, align 8, !tbaa !5
  %125 = icmp sle i64 %123, %124
  br i1 %125, label %126, label %173

126:                                              ; preds = %122
  %127 = load i64, ptr %11, align 8, !tbaa !5
  %128 = load i64, ptr %1, align 8, !tbaa !5
  %129 = icmp ne i64 %127, %128
  br i1 %129, label %130, label %173

130:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %131 = load i64, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %132 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %131)
          to label %133 unwind label %159

133:                                              ; preds = %130
  %134 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %135 = extractvalue { ptr, i64 } %132, 0
  store ptr %135, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i64 }, ptr %17, 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) %17) #5
  br i1 %138, label %149, label %139

139:                                              ; preds = %133
  %140 = load i64, ptr %11, align 8, !tbaa !5
  %141 = sub nsw i64 %140, 1
  %142 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %141)
          to label %143 unwind label %163

143:                                              ; preds = %139
  %144 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %145 = extractvalue { ptr, i64 } %142, 0
  store ptr %145, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %147 = extractvalue { ptr, i64 } %142, 1
  store i64 %147, ptr %146, align 8
  %148 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  br label %149

149:                                              ; preds = %143, %133
  %150 = phi i1 [ true, %133 ], [ %148, %143 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %151 = load i64, ptr %13, align 8, !tbaa !5
  %152 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %151)
          to label %153 unwind label %167

153:                                              ; preds = %149
  %154 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %155 = extractvalue { ptr, i64 } %152, 0
  store ptr %155, ptr %154, align 8
  %156 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %157 = extractvalue { ptr, i64 } %152, 1
  store i64 %157, ptr %156, align 8
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext %150) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %173

159:                                              ; preds = %130
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %8, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %9, align 4
  br label %172

163:                                              ; preds = %139
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %8, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %9, align 4
  br label %171

167:                                              ; preds = %149
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %8, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %171

171:                                              ; preds = %167, %163
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %172

172:                                              ; preds = %171, %159
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %177

173:                                              ; preds = %153, %126, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %174

174:                                              ; preds = %173
  %175 = load i64, ptr %11, align 8, !tbaa !5
  %176 = add nsw i64 %175, 1
  store i64 %176, ptr %11, align 8, !tbaa !5
  br label %50, !llvm.loop !13

177:                                              ; preds = %172, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %198

178:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %179 = load i64, ptr %1, align 8, !tbaa !5
  %180 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %179)
          to label %181 unwind label %194

181:                                              ; preds = %178
  %182 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %183 = extractvalue { ptr, i64 } %180, 0
  store ptr %183, ptr %182, align 8
  %184 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %185 = extractvalue { ptr, i64 } %180, 1
  store i64 %185, ptr %184, align 8
  %186 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  %187 = zext i1 %186 to i64
  %188 = select i1 %186, ptr @.str, ptr @.str.1
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %188)
          to label %190 unwind label %194

190:                                              ; preds = %181
  %191 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef @.str.2)
          to label %192 unwind label %194

192:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #5
  %193 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %193)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void

194:                                              ; preds = %190, %181, %178
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %8, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %198

198:                                              ; preds = %194, %177, %59
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  br label %199

199:                                              ; preds = %198, %55
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr %8, align 8
  %202 = load i32, ptr %9, align 4
  %203 = insertvalue { ptr, i32 } poison, ptr %201, 0
  %204 = insertvalue { ptr, i32 } %203, i32 %202, 1
  resume { ptr, i32 } %204
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 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) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = 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.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca %"struct.std::_Bit_reference", align 8
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = add nsw i64 %14, 1
  %16 = call ptr @llvm.stacksave.p0()
  %17 = alloca i64, i64 %15, align 16
  store i64 0, ptr %17, align 16, !tbaa !5
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %.not53 = icmp slt i64 %18, 1
  br i1 %.not53, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa52 = phi i64 [ %18, %0 ], [ %23, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #5
  %19 = add nsw i64 %.lcssa52, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %24 unwind label %64

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.054 = phi i64 [ %22, %.lr.ph ], [ 1, %0 ]
  %20 = getelementptr inbounds i64, ptr %17, i64 %.054
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %22 = add nuw nsw i64 %.054, 1
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.054, %23
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

24:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %25 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 0)
          to label %26 unwind label %66

26:                                               ; preds = %24
  %27 = extractvalue { ptr, i64 } %25, 0
  store ptr %27, ptr %5, align 8
  %28 = getelementptr inbounds i8, ptr %5, i64 8
  %29 = extractvalue { ptr, i64 } %25, 1
  store i64 %29, ptr %28, align 8
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %.not3455 = icmp slt i64 %31, 1
  br i1 %.not3455, label %._crit_edge60, label %32

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %6, i64 8
  %34 = getelementptr inbounds i8, ptr %7, i64 8
  %35 = getelementptr inbounds i8, ptr %8, i64 8
  %36 = getelementptr inbounds i8, ptr %9, i64 8
  %37 = getelementptr inbounds i8, ptr %10, i64 8
  %38 = getelementptr inbounds i8, ptr %11, i64 8
  %39 = getelementptr inbounds i8, ptr %17, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  %.not37.peel = icmp sge i64 %40, %31
  %.not38.peel = icmp eq i64 %31, 1
  %or.cond45.peel = or i1 %.not37.peel, %.not38.peel
  br i1 %or.cond45.peel, label %61, label %42

42:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %43 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %41)
          to label %44 unwind label %.loopexit.split-lp76

44:                                               ; preds = %42
  %45 = extractvalue { ptr, i64 } %43, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i64 } %43, 1
  store i64 %46, ptr %36, align 8
  %47 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br i1 %47, label %54, label %48

48:                                               ; preds = %44
  %49 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 0)
          to label %50 unwind label %.loopexit.split-lp81

50:                                               ; preds = %48
  %51 = extractvalue { ptr, i64 } %49, 0
  store ptr %51, ptr %10, align 8
  %52 = extractvalue { ptr, i64 } %49, 1
  store i64 %52, ptr %37, align 8
  %53 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  br label %54

54:                                               ; preds = %50, %44
  %55 = phi i1 [ true, %44 ], [ %53, %50 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %56 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %41)
          to label %57 unwind label %.loopexit.split-lp86

57:                                               ; preds = %54
  %58 = extractvalue { ptr, i64 } %56, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i64 } %56, 1
  store i64 %59, ptr %38, align 8
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext %55) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %57, %32
  %62 = phi i64 [ %.pre, %57 ], [ %31, %32 ]
  %.not34.not.peel = icmp sgt i64 %62, 1
  br i1 %.not34.not.peel, label %.peel.next, label %._crit_edge60

._crit_edge60:                                    ; preds = %124, %61, %26
  %.lcssa = phi i64 [ %31, %26 ], [ %62, %61 ], [ %125, %124 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %63 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.lcssa)
          to label %127 unwind label %137

64:                                               ; preds = %._crit_edge
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %140

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

.peel.next:                                       ; preds = %61, %124
  %68 = phi i64 [ %125, %124 ], [ %62, %61 ]
  %.02356 = phi i64 [ %126, %124 ], [ 2, %61 ]
  %69 = getelementptr inbounds i64, ptr %17, i64 %.02356
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = xor i64 %70, -1
  %72 = add i64 %.02356, %71
  %73 = add nsw i64 %70, %.02356
  %74 = icmp sgt i64 %72, -1
  br i1 %74, label %75, label %99

75:                                               ; preds = %.peel.next
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %76 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.02356)
          to label %77 unwind label %94

77:                                               ; preds = %75
  %78 = extractvalue { ptr, i64 } %76, 0
  store ptr %78, ptr %6, align 8
  %79 = extractvalue { ptr, i64 } %76, 1
  store i64 %79, ptr %33, align 8
  %80 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br i1 %80, label %87, label %81

81:                                               ; preds = %77
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %72)
          to label %83 unwind label %95

83:                                               ; preds = %81
  %84 = extractvalue { ptr, i64 } %82, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i64 } %82, 1
  store i64 %85, ptr %34, align 8
  %86 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  br label %87

87:                                               ; preds = %83, %77
  %88 = phi i1 [ true, %77 ], [ %86, %83 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %89 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.02356)
          to label %90 unwind label %96

90:                                               ; preds = %87
  %91 = extractvalue { ptr, i64 } %89, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i64 } %89, 1
  store i64 %92, ptr %35, align 8
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext %88) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %.pre90 = load i64, ptr %1, align 8, !tbaa !5
  br label %99

94:                                               ; preds = %75
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %98

95:                                               ; preds = %81
  %lpad.loopexit67 = landingpad { ptr, i32 }
          cleanup
  br label %97

96:                                               ; preds = %87
  %lpad.loopexit72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %97

97:                                               ; preds = %96, %95
  %.pn = phi { ptr, i32 } [ %lpad.loopexit72, %96 ], [ %lpad.loopexit67, %95 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %98

98:                                               ; preds = %97, %94
  %.pn.pn = phi { ptr, i32 } [ %.pn, %97 ], [ %lpad.loopexit, %94 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %139

99:                                               ; preds = %90, %.peel.next
  %100 = phi i64 [ %.pre90, %90 ], [ %68, %.peel.next ]
  %.not37 = icmp sgt i64 %73, %100
  %.not38 = icmp eq i64 %.02356, %100
  %or.cond45 = or i1 %.not37, %.not38
  br i1 %or.cond45, label %124, label %101

101:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %102 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %73)
          to label %103 unwind label %.loopexit75

103:                                              ; preds = %101
  %104 = extractvalue { ptr, i64 } %102, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i64 } %102, 1
  store i64 %105, ptr %36, align 8
  %106 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br i1 %106, label %114, label %107

107:                                              ; preds = %103
  %108 = add nsw i64 %.02356, -1
  %109 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %108)
          to label %110 unwind label %.loopexit80

110:                                              ; preds = %107
  %111 = extractvalue { ptr, i64 } %109, 0
  store ptr %111, ptr %10, align 8
  %112 = extractvalue { ptr, i64 } %109, 1
  store i64 %112, ptr %37, align 8
  %113 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  br label %114

114:                                              ; preds = %110, %103
  %115 = phi i1 [ true, %103 ], [ %113, %110 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %116 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %73)
          to label %117 unwind label %.loopexit85

117:                                              ; preds = %114
  %118 = extractvalue { ptr, i64 } %116, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i64 } %116, 1
  store i64 %119, ptr %38, align 8
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext %115) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %.pre91 = load i64, ptr %1, align 8, !tbaa !5
  br label %124

.loopexit75:                                      ; preds = %101
  %lpad.loopexit77 = landingpad { ptr, i32 }
          cleanup
  br label %123

.loopexit.split-lp76:                             ; preds = %42
  %lpad.loopexit.split-lp78 = landingpad { ptr, i32 }
          cleanup
  br label %123

.loopexit80:                                      ; preds = %107
  %lpad.loopexit82 = landingpad { ptr, i32 }
          cleanup
  br label %122

.loopexit.split-lp81:                             ; preds = %48
  %lpad.loopexit.split-lp83 = landingpad { ptr, i32 }
          cleanup
  br label %122

.loopexit85:                                      ; preds = %114
  %lpad.loopexit87 = landingpad { ptr, i32 }
          cleanup
  br label %121

.loopexit.split-lp86:                             ; preds = %54
  %lpad.loopexit.split-lp88 = landingpad { ptr, i32 }
          cleanup
  br label %121

121:                                              ; preds = %.loopexit.split-lp86, %.loopexit85
  %lpad.phi89 = phi { ptr, i32 } [ %lpad.loopexit87, %.loopexit85 ], [ %lpad.loopexit.split-lp88, %.loopexit.split-lp86 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %122

122:                                              ; preds = %.loopexit80, %.loopexit.split-lp81, %121
  %.pn39 = phi { ptr, i32 } [ %lpad.phi89, %121 ], [ %lpad.loopexit82, %.loopexit80 ], [ %lpad.loopexit.split-lp83, %.loopexit.split-lp81 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %123

123:                                              ; preds = %.loopexit75, %.loopexit.split-lp76, %122
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %122 ], [ %lpad.loopexit77, %.loopexit75 ], [ %lpad.loopexit.split-lp78, %.loopexit.split-lp76 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %139

124:                                              ; preds = %117, %99
  %125 = phi i64 [ %.pre91, %117 ], [ %100, %99 ]
  %126 = add nuw nsw i64 %.02356, 1
  %.not34.not = icmp slt i64 %.02356, %125
  br i1 %.not34.not, label %.peel.next, label %._crit_edge60, !llvm.loop !13

127:                                              ; preds = %._crit_edge60
  %128 = extractvalue { ptr, i64 } %63, 0
  store ptr %128, ptr %12, align 8
  %129 = getelementptr inbounds i8, ptr %12, i64 8
  %130 = extractvalue { ptr, i64 } %63, 1
  store i64 %130, ptr %129, align 8
  %131 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  %132 = select i1 %131, ptr @.str, ptr @.str.1
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %132)
          to label %134 unwind label %137

134:                                              ; preds = %127
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @.str.2)
          to label %136 unwind label %137

136:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  call void @llvm.stackrestore.p0(ptr %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

137:                                              ; preds = %134, %127, %._crit_edge60
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %139

139:                                              ; preds = %98, %123, %137, %66
  %.pn39.pn.pn.pn = phi { ptr, i32 } [ %138, %137 ], [ %67, %66 ], [ %.pn39.pn, %123 ], [ %.pn.pn, %98 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  br label %140

140:                                              ; preds = %139, %64
  %.pn39.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn39.pn.pn.pn, %139 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn39.pn.pn.pn.pn
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 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 #3 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 = !{!"long", !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}
!14 = !{!"llvm.loop.peeled.count", i32 1}


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