; LLVM IR from abeaumont/competitive-programming :: codeforces/1208 (e)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.4" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.4" = type { i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::deque", align 8
  %16 = alloca %"class.std::tuple", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::tuple", align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %29
  %31 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  %34 = load i32, ptr %5, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %36 unwind label %45

36:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %37 = load i32, ptr %5, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %39 unwind label %49

39:                                               ; preds = %36
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %40

40:                                               ; preds = %261, %39
  %41 = load i32, ptr %13, align 4, !tbaa !8
  %42 = load i32, ptr %4, align 4, !tbaa !8
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %53, label %44

44:                                               ; preds = %40
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %265

45:                                               ; preds = %0
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %312

49:                                               ; preds = %36
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %311

53:                                               ; preds = %40
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %55 unwind label %70

55:                                               ; preds = %53
  %56 = load i32, ptr %5, align 4, !tbaa !8
  %57 = load i32, ptr %3, align 4, !tbaa !8
  %58 = sub nsw i32 %56, %57
  store i32 %58, ptr %2, align 4, !tbaa !8
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = icmp sge i32 %59, %60
  br i1 %61, label %62, label %162

62:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 80, ptr %15) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15)
          to label %63 unwind label %74

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 -1, ptr %18, align 4, !tbaa !8
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %15, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %64 unwind label %78

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %65

65:                                               ; preds = %155, %64
  %66 = load i32, ptr %19, align 4, !tbaa !8
  %67 = load i32, ptr %5, align 4, !tbaa !8
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %82, label %69

69:                                               ; preds = %65
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %159

70:                                               ; preds = %53
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  br label %264

74:                                               ; preds = %62
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  br label %161

78:                                               ; preds = %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %160

82:                                               ; preds = %65
  %83 = load i32, ptr %19, align 4, !tbaa !8
  %84 = load i32, ptr %3, align 4, !tbaa !8
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %86, label %116

86:                                               ; preds = %82
  %87 = load i32, ptr %19, align 4, !tbaa !8
  %88 = load i32, ptr %3, align 4, !tbaa !8
  %89 = icmp eq i32 %87, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %98

91:                                               ; preds = %86
  %92 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %93 unwind label %94

93:                                               ; preds = %91
  br label %98

94:                                               ; preds = %91
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %158

98:                                               ; preds = %93, %90
  br label %99

99:                                               ; preds = %109, %98
  %100 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  br i1 %100, label %107, label %101

101:                                              ; preds = %99
  %102 = load i32, ptr %6, align 4, !tbaa !8
  %103 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %103) #7
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = icmp sgt i32 %102, %105
  br label %107

107:                                              ; preds = %101, %99
  %108 = phi i1 [ false, %99 ], [ %106, %101 ]
  br i1 %108, label %109, label %110

109:                                              ; preds = %107
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  br label %99, !llvm.loop !11

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %19) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %15, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %111 unwind label %112

111:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %116

112:                                              ; preds = %110
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %158

116:                                              ; preds = %111, %82
  br label %117

117:                                              ; preds = %129, %116
  %118 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  br i1 %118, label %127, label %119

119:                                              ; preds = %117
  %120 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %120) #7
  %122 = load i32, ptr %121, align 4, !tbaa !8
  %123 = load i32, ptr %19, align 4, !tbaa !8
  %124 = load i32, ptr %2, align 4, !tbaa !8
  %125 = sub nsw i32 %123, %124
  %126 = icmp slt i32 %122, %125
  br label %127

127:                                              ; preds = %119, %117
  %128 = phi i1 [ false, %117 ], [ %126, %119 ]
  br i1 %128, label %129, label %130

129:                                              ; preds = %127
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  br label %117, !llvm.loop !13

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %131 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %131) #7
  %133 = load i32, ptr %132, align 4, !tbaa !8
  store i32 %133, ptr %21, align 4, !tbaa !8
  %134 = load i32, ptr %21, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = load i32, ptr %19, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %137) #7
  %139 = load i64, ptr %138, align 8, !tbaa !14
  %140 = add nsw i64 %139, %135
  store i64 %140, ptr %138, align 8, !tbaa !14
  %141 = load i32, ptr %19, align 4, !tbaa !8
  %142 = load i32, ptr %5, align 4, !tbaa !8
  %143 = sub nsw i32 %142, 1
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %145, label %154

145:                                              ; preds = %130
  %146 = load i32, ptr %21, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = load i32, ptr %19, align 4, !tbaa !8
  %149 = add nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %150) #7
  %152 = load i64, ptr %151, align 8, !tbaa !14
  %153 = sub nsw i64 %152, %147
  store i64 %153, ptr %151, align 8, !tbaa !14
  br label %154

154:                                              ; preds = %145, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %19, align 4, !tbaa !8
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %19, align 4, !tbaa !8
  br label %65, !llvm.loop !16

158:                                              ; preds = %112, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %160

159:                                              ; preds = %69
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #7
  br label %260

160:                                              ; preds = %158, %78
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15) #7
  br label %161

161:                                              ; preds = %160, %74
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #7
  br label %264

162:                                              ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %163

163:                                              ; preds = %193, %162
  %164 = load i32, ptr %23, align 4, !tbaa !8
  %165 = load i32, ptr %3, align 4, !tbaa !8
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  store i32 12, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %200

168:                                              ; preds = %163
  %169 = load i32, ptr %23, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %170) #7
  %172 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %171)
          to label %173 unwind label %196

173:                                              ; preds = %168
  %174 = load i32, ptr %23, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %175) #7
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %176)
          to label %178 unwind label %196

178:                                              ; preds = %173
  %179 = load i64, ptr %177, align 8, !tbaa !14
  store i64 %179, ptr %22, align 8, !tbaa !14
  %180 = load i64, ptr %22, align 8, !tbaa !14
  %181 = load i32, ptr %23, align 4, !tbaa !8
  %182 = sext i32 %181 to i64
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %182) #7
  %184 = load i64, ptr %183, align 8, !tbaa !14
  %185 = add nsw i64 %184, %180
  store i64 %185, ptr %183, align 8, !tbaa !14
  %186 = load i64, ptr %22, align 8, !tbaa !14
  %187 = load i32, ptr %23, align 4, !tbaa !8
  %188 = add nsw i32 %187, 1
  %189 = sext i32 %188 to i64
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %189) #7
  %191 = load i64, ptr %190, align 8, !tbaa !14
  %192 = sub nsw i64 %191, %186
  store i64 %192, ptr %190, align 8, !tbaa !14
  br label %193

193:                                              ; preds = %178
  %194 = load i32, ptr %23, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %23, align 4, !tbaa !8
  br label %163, !llvm.loop !17

196:                                              ; preds = %173, %168
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %9, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %259

200:                                              ; preds = %167
  %201 = load i64, ptr %22, align 8, !tbaa !14
  %202 = load i32, ptr %3, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %203) #7
  %205 = load i64, ptr %204, align 8, !tbaa !14
  %206 = add nsw i64 %205, %201
  store i64 %206, ptr %204, align 8, !tbaa !14
  %207 = load i64, ptr %22, align 8, !tbaa !14
  %208 = load i32, ptr %5, align 4, !tbaa !8
  %209 = load i32, ptr %3, align 4, !tbaa !8
  %210 = sub nsw i32 %208, %209
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %211) #7
  %213 = load i64, ptr %212, align 8, !tbaa !14
  %214 = sub nsw i64 %213, %207
  store i64 %214, ptr %212, align 8, !tbaa !14
  store i64 0, ptr %22, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %215

215:                                              ; preds = %255, %200
  %216 = load i32, ptr %24, align 4, !tbaa !8
  %217 = load i32, ptr %3, align 4, !tbaa !8
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 15, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %258

220:                                              ; preds = %215
  %221 = load i32, ptr %3, align 4, !tbaa !8
  %222 = load i32, ptr %24, align 4, !tbaa !8
  %223 = sub nsw i32 %221, %222
  %224 = sub nsw i32 %223, 1
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %225) #7
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %226)
          to label %228 unwind label %250

228:                                              ; preds = %220
  %229 = load i64, ptr %227, align 8, !tbaa !14
  store i64 %229, ptr %22, align 8, !tbaa !14
  %230 = load i64, ptr %22, align 8, !tbaa !14
  %231 = load i32, ptr %5, align 4, !tbaa !8
  %232 = load i32, ptr %24, align 4, !tbaa !8
  %233 = sub nsw i32 %231, %232
  %234 = sub nsw i32 %233, 1
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %235) #7
  %237 = load i64, ptr %236, align 8, !tbaa !14
  %238 = add nsw i64 %237, %230
  store i64 %238, ptr %236, align 8, !tbaa !14
  %239 = load i32, ptr %24, align 4, !tbaa !8
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %254

241:                                              ; preds = %228
  %242 = load i64, ptr %22, align 8, !tbaa !14
  %243 = load i32, ptr %5, align 4, !tbaa !8
  %244 = load i32, ptr %24, align 4, !tbaa !8
  %245 = sub nsw i32 %243, %244
  %246 = sext i32 %245 to i64
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %246) #7
  %248 = load i64, ptr %247, align 8, !tbaa !14
  %249 = sub nsw i64 %248, %242
  store i64 %249, ptr %247, align 8, !tbaa !14
  br label %254

250:                                              ; preds = %220
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %9, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %259

254:                                              ; preds = %241, %228
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %24, align 4, !tbaa !8
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %24, align 4, !tbaa !8
  br label %215, !llvm.loop !18

258:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %260

259:                                              ; preds = %250, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %264

260:                                              ; preds = %258, %159
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %13, align 4, !tbaa !8
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %13, align 4, !tbaa !8
  br label %40, !llvm.loop !19

264:                                              ; preds = %259, %161, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %310

265:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !8
  br label %266

266:                                              ; preds = %301, %265
  %267 = load i32, ptr %25, align 4, !tbaa !8
  %268 = load i32, ptr %5, align 4, !tbaa !8
  %269 = icmp slt i32 %267, %268
  br i1 %269, label %271, label %270

270:                                              ; preds = %266
  store i32 18, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %308

271:                                              ; preds = %266
  %272 = load i32, ptr %25, align 4, !tbaa !8
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %285

274:                                              ; preds = %271
  %275 = load i32, ptr %25, align 4, !tbaa !8
  %276 = sub nsw i32 %275, 1
  %277 = sext i32 %276 to i64
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %277) #7
  %279 = load i64, ptr %278, align 8, !tbaa !14
  %280 = load i32, ptr %25, align 4, !tbaa !8
  %281 = sext i32 %280 to i64
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %281) #7
  %283 = load i64, ptr %282, align 8, !tbaa !14
  %284 = add nsw i64 %283, %279
  store i64 %284, ptr %282, align 8, !tbaa !14
  br label %285

285:                                              ; preds = %274, %271
  %286 = load i32, ptr %25, align 4, !tbaa !8
  %287 = sext i32 %286 to i64
  %288 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %287) #7
  %289 = load i64, ptr %288, align 8, !tbaa !14
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %289)
          to label %291 unwind label %304

291:                                              ; preds = %285
  %292 = load i32, ptr %25, align 4, !tbaa !8
  %293 = load i32, ptr %5, align 4, !tbaa !8
  %294 = sub nsw i32 %293, 1
  %295 = icmp eq i32 %292, %294
  %296 = zext i1 %295 to i64
  %297 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %296
  %298 = load i8, ptr %297, align 1, !tbaa !20
  %299 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %290, i8 noundef signext %298)
          to label %300 unwind label %304

300:                                              ; preds = %291
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %25, align 4, !tbaa !8
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %25, align 4, !tbaa !8
  br label %266, !llvm.loop !21

304:                                              ; preds = %291, %285
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %9, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %310

308:                                              ; preds = %270
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %309 = load i32, ptr %1, align 4
  ret i32 %309

310:                                              ; preds = %304, %264
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %311

311:                                              ; preds = %310, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %312

312:                                              ; preds = %311, %45
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %313

313:                                              ; preds = %312
  %314 = load ptr, ptr %9, align 8
  %315 = load i32, ptr %10, align 4
  %316 = insertvalue { ptr, i32 } poison, ptr %314, 0
  %317 = insertvalue { ptr, i32 } %316, i32 %315, 1
  resume { ptr, i32 } %317
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!10, !10, i64 0}
!21 = distinct !{!21, !12}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.4" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.4" = type { i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::deque", align 8
  %10 = alloca %"class.std::tuple", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::tuple", align 4
  %15 = alloca i64, align 8
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %24 = load i32, ptr %3, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %26 unwind label %47

26:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %27 = load i32, ptr %3, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %29 unwind label %49

29:                                               ; preds = %26
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph72, label %.preheader

.preheader:                                       ; preds = %194, %29
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph74.preheader, label %._crit_edge75

.lr.ph74.preheader:                               ; preds = %.preheader
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #7
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %35)
          to label %37 unwind label %.loopexit.split-lp

37:                                               ; preds = %.lr.ph74.preheader
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = icmp eq i32 %38, 1
  %40 = zext i1 %39 to i64
  %41 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !13
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %36, i8 noundef signext %42)
          to label %44 unwind label %.loopexit.split-lp

44:                                               ; preds = %37
  %45 = load i32, ptr %3, align 4, !tbaa !8
  %46 = icmp sgt i32 %45, 1
  br i1 %46, label %.lr.ph74.peel.next, label %._crit_edge75

47:                                               ; preds = %0
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %222

49:                                               ; preds = %26
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  br label %221

.lr.ph72:                                         ; preds = %29, %194
  %.03270 = phi i32 [ %195, %194 ], [ 0, %29 ]
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %52 unwind label %61

52:                                               ; preds = %.lr.ph72
  %53 = load i32, ptr %3, align 4, !tbaa !8
  %54 = load i32, ptr %1, align 4, !tbaa !8
  %55 = sub nsw i32 %53, %54
  %.not46 = icmp slt i32 %54, %55
  br i1 %.not46, label %124, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %57 unwind label %63

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 -1, ptr %12, align 4, !tbaa !8
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %58 unwind label %65

58:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph61, label %._crit_edge

._crit_edge:                                      ; preds = %116, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  br label %194

61:                                               ; preds = %.lr.ph72
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %220

63:                                               ; preds = %56
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %123

65:                                               ; preds = %57
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %122

.lr.ph61:                                         ; preds = %58, %116
  %storemerge60 = phi i32 [ %119, %116 ], [ 0, %58 ]
  %67 = load i32, ptr %1, align 4, !tbaa !8
  %.not48 = icmp sgt i32 %storemerge60, %67
  br i1 %.not48, label %87, label %68

68:                                               ; preds = %.lr.ph61
  %69 = icmp eq i32 %storemerge60, %67
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %75

71:                                               ; preds = %68
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %75 unwind label %73

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

75:                                               ; preds = %71, %70
  %76 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br i1 %76, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %75, %82
  %77 = load i32, ptr %4, align 4, !tbaa !8
  %78 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %78) #7
  %80 = load i32, ptr %79, align 4, !tbaa !8
  %81 = icmp sgt i32 %77, %80
  br i1 %81, label %82, label %.critedge

82:                                               ; preds = %.lr.ph
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  %83 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br i1 %83, label %.critedge, label %.lr.ph, !llvm.loop !14

.critedge:                                        ; preds = %.lr.ph, %82, %75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %13) #7
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %84 unwind label %85

84:                                               ; preds = %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %87

85:                                               ; preds = %.critedge
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %121

87:                                               ; preds = %84, %.lr.ph61
  %88 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br i1 %88, label %.critedge2, label %.lr.ph58

.lr.ph58:                                         ; preds = %87, %95
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %89) #7
  %91 = load i32, ptr %90, align 4, !tbaa !8
  %92 = load i32, ptr %13, align 4, !tbaa !8
  %93 = sub nsw i32 %92, %55
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %95, label %.critedge2

95:                                               ; preds = %.lr.ph58
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  %96 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br i1 %96, label %.critedge2, label %.lr.ph58, !llvm.loop !16

.critedge2:                                       ; preds = %.lr.ph58, %95, %87
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %97) #7
  %99 = load i32, ptr %98, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = load i32, ptr %13, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %102) #7
  %104 = load i64, ptr %103, align 8, !tbaa !11
  %105 = add nsw i64 %104, %100
  store i64 %105, ptr %103, align 8, !tbaa !11
  %106 = load i32, ptr %13, align 4, !tbaa !8
  %107 = load i32, ptr %3, align 4, !tbaa !8
  %108 = add nsw i32 %107, -1
  %109 = icmp slt i32 %106, %108
  br i1 %109, label %110, label %116

110:                                              ; preds = %.critedge2
  %111 = add nsw i32 %106, 1
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %112) #7
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = sub nsw i64 %114, %100
  store i64 %115, ptr %113, align 8, !tbaa !11
  %.pre = load i32, ptr %13, align 4, !tbaa !8
  %.pre83 = load i32, ptr %3, align 4, !tbaa !8
  br label %116

116:                                              ; preds = %110, %.critedge2
  %117 = phi i32 [ %.pre83, %110 ], [ %107, %.critedge2 ]
  %118 = phi i32 [ %.pre, %110 ], [ %106, %.critedge2 ]
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !8
  %120 = icmp slt i32 %119, %117
  br i1 %120, label %.lr.ph61, label %._crit_edge, !llvm.loop !17

121:                                              ; preds = %85, %73
  %.pn = phi { ptr, i32 } [ %86, %85 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  br label %122

122:                                              ; preds = %121, %65
  %.pn.pn = phi { ptr, i32 } [ %.pn, %121 ], [ %66, %65 ]
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  br label %123

123:                                              ; preds = %122, %63
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %122 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  br label %220

124:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i64 0, ptr %15, align 8, !tbaa !11
  %125 = icmp sgt i32 %54, 0
  br i1 %125, label %.lr.ph64, label %.._crit_edge65_crit_edge

.._crit_edge65_crit_edge:                         ; preds = %124
  %.pre86 = sext i32 %54 to i64
  br label %._crit_edge65

._crit_edge65.loopexit:                           ; preds = %155
  %.pre84 = load i64, ptr %15, align 8, !tbaa !11
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %.._crit_edge65_crit_edge, %._crit_edge65.loopexit
  %.pre-phi = phi i64 [ %.pre86, %.._crit_edge65_crit_edge ], [ %167, %._crit_edge65.loopexit ]
  %126 = phi i64 [ 0, %.._crit_edge65_crit_edge ], [ %.pre84, %._crit_edge65.loopexit ]
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.pre-phi) #7
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %129 = add nsw i64 %128, %126
  store i64 %129, ptr %127, align 8, !tbaa !11
  %130 = load i64, ptr %15, align 8, !tbaa !11
  %131 = load i32, ptr %3, align 4, !tbaa !8
  %132 = load i32, ptr %1, align 4, !tbaa !8
  %133 = sub nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %134) #7
  %136 = load i64, ptr %135, align 8, !tbaa !11
  %137 = sub nsw i64 %136, %130
  store i64 %137, ptr %135, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !11
  %138 = load i32, ptr %1, align 4, !tbaa !8
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %140, label %._crit_edge69

140:                                              ; preds = %._crit_edge65
  %141 = add nsw i32 %138, -1
  %142 = zext nneg i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %142) #7
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %143)
  %145 = load i64, ptr %144, align 8, !tbaa !11
  store i64 %145, ptr %15, align 8, !tbaa !11
  %146 = load i32, ptr %3, align 4, !tbaa !8
  %147 = add i32 %146, -1
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %148) #7
  %150 = load i64, ptr %149, align 8, !tbaa !11
  %151 = add nsw i64 %150, %145
  store i64 %151, ptr %149, align 8, !tbaa !11
  %.pre85 = load i32, ptr %1, align 4, !tbaa !8
  %152 = icmp sgt i32 %.pre85, 1
  br i1 %152, label %.lr.ph68.peel.next, label %._crit_edge69

.lr.ph64:                                         ; preds = %124, %155
  %indvars.iv = phi i64 [ %indvars.iv.next, %155 ], [ 0, %124 ]
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #7
  %154 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %153)
          to label %155 unwind label %169

155:                                              ; preds = %.lr.ph64
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #7
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %156)
  %158 = load i64, ptr %157, align 8, !tbaa !11
  store i64 %158, ptr %15, align 8, !tbaa !11
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #7
  %160 = load i64, ptr %159, align 8, !tbaa !11
  %161 = add nsw i64 %160, %158
  store i64 %161, ptr %159, align 8, !tbaa !11
  %162 = load i64, ptr %15, align 8, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv.next) #7
  %164 = load i64, ptr %163, align 8, !tbaa !11
  %165 = sub nsw i64 %164, %162
  store i64 %165, ptr %163, align 8, !tbaa !11
  %166 = load i32, ptr %1, align 4, !tbaa !8
  %167 = sext i32 %166 to i64
  %168 = icmp slt i64 %indvars.iv.next, %167
  br i1 %168, label %.lr.ph64, label %._crit_edge65.loopexit, !llvm.loop !18

169:                                              ; preds = %.lr.ph64
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %220

._crit_edge69:                                    ; preds = %.lr.ph68.peel.next, %140, %._crit_edge65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %194

.lr.ph68.peel.next:                               ; preds = %140, %.lr.ph68.peel.next
  %171 = phi i32 [ %192, %.lr.ph68.peel.next ], [ %.pre85, %140 ]
  %.02966 = phi i32 [ %191, %.lr.ph68.peel.next ], [ 1, %140 ]
  %172 = xor i32 %.02966, -1
  %173 = add i32 %171, %172
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %174) #7
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %175)
  %177 = load i64, ptr %176, align 8, !tbaa !11
  store i64 %177, ptr %15, align 8, !tbaa !11
  %178 = load i32, ptr %3, align 4, !tbaa !8
  %179 = add i32 %178, %172
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %180) #7
  %182 = load i64, ptr %181, align 8, !tbaa !11
  %183 = add nsw i64 %182, %177
  store i64 %183, ptr %181, align 8, !tbaa !11
  %184 = load i64, ptr %15, align 8, !tbaa !11
  %185 = load i32, ptr %3, align 4, !tbaa !8
  %186 = sub nsw i32 %185, %.02966
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %187) #7
  %189 = load i64, ptr %188, align 8, !tbaa !11
  %190 = sub nsw i64 %189, %184
  store i64 %190, ptr %188, align 8, !tbaa !11
  %191 = add nuw nsw i32 %.02966, 1
  %192 = load i32, ptr %1, align 4, !tbaa !8
  %193 = icmp slt i32 %191, %192
  br i1 %193, label %.lr.ph68.peel.next, label %._crit_edge69, !llvm.loop !19

194:                                              ; preds = %._crit_edge, %._crit_edge69
  %195 = add nuw nsw i32 %.03270, 1
  %196 = load i32, ptr %2, align 4, !tbaa !8
  %197 = icmp slt i32 %195, %196
  br i1 %197, label %.lr.ph72, label %.preheader, !llvm.loop !21

._crit_edge75:                                    ; preds = %216, %44, %.preheader
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph74.peel.next:                               ; preds = %44, %216
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %216 ], [ 1, %44 ]
  %198 = add nsw i64 %indvars.iv79, -1
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %198) #7
  %200 = load i64, ptr %199, align 8, !tbaa !11
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv79) #7
  %202 = load i64, ptr %201, align 8, !tbaa !11
  %203 = add nsw i64 %202, %200
  store i64 %203, ptr %201, align 8, !tbaa !11
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv79) #7
  %205 = load i64, ptr %204, align 8, !tbaa !11
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %205)
          to label %207 unwind label %.loopexit

207:                                              ; preds = %.lr.ph74.peel.next
  %208 = load i32, ptr %3, align 4, !tbaa !8
  %209 = add nsw i32 %208, -1
  %210 = zext i32 %209 to i64
  %211 = icmp eq i64 %indvars.iv79, %210
  %212 = zext i1 %211 to i64
  %213 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %212
  %214 = load i8, ptr %213, align 1, !tbaa !13
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %206, i8 noundef signext %214)
          to label %216 unwind label %.loopexit

216:                                              ; preds = %207
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %217 = load i32, ptr %3, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = icmp slt i64 %indvars.iv.next80, %218
  br i1 %219, label %.lr.ph74.peel.next, label %._crit_edge75, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph74.peel.next, %207
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %220

.loopexit.split-lp:                               ; preds = %.lr.ph74.preheader, %37
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %220

220:                                              ; preds = %.loopexit, %.loopexit.split-lp, %61, %123, %169
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %123 ], [ %170, %169 ], [ %62, %61 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %221

221:                                              ; preds = %220, %49
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %220 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %222

222:                                              ; preds = %221, %47
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %221 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15, !20}
!20 = !{!"llvm.loop.peeled.count", i32 1}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15, !20}


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