; LLVM IR from DionysiosB/CodeForces :: 1200-1299 (1292A-NEKOsMazeGame)

; 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<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = 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.4" = type { i8 }
%"class.std::allocator" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.4", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator", align 1
  %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
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca %"struct.std::_Bit_reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #5
  %24 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  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 %24, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %25 unwind label %63

25:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 2, ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %26 unwind label %67

26:                                               ; preds = %25
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  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.end.p0(i64 40, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %238, %26
  %28 = load i64, ptr %3, align 8, !tbaa !5
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %3, align 8, !tbaa !5
  %30 = icmp ne i64 %28, 0
  br i1 %30, label %31, label %249

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %32 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %12, ptr noundef %13)
          to label %33 unwind label %72

33:                                               ; preds = %31
  %34 = load i64, ptr %12, align 8, !tbaa !5
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr %12, align 8, !tbaa !5
  %36 = load i64, ptr %13, align 8, !tbaa !5
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %38 = load i64, ptr %12, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %38) #5
  %40 = load i64, ptr %13, align 8, !tbaa !5
  %41 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %39, i64 noundef %40)
          to label %42 unwind label %76

42:                                               ; preds = %33
  %43 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %44 = extractvalue { ptr, i64 } %41, 0
  store ptr %44, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %46 = extractvalue { ptr, i64 } %41, 1
  store i64 %46, ptr %45, align 8
  %47 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br i1 %47, label %48, label %137

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %49 = load i64, ptr %12, align 8, !tbaa !5
  %50 = sub nsw i64 1, %49
  %51 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %50) #5
  %52 = load i64, ptr %13, align 8, !tbaa !5
  %53 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %51, i64 noundef %52)
          to label %54 unwind label %80

54:                                               ; preds = %48
  %55 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %56 = extractvalue { ptr, i64 } %53, 0
  store ptr %56, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %58 = extractvalue { ptr, i64 } %53, 1
  store i64 %58, ptr %57, align 8
  %59 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br i1 %59, label %60, label %84

60:                                               ; preds = %54
  %61 = load i64, ptr %11, align 8, !tbaa !5
  %62 = add nsw i64 %61, -1
  store i64 %62, ptr %11, align 8, !tbaa !5
  br label %84

63:                                               ; preds = %0
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %8, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %9, align 4
  br label %71

67:                                               ; preds = %25
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %8, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  br label %71

71:                                               ; preds = %67, %63
  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.end.p0(i64 40, ptr %5) #5
  br label %251

72:                                               ; preds = %227, %31
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  br label %248

76:                                               ; preds = %33
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %248

80:                                               ; preds = %48
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %248

84:                                               ; preds = %60, %54
  %85 = load i64, ptr %13, align 8, !tbaa !5
  %86 = icmp sgt i64 %85, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  br i1 %86, label %87, label %100

87:                                               ; preds = %84
  %88 = load i64, ptr %12, align 8, !tbaa !5
  %89 = sub nsw i64 1, %88
  %90 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %89) #5
  %91 = load i64, ptr %13, align 8, !tbaa !5
  %92 = sub nsw i64 %91, 1
  %93 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %90, i64 noundef %92)
          to label %94 unwind label %105

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

100:                                              ; preds = %94, %84
  %101 = phi i1 [ false, %84 ], [ %99, %94 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br i1 %101, label %102, label %109

102:                                              ; preds = %100
  %103 = load i64, ptr %11, align 8, !tbaa !5
  %104 = add nsw i64 %103, -1
  store i64 %104, ptr %11, align 8, !tbaa !5
  br label %109

105:                                              ; preds = %87
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %248

109:                                              ; preds = %102, %100
  %110 = load i64, ptr %13, align 8, !tbaa !5
  %111 = add nsw i64 %110, 1
  %112 = load i64, ptr %2, align 8, !tbaa !5
  %113 = icmp slt i64 %111, %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  br i1 %113, label %114, label %127

114:                                              ; preds = %109
  %115 = load i64, ptr %12, align 8, !tbaa !5
  %116 = sub nsw i64 1, %115
  %117 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %116) #5
  %118 = load i64, ptr %13, align 8, !tbaa !5
  %119 = add nsw i64 %118, 1
  %120 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %117, i64 noundef %119)
          to label %121 unwind label %132

121:                                              ; preds = %114
  %122 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %123 = extractvalue { ptr, i64 } %120, 0
  store ptr %123, ptr %122, align 8
  %124 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %125 = extractvalue { ptr, i64 } %120, 1
  store i64 %125, ptr %124, align 8
  %126 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  br label %127

127:                                              ; preds = %121, %109
  %128 = phi i1 [ false, %109 ], [ %126, %121 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br i1 %128, label %129, label %136

129:                                              ; preds = %127
  %130 = load i64, ptr %11, align 8, !tbaa !5
  %131 = add nsw i64 %130, -1
  store i64 %131, ptr %11, align 8, !tbaa !5
  br label %136

132:                                              ; preds = %114
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %8, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %248

136:                                              ; preds = %129, %127
  br label %209

137:                                              ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %138 = load i64, ptr %12, align 8, !tbaa !5
  %139 = sub nsw i64 1, %138
  %140 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %139) #5
  %141 = load i64, ptr %13, align 8, !tbaa !5
  %142 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %140, i64 noundef %141)
          to label %143 unwind label %152

143:                                              ; preds = %137
  %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
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br i1 %148, label %149, label %156

149:                                              ; preds = %143
  %150 = load i64, ptr %11, align 8, !tbaa !5
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %11, align 8, !tbaa !5
  br label %156

152:                                              ; preds = %137
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %8, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %248

156:                                              ; preds = %149, %143
  %157 = load i64, ptr %13, align 8, !tbaa !5
  %158 = icmp sgt i64 %157, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  br i1 %158, label %159, label %172

159:                                              ; preds = %156
  %160 = load i64, ptr %12, align 8, !tbaa !5
  %161 = sub nsw i64 1, %160
  %162 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %161) #5
  %163 = load i64, ptr %13, align 8, !tbaa !5
  %164 = sub nsw i64 %163, 1
  %165 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %162, i64 noundef %164)
          to label %166 unwind label %177

166:                                              ; preds = %159
  %167 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %168 = extractvalue { ptr, i64 } %165, 0
  store ptr %168, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %170 = extractvalue { ptr, i64 } %165, 1
  store i64 %170, ptr %169, align 8
  %171 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  br label %172

172:                                              ; preds = %166, %156
  %173 = phi i1 [ false, %156 ], [ %171, %166 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br i1 %173, label %174, label %181

174:                                              ; preds = %172
  %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 %181

177:                                              ; preds = %159
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %8, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %248

181:                                              ; preds = %174, %172
  %182 = load i64, ptr %13, align 8, !tbaa !5
  %183 = add nsw i64 %182, 1
  %184 = load i64, ptr %2, align 8, !tbaa !5
  %185 = icmp slt i64 %183, %184
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  br i1 %185, label %186, label %199

186:                                              ; preds = %181
  %187 = load i64, ptr %12, align 8, !tbaa !5
  %188 = sub nsw i64 1, %187
  %189 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %188) #5
  %190 = load i64, ptr %13, align 8, !tbaa !5
  %191 = add nsw i64 %190, 1
  %192 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %189, i64 noundef %191)
          to label %193 unwind label %204

193:                                              ; preds = %186
  %194 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %195 = extractvalue { ptr, i64 } %192, 0
  store ptr %195, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %197 = extractvalue { ptr, i64 } %192, 1
  store i64 %197, ptr %196, align 8
  %198 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  br label %199

199:                                              ; preds = %193, %181
  %200 = phi i1 [ false, %181 ], [ %198, %193 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br i1 %200, label %201, label %208

201:                                              ; preds = %199
  %202 = load i64, ptr %11, align 8, !tbaa !5
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %11, align 8, !tbaa !5
  br label %208

204:                                              ; preds = %186
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %8, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %248

208:                                              ; preds = %201, %199
  br label %209

209:                                              ; preds = %208, %136
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %210 = load i64, ptr %12, align 8, !tbaa !5
  %211 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %210) #5
  %212 = load i64, ptr %13, align 8, !tbaa !5
  %213 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %211, i64 noundef %212)
          to label %214 unwind label %239

214:                                              ; preds = %209
  %215 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %216 = extractvalue { ptr, i64 } %213, 0
  store ptr %216, ptr %215, align 8
  %217 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %218 = extractvalue { ptr, i64 } %213, 1
  store i64 %218, ptr %217, align 8
  %219 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  %220 = zext i1 %219 to i32
  %221 = sub nsw i32 1, %220
  %222 = icmp ne i32 %221, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %223 = load i64, ptr %12, align 8, !tbaa !5
  %224 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %223) #5
  %225 = load i64, ptr %13, align 8, !tbaa !5
  %226 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %224, i64 noundef %225)
          to label %227 unwind label %243

227:                                              ; preds = %214
  %228 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %229 = extractvalue { ptr, i64 } %226, 0
  store ptr %229, ptr %228, align 8
  %230 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %231 = extractvalue { ptr, i64 } %226, 1
  store i64 %231, ptr %230, align 8
  %232 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %22, i1 noundef zeroext %222) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  %233 = load i64, ptr %11, align 8, !tbaa !5
  %234 = icmp sle i64 %233, 0
  %235 = zext i1 %234 to i64
  %236 = select i1 %234, ptr @.str.1, ptr @.str.2
  %237 = invoke i32 @puts(ptr noundef %236)
          to label %238 unwind label %72

238:                                              ; preds = %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %27, !llvm.loop !11

239:                                              ; preds = %209
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %8, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %9, align 4
  br label %247

243:                                              ; preds = %214
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %8, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %247

247:                                              ; preds = %243, %239
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %248

248:                                              ; preds = %247, %204, %177, %152, %132, %105, %80, %76, %72
  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
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %251

249:                                              ; preds = %27
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %250 = load i32, ptr %1, align 4
  ret i32 %250

251:                                              ; preds = %248, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr %8, align 8
  %254 = load i32, ptr %9, align 4
  %255 = insertvalue { ptr, i32 } poison, ptr %253, 0
  %256 = insertvalue { ptr, i32 } %255, i32 %254, 1
  resume { ptr, i32 } %256
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

declare i32 @puts(ptr noundef) #2

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

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

attributes #0 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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"}


; 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<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = 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.4" = type { i8 }
%"class.std::allocator" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.4", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i64, align 8
  %9 = alloca i64, 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
  %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 %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %60

21:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 2, ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %22 unwind label %62

22:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = add nsw i64 %23, -1
  store i64 %24, ptr %2, align 8, !tbaa !5
  %.not33 = icmp eq i64 %23, 0
  br i1 %.not33, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %25 = getelementptr inbounds i8, ptr %10, i64 8
  %26 = getelementptr inbounds i8, ptr %14, i64 8
  %27 = getelementptr inbounds i8, ptr %15, i64 8
  %28 = getelementptr inbounds i8, ptr %16, i64 8
  %29 = getelementptr inbounds i8, ptr %11, i64 8
  %30 = getelementptr inbounds i8, ptr %12, i64 8
  %31 = getelementptr inbounds i8, ptr %13, i64 8
  %32 = getelementptr inbounds i8, ptr %17, i64 8
  %33 = getelementptr inbounds i8, ptr %18, i64 8
  br label %34

34:                                               ; preds = %.lr.ph, %163
  %.034 = phi i64 [ 0, %.lr.ph ], [ %.5, %163 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr %8, align 8, !tbaa !5
  %38 = load i64, ptr %9, align 8, !tbaa !5
  %39 = add nsw i64 %38, -1
  store i64 %39, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %40 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %37) #5
  %41 = load i64, ptr %9, align 8, !tbaa !5
  %42 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %40, i64 noundef %41)
          to label %43 unwind label %65

43:                                               ; preds = %34
  %44 = extractvalue { ptr, i64 } %42, 0
  store ptr %44, ptr %10, align 8
  %45 = extractvalue { ptr, i64 } %42, 1
  store i64 %45, ptr %25, align 8
  %46 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br i1 %46, label %47, label %102

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %48 = load i64, ptr %8, align 8, !tbaa !5
  %49 = sub nsw i64 1, %48
  %50 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %49) #5
  %51 = load i64, ptr %9, align 8, !tbaa !5
  %52 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %50, i64 noundef %51)
          to label %53 unwind label %67

53:                                               ; preds = %47
  %54 = extractvalue { ptr, i64 } %52, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i64 } %52, 1
  store i64 %55, ptr %29, align 8
  %56 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  %57 = sext i1 %56 to i64
  %spec.select = add nsw i64 %.034, %57
  %58 = load i64, ptr %9, align 8, !tbaa !5
  %59 = icmp sgt i64 %58, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  br i1 %59, label %69, label %.critedge

60:                                               ; preds = %0
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %21
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  br label %64

64:                                               ; preds = %62, %60
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  br label %178

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

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

69:                                               ; preds = %53
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = sub nsw i64 1, %70
  %72 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %71) #5
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = add nsw i64 %73, -1
  %75 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %72, i64 noundef %74)
          to label %76 unwind label %81

76:                                               ; preds = %69
  %77 = extractvalue { ptr, i64 } %75, 0
  store ptr %77, ptr %12, align 8
  %78 = extractvalue { ptr, i64 } %75, 1
  store i64 %78, ptr %30, align 8
  %79 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  %80 = sext i1 %79 to i64
  %spec.select28 = add nsw i64 %spec.select, %80
  %.pre35 = load i64, ptr %9, align 8, !tbaa !5
  br label %83

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %177

.critedge:                                        ; preds = %53
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %83

83:                                               ; preds = %76, %.critedge
  %84 = phi i64 [ %58, %.critedge ], [ %.pre35, %76 ]
  %.2 = phi i64 [ %spec.select, %.critedge ], [ %spec.select28, %76 ]
  %85 = add nsw i64 %84, 1
  %86 = load i64, ptr %1, align 8, !tbaa !5
  %87 = icmp slt i64 %85, %86
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  br i1 %87, label %88, label %.critedge2

88:                                               ; preds = %83
  %89 = load i64, ptr %8, align 8, !tbaa !5
  %90 = sub nsw i64 1, %89
  %91 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %90) #5
  %92 = load i64, ptr %9, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  %94 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %91, i64 noundef %93)
          to label %95 unwind label %100

95:                                               ; preds = %88
  %96 = extractvalue { ptr, i64 } %94, 0
  store ptr %96, ptr %13, align 8
  %97 = extractvalue { ptr, i64 } %94, 1
  store i64 %97, ptr %31, align 8
  %98 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  %99 = sext i1 %98 to i64
  %spec.select29 = add nsw i64 %.2, %99
  br label %150

100:                                              ; preds = %88
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %177

.critedge2:                                       ; preds = %83
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %150

102:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %103 = load i64, ptr %8, align 8, !tbaa !5
  %104 = sub nsw i64 1, %103
  %105 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %104) #5
  %106 = load i64, ptr %9, align 8, !tbaa !5
  %107 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %105, i64 noundef %106)
          to label %108 unwind label %115

108:                                              ; preds = %102
  %109 = extractvalue { ptr, i64 } %107, 0
  store ptr %109, ptr %14, align 8
  %110 = extractvalue { ptr, i64 } %107, 1
  store i64 %110, ptr %26, align 8
  %111 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  %112 = zext i1 %111 to i64
  %spec.select30 = add nsw i64 %.034, %112
  %113 = load i64, ptr %9, align 8, !tbaa !5
  %114 = icmp sgt i64 %113, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  br i1 %114, label %117, label %.critedge4

115:                                              ; preds = %102
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %177

117:                                              ; preds = %108
  %118 = load i64, ptr %8, align 8, !tbaa !5
  %119 = sub nsw i64 1, %118
  %120 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %119) #5
  %121 = load i64, ptr %9, align 8, !tbaa !5
  %122 = add nsw i64 %121, -1
  %123 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %120, i64 noundef %122)
          to label %124 unwind label %129

124:                                              ; preds = %117
  %125 = extractvalue { ptr, i64 } %123, 0
  store ptr %125, ptr %15, align 8
  %126 = extractvalue { ptr, i64 } %123, 1
  store i64 %126, ptr %27, align 8
  %127 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  %128 = zext i1 %127 to i64
  %spec.select31 = add nsw i64 %spec.select30, %128
  %.pre = load i64, ptr %9, align 8, !tbaa !5
  br label %131

129:                                              ; preds = %117
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %177

.critedge4:                                       ; preds = %108
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %131

131:                                              ; preds = %124, %.critedge4
  %132 = phi i64 [ %113, %.critedge4 ], [ %.pre, %124 ]
  %.4 = phi i64 [ %spec.select30, %.critedge4 ], [ %spec.select31, %124 ]
  %133 = add nsw i64 %132, 1
  %134 = load i64, ptr %1, align 8, !tbaa !5
  %135 = icmp slt i64 %133, %134
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  br i1 %135, label %136, label %.critedge6

136:                                              ; preds = %131
  %137 = load i64, ptr %8, align 8, !tbaa !5
  %138 = sub nsw i64 1, %137
  %139 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %138) #5
  %140 = load i64, ptr %9, align 8, !tbaa !5
  %141 = add nsw i64 %140, 1
  %142 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %139, i64 noundef %141)
          to label %143 unwind label %148

143:                                              ; preds = %136
  %144 = extractvalue { ptr, i64 } %142, 0
  store ptr %144, ptr %16, align 8
  %145 = extractvalue { ptr, i64 } %142, 1
  store i64 %145, ptr %28, align 8
  %146 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  %147 = zext i1 %146 to i64
  %spec.select32 = add nsw i64 %.4, %147
  br label %150

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

.critedge6:                                       ; preds = %131
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %150

150:                                              ; preds = %143, %95, %.critedge6, %.critedge2
  %.5 = phi i64 [ %.2, %.critedge2 ], [ %.4, %.critedge6 ], [ %spec.select29, %95 ], [ %spec.select32, %143 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %151 = load i64, ptr %8, align 8, !tbaa !5
  %152 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %151) #5
  %153 = load i64, ptr %9, align 8, !tbaa !5
  %154 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %152, i64 noundef %153)
          to label %155 unwind label %172

155:                                              ; preds = %150
  %156 = extractvalue { ptr, i64 } %154, 0
  store ptr %156, ptr %17, align 8
  %157 = extractvalue { ptr, i64 } %154, 1
  store i64 %157, ptr %32, align 8
  %158 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  %159 = load i64, ptr %8, align 8, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %159) #5
  %161 = load i64, ptr %9, align 8, !tbaa !5
  %162 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %160, i64 noundef %161)
          to label %163 unwind label %174

163:                                              ; preds = %155
  %not. = xor i1 %158, true
  %164 = extractvalue { ptr, i64 } %162, 0
  store ptr %164, ptr %18, align 8
  %165 = extractvalue { ptr, i64 } %162, 1
  store i64 %165, ptr %33, align 8
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext %not.) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  %167 = icmp slt i64 %.5, 1
  %168 = select i1 %167, ptr @.str.1, ptr @.str.2
  %169 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %168)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %170 = load i64, ptr %2, align 8, !tbaa !5
  %171 = add nsw i64 %170, -1
  store i64 %171, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i64 %170, 0
  br i1 %.not, label %._crit_edge, label %34, !llvm.loop !11

172:                                              ; preds = %150
  %173 = landingpad { ptr, i32 }
          cleanup
  br label %176

174:                                              ; preds = %155
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  br label %176

176:                                              ; preds = %174, %172
  %.pn24 = phi { ptr, i32 } [ %175, %174 ], [ %173, %172 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br label %177

177:                                              ; preds = %176, %148, %129, %115, %100, %81, %67, %65
  %.pn24.pn = phi { ptr, i32 } [ %.pn24, %176 ], [ %101, %100 ], [ %82, %81 ], [ %68, %67 ], [ %149, %148 ], [ %130, %129 ], [ %116, %115 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %178

._crit_edge:                                      ; preds = %163, %22
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

178:                                              ; preds = %177, %64
  %.pn24.pn.pn = phi { ptr, i32 } [ %.pn24.pn, %177 ], [ %.pn, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn24.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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_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 #4 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: 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: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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"}


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