; LLVM IR from DionysiosB/CodeForces :: 0800-0899 (852B-NeuralNetworkCountry-OLD)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::vector.0", align 8
  %21 = alloca %"class.std::vector.5", align 8
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca i64, align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::allocator.7", align 1
  %26 = alloca %"class.std::allocator.2", align 1
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store i64 1000000007, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %40 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %40, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %41 unwind label %47

41:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %56, %41
  %43 = load i64, ptr %11, align 8, !tbaa !5
  %44 = load i64, ptr %3, align 8, !tbaa !5
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %51, label %46

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

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

51:                                               ; preds = %42
  %52 = load i64, ptr %11, align 8, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %52) #5
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %55 unwind label %59

55:                                               ; preds = %51
  br label %56

56:                                               ; preds = %55
  %57 = load i64, ptr %11, align 8, !tbaa !5
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %11, align 8, !tbaa !5
  br label %42, !llvm.loop !9

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

63:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %64 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %64, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %65 unwind label %71

65:                                               ; preds = %63
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %80, %65
  %67 = load i64, ptr %15, align 8, !tbaa !5
  %68 = load i64, ptr %3, align 8, !tbaa !5
  %69 = icmp slt i64 %67, %68
  br i1 %69, label %75, label %70

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

71:                                               ; preds = %63
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %269

75:                                               ; preds = %66
  %76 = load i64, ptr %15, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %76) #5
  %78 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %79 unwind label %83

79:                                               ; preds = %75
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %15, align 8, !tbaa !5
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %15, align 8, !tbaa !5
  br label %66, !llvm.loop !11

83:                                               ; preds = %75
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %268

87:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %88 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %88, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %89 unwind label %95

89:                                               ; preds = %87
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %104, %89
  %91 = load i64, ptr %19, align 8, !tbaa !5
  %92 = load i64, ptr %3, align 8, !tbaa !5
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %99, label %94

94:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %111

95:                                               ; preds = %87
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %267

99:                                               ; preds = %90
  %100 = load i64, ptr %19, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %100) #5
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %101)
          to label %103 unwind label %107

103:                                              ; preds = %99
  br label %104

104:                                              ; preds = %103
  %105 = load i64, ptr %19, align 8, !tbaa !5
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %19, align 8, !tbaa !5
  br label %90, !llvm.loop !12

107:                                              ; preds = %99
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %9, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %266

111:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %112 = load i64, ptr %4, align 8, !tbaa !5
  %113 = add nsw i64 %112, 2
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  %114 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  %115 = load i64, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %115, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %116 unwind label %124

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #5
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %114, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %117 unwind label %128

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @_ZNSaISt6vectorIS_IlSaIlEESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  invoke void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %113, ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %118 unwind label %132

118:                                              ; preds = %117
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store i64 0, ptr %27, align 8, !tbaa !5
  br label %119

119:                                              ; preds = %148, %118
  %120 = load i64, ptr %27, align 8, !tbaa !5
  %121 = load i64, ptr %3, align 8, !tbaa !5
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %138, label %123

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

124:                                              ; preds = %111
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %9, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %10, align 4
  br label %137

128:                                              ; preds = %116
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %9, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %10, align 4
  br label %136

132:                                              ; preds = %117
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %9, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  br label %136

136:                                              ; preds = %132, %128
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  br label %137

137:                                              ; preds = %136, %124
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  br label %265

138:                                              ; preds = %119
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 1) #5
  %140 = load i64, ptr %27, align 8, !tbaa !5
  %141 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %140) #5
  %142 = load i64, ptr %27, align 8, !tbaa !5
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %142) #5
  %144 = load i64, ptr %143, align 8, !tbaa !5
  %145 = load i64, ptr %5, align 8, !tbaa !5
  %146 = srem i64 %144, %145
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %146) #5
  store i64 1, ptr %147, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %138
  %149 = load i64, ptr %27, align 8, !tbaa !5
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %27, align 8, !tbaa !5
  br label %119, !llvm.loop !13

151:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store i64 2, ptr %28, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %223, %151
  %153 = load i64, ptr %28, align 8, !tbaa !5
  %154 = load i64, ptr %4, align 8, !tbaa !5
  %155 = icmp sle i64 %153, %154
  br i1 %155, label %157, label %156

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

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

158:                                              ; preds = %219, %157
  %159 = load i64, ptr %30, align 8, !tbaa !5
  %160 = load i64, ptr %3, align 8, !tbaa !5
  %161 = icmp slt i64 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 17, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %222

163:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store i64 0, ptr %31, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %215, %163
  %165 = load i64, ptr %31, align 8, !tbaa !5
  %166 = load i64, ptr %3, align 8, !tbaa !5
  %167 = icmp slt i64 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 20, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %218

169:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %170 = load i64, ptr %31, align 8, !tbaa !5
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %170) #5
  %172 = load i64, ptr %171, align 8, !tbaa !5
  store i64 %172, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  store i64 0, ptr %33, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %211, %169
  %174 = load i64, ptr %33, align 8, !tbaa !5
  %175 = load i64, ptr %5, align 8, !tbaa !5
  %176 = icmp slt i64 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 23, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %214

178:                                              ; preds = %173
  %179 = load i64, ptr %28, align 8, !tbaa !5
  %180 = sub nsw i64 %179, 1
  %181 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %180) #5
  %182 = load i64, ptr %30, align 8, !tbaa !5
  %183 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %182) #5
  %184 = load i64, ptr %33, align 8, !tbaa !5
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %183, i64 noundef %184) #5
  %186 = load i64, ptr %185, align 8, !tbaa !5
  %187 = load i64, ptr %28, align 8, !tbaa !5
  %188 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %187) #5
  %189 = load i64, ptr %31, align 8, !tbaa !5
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %188, i64 noundef %189) #5
  %191 = load i64, ptr %33, align 8, !tbaa !5
  %192 = load i64, ptr %32, align 8, !tbaa !5
  %193 = add nsw i64 %191, %192
  %194 = load i64, ptr %5, align 8, !tbaa !5
  %195 = srem i64 %193, %194
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef %195) #5
  %197 = load i64, ptr %196, align 8, !tbaa !5
  %198 = add nsw i64 %197, %186
  store i64 %198, ptr %196, align 8, !tbaa !5
  %199 = load i64, ptr %28, align 8, !tbaa !5
  %200 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %199) #5
  %201 = load i64, ptr %31, align 8, !tbaa !5
  %202 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef %201) #5
  %203 = load i64, ptr %33, align 8, !tbaa !5
  %204 = load i64, ptr %32, align 8, !tbaa !5
  %205 = add nsw i64 %203, %204
  %206 = load i64, ptr %5, align 8, !tbaa !5
  %207 = srem i64 %205, %206
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %207) #5
  %209 = load i64, ptr %208, align 8, !tbaa !5
  %210 = srem i64 %209, 1000000007
  store i64 %210, ptr %208, align 8, !tbaa !5
  br label %211

211:                                              ; preds = %178
  %212 = load i64, ptr %33, align 8, !tbaa !5
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %33, align 8, !tbaa !5
  br label %173, !llvm.loop !14

214:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %31, align 8, !tbaa !5
  %217 = add nsw i64 %216, 1
  store i64 %217, ptr %31, align 8, !tbaa !5
  br label %164, !llvm.loop !15

218:                                              ; preds = %168
  br label %219

219:                                              ; preds = %218
  %220 = load i64, ptr %30, align 8, !tbaa !5
  %221 = add nsw i64 %220, 1
  store i64 %221, ptr %30, align 8, !tbaa !5
  br label %158, !llvm.loop !16

222:                                              ; preds = %162
  br label %223

223:                                              ; preds = %222
  %224 = load i64, ptr %28, align 8, !tbaa !5
  %225 = add nsw i64 %224, 1
  store i64 %225, ptr %28, align 8, !tbaa !5
  br label %152, !llvm.loop !17

226:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  store i64 0, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  store i64 0, ptr %35, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %251, %226
  %228 = load i64, ptr %35, align 8, !tbaa !5
  %229 = load i64, ptr %3, align 8, !tbaa !5
  %230 = icmp slt i64 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 26, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %254

232:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %233 = load i64, ptr %35, align 8, !tbaa !5
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %233) #5
  %235 = load i64, ptr %234, align 8, !tbaa !5
  store i64 %235, ptr %36, align 8, !tbaa !5
  %236 = load i64, ptr %4, align 8, !tbaa !5
  %237 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %236) #5
  %238 = load i64, ptr %35, align 8, !tbaa !5
  %239 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %238) #5
  %240 = load i64, ptr %5, align 8, !tbaa !5
  %241 = load i64, ptr %36, align 8, !tbaa !5
  %242 = load i64, ptr %5, align 8, !tbaa !5
  %243 = srem i64 %241, %242
  %244 = sub nsw i64 %240, %243
  %245 = load i64, ptr %5, align 8, !tbaa !5
  %246 = srem i64 %244, %245
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %239, i64 noundef %246) #5
  %248 = load i64, ptr %247, align 8, !tbaa !5
  %249 = load i64, ptr %34, align 8, !tbaa !5
  %250 = add nsw i64 %249, %248
  store i64 %250, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  br label %251

251:                                              ; preds = %232
  %252 = load i64, ptr %35, align 8, !tbaa !5
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %35, align 8, !tbaa !5
  br label %227, !llvm.loop !18

254:                                              ; preds = %231
  %255 = load i64, ptr %34, align 8, !tbaa !5
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %255)
          to label %257 unwind label %261

257:                                              ; preds = %254
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %259 unwind label %261

259:                                              ; preds = %257
  store i32 0, ptr %1, align 4
  store i32 1, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  %260 = load i32, ptr %1, align 4
  ret i32 %260

261:                                              ; preds = %257, %254
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %9, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  br label %265

265:                                              ; preds = %261, %137
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  br label %266

266:                                              ; preds = %265, %107
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  br label %267

267:                                              ; preds = %266, %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %268

268:                                              ; preds = %267, %83
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %269

269:                                              ; preds = %268, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %270

270:                                              ; preds = %269, %59
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %271

271:                                              ; preds = %270, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 %272

272:                                              ; preds = %271
  %273 = load ptr, ptr %9, align 8
  %274 = load i32, ptr %10, align 4
  %275 = insertvalue { ptr, i32 } poison, ptr %273, 0
  %276 = insertvalue { ptr, i32 } %275, i32 %274, 1
  resume { ptr, i32 } %276
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 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 #2 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(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 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_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

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

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

; 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_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::vector<long>>, std::allocator<std::vector<std::vector<long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::vector<long>>, std::allocator<std::vector<std::vector<long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::vector<long>>, std::allocator<std::vector<std::vector<long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::vector<long>>, std::allocator<std::vector<std::vector<long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.7" = type { i8 }
%"class.std::allocator.2" = type { i8 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca %"class.std::vector.5", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::allocator.7", align 1
  %19 = alloca %"class.std::allocator.2", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %23 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %24 unwind label %27

24:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %25 = load i64, ptr %1, align 8, !tbaa !5
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %31, %24
  %.lcssa80 = phi i64 [ %25, %24 ], [ %33, %31 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.lcssa80, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %37 unwind label %40

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %168

.lr.ph:                                           ; preds = %24, %31
  %.05182 = phi i64 [ %32, %31 ], [ 0, %24 ]
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.05182) #5
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %31 unwind label %35

31:                                               ; preds = %.lr.ph
  %32 = add nuw nsw i64 %.05182, 1
  %33 = load i64, ptr %1, align 8, !tbaa !5
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !9

35:                                               ; preds = %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %167

37:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIlED2Ev(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 8, ptr nonnull %8) #5
  %38 = load i64, ptr %1, align 8, !tbaa !5
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %.lr.ph85, label %._crit_edge86

._crit_edge86:                                    ; preds = %44, %37
  %.lcssa78 = phi i64 [ %38, %37 ], [ %46, %44 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  store i64 0, 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 %.lcssa78, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %50 unwind label %56

40:                                               ; preds = %._crit_edge
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(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 8, ptr nonnull %8) #5
  br label %166

.lr.ph85:                                         ; preds = %37, %44
  %.05083 = phi i64 [ %45, %44 ], [ 0, %37 ]
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.05083) #5
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %44 unwind label %48

44:                                               ; preds = %.lr.ph85
  %45 = add nuw nsw i64 %.05083, 1
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %.lr.ph85, label %._crit_edge86, !llvm.loop !11

48:                                               ; preds = %.lr.ph85
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %165

50:                                               ; preds = %._crit_edge86
  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
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = icmp sgt i64 %51, 0
  br i1 %52, label %.lr.ph90, label %._crit_edge91

._crit_edge91:                                    ; preds = %60, %50
  %.lcssa = phi i64 [ %51, %50 ], [ %62, %60 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #5
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = add nsw i64 %53, 2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #5
  %55 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %55, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %66 unwind label %74

56:                                               ; preds = %._crit_edge86
  %57 = 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 %164

.lr.ph90:                                         ; preds = %50, %60
  %.04988 = phi i64 [ %61, %60 ], [ 0, %50 ]
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04988) #5
  %59 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %60 unwind label %64

60:                                               ; preds = %.lr.ph90
  %61 = add nuw nsw i64 %.04988, 1
  %62 = load i64, ptr %1, align 8, !tbaa !5
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %.lr.ph90, label %._crit_edge91, !llvm.loop !12

64:                                               ; preds = %.lr.ph90
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %163

66:                                               ; preds = %._crit_edge91
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %.lcssa, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %67 unwind label %76

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #5
  call void @_ZNSaISt6vectorIS_IlSaIlEESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %54, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %68 unwind label %78

68:                                               ; preds = %67
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  %69 = load i64, ptr %1, align 8, !tbaa !5
  %70 = icmp sgt i64 %69, 0
  br i1 %70, label %.lr.ph95, label %.preheader76

.preheader76:                                     ; preds = %.lr.ph95, %68
  %71 = phi i64 [ %69, %68 ], [ %90, %.lr.ph95 ]
  %72 = load i64, ptr %2, align 8, !tbaa !5
  %.not105 = icmp slt i64 %72, 2
  br i1 %.not105, label %.preheader, label %.preheader75.lr.ph

.preheader75.lr.ph:                               ; preds = %.preheader76
  %73 = icmp sgt i64 %71, 0
  br i1 %73, label %.preheader75, label %._crit_edge111

74:                                               ; preds = %._crit_edge91
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %81

76:                                               ; preds = %66
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

78:                                               ; preds = %67
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #5
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  br label %80

80:                                               ; preds = %78, %76
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %81

81:                                               ; preds = %80, %74
  %.pn.pn = phi { ptr, i32 } [ %.pn, %80 ], [ %75, %74 ]
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  br label %162

.lr.ph95:                                         ; preds = %68, %.lr.ph95
  %.04893 = phi i64 [ %89, %.lr.ph95 ], [ 0, %68 ]
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 1) #5
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %.04893) #5
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04893) #5
  %85 = load i64, ptr %84, align 8, !tbaa !5
  %86 = load i64, ptr %3, align 8, !tbaa !5
  %87 = srem i64 %85, %86
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %87) #5
  store i64 1, ptr %88, align 8, !tbaa !5
  %89 = add nuw nsw i64 %.04893, 1
  %90 = load i64, ptr %1, align 8, !tbaa !5
  %91 = icmp slt i64 %89, %90
  br i1 %91, label %.lr.ph95, label %.preheader76, !llvm.loop !13

.preheader75:                                     ; preds = %.preheader75.lr.ph, %._crit_edge104
  %92 = phi i64 [ %104, %._crit_edge104 ], [ %72, %.preheader75.lr.ph ]
  %93 = phi i64 [ %105, %._crit_edge104 ], [ %71, %.preheader75.lr.ph ]
  %94 = phi i64 [ %106, %._crit_edge104 ], [ %71, %.preheader75.lr.ph ]
  %95 = phi i64 [ %107, %._crit_edge104 ], [ %71, %.preheader75.lr.ph ]
  %.047106 = phi i64 [ %108, %._crit_edge104 ], [ 2, %.preheader75.lr.ph ]
  %96 = icmp sgt i64 %95, 0
  br i1 %96, label %.preheader74.lr.ph, label %._crit_edge104

.preheader74.lr.ph:                               ; preds = %.preheader75
  %97 = add nsw i64 %.047106, -1
  %98 = icmp sgt i64 %94, 0
  br i1 %98, label %.preheader74, label %._crit_edge104

.preheader:                                       ; preds = %._crit_edge104, %.preheader76
  %99 = phi i64 [ %71, %.preheader76 ], [ %105, %._crit_edge104 ]
  %100 = icmp sgt i64 %99, 0
  br i1 %100, label %.lr.ph110, label %._crit_edge111

.preheader74:                                     ; preds = %.preheader74.lr.ph, %._crit_edge102
  %101 = phi i64 [ %109, %._crit_edge102 ], [ %93, %.preheader74.lr.ph ]
  %102 = phi i64 [ %109, %._crit_edge102 ], [ %94, %.preheader74.lr.ph ]
  %.046103 = phi i64 [ %110, %._crit_edge102 ], [ 0, %.preheader74.lr.ph ]
  %103 = icmp sgt i64 %102, 0
  br i1 %103, label %.lr.ph101, label %._crit_edge102

._crit_edge104.loopexit:                          ; preds = %._crit_edge102
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge104

._crit_edge104:                                   ; preds = %.preheader74.lr.ph, %._crit_edge104.loopexit, %.preheader75
  %104 = phi i64 [ %.pre, %._crit_edge104.loopexit ], [ %92, %.preheader75 ], [ %92, %.preheader74.lr.ph ]
  %105 = phi i64 [ %109, %._crit_edge104.loopexit ], [ %93, %.preheader75 ], [ %93, %.preheader74.lr.ph ]
  %106 = phi i64 [ %109, %._crit_edge104.loopexit ], [ %94, %.preheader75 ], [ %94, %.preheader74.lr.ph ]
  %107 = phi i64 [ %109, %._crit_edge104.loopexit ], [ %95, %.preheader75 ], [ %94, %.preheader74.lr.ph ]
  %108 = add nuw nsw i64 %.047106, 1
  %.not.not = icmp slt i64 %.047106, %104
  br i1 %.not.not, label %.preheader75, label %.preheader, !llvm.loop !14

._crit_edge102:                                   ; preds = %._crit_edge99, %.preheader74
  %109 = phi i64 [ %101, %.preheader74 ], [ %117, %._crit_edge99 ]
  %110 = add nuw nsw i64 %.046103, 1
  %111 = icmp slt i64 %110, %109
  br i1 %111, label %.preheader74, label %._crit_edge104.loopexit, !llvm.loop !16

.lr.ph101:                                        ; preds = %.preheader74, %._crit_edge99
  %.045100 = phi i64 [ %116, %._crit_edge99 ], [ 0, %.preheader74 ]
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.045100) #5
  %113 = load i64, ptr %112, align 8, !tbaa !5
  %114 = load i64, ptr %3, align 8, !tbaa !5
  %115 = icmp sgt i64 %114, 0
  br i1 %115, label %.lr.ph98, label %._crit_edge99

._crit_edge99:                                    ; preds = %.lr.ph98, %.lr.ph101
  %116 = add nuw nsw i64 %.045100, 1
  %117 = load i64, ptr %1, align 8, !tbaa !5
  %118 = icmp slt i64 %116, %117
  br i1 %118, label %.lr.ph101, label %._crit_edge102, !llvm.loop !17

.lr.ph98:                                         ; preds = %.lr.ph101, %.lr.ph98
  %.04396 = phi i64 [ %138, %.lr.ph98 ], [ 0, %.lr.ph101 ]
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %97) #5
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %.046103) #5
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %.04396) #5
  %122 = load i64, ptr %121, align 8, !tbaa !5
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %.047106) #5
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %.045100) #5
  %125 = add nsw i64 %.04396, %113
  %126 = load i64, ptr %3, align 8, !tbaa !5
  %127 = srem i64 %125, %126
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %127) #5
  %129 = load i64, ptr %128, align 8, !tbaa !5
  %130 = add nsw i64 %129, %122
  store i64 %130, ptr %128, align 8, !tbaa !5
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %.047106) #5
  %132 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %.045100) #5
  %133 = load i64, ptr %3, align 8, !tbaa !5
  %134 = srem i64 %125, %133
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %134) #5
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %137 = srem i64 %136, 1000000007
  store i64 %137, ptr %135, align 8, !tbaa !5
  %138 = add nuw nsw i64 %.04396, 1
  %139 = load i64, ptr %3, align 8, !tbaa !5
  %140 = icmp slt i64 %138, %139
  br i1 %140, label %.lr.ph98, label %._crit_edge99, !llvm.loop !18

._crit_edge111:                                   ; preds = %.lr.ph110, %.preheader75.lr.ph, %.preheader
  %.042.lcssa = phi i64 [ 0, %.preheader ], [ 0, %.preheader75.lr.ph ], [ %153, %.lr.ph110 ]
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.042.lcssa)
          to label %157 unwind label %160

.lr.ph110:                                        ; preds = %.preheader, %.lr.ph110
  %.0109 = phi i64 [ %154, %.lr.ph110 ], [ 0, %.preheader ]
  %.042108 = phi i64 [ %153, %.lr.ph110 ], [ 0, %.preheader ]
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.0109) #5
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = load i64, ptr %2, align 8, !tbaa !5
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %144) #5
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %.0109) #5
  %147 = load i64, ptr %3, align 8, !tbaa !5
  %148 = srem i64 %143, %147
  %149 = sub nsw i64 %147, %148
  %150 = srem i64 %149, %147
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %150) #5
  %152 = load i64, ptr %151, align 8, !tbaa !5
  %153 = add nsw i64 %152, %.042108
  %154 = add nuw nsw i64 %.0109, 1
  %155 = load i64, ptr %1, align 8, !tbaa !5
  %156 = icmp slt i64 %154, %155
  br i1 %156, label %.lr.ph110, label %._crit_edge111, !llvm.loop !19

157:                                              ; preds = %._crit_edge111
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %159 unwind label %160

159:                                              ; preds = %157
  call void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

160:                                              ; preds = %157, %._crit_edge111
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %162

162:                                              ; preds = %160, %81
  %.pn63 = phi { ptr, i32 } [ %161, %160 ], [ %.pn.pn, %81 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  br label %163

163:                                              ; preds = %162, %64
  %.pn65 = phi { ptr, i32 } [ %65, %64 ], [ %.pn63, %162 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %164

164:                                              ; preds = %163, %56
  %.pn65.pn = phi { ptr, i32 } [ %.pn65, %163 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %165

165:                                              ; preds = %164, %48
  %.pn68 = phi { ptr, i32 } [ %49, %48 ], [ %.pn65.pn, %164 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %166

166:                                              ; preds = %165, %40
  %.pn68.pn = phi { ptr, i32 } [ %.pn68, %165 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %167

167:                                              ; preds = %166, %35
  %.pn71 = phi { ptr, i32 } [ %36, %35 ], [ %.pn68.pn, %166 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %168

168:                                              ; preds = %167, %27
  %.pn71.pn = phi { ptr, i32 } [ %.pn71, %167 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 } %.pn71.pn
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 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 #2 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(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 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_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IS_IlSaIlEESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

; 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_allocatorISt6vectorIS0_IlSaIlEESaIS2_EEED2Ev(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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !10, !15}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass