; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Codeagon/Problem E (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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_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::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.10" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.12" = type { ptr }

@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@a = external dso_local global [200100 x i64], align 16
@ans = external dso_local global [200100 x i64], align 16
@inf = external dso_local global i64, align 8
@aux = external dso_local global [200100 x i32], align 16
@p = external dso_local global %"class.std::vector", align 8
@cnt = external dso_local global %"class.std::vector.0", align 8
@res = external dso_local global [200100 x %"class.std::vector.5"], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair.10", align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair.10", align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca { i64, i32 }, align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca { i64, i32 }, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair.10", align 4
  %31 = alloca %"struct.std::pair", align 8
  %32 = alloca { i64, i32 }, align 8
  %33 = alloca i32, align 4
  %34 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  store i32 0, ptr %1, align 4
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @k, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %70, %0
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = load i64, ptr @n, align 8, !tbaa !9
  %44 = icmp sle i64 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %73

46:                                               ; preds = %40
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %48
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %49)
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = load i64, ptr @k, align 8, !tbaa !9
  %56 = srem i64 %54, %55
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %58, label %64

58:                                               ; preds = %46
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %62
  store i64 %60, ptr %63, align 8, !tbaa !9
  br label %69

64:                                               ; preds = %46
  %65 = load i64, ptr @inf, align 8, !tbaa !9
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %64, %58
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %2, align 4, !tbaa !5
  br label %40, !llvm.loop !11

73:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %74 = load i64, ptr @k, align 8, !tbaa !9
  store i64 %74, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %79, %73
  %76 = load i64, ptr %3, align 8, !tbaa !9
  %77 = srem i64 %76, 2
  %78 = icmp eq i64 %77, 0
  br i1 %78, label %79, label %84

79:                                               ; preds = %75
  %80 = load i64, ptr %3, align 8, !tbaa !9
  %81 = sdiv i64 %80, 2
  store i64 %81, ptr %3, align 8, !tbaa !9
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %4, align 4, !tbaa !5
  br label %75, !llvm.loop !13

84:                                               ; preds = %75
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 2, ptr %7, align 4, !tbaa !5
  %88 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %88, ptr %6, align 4
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  br label %89

89:                                               ; preds = %87, %84
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %94, %89
  %91 = load i64, ptr %3, align 8, !tbaa !9
  %92 = srem i64 %91, 3
  %93 = icmp eq i64 %92, 0
  br i1 %93, label %94, label %99

94:                                               ; preds = %90
  %95 = load i64, ptr %3, align 8, !tbaa !9
  %96 = sdiv i64 %95, 3
  store i64 %96, ptr %3, align 8, !tbaa !9
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %4, align 4, !tbaa !5
  br label %90, !llvm.loop !14

99:                                               ; preds = %90
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 3, ptr %10, align 4, !tbaa !5
  %103 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %103, ptr %9, align 4
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %104

104:                                              ; preds = %102, %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 5, ptr %11, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %155, %104
  %106 = load i64, ptr %11, align 8, !tbaa !9
  %107 = load i64, ptr %11, align 8, !tbaa !9
  %108 = mul nsw i64 %106, %107
  %109 = load i64, ptr %3, align 8, !tbaa !9
  %110 = icmp sle i64 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %158

112:                                              ; preds = %105
  %113 = load i64, ptr %3, align 8, !tbaa !9
  %114 = load i64, ptr %11, align 8, !tbaa !9
  %115 = srem i64 %113, %114
  %116 = icmp eq i64 %115, 0
  br i1 %116, label %117, label %131

117:                                              ; preds = %112
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %123, %117
  %119 = load i64, ptr %3, align 8, !tbaa !9
  %120 = load i64, ptr %11, align 8, !tbaa !9
  %121 = srem i64 %119, %120
  %122 = icmp eq i64 %121, 0
  br i1 %122, label %123, label %129

123:                                              ; preds = %118
  %124 = load i64, ptr %11, align 8, !tbaa !9
  %125 = load i64, ptr %3, align 8, !tbaa !9
  %126 = sdiv i64 %125, %124
  store i64 %126, ptr %3, align 8, !tbaa !9
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %4, align 4, !tbaa !5
  br label %118, !llvm.loop !15

129:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %130 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store { i64, i32 } %130, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %13, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %131

131:                                              ; preds = %129, %112
  %132 = load i64, ptr %11, align 8, !tbaa !9
  %133 = add nsw i64 %132, 2
  store i64 %133, ptr %11, align 8, !tbaa !9
  %134 = load i64, ptr %3, align 8, !tbaa !9
  %135 = load i64, ptr %11, align 8, !tbaa !9
  %136 = srem i64 %134, %135
  %137 = icmp eq i64 %136, 0
  br i1 %137, label %138, label %152

138:                                              ; preds = %131
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %144, %138
  %140 = load i64, ptr %3, align 8, !tbaa !9
  %141 = load i64, ptr %11, align 8, !tbaa !9
  %142 = srem i64 %140, %141
  %143 = icmp eq i64 %142, 0
  br i1 %143, label %144, label %150

144:                                              ; preds = %139
  %145 = load i64, ptr %11, align 8, !tbaa !9
  %146 = load i64, ptr %3, align 8, !tbaa !9
  %147 = sdiv i64 %146, %145
  store i64 %147, ptr %3, align 8, !tbaa !9
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %4, align 4, !tbaa !5
  br label %139, !llvm.loop !16

150:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %151 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store { i64, i32 } %151, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %152

152:                                              ; preds = %150, %131
  %153 = load i64, ptr %11, align 8, !tbaa !9
  %154 = sub nsw i64 %153, 2
  store i64 %154, ptr %11, align 8, !tbaa !9
  br label %155

155:                                              ; preds = %152
  %156 = load i64, ptr %11, align 8, !tbaa !9
  %157 = add nsw i64 %156, 6
  store i64 %157, ptr %11, align 8, !tbaa !9
  br label %105, !llvm.loop !17

158:                                              ; preds = %111
  %159 = load i64, ptr %3, align 8, !tbaa !9
  %160 = icmp sgt i64 %159, 1
  br i1 %160, label %161, label %172

161:                                              ; preds = %158
  %162 = load i64, ptr %3, align 8, !tbaa !9
  %163 = load i64, ptr @k, align 8, !tbaa !9
  %164 = icmp eq i64 %162, %163
  br i1 %164, label %165, label %170

165:                                              ; preds = %161
  %166 = load i64, ptr @k, align 8, !tbaa !9
  %167 = icmp sgt i64 %166, 1000000000000000
  br i1 %167, label %168, label %170

168:                                              ; preds = %165
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  br label %392

170:                                              ; preds = %165, %161
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 1, ptr %18, align 4, !tbaa !5
  %171 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store { i64, i32 } %171, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %19, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  br label %172

172:                                              ; preds = %170, %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %173 = load i64, ptr @n, align 8, !tbaa !9
  %174 = add nsw i64 %173, 1
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %174)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %291, %172
  %176 = load i32, ptr %21, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = call noundef i64 @_ZNKSt6vectorISt4pairIxiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  %179 = icmp ult i64 %177, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %175
  store i32 16, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %294

181:                                              ; preds = %175
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef 0) #8
  store i32 0, ptr %182, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %227, %181
  %184 = load i32, ptr %22, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = load i64, ptr @n, align 8, !tbaa !9
  %187 = icmp sle i64 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %183
  store i32 19, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %230

189:                                              ; preds = %183
  %190 = load i32, ptr %22, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %192) #8
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr %22, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %196) #8
  store i32 %194, ptr %197, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %210, %189
  %199 = load i32, ptr %22, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !9
  %203 = load i32, ptr %21, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %204) #8
  %206 = getelementptr inbounds %"struct.std::pair", ptr %205, i32 0, i32 0
  %207 = load i64, ptr %206, align 8, !tbaa !18
  %208 = srem i64 %202, %207
  %209 = icmp eq i64 %208, 0
  br i1 %209, label %210, label %226

210:                                              ; preds = %198
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %212) #8
  %214 = getelementptr inbounds %"struct.std::pair", ptr %213, i32 0, i32 0
  %215 = load i64, ptr %214, align 8, !tbaa !18
  %216 = load i32, ptr %22, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !9
  %220 = sdiv i64 %219, %215
  store i64 %220, ptr %218, align 8, !tbaa !9
  %221 = load i32, ptr %22, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %222) #8
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %223, align 4, !tbaa !5
  br label %198, !llvm.loop !20

226:                                              ; preds = %198
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %22, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %22, align 4, !tbaa !5
  br label %183, !llvm.loop !21

230:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %287, %230
  %232 = load i32, ptr %23, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = load i64, ptr @n, align 8, !tbaa !9
  %235 = icmp sle i64 %233, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %231
  store i32 24, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %290

237:                                              ; preds = %231
  %238 = load i32, ptr %23, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %239) #8
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = load i32, ptr %21, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %243) #8
  %245 = getelementptr inbounds %"struct.std::pair", ptr %244, i32 0, i32 1
  %246 = load i32, ptr %245, align 8, !tbaa !22
  %247 = icmp sge i32 %241, %246
  br i1 %247, label %248, label %286

248:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %249 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #8
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %249, ptr %250, align 8
  %251 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #8
  %252 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %251, ptr %252, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %253 = load i32, ptr %23, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %254) #8
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = load i32, ptr %21, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %258) #8
  %260 = getelementptr inbounds %"struct.std::pair", ptr %259, i32 0, i32 1
  %261 = load i32, ptr %260, align 8, !tbaa !22
  %262 = sub nsw i32 %256, %261
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %27, align 4, !tbaa !5
  %264 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8
  %266 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8
  %268 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %265, ptr %267, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %269 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %268, ptr %269, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %270 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #8
  %271 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %270, ptr %271, align 8
  %272 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  store i64 %272, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %273 = load i32, ptr %23, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %274
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %275, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %277 = load i64, ptr %276, align 8, !tbaa !9
  %278 = load i32, ptr %23, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %279
  store i64 %277, ptr %280, align 8, !tbaa !9
  %281 = load i32, ptr %23, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [200100 x i32], ptr @aux, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %283, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %248, %237
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %23, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %23, align 4, !tbaa !5
  br label %231, !llvm.loop !23

290:                                              ; preds = %236
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %21, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %21, align 4, !tbaa !5
  br label %175, !llvm.loop !24

294:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 1, ptr %29, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %324, %294
  %296 = load i32, ptr %29, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = load i64, ptr @n, align 8, !tbaa !9
  %299 = icmp sle i64 %297, %298
  br i1 %299, label %301, label %300

300:                                              ; preds = %295
  store i32 27, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %327

301:                                              ; preds = %295
  %302 = load i32, ptr %29, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [200100 x i32], ptr @aux, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = call noundef i64 @_ZNKSt6vectorISt4pairIxiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  %308 = icmp eq i64 %306, %307
  br i1 %308, label %309, label %323

309:                                              ; preds = %301
  %310 = load i32, ptr %29, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = load i32, ptr %29, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %313
  %315 = load i64, ptr %314, align 8, !tbaa !9
  %316 = sub nsw i64 %311, %315
  %317 = add nsw i64 %316, 1
  %318 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %317
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  %319 = load i32, ptr %29, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %320
  %322 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %321, ptr noundef nonnull align 4 dereferenceable(4) %29)
  store { i64, i32 } %322, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %32, i64 12, i1 false)
  call void @_ZNSt4pairIiiEC2IxiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(12) %31)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %318, ptr noundef nonnull align 4 dereferenceable(8) %30)
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %323

323:                                              ; preds = %309, %301
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %29, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %29, align 4, !tbaa !5
  br label %295, !llvm.loop !25

327:                                              ; preds = %300
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 1, ptr %33, align 4, !tbaa !5
  br label %328

328:                                              ; preds = %384, %327
  %329 = load i32, ptr %33, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = load i64, ptr @n, align 8, !tbaa !9
  %332 = icmp sle i64 %330, %331
  br i1 %332, label %334, label %333

333:                                              ; preds = %328
  store i32 30, ptr %16, align 4
  br label %387

334:                                              ; preds = %328
  %335 = load i32, ptr %33, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %336
  %338 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %337) #8
  %339 = icmp ugt i64 %338, 0
  br i1 %339, label %340, label %383

340:                                              ; preds = %334
  %341 = load i32, ptr %33, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %342
  %344 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %343) #8
  %345 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %34, i32 0, i32 0
  store ptr %344, ptr %345, align 8
  %346 = load i32, ptr %33, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %347
  %349 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %348) #8
  %350 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %35, i32 0, i32 0
  store ptr %349, ptr %350, align 8
  %351 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %34, i32 0, i32 0
  %352 = load ptr, ptr %351, align 8
  %353 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %35, i32 0, i32 0
  %354 = load ptr, ptr %353, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %352, ptr %354)
  %355 = load i32, ptr %33, align 4, !tbaa !5
  %356 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %355)
  %357 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %358 = load i32, ptr %33, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %359
  %361 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %360) #8
  %362 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %36, i32 0, i32 0
  store ptr %361, ptr %362, align 8
  br label %363

363:                                              ; preds = %379, %340
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %364 = load i32, ptr %33, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %365
  %367 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %366) #8
  %368 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %37, i32 0, i32 0
  store ptr %367, ptr %368, align 8
  %369 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br i1 %369, label %371, label %370

370:                                              ; preds = %363
  store i32 33, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %382

371:                                              ; preds = %363
  %372 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  %373 = getelementptr inbounds %"struct.std::pair.10", ptr %372, i32 0, i32 0
  %374 = load i32, ptr %373, align 4, !tbaa !26
  %375 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  %376 = getelementptr inbounds %"struct.std::pair.10", ptr %375, i32 0, i32 1
  %377 = load i32, ptr %376, align 4, !tbaa !28
  %378 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %374, i32 noundef %377)
  br label %379

379:                                              ; preds = %371
  %380 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %36, i32 noundef 0) #8
  %381 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %38, i32 0, i32 0
  store ptr %380, ptr %381, align 8
  br label %363, !llvm.loop !29

382:                                              ; preds = %370
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  br label %387

383:                                              ; preds = %334
  br label %384

384:                                              ; preds = %383
  %385 = load i32, ptr %33, align 4, !tbaa !5
  %386 = add nsw i32 %385, 1
  store i32 %386, ptr %33, align 4, !tbaa !5
  br label %328, !llvm.loop !30

387:                                              ; preds = %382, %333
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  %388 = load i32, ptr %16, align 4
  switch i32 %388, label %391 [
    i32 30, label %389
  ]

389:                                              ; preds = %387
  %390 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  br label %391

391:                                              ; preds = %389, %387
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %392

392:                                              ; preds = %391, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  %393 = load i32, ptr %1, align 4
  ret i32 %393
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSSt4pairIxiE", !10, i64 0, !6, i64 8}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{!19, !6, i64 8}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!28 = !{!27, !6, i64 4}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_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::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.10" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.12" = type { ptr }

@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@a = external dso_local global [200100 x i64], align 16
@ans = external dso_local global [200100 x i64], align 16
@inf = external dso_local local_unnamed_addr global i64, align 8
@aux = external dso_local local_unnamed_addr global [200100 x i32], align 16
@p = external dso_local global %"class.std::vector", align 8
@cnt = external dso_local global %"class.std::vector.0", align 8
@res = external dso_local global [200100 x %"class.std::vector.5"], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair.10", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.10", align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair.10", align 4
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @k, ptr noundef nonnull @n)
  %24 = load i64, ptr @n, align 8, !tbaa !5
  %.not87 = icmp slt i64 %24, 1
  br i1 %.not87, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = load i64, ptr @k, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %25 = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %31, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %26 = and i64 %25, 1
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %.lr.ph93, label %._crit_edge94.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %28 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %indvars.iv
  %29 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %28)
  %30 = load i64, ptr %28, align 8, !tbaa !5
  %31 = load i64, ptr @k, align 8, !tbaa !5
  %32 = srem i64 %30, %31
  %33 = icmp eq i64 %32, 0
  %34 = load i64, ptr @inf, align 8
  %spec.select = select i1 %33, i64 %indvars.iv, i64 %34
  %35 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %indvars.iv
  store i64 %spec.select, ptr %35, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i64, ptr @n, align 8, !tbaa !5
  %.not.not = icmp sgt i64 %36, %indvars.iv
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph93:                                         ; preds = %._crit_edge, %.lr.ph93
  %storemerge91 = phi i32 [ %39, %.lr.ph93 ], [ 0, %._crit_edge ]
  %37 = phi i64 [ %38, %.lr.ph93 ], [ %25, %._crit_edge ]
  %38 = ashr exact i64 %37, 1
  %39 = add nuw nsw i32 %storemerge91, 1
  %40 = and i64 %37, 2
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %.lr.ph93, label %42, !llvm.loop !11

42:                                               ; preds = %.lr.ph93
  store i32 %39, ptr %2, align 4, !tbaa !12
  store i64 %38, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 2, ptr %5, align 4, !tbaa !12
  %43 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %43, ptr %4, align 8
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %.promoted98.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge94.thread

._crit_edge94.thread:                             ; preds = %._crit_edge, %42
  %.promoted98 = phi i64 [ %.promoted98.pre, %42 ], [ %25, %._crit_edge ]
  %44 = srem i64 %.promoted98, 3
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %.lr.ph102, label %._crit_edge103.thread

._crit_edge103.thread:                            ; preds = %._crit_edge94.thread
  store i32 0, ptr %2, align 4, !tbaa !12
  store i64 %.promoted98, ptr %1, align 8, !tbaa !5
  br label %53

.lr.ph102:                                        ; preds = %._crit_edge94.thread, %.lr.ph102
  %storemerge69100 = phi i32 [ %48, %.lr.ph102 ], [ 0, %._crit_edge94.thread ]
  %46 = phi i64 [ %47, %.lr.ph102 ], [ %.promoted98, %._crit_edge94.thread ]
  %47 = sdiv i64 %46, 3
  %48 = add nuw nsw i32 %storemerge69100, 1
  %49 = srem i64 %47, 3
  %50 = icmp eq i64 %49, 0
  br i1 %50, label %.lr.ph102, label %51, !llvm.loop !14

51:                                               ; preds = %.lr.ph102
  store i32 %48, ptr %2, align 4, !tbaa !12
  store i64 %47, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 3, ptr %8, align 4, !tbaa !12
  %52 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %52, ptr %7, align 8
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %.pre179 = load i64, ptr %1, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %._crit_edge103.thread, %51
  %54 = phi i64 [ %.pre179, %51 ], [ %.promoted98, %._crit_edge103.thread ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 5, ptr %9, align 8, !tbaa !5
  %.not72121 = icmp slt i64 %54, 25
  br i1 %.not72121, label %._crit_edge125, label %.lr.ph124

.lr.ph124:                                        ; preds = %53
  %.sroa.246.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.242.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  br label %56

._crit_edge125:                                   ; preds = %78, %53
  %.lcssa86 = phi i64 [ %54, %53 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %55 = icmp sgt i64 %.lcssa86, 1
  br i1 %55, label %83, label %91

56:                                               ; preds = %.lr.ph124, %78
  %57 = phi i64 [ %54, %.lr.ph124 ], [ %79, %78 ]
  %storemerge71122 = phi i64 [ 5, %.lr.ph124 ], [ %81, %78 ]
  %58 = srem i64 %57, %storemerge71122
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %.lr.ph110, label %66

.lr.ph110:                                        ; preds = %56, %.lr.ph110
  %storemerge80109 = phi i32 [ %62, %.lr.ph110 ], [ 0, %56 ]
  %60 = phi i64 [ %61, %.lr.ph110 ], [ %57, %56 ]
  %61 = sdiv i64 %60, %storemerge71122
  %62 = add nuw nsw i32 %storemerge80109, 1
  %63 = srem i64 %61, %storemerge71122
  %64 = icmp eq i64 %63, 0
  br i1 %64, label %.lr.ph110, label %._crit_edge111, !llvm.loop !15

._crit_edge111:                                   ; preds = %.lr.ph110
  store i32 %62, ptr %2, align 4, !tbaa !12
  store i64 %61, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %65 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %.fca.0.extract43 = extractvalue { i64, i32 } %65, 0
  %.fca.1.extract44 = extractvalue { i64, i32 } %65, 1
  store i64 %.fca.0.extract43, ptr %10, align 8
  store i32 %.fca.1.extract44, ptr %.sroa.246.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  %.pre180 = load i64, ptr %9, align 8, !tbaa !5
  %.pre181 = load i64, ptr %1, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %._crit_edge111, %56
  %67 = phi i64 [ %.pre181, %._crit_edge111 ], [ %57, %56 ]
  %68 = phi i64 [ %.pre180, %._crit_edge111 ], [ %storemerge71122, %56 ]
  %69 = add nsw i64 %68, 2
  store i64 %69, ptr %9, align 8, !tbaa !5
  %70 = srem i64 %67, %69
  %71 = icmp eq i64 %70, 0
  br i1 %71, label %.lr.ph117, label %78

.lr.ph117:                                        ; preds = %66, %.lr.ph117
  %storemerge81116 = phi i32 [ %74, %.lr.ph117 ], [ 0, %66 ]
  %72 = phi i64 [ %73, %.lr.ph117 ], [ %67, %66 ]
  %73 = sdiv i64 %72, %69
  %74 = add nuw nsw i32 %storemerge81116, 1
  %75 = srem i64 %73, %69
  %76 = icmp eq i64 %75, 0
  br i1 %76, label %.lr.ph117, label %._crit_edge118, !llvm.loop !16

._crit_edge118:                                   ; preds = %.lr.ph117
  store i32 %74, ptr %2, align 4, !tbaa !12
  store i64 %73, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  %77 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %.fca.0.extract39 = extractvalue { i64, i32 } %77, 0
  %.fca.1.extract40 = extractvalue { i64, i32 } %77, 1
  store i64 %.fca.0.extract39, ptr %11, align 8
  store i32 %.fca.1.extract40, ptr %.sroa.242.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  %.pre182 = load i64, ptr %9, align 8, !tbaa !5
  %.pre183 = load i64, ptr %1, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %._crit_edge118, %66
  %79 = phi i64 [ %.pre183, %._crit_edge118 ], [ %67, %66 ]
  %80 = phi i64 [ %.pre182, %._crit_edge118 ], [ %69, %66 ]
  %81 = add nsw i64 %80, 4
  store i64 %81, ptr %9, align 8, !tbaa !5
  %82 = mul nsw i64 %81, %81
  %.not72 = icmp sgt i64 %82, %79
  br i1 %.not72, label %._crit_edge125, label %56, !llvm.loop !17

83:                                               ; preds = %._crit_edge125
  %84 = load i64, ptr @k, align 8
  %85 = icmp eq i64 %.lcssa86, %84
  %86 = icmp sgt i64 %84, 1000000000000000
  %or.cond = and i1 %85, %86
  br i1 %or.cond, label %87, label %89

87:                                               ; preds = %83
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  br label %194

89:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 1, ptr %13, align 4, !tbaa !12
  %90 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %.fca.0.extract34 = extractvalue { i64, i32 } %90, 0
  %.fca.1.extract35 = extractvalue { i64, i32 } %90, 1
  store i64 %.fca.0.extract34, ptr %12, align 8
  %.sroa.237.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %.fca.1.extract35, ptr %.sroa.237.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %91

91:                                               ; preds = %89, %._crit_edge125
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %92 = load i64, ptr @n, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %93)
  %94 = call noundef i64 @_ZNKSt6vectorISt4pairIxiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %.not153 = icmp eq i64 %94, 0
  br i1 %.not153, label %._crit_edge141, label %.lr.ph140

._crit_edge141:                                   ; preds = %._crit_edge137, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  store i32 1, ptr %18, align 4, !tbaa !12
  %95 = load i64, ptr @n, align 8, !tbaa !5
  %.not74142 = icmp slt i64 %95, 1
  br i1 %.not74142, label %._crit_edge145.thread, label %.lr.ph144

._crit_edge145.thread:                            ; preds = %._crit_edge141
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %.critedge

.lr.ph144:                                        ; preds = %._crit_edge141
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  br label %150

.lr.ph140:                                        ; preds = %91, %._crit_edge137
  %indvars.iv172 = phi i64 [ %indvars.iv.next173, %._crit_edge137 ], [ 0, %91 ]
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef 0) #7
  store i32 0, ptr %96, align 4, !tbaa !12
  %97 = load i64, ptr @n, align 8, !tbaa !5
  %.not77130 = icmp slt i64 %97, 1
  br i1 %.not77130, label %._crit_edge137, label %.lr.ph133

.preheader:                                       ; preds = %._crit_edge129
  %.not78134 = icmp slt i64 %120, 1
  br i1 %.not78134, label %._crit_edge137, label %.lr.ph136

.lr.ph133:                                        ; preds = %.lr.ph140, %._crit_edge129
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %._crit_edge129 ], [ 1, %.lr.ph140 ]
  %98 = add nsw i64 %indvars.iv166, -1
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %98) #7
  %100 = load i32, ptr %99, align 4, !tbaa !12
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %indvars.iv166) #7
  store i32 %100, ptr %101, align 4, !tbaa !12
  %102 = getelementptr inbounds [200100 x i64], ptr @a, i64 0, i64 %indvars.iv166
  %103 = load i64, ptr %102, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv172) #7
  %105 = load i64, ptr %104, align 8, !tbaa !18
  %106 = srem i64 %103, %105
  %107 = icmp eq i64 %106, 0
  br i1 %107, label %.lr.ph128, label %._crit_edge129

.lr.ph128:                                        ; preds = %.lr.ph133, %.lr.ph128
  %108 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv172) #7
  %109 = load i64, ptr %108, align 8, !tbaa !18
  %110 = load i64, ptr %102, align 8, !tbaa !5
  %111 = sdiv i64 %110, %109
  store i64 %111, ptr %102, align 8, !tbaa !5
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %indvars.iv166) #7
  %113 = load i32, ptr %112, align 4, !tbaa !12
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !12
  %115 = load i64, ptr %102, align 8, !tbaa !5
  %116 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv172) #7
  %117 = load i64, ptr %116, align 8, !tbaa !18
  %118 = srem i64 %115, %117
  %119 = icmp eq i64 %118, 0
  br i1 %119, label %.lr.ph128, label %._crit_edge129, !llvm.loop !20

._crit_edge129:                                   ; preds = %.lr.ph128, %.lr.ph133
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %120 = load i64, ptr @n, align 8, !tbaa !5
  %.not77.not = icmp sgt i64 %120, %indvars.iv166
  br i1 %.not77.not, label %.lr.ph133, label %.preheader, !llvm.loop !21

._crit_edge137:                                   ; preds = %147, %.lr.ph140, %.preheader
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %121 = call noundef i64 @_ZNKSt6vectorISt4pairIxiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %122 = icmp ugt i64 %121, %indvars.iv.next173
  br i1 %122, label %.lr.ph140, label %._crit_edge141, !llvm.loop !22

.lr.ph136:                                        ; preds = %.preheader, %147
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %147 ], [ 1, %.preheader ]
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %indvars.iv169) #7
  %124 = load i32, ptr %123, align 4, !tbaa !12
  %125 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv172) #7
  %126 = getelementptr inbounds i8, ptr %125, i64 8
  %127 = load i32, ptr %126, align 8, !tbaa !23
  %.not79 = icmp slt i32 %124, %127
  br i1 %.not79, label %147, label %128

128:                                              ; preds = %.lr.ph136
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %129 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #7
  %130 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cnt, i64 noundef %indvars.iv169) #7
  %132 = load i32, ptr %131, align 4, !tbaa !12
  %133 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv172) #7
  %134 = getelementptr inbounds i8, ptr %133, i64 8
  %135 = load i32, ptr %134, align 8, !tbaa !23
  %136 = add i32 %132, 1
  %137 = sub i32 %136, %135
  store i32 %137, ptr %16, align 4, !tbaa !12
  %138 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %129, ptr %130, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store ptr %138, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %139 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @cnt) #7
  store ptr %139, ptr %17, align 8
  %140 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  store i64 %140, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %141 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %indvars.iv169
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %143 = load i64, ptr %142, align 8, !tbaa !5
  store i64 %143, ptr %141, align 8, !tbaa !5
  %144 = getelementptr inbounds [200100 x i32], ptr @aux, i64 0, i64 %indvars.iv169
  %145 = load i32, ptr %144, align 4, !tbaa !12
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %144, align 4, !tbaa !12
  br label %147

147:                                              ; preds = %.lr.ph136, %128
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %148 = load i64, ptr @n, align 8, !tbaa !5
  %.not78.not = icmp sgt i64 %148, %indvars.iv169
  br i1 %.not78.not, label %.lr.ph136, label %._crit_edge137, !llvm.loop !24

._crit_edge145:                                   ; preds = %165
  %149 = icmp slt i64 %169, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br i1 %149, label %.critedge, label %.lr.ph149

150:                                              ; preds = %.lr.ph144, %165
  %151 = phi i64 [ 1, %.lr.ph144 ], [ %168, %165 ]
  %152 = getelementptr inbounds [200100 x i32], ptr @aux, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !12
  %154 = sext i32 %153 to i64
  %155 = call noundef i64 @_ZNKSt6vectorISt4pairIxiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %156 = icmp eq i64 %155, %154
  br i1 %156, label %157, label %165

157:                                              ; preds = %150
  %158 = load i32, ptr %18, align 4, !tbaa !12
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [200100 x i64], ptr @ans, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !5
  %reass.sub = sub i64 %159, %161
  %162 = add i64 %reass.sub, 1
  %163 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %162
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  %164 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %.fca.0.extract = extractvalue { i64, i32 } %164, 0
  %.fca.1.extract = extractvalue { i64, i32 } %164, 1
  store i64 %.fca.0.extract, ptr %20, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt4pairIiiEC2IxiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(12) %20)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %165

165:                                              ; preds = %150, %157
  %166 = load i32, ptr %18, align 4, !tbaa !12
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %18, align 4, !tbaa !12
  %168 = sext i32 %167 to i64
  %169 = load i64, ptr @n, align 8, !tbaa !5
  %.not74 = icmp slt i64 %169, %168
  br i1 %.not74, label %._crit_edge145, label %150, !llvm.loop !25

.lr.ph149:                                        ; preds = %._crit_edge145, %190
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %190 ], [ 1, %._crit_edge145 ]
  %170 = getelementptr inbounds [200100 x %"class.std::vector.5"], ptr @res, i64 0, i64 %indvars.iv175
  %171 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  %.not76 = icmp eq i64 %171, 0
  br i1 %.not76, label %190, label %172

172:                                              ; preds = %.lr.ph149
  %173 = trunc nuw nsw i64 %indvars.iv175 to i32
  %174 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  %175 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %174, ptr %175)
  %176 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %173)
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %178 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  store ptr %178, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %179 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  store ptr %179, ptr %22, align 8
  %180 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br i1 %180, label %.lr.ph151, label %._crit_edge152

._crit_edge152:                                   ; preds = %.lr.ph151, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %193

.lr.ph151:                                        ; preds = %172, %.lr.ph151
  %181 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %182 = load i32, ptr %181, align 4, !tbaa !26
  %183 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %184 = getelementptr inbounds i8, ptr %183, i64 4
  %185 = load i32, ptr %184, align 4, !tbaa !28
  %186 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %182, i32 noundef %185)
  %187 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %188 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  store ptr %188, ptr %22, align 8
  %189 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br i1 %189, label %.lr.ph151, label %._crit_edge152, !llvm.loop !29

190:                                              ; preds = %.lr.ph149
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %191 = load i64, ptr @n, align 8, !tbaa !5
  %.not75.not = icmp sgt i64 %191, %indvars.iv175
  br i1 %.not75.not, label %.lr.ph149, label %.critedge, !llvm.loop !30

.critedge:                                        ; preds = %190, %._crit_edge145.thread, %._crit_edge145
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
  br label %193

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

194:                                              ; preds = %193, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #5

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIxiE", !6, i64 0, !13, i64 8}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!19, !13, i64 8}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = !{!27, !13, i64 0}
!27 = !{!"_ZTSSt4pairIiiE", !13, i64 0, !13, i64 4}
!28 = !{!27, !13, i64 4}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass