; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LTIME/LTIME 19 (a)

; 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_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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, %"struct.std::pair.0" }
%"struct.std::pair.0" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::greater" = type { i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [100000 x i32], align 16
  %6 = alloca [100000 x i32], align 16
  %7 = alloca [100000 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair.0", align 4
  %18 = alloca { i64, i32 }, align 8
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair.0", align 4
  %22 = alloca { i64, i32 }, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"struct.std::greater", align 1
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %29 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4)
          to label %30 unwind label %36

30:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %46, %30
  %32 = load i32, ptr %13, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %40, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %53

36:                                               ; preds = %230, %227, %127, %0
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %11, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %12, align 4
  br label %234

40:                                               ; preds = %31
  %41 = load i32, ptr %13, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %42
  %44 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %43)
          to label %45 unwind label %49

45:                                               ; preds = %40
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %13, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %13, align 4, !tbaa !5
  br label %31, !llvm.loop !9

49:                                               ; preds = %40
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %234

53:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %123, %53
  %55 = load i32, ptr %14, align 4, !tbaa !5
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %127

59:                                               ; preds = %54
  %60 = load i32, ptr %14, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %61
  %63 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %62)
          to label %64 unwind label %92

64:                                               ; preds = %59
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = load i32, ptr %14, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp sge i32 %68, %72
  br i1 %73, label %74, label %100

74:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %75 = load i32, ptr %14, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sub nsw i32 %78, %82
  store i32 %83, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %84 = load i32, ptr %14, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %85
  %87 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %88 unwind label %96

88:                                               ; preds = %74
  store i64 %87, ptr %17, align 4
  %89 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %90 unwind label %96

90:                                               ; preds = %88
  store { i64, i32 } %89, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %18, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %91 unwind label %96

91:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  br label %122

92:                                               ; preds = %59
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  br label %126

96:                                               ; preds = %90, %88, %74
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %11, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  br label %126

100:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %101 = load i32, ptr %14, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = load i32, ptr %14, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sub nsw i32 %104, %108
  store i32 %109, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %111
  %113 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %112, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %114 unwind label %118

114:                                              ; preds = %100
  store i64 %113, ptr %21, align 4
  %115 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %116 unwind label %118

116:                                              ; preds = %114
  store { i64, i32 } %115, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %22, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %117 unwind label %118

117:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  br label %122

118:                                              ; preds = %116, %114, %100
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  br label %126

122:                                              ; preds = %117, %91
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %14, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %14, align 4, !tbaa !5
  br label %54, !llvm.loop !11

126:                                              ; preds = %118, %96, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %234

127:                                              ; preds = %58
  %128 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %129 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %128, ptr %129, align 8
  %130 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiS2_IiiEESt6vectorIS4_SaIS4_EEEESt7greaterIS4_EEvT_SC_T0_(ptr %133, ptr %135)
          to label %136 unwind label %36

136:                                              ; preds = %127
  %137 = load i32, ptr %3, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %140 = icmp ugt i64 %138, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %136
  %142 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %143 = trunc i64 %142 to i32
  store i32 %143, ptr %3, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %141, %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %167, %144
  %146 = load i32, ptr %26, align 4, !tbaa !5
  %147 = load i32, ptr %3, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %170

150:                                              ; preds = %145
  %151 = load i32, ptr %26, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %152) #7
  %154 = getelementptr inbounds %"struct.std::pair", ptr %153, i32 0, i32 1
  %155 = getelementptr inbounds %"struct.std::pair.0", ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !12
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = add nsw i32 %157, %156
  store i32 %158, ptr %8, align 4, !tbaa !5
  %159 = load i32, ptr %26, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %160) #7
  %162 = getelementptr inbounds %"struct.std::pair", ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds %"struct.std::pair.0", ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !15
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %165
  store i32 1, ptr %166, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %150
  %168 = load i32, ptr %26, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %26, align 4, !tbaa !5
  br label %145, !llvm.loop !16

170:                                              ; preds = %149
  %171 = load i32, ptr %4, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %174 = icmp ugt i64 %172, %173
  br i1 %174, label %175, label %178

175:                                              ; preds = %170
  %176 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %177 = trunc i64 %176 to i32
  store i32 %177, ptr %4, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %175, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %179

179:                                              ; preds = %201, %178
  %180 = load i32, ptr %27, align 4, !tbaa !5
  %181 = load i32, ptr %4, align 4, !tbaa !5
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %184, label %183

183:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %204

184:                                              ; preds = %179
  %185 = load i32, ptr %27, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %186) #7
  %188 = getelementptr inbounds %"struct.std::pair", ptr %187, i32 0, i32 1
  %189 = getelementptr inbounds %"struct.std::pair.0", ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 4, !tbaa !12
  %191 = load i32, ptr %8, align 4, !tbaa !5
  %192 = add nsw i32 %191, %190
  store i32 %192, ptr %8, align 4, !tbaa !5
  %193 = load i32, ptr %27, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %194) #7
  %196 = getelementptr inbounds %"struct.std::pair", ptr %195, i32 0, i32 1
  %197 = getelementptr inbounds %"struct.std::pair.0", ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 4, !tbaa !15
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %199
  store i32 1, ptr %200, align 4, !tbaa !5
  br label %201

201:                                              ; preds = %184
  %202 = load i32, ptr %27, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %27, align 4, !tbaa !5
  br label %179, !llvm.loop !17

204:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %224, %204
  %206 = load i32, ptr %28, align 4, !tbaa !5
  %207 = load i32, ptr %2, align 4, !tbaa !5
  %208 = icmp slt i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %227

210:                                              ; preds = %205
  %211 = load i32, ptr %28, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = icmp ne i32 %214, 1
  br i1 %215, label %216, label %223

216:                                              ; preds = %210
  %217 = load i32, ptr %28, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = load i32, ptr %8, align 4, !tbaa !5
  %222 = add nsw i32 %221, %220
  store i32 %222, ptr %8, align 4, !tbaa !5
  br label %223

223:                                              ; preds = %216, %210
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %28, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %28, align 4, !tbaa !5
  br label %205, !llvm.loop !18

227:                                              ; preds = %209
  %228 = load i32, ptr %8, align 4, !tbaa !5
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %228)
          to label %230 unwind label %36

230:                                              ; preds = %227
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %232 unwind label %36

232:                                              ; preds = %230
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %233 = load i32, ptr %1, align 4
  ret i32 %233

234:                                              ; preds = %126, %49, %36
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %11, align 8
  %237 = load i32, ptr %12, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239
}

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

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

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

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 uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

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

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

; 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 dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiS2_IiiEESt6vectorIS4_SaIS4_EEEESt7greaterIS4_EEvT_SC_T0_(ptr, ptr) #6

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 4}
!13 = !{!"_ZTSSt4pairIiS_IiiEE", !6, i64 0, !14, i64 4}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 8}
!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_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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, %"struct.std::pair.0" }
%"struct.std::pair.0" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [100000 x i32], align 16
  %5 = alloca [100000 x i32], align 16
  %6 = alloca [100000 x i32], align 16
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.0", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.0", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  br label %._crit_edge43

._crit_edge:                                      ; preds = %.lr.ph
  %19 = icmp sgt i32 %24, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br i1 %19, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %._crit_edge
  %.sroa.217.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %29

20:                                               ; preds = %131, %._crit_edge57, %._crit_edge43
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %134

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %22 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %22)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge43:                                    ; preds = %57, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %27 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %28 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiS2_IiiEESt6vectorIS4_SaIS4_EEEESt7greaterIS4_EEvT_SC_T0_(ptr %27, ptr %28)
          to label %63 unwind label %20

29:                                               ; preds = %.lr.ph42, %57
  %storemerge40 = phi i32 [ 0, %.lr.ph42 ], [ %59, %57 ]
  %30 = sext i32 %storemerge40 to i64
  %31 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %30
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %31)
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %34
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %.not36 = icmp slt i32 %36, %38
  br i1 %.not36, label %48, label %39

39:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %40 = sub nsw i32 %36, %38
  store i32 %40, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %41 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %42 unwind label %46

42:                                               ; preds = %39
  store i64 %41, ptr %12, align 8
  %43 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %44 unwind label %46

44:                                               ; preds = %42
  %.fca.0.extract14 = extractvalue { i64, i32 } %43, 0
  %.fca.1.extract15 = extractvalue { i64, i32 } %43, 1
  store i64 %.fca.0.extract14, ptr %10, align 8
  store i32 %.fca.1.extract15, ptr %.sroa.217.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %45 unwind label %46

45:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  br label %57

46:                                               ; preds = %44, %42, %39
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  br label %62

48:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %49 = sub nsw i32 %38, %36
  store i32 %49, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %50 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %51 unwind label %55

51:                                               ; preds = %48
  store i64 %50, ptr %15, align 8
  %52 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %53 unwind label %55

53:                                               ; preds = %51
  %.fca.0.extract = extractvalue { i64, i32 } %52, 0
  %.fca.1.extract = extractvalue { i64, i32 } %52, 1
  store i64 %.fca.0.extract, ptr %13, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %54 unwind label %55

54:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  br label %57

55:                                               ; preds = %53, %51, %48
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  br label %62

57:                                               ; preds = %45, %54
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %9, align 4, !tbaa !5
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %29, label %._crit_edge43, !llvm.loop !11

62:                                               ; preds = %55, %46
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %134

63:                                               ; preds = %._crit_edge43
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %67 = icmp ult i64 %66, %65
  br i1 %67, label %68, label %._crit_edge70

._crit_edge70:                                    ; preds = %63
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %71

68:                                               ; preds = %63
  %69 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %2, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %._crit_edge70, %68
  %72 = phi i32 [ %.pre, %._crit_edge70 ], [ %70, %68 ]
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph47, label %._crit_edge48

._crit_edge48:                                    ; preds = %.lr.ph47, %71
  %.029.lcssa = phi i32 [ 0, %71 ], [ %81, %.lr.ph47 ]
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %77 = icmp ult i64 %76, %75
  br i1 %77, label %90, label %._crit_edge48._crit_edge

._crit_edge48._crit_edge:                         ; preds = %._crit_edge48
  %.pre71 = load i32, ptr %3, align 4, !tbaa !5
  br label %93

.lr.ph47:                                         ; preds = %71, %.lr.ph47
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph47 ], [ 0, %71 ]
  %.02944 = phi i32 [ %81, %.lr.ph47 ], [ 0, %71 ]
  %78 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv61) #7
  %79 = getelementptr inbounds i8, ptr %78, i64 4
  %80 = load i32, ptr %79, align 4, !tbaa !12
  %81 = add nsw i32 %80, %.02944
  %82 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv61) #7
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %85
  store i32 1, ptr %86, align 4, !tbaa !5
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next62, %88
  br i1 %89, label %.lr.ph47, label %._crit_edge48, !llvm.loop !16

90:                                               ; preds = %._crit_edge48
  %91 = call noundef i64 @_ZNKSt6vectorISt4pairIiS0_IiiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %92 = trunc i64 %91 to i32
  store i32 %92, ptr %3, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %._crit_edge48._crit_edge, %90
  %94 = phi i32 [ %.pre71, %._crit_edge48._crit_edge ], [ %92, %90 ]
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph52, label %.preheader

.preheader:                                       ; preds = %.lr.ph52, %93
  %.1.lcssa = phi i32 [ %.029.lcssa, %93 ], [ %102, %.lr.ph52 ]
  %96 = load i32, ptr %1, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph56.preheader, label %._crit_edge57

.lr.ph56.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %96 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %98 = icmp eq i32 %96, 1
  br i1 %98, label %._crit_edge57.loopexit.unr-lcssa, label %.lr.ph56.preheader.new

.lr.ph56.preheader.new:                           ; preds = %.lr.ph56.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph56

.lr.ph52:                                         ; preds = %93, %.lr.ph52
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %.lr.ph52 ], [ 0, %93 ]
  %.149 = phi i32 [ %102, %.lr.ph52 ], [ %.029.lcssa, %93 ]
  %99 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv64) #7
  %100 = getelementptr inbounds i8, ptr %99, i64 4
  %101 = load i32, ptr %100, align 4, !tbaa !12
  %102 = add nsw i32 %101, %.149
  %103 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv64) #7
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  %105 = load i32, ptr %104, align 4, !tbaa !15
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %106
  store i32 1, ptr %107, align 4, !tbaa !5
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = icmp slt i64 %indvars.iv.next65, %109
  br i1 %110, label %.lr.ph52, label %.preheader, !llvm.loop !17

._crit_edge57.loopexit.unr-lcssa:                 ; preds = %130, %.lr.ph56.preheader
  %.3.lcssa.ph = phi i32 [ poison, %.lr.ph56.preheader ], [ %.3.1, %130 ]
  %indvars.iv67.unr = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next68.1, %130 ]
  %.254.unr = phi i32 [ %.1.lcssa, %.lr.ph56.preheader ], [ %.3.1, %130 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge57, label %.lr.ph56.epil

.lr.ph56.epil:                                    ; preds = %._crit_edge57.loopexit.unr-lcssa
  %111 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv67.unr
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %.not.epil = icmp eq i32 %112, 1
  br i1 %.not.epil, label %._crit_edge57, label %113

113:                                              ; preds = %.lr.ph56.epil
  %114 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %indvars.iv67.unr
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add nsw i32 %115, %.254.unr
  br label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge57.loopexit.unr-lcssa, %113, %.lr.ph56.epil, %.preheader
  %.2.lcssa = phi i32 [ %.1.lcssa, %.preheader ], [ %.3.lcssa.ph, %._crit_edge57.loopexit.unr-lcssa ], [ %116, %113 ], [ %.254.unr, %.lr.ph56.epil ]
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.2.lcssa)
          to label %131 unwind label %20

.lr.ph56:                                         ; preds = %130, %.lr.ph56.preheader.new
  %indvars.iv67 = phi i64 [ 0, %.lr.ph56.preheader.new ], [ %indvars.iv.next68.1, %130 ]
  %.254 = phi i32 [ %.1.lcssa, %.lr.ph56.preheader.new ], [ %.3.1, %130 ]
  %niter = phi i64 [ 0, %.lr.ph56.preheader.new ], [ %niter.next.1, %130 ]
  %118 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv67
  %119 = load i32, ptr %118, align 8, !tbaa !5
  %.not = icmp eq i32 %119, 1
  br i1 %.not, label %.lr.ph56.1, label %120

120:                                              ; preds = %.lr.ph56
  %121 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %indvars.iv67
  %122 = load i32, ptr %121, align 8, !tbaa !5
  %123 = add nsw i32 %122, %.254
  br label %.lr.ph56.1

.lr.ph56.1:                                       ; preds = %.lr.ph56, %120
  %.3 = phi i32 [ %123, %120 ], [ %.254, %.lr.ph56 ]
  %indvars.iv.next68 = or disjoint i64 %indvars.iv67, 1
  %124 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv.next68
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %125, 1
  br i1 %.not.1, label %130, label %126

126:                                              ; preds = %.lr.ph56.1
  %127 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %indvars.iv.next68
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = add nsw i32 %128, %.3
  br label %130

130:                                              ; preds = %126, %.lr.ph56.1
  %.3.1 = phi i32 [ %129, %126 ], [ %.3, %.lr.ph56.1 ]
  %indvars.iv.next68.1 = add nuw nsw i64 %indvars.iv67, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge57.loopexit.unr-lcssa, label %.lr.ph56, !llvm.loop !18

131:                                              ; preds = %._crit_edge57
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %133 unwind label %20

133:                                              ; preds = %131
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

134:                                              ; preds = %62, %20
  %.pn.pn = phi { ptr, i32 } [ %.pn, %62 ], [ %21, %20 ]
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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 uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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 #4

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

; 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 #4 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)) #5

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = { "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 = !{!"int", !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, !6, i64 4}
!13 = !{!"_ZTSSt4pairIiS_IiiEE", !6, i64 0, !14, i64 4}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 8}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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