; LLVM IR from DionysiosB/CodeForces :: 1798B-ThreeSevens (main)

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

@.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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 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 i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::vector.5", align 8
  %15 = alloca i8, align 1
  %16 = alloca %"class.std::allocator.9", align 1
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::allocator.2", align 1
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca %"struct.std::_Bit_reference", align 8
  %25 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store i64 50007, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  br label %27

27:                                               ; preds = %190, %0
  %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 %196

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %33 = load i64, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %40

34:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %70, %34
  %36 = load i64, ptr %9, align 8, !tbaa !5
  %37 = load i64, ptr %4, align 8, !tbaa !5
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %44, label %39

39:                                               ; preds = %35
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %74

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %195

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %45 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %11)
          to label %46 unwind label %52

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %62, %46
  %48 = load i64, ptr %12, align 8, !tbaa !5
  %49 = load i64, ptr %11, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %56, label %51

51:                                               ; preds = %47
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %69

52:                                               ; preds = %44
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  br label %73

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %57 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %13)
          to label %58 unwind label %65

58:                                               ; preds = %56
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %59) #5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %61 unwind label %65

61:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %62

62:                                               ; preds = %61
  %63 = load i64, ptr %12, align 8, !tbaa !5
  %64 = add nsw i64 %63, 1
  store i64 %64, ptr %12, align 8, !tbaa !5
  br label %47, !llvm.loop !9

65:                                               ; preds = %58, %56
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %73

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

70:                                               ; preds = %69
  %71 = load i64, ptr %9, align 8, !tbaa !5
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %9, align 8, !tbaa !5
  br label %35, !llvm.loop !11

73:                                               ; preds = %65, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %194

74:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  store i8 0, ptr %15, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %14, i64 noundef 50007, ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %75 unwind label %84

75:                                               ; preds = %74
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %76 = load i64, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 -1, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %76, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %77 unwind label %88

77:                                               ; preds = %75
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %78 = load i64, ptr %4, align 8, !tbaa !5
  %79 = sub nsw i64 %78, 1
  store i64 %79, ptr %20, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %153, %77
  %81 = load i64, ptr %20, align 8, !tbaa !5
  %82 = icmp sge i64 %81, 0
  br i1 %82, label %92, label %83

83:                                               ; preds = %80
  store i32 10, ptr %10, align 4
  br label %156

84:                                               ; preds = %74
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %193

88:                                               ; preds = %75
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %192

92:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %138, %92
  %94 = load i64, ptr %21, align 8, !tbaa !5
  %95 = load i64, ptr %20, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %95) #5
  %97 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #5
  %98 = icmp ult i64 %94, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %93
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %146

100:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %101 = load i64, ptr %20, align 8, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %101) #5
  %103 = load i64, ptr %21, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %103) #5
  %105 = load i64, ptr %104, align 8, !tbaa !5
  store i64 %105, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %106 = load i64, ptr %22, align 8, !tbaa !5
  %107 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %14, i64 noundef %106)
          to label %108 unwind label %125

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

114:                                              ; preds = %108
  %115 = load i64, ptr %20, align 8, !tbaa !5
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %115) #5
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = icmp slt i64 %117, 0
  br label %119

119:                                              ; preds = %114, %108
  %120 = phi i1 [ false, %108 ], [ %118, %114 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br i1 %120, label %121, label %129

121:                                              ; preds = %119
  %122 = load i64, ptr %22, align 8, !tbaa !5
  %123 = load i64, ptr %20, align 8, !tbaa !5
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %123) #5
  store i64 %122, ptr %124, align 8, !tbaa !5
  br label %129

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

129:                                              ; preds = %121, %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %130 = load i64, ptr %22, align 8, !tbaa !5
  %131 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %14, i64 noundef %130)
          to label %132 unwind label %141

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

138:                                              ; preds = %132
  %139 = load i64, ptr %21, align 8, !tbaa !5
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %21, align 8, !tbaa !5
  br label %93, !llvm.loop !14

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

145:                                              ; preds = %141, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %191

146:                                              ; preds = %99
  %147 = load i64, ptr %20, align 8, !tbaa !5
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %147) #5
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = icmp slt i64 %149, 0
  br i1 %150, label %151, label %152

151:                                              ; preds = %146
  store i32 10, ptr %10, align 4
  br label %156

152:                                              ; preds = %146
  br label %153

153:                                              ; preds = %152
  %154 = load i64, ptr %20, align 8, !tbaa !5
  %155 = add nsw i64 %154, -1
  store i64 %155, ptr %20, align 8, !tbaa !5
  br label %80, !llvm.loop !15

156:                                              ; preds = %151, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %157

157:                                              ; preds = %156
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #5
  %159 = load i64, ptr %158, align 8, !tbaa !5
  %160 = icmp slt i64 %159, 0
  br i1 %160, label %161, label %168

161:                                              ; preds = %157
  %162 = invoke i32 @puts(ptr noundef @.str.1)
          to label %163 unwind label %164

163:                                              ; preds = %161
  br label %190

164:                                              ; preds = %187, %161
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %7, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %8, align 4
  br label %191

168:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %180, %168
  %170 = load i64, ptr %25, align 8, !tbaa !5
  %171 = load i64, ptr %4, align 8, !tbaa !5
  %172 = icmp slt i64 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %187

174:                                              ; preds = %169
  %175 = load i64, ptr %25, align 8, !tbaa !5
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %175) #5
  %177 = load i64, ptr %176, align 8, !tbaa !5
  %178 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %177)
          to label %179 unwind label %183

179:                                              ; preds = %174
  br label %180

180:                                              ; preds = %179
  %181 = load i64, ptr %25, align 8, !tbaa !5
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %25, align 8, !tbaa !5
  br label %169, !llvm.loop !16

183:                                              ; preds = %174
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %7, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %191

187:                                              ; preds = %173
  %188 = invoke i32 @puts(ptr noundef @.str.3)
          to label %189 unwind label %164

189:                                              ; preds = %187
  br label %190

190:                                              ; preds = %189, %163
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %27, !llvm.loop !17

191:                                              ; preds = %183, %164, %145
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %192

192:                                              ; preds = %191, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #5
  br label %193

193:                                              ; preds = %192, %84
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #5
  br label %194

194:                                              ; preds = %193, %73
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %195

195:                                              ; preds = %194, %40
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 %198

196:                                              ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %197 = load i32, ptr %1, align 4
  ret i32 %197

198:                                              ; preds = %195
  %199 = load ptr, ptr %7, align 8
  %200 = load i32, ptr %8, align 4
  %201 = insertvalue { ptr, i32 } poison, ptr %199, 0
  %202 = insertvalue { ptr, i32 } %201, i32 %200, 1
  resume { ptr, i32 } %202
}

; 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 @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 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

; 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 void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.5" = 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.9" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 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::allocator", align 1
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector.5", align 8
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::allocator.9", align 1
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = add nsw i64 %16, -1
  store i64 %17, ptr %1, align 8, !tbaa !5
  %.not51 = icmp eq i64 %16, 0
  br i1 %.not51, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %0
  %18 = getelementptr inbounds i8, ptr %13, i64 8
  %19 = getelementptr inbounds i8, ptr %14, i64 8
  br label %20

20:                                               ; preds = %.lr.ph53, %._crit_edge50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %22 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %26

23:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %24 = load i64, ptr %2, align 8, !tbaa !5
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph43, label %._crit_edge44

._crit_edge44:                                    ; preds = %._crit_edge, %23
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  store i8 0, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef 50007, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %42 unwind label %50

26:                                               ; preds = %20
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %104

.lr.ph43:                                         ; preds = %23, %._crit_edge
  %.02741 = phi i64 [ %31, %._crit_edge ], [ 0, %23 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %29 = load i64, ptr %5, align 8, !tbaa !5
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %36, %.lr.ph43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %31 = add nuw nsw i64 %.02741, 1
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph43, label %._crit_edge44, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph43, %36
  %.02640 = phi i64 [ %37, %36 ], [ 0, %.lr.ph43 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02741) #5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %36 unwind label %40

36:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %37 = add nuw nsw i64 %.02640, 1
  %38 = load i64, ptr %5, align 8, !tbaa !5
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !13

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

42:                                               ; preds = %._crit_edge44
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %43 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  store i64 -1, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %43, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %44 unwind label %52

44:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %45 = load i64, ptr %2, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %._crit_edge47, %44
  %.025.in = phi i64 [ %45, %44 ], [ %.025, %._crit_edge47 ]
  %.025 = add nsw i64 %.025.in, -1
  %47 = icmp sgt i64 %.025.in, 0
  br i1 %47, label %.preheader, label %86

.preheader:                                       ; preds = %46
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.025) #5
  %49 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %.not55 = icmp eq i64 %49, 0
  br i1 %.not55, label %._crit_edge47, label %.lr.ph46

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

52:                                               ; preds = %42
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %101

._crit_edge47:                                    ; preds = %75, %.preheader
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.025) #5
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = icmp slt i64 %55, 0
  br i1 %56, label %86, label %46, !llvm.loop !14

.lr.ph46:                                         ; preds = %.preheader, %75
  %.02445 = phi i64 [ %79, %75 ], [ 0, %.preheader ]
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.025) #5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %.02445) #5
  %59 = load i64, ptr %58, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %60 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %59)
          to label %61 unwind label %71

61:                                               ; preds = %.lr.ph46
  %62 = extractvalue { ptr, i64 } %60, 0
  store ptr %62, ptr %13, align 8
  %63 = extractvalue { ptr, i64 } %60, 1
  store i64 %63, ptr %18, align 8
  %64 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  br i1 %64, label %.critedge, label %65

65:                                               ; preds = %61
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.025) #5
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = icmp slt i64 %67, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br i1 %68, label %69, label %73

69:                                               ; preds = %65
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.025) #5
  store i64 %59, ptr %70, align 8, !tbaa !5
  br label %73

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

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

73:                                               ; preds = %.critedge, %69, %65
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %74 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %59)
          to label %75 unwind label %83

75:                                               ; preds = %73
  %76 = extractvalue { ptr, i64 } %74, 0
  store ptr %76, ptr %14, align 8
  %77 = extractvalue { ptr, i64 } %74, 1
  store i64 %77, ptr %19, align 8
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  %79 = add nuw nsw i64 %.02445, 1
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.025) #5
  %81 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %80) #5
  %82 = icmp ult i64 %79, %81
  br i1 %82, label %.lr.ph46, label %._crit_edge47, !llvm.loop !15

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %85

85:                                               ; preds = %83, %71
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %72, %71 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %101

86:                                               ; preds = %._crit_edge47, %46
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #5
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = icmp slt i64 %88, 0
  br i1 %89, label %._crit_edge50, label %.preheader39

.preheader39:                                     ; preds = %86
  %90 = load i64, ptr %2, align 8, !tbaa !5
  %91 = icmp sgt i64 %90, 0
  br i1 %91, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %.preheader39, %.lr.ph49
  %.048 = phi i64 [ %95, %.lr.ph49 ], [ 0, %.preheader39 ]
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.048) #5
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %93)
  %95 = add nuw nsw i64 %.048, 1
  %96 = load i64, ptr %2, align 8, !tbaa !5
  %97 = icmp slt i64 %95, %96
  br i1 %97, label %.lr.ph49, label %._crit_edge50, !llvm.loop !16

._crit_edge50:                                    ; preds = %.lr.ph49, %.preheader39, %86
  %.str.3.sink = phi ptr [ @.str.1, %86 ], [ @.str.3, %.preheader39 ], [ @.str.3, %.lr.ph49 ]
  %98 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_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
  %99 = load i64, ptr %1, align 8, !tbaa !5
  %100 = add nsw i64 %99, -1
  store i64 %100, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %99, 0
  br i1 %.not, label %._crit_edge54, label %20, !llvm.loop !17

101:                                              ; preds = %85, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %85 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  br label %102

102:                                              ; preds = %101, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %101 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %103

103:                                              ; preds = %102, %40
  %.pn36 = phi { ptr, i32 } [ %41, %40 ], [ %.pn.pn.pn, %102 ]
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %104

104:                                              ; preds = %103, %26
  %.pn36.pn = phi { ptr, i32 } [ %.pn36, %103 ], [ %27, %26 ]
  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 } %.pn36.pn

._crit_edge54:                                    ; preds = %._crit_edge50, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

; 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 @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 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

; 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 void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(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"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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