; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 11/2060. Subpalindrome pairs (main)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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::allocator.0" = type { i8 }

@n = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@starts = external dso_local global [300005 x i64], align 16
@ens = external dso_local global [300005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca [300005 x i32], align 16
  %3 = alloca [300005 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.std::allocator.0", align 1
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i64, align 8
  %33 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  call void @llvm.memset.p0.i64(ptr align 16 @ens, i8 0, i64 2400040, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @starts, i8 0, i64 2400040, i1 false)
  %35 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  %36 = trunc i64 %35 to i32
  store i32 %36, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1200020, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1200020, ptr %3) #7
  %37 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %37, i8 0, i64 1200020, i1 false)
  %38 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %38, i8 0, i64 1200020, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %116, %0
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %119

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = icmp sgt i32 %45, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %62

49:                                               ; preds = %44
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = add nsw i32 %50, %51
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = sub nsw i32 %52, %53
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sub nsw i32 %57, %58
  store i32 %59, ptr %8, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %62

62:                                               ; preds = %49, %48
  br label %63

63:                                               ; preds = %92, %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = sub nsw i32 %64, %65
  %67 = icmp sle i32 0, %66
  br i1 %67, label %68, label %90

68:                                               ; preds = %63
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = add nsw i32 %69, %70
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %90

74:                                               ; preds = %68
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sub nsw i32 %75, %76
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %78)
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %85)
  %87 = load i8, ptr %86, align 1, !tbaa !9
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %81, %88
  br label %90

90:                                               ; preds = %74, %68, %63
  %91 = phi i1 [ false, %68 ], [ false, %63 ], [ %89, %74 ]
  br i1 %91, label %92, label %95

92:                                               ; preds = %90
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !5
  br label %63, !llvm.loop !10

95:                                               ; preds = %90
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %98
  store i32 %96, ptr %99, align 4, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = add nsw i32 %100, %101
  %103 = sub nsw i32 %102, 1
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = icmp sgt i32 %103, %104
  br i1 %105, label %106, label %115

106:                                              ; preds = %95
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = add nsw i32 %107, %108
  %110 = sub nsw i32 %109, 1
  store i32 %110, ptr %5, align 4, !tbaa !5
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = sub nsw i32 %111, %112
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %4, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %106, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %6, align 4, !tbaa !5
  br label %39, !llvm.loop !12

119:                                              ; preds = %43
  store i32 0, ptr %4, align 4, !tbaa !5
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %200, %119
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %203

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = icmp sgt i32 %126, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %125
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %145

130:                                              ; preds = %125
  %131 = load i32, ptr %4, align 4, !tbaa !5
  %132 = load i32, ptr %5, align 4, !tbaa !5
  %133 = add nsw i32 %131, %132
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = sub nsw i32 %133, %134
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = sub nsw i32 %139, %140
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %11, align 4, !tbaa !5
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %138, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %144 = load i32, ptr %143, align 4, !tbaa !5
  store i32 %144, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %145

145:                                              ; preds = %130, %129
  br label %146

146:                                              ; preds = %177, %145
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = add nsw i32 %147, %148
  %150 = load i32, ptr @n, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %152, label %175

152:                                              ; preds = %146
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  %156 = sub nsw i32 %155, 1
  %157 = icmp sge i32 %156, 0
  br i1 %157, label %158, label %175

158:                                              ; preds = %152
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = add nsw i32 %159, %160
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %162)
  %164 = load i8, ptr %163, align 1, !tbaa !9
  %165 = sext i8 %164 to i32
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = sub nsw i32 %166, %167
  %169 = sub nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %170)
  %172 = load i8, ptr %171, align 1, !tbaa !9
  %173 = sext i8 %172 to i32
  %174 = icmp eq i32 %165, %173
  br label %175

175:                                              ; preds = %158, %152, %146
  %176 = phi i1 [ false, %152 ], [ false, %146 ], [ %174, %158 ]
  br i1 %176, label %177, label %180

177:                                              ; preds = %175
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %10, align 4, !tbaa !5
  br label %146, !llvm.loop !13

180:                                              ; preds = %175
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %183
  store i32 %181, ptr %184, align 4, !tbaa !5
  %185 = load i32, ptr %9, align 4, !tbaa !5
  %186 = load i32, ptr %10, align 4, !tbaa !5
  %187 = add nsw i32 %185, %186
  %188 = sub nsw i32 %187, 1
  %189 = load i32, ptr %5, align 4, !tbaa !5
  %190 = icmp sgt i32 %188, %189
  br i1 %190, label %191, label %199

191:                                              ; preds = %180
  %192 = load i32, ptr %9, align 4, !tbaa !5
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = sub nsw i32 %192, %193
  store i32 %194, ptr %4, align 4, !tbaa !5
  %195 = load i32, ptr %9, align 4, !tbaa !5
  %196 = load i32, ptr %10, align 4, !tbaa !5
  %197 = add nsw i32 %195, %196
  %198 = sub nsw i32 %197, 1
  store i32 %198, ptr %5, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %191, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %9, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %9, align 4, !tbaa !5
  br label %120, !llvm.loop !14

203:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  %204 = load i32, ptr @n, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  %206 = sext i32 %205 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %206, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %207 unwind label %213

207:                                              ; preds = %203
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %237, %207
  %209 = load i32, ptr %16, align 4, !tbaa !5
  %210 = load i32, ptr @n, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %217, label %212

212:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %240

213:                                              ; preds = %203
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %14, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %15, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %432

217:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %218 = load i32, ptr %16, align 4, !tbaa !5
  %219 = load i32, ptr %16, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = sub nsw i32 %218, %222
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %225 = load i32, ptr %16, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %18, align 4, !tbaa !5
  %227 = load i32, ptr %17, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %228) #7
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %229, align 4, !tbaa !5
  %232 = load i32, ptr %18, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %233) #7
  %235 = load i32, ptr %234, align 4, !tbaa !5
  %236 = add nsw i32 %235, -1
  store i32 %236, ptr %234, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %237

237:                                              ; preds = %217
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %16, align 4, !tbaa !5
  br label %208, !llvm.loop !15

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

241:                                              ; preds = %264, %240
  %242 = load i32, ptr %19, align 4, !tbaa !5
  %243 = load i32, ptr @n, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %267

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %247 = load i32, ptr %19, align 4, !tbaa !5
  %248 = load i32, ptr %19, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = sub nsw i32 %247, %251
  store i32 %252, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %253 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %253, ptr %21, align 4, !tbaa !5
  %254 = load i32, ptr %20, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %255) #7
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %256, align 4, !tbaa !5
  %259 = load i32, ptr %21, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %260) #7
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = add nsw i32 %262, -1
  store i32 %263, ptr %261, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %264

264:                                              ; preds = %246
  %265 = load i32, ptr %19, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %19, align 4, !tbaa !5
  br label %241, !llvm.loop !16

267:                                              ; preds = %245
  %268 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #7
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = load i64, ptr @starts, align 16, !tbaa !17
  %272 = add nsw i64 %271, %270
  store i64 %272, ptr @starts, align 16, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %273

273:                                              ; preds = %299, %267
  %274 = load i32, ptr %22, align 4, !tbaa !5
  %275 = load i32, ptr @n, align 4, !tbaa !5
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %278, label %277

277:                                              ; preds = %273
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %302

278:                                              ; preds = %273
  %279 = load i32, ptr %22, align 4, !tbaa !5
  %280 = sub nsw i32 %279, 1
  %281 = sext i32 %280 to i64
  %282 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %281) #7
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = load i32, ptr %22, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %285) #7
  %287 = load i32, ptr %286, align 4, !tbaa !5
  %288 = add nsw i32 %287, %283
  store i32 %288, ptr %286, align 4, !tbaa !5
  %289 = load i32, ptr %22, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %290) #7
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = load i32, ptr %22, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [300005 x i64], ptr @starts, i64 0, i64 %295
  %297 = load i64, ptr %296, align 8, !tbaa !17
  %298 = add nsw i64 %297, %293
  store i64 %298, ptr %296, align 8, !tbaa !17
  br label %299

299:                                              ; preds = %278
  %300 = load i32, ptr %22, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %22, align 4, !tbaa !5
  br label %273, !llvm.loop !19

302:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  %303 = load i32, ptr @n, align 4, !tbaa !5
  %304 = add nsw i32 %303, 1
  %305 = sext i32 %304 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %305, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %306 unwind label %312

306:                                              ; preds = %302
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %334, %306
  %308 = load i32, ptr %25, align 4, !tbaa !5
  %309 = load i32, ptr @n, align 4, !tbaa !5
  %310 = icmp slt i32 %308, %309
  br i1 %310, label %316, label %311

311:                                              ; preds = %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %337

312:                                              ; preds = %302
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %14, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %15, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  br label %431

316:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %317 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %317, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %318 = load i32, ptr %25, align 4, !tbaa !5
  %319 = load i32, ptr %25, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %320
  %322 = load i32, ptr %321, align 4, !tbaa !5
  %323 = add nsw i32 %318, %322
  store i32 %323, ptr %27, align 4, !tbaa !5
  %324 = load i32, ptr %26, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %325) #7
  %327 = load i32, ptr %326, align 4, !tbaa !5
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %326, align 4, !tbaa !5
  %329 = load i32, ptr %27, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %330) #7
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = add nsw i32 %332, -1
  store i32 %333, ptr %331, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %334

334:                                              ; preds = %316
  %335 = load i32, ptr %25, align 4, !tbaa !5
  %336 = add nsw i32 %335, 1
  store i32 %336, ptr %25, align 4, !tbaa !5
  br label %307, !llvm.loop !20

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

338:                                              ; preds = %361, %337
  %339 = load i32, ptr %28, align 4, !tbaa !5
  %340 = load i32, ptr @n, align 4, !tbaa !5
  %341 = icmp slt i32 %339, %340
  br i1 %341, label %343, label %342

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

343:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %344 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %344, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %345 = load i32, ptr %28, align 4, !tbaa !5
  %346 = load i32, ptr %28, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %347
  %349 = load i32, ptr %348, align 4, !tbaa !5
  %350 = add nsw i32 %345, %349
  store i32 %350, ptr %30, align 4, !tbaa !5
  %351 = load i32, ptr %29, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %352) #7
  %354 = load i32, ptr %353, align 4, !tbaa !5
  %355 = add nsw i32 %354, 1
  store i32 %355, ptr %353, align 4, !tbaa !5
  %356 = load i32, ptr %30, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %357) #7
  %359 = load i32, ptr %358, align 4, !tbaa !5
  %360 = add nsw i32 %359, -1
  store i32 %360, ptr %358, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %361

361:                                              ; preds = %343
  %362 = load i32, ptr %28, align 4, !tbaa !5
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %28, align 4, !tbaa !5
  br label %338, !llvm.loop !21

364:                                              ; preds = %342
  %365 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 0) #7
  %366 = load i32, ptr %365, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = load i64, ptr @ens, align 16, !tbaa !17
  %369 = add nsw i64 %368, %367
  store i64 %369, ptr @ens, align 16, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 1, ptr %31, align 4, !tbaa !5
  br label %370

370:                                              ; preds = %396, %364
  %371 = load i32, ptr %31, align 4, !tbaa !5
  %372 = load i32, ptr @n, align 4, !tbaa !5
  %373 = icmp slt i32 %371, %372
  br i1 %373, label %375, label %374

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

375:                                              ; preds = %370
  %376 = load i32, ptr %31, align 4, !tbaa !5
  %377 = sub nsw i32 %376, 1
  %378 = sext i32 %377 to i64
  %379 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %378) #7
  %380 = load i32, ptr %379, align 4, !tbaa !5
  %381 = load i32, ptr %31, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %382) #7
  %384 = load i32, ptr %383, align 4, !tbaa !5
  %385 = add nsw i32 %384, %380
  store i32 %385, ptr %383, align 4, !tbaa !5
  %386 = load i32, ptr %31, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %387) #7
  %389 = load i32, ptr %388, align 4, !tbaa !5
  %390 = sext i32 %389 to i64
  %391 = load i32, ptr %31, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [300005 x i64], ptr @ens, i64 0, i64 %392
  %394 = load i64, ptr %393, align 8, !tbaa !17
  %395 = add nsw i64 %394, %390
  store i64 %395, ptr %393, align 8, !tbaa !17
  br label %396

396:                                              ; preds = %375
  %397 = load i32, ptr %31, align 4, !tbaa !5
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %31, align 4, !tbaa !5
  br label %370, !llvm.loop !22

399:                                              ; preds = %374
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 0, ptr %32, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store i32 1, ptr %33, align 4, !tbaa !5
  br label %400

400:                                              ; preds = %419, %399
  %401 = load i32, ptr %33, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  %404 = icmp ult i64 %402, %403
  br i1 %404, label %406, label %405

405:                                              ; preds = %400
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %422

406:                                              ; preds = %400
  %407 = load i32, ptr %33, align 4, !tbaa !5
  %408 = sub nsw i32 %407, 1
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds [300005 x i64], ptr @ens, i64 0, i64 %409
  %411 = load i64, ptr %410, align 8, !tbaa !17
  %412 = load i32, ptr %33, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [300005 x i64], ptr @starts, i64 0, i64 %413
  %415 = load i64, ptr %414, align 8, !tbaa !17
  %416 = mul nsw i64 %411, %415
  %417 = load i64, ptr %32, align 8, !tbaa !17
  %418 = add nsw i64 %417, %416
  store i64 %418, ptr %32, align 8, !tbaa !17
  br label %419

419:                                              ; preds = %406
  %420 = load i32, ptr %33, align 4, !tbaa !5
  %421 = add nsw i32 %420, 1
  store i32 %421, ptr %33, align 4, !tbaa !5
  br label %400, !llvm.loop !23

422:                                              ; preds = %405
  %423 = load i64, ptr %32, align 8, !tbaa !17
  %424 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %423)
          to label %425 unwind label %427

425:                                              ; preds = %422
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %2) #7
  %426 = load i32, ptr %1, align 4
  ret i32 %426

427:                                              ; preds = %422
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %14, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  br label %431

431:                                              ; preds = %427, %312
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  br label %432

432:                                              ; preds = %431, %213
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %2) #7
  br label %433

433:                                              ; preds = %432
  %434 = load ptr, ptr %14, align 8
  %435 = load i32, ptr %15, align 4
  %436 = insertvalue { ptr, i32 } poison, ptr %434, 0
  %437 = insertvalue { ptr, i32 } %436, i32 %435, 1
  resume { ptr, i32 } %437
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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) #1 align 2

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

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

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

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


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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::allocator.0" = type { i8 }

@n = external dso_local local_unnamed_addr global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@starts = external dso_local local_unnamed_addr global [300005 x i64], align 16
@ens = external dso_local local_unnamed_addr global [300005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca [300005 x i32], align 16
  %2 = alloca [300005 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400040) @ens, i8 0, i64 2400040, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400040) @starts, i8 0, i64 2400040, i1 false)
  %10 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  %11 = trunc i64 %10 to i32
  store i32 %11, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1200020, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 1200020, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1200020) %1, i8 0, i64 1200020, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1200020) %2, i8 0, i64 1200020, i1 false)
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph155, label %._crit_edge

.preheader140:                                    ; preds = %.critedge
  %13 = icmp sgt i32 %50, 0
  br i1 %13, label %.lr.ph170, label %._crit_edge

.lr.ph155:                                        ; preds = %0, %.critedge
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %.critedge ], [ 0, %0 ]
  %indvars.iv200 = phi i32 [ %indvars.iv.next201, %.critedge ], [ 1, %0 ]
  %.0106154 = phi i32 [ %spec.select135, %.critedge ], [ 0, %0 ]
  %.0107153 = phi i32 [ %spec.select, %.critedge ], [ -1, %0 ]
  %14 = sext i32 %.0107153 to i64
  %15 = icmp sgt i64 %indvars.iv203, %14
  %.pre244 = trunc nuw nsw i64 %indvars.iv203 to i32
  br i1 %15, label %.lr.ph155._crit_edge, label %16

16:                                               ; preds = %.lr.ph155
  %17 = sub i32 %.0107153, %.pre244
  %18 = add i32 %17, %.0106154
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [300005 x i32], ptr %1, i64 0, i64 %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 %17, ptr %3, align 4, !tbaa !5
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = load i32, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %.lr.ph155._crit_edge

.lr.ph155._crit_edge:                             ; preds = %.lr.ph155, %16
  %.0113 = phi i32 [ %22, %16 ], [ 1, %.lr.ph155 ]
  %23 = sub nsw i32 %.pre244, %.0113
  %24 = icmp sgt i32 %23, -1
  br i1 %24, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %.lr.ph155._crit_edge
  %25 = sext i32 %.0113 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %38
  %indvars.iv = phi i64 [ %25, %.lr.ph.preheader ], [ %indvars.iv.next, %38 ]
  %26 = phi i32 [ %23, %.lr.ph.preheader ], [ %41, %38 ]
  %27 = add nsw i64 %indvars.iv, %indvars.iv203
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %27, %29
  br i1 %30, label %31, label %.critedge.loopexit.split.loop.exit

31:                                               ; preds = %.lr.ph
  %32 = zext nneg i32 %26 to i64
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %32)
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %27)
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = icmp eq i8 %34, %36
  br i1 %37, label %38, label %.critedge.loopexit.split.loop.exit254

38:                                               ; preds = %31
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %39 = sub nsw i64 %indvars.iv203, %indvars.iv.next
  %40 = icmp sgt i64 %39, -1
  %41 = trunc nsw i64 %39 to i32
  br i1 %40, label %.lr.ph, label %.critedge, !llvm.loop !10

.critedge.loopexit.split.loop.exit:               ; preds = %.lr.ph
  %42 = trunc nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge.loopexit.split.loop.exit254:            ; preds = %31
  %43 = trunc nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %38, %.critedge.loopexit.split.loop.exit, %.critedge.loopexit.split.loop.exit254, %.lr.ph155._crit_edge
  %.1114.lcssa = phi i32 [ %.0113, %.lr.ph155._crit_edge ], [ %42, %.critedge.loopexit.split.loop.exit ], [ %43, %.critedge.loopexit.split.loop.exit254 ], [ %indvars.iv200, %38 ]
  %.lcssa143 = phi i32 [ %23, %.lr.ph155._crit_edge ], [ %26, %.critedge.loopexit.split.loop.exit ], [ %26, %.critedge.loopexit.split.loop.exit254 ], [ -1, %38 ]
  %44 = getelementptr inbounds [300005 x i32], ptr %1, i64 0, i64 %indvars.iv203
  store i32 %.1114.lcssa, ptr %44, align 4, !tbaa !5
  %45 = trunc i64 %indvars.iv203 to i32
  %46 = add i32 %45, -1
  %47 = add i32 %46, %.1114.lcssa
  %48 = icmp sgt i32 %47, %.0107153
  %49 = add nsw i32 %.lcssa143, 1
  %spec.select = call i32 @llvm.smax.i32(i32 %47, i32 %.0107153)
  %spec.select135 = select i1 %48, i32 %49, i32 %.0106154
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next204, %51
  %indvars.iv.next201 = add nuw i32 %indvars.iv200, 1
  br i1 %52, label %.lr.ph155, label %.preheader140, !llvm.loop !12

._crit_edge:                                      ; preds = %.critedge2, %0, %.preheader140
  %.lcssa142 = phi i32 [ %50, %.preheader140 ], [ %11, %0 ], [ %92, %.critedge2 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %53 = add nsw i32 %.lcssa142, 1
  %54 = sext i32 %53 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %54, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %101 unwind label %105

.lr.ph170:                                        ; preds = %.preheader140, %.critedge2
  %.pre238241 = phi i32 [ %.pre238242, %.critedge2 ], [ %50, %.preheader140 ]
  %55 = phi i32 [ %92, %.critedge2 ], [ %50, %.preheader140 ]
  %indvars.iv206 = phi i64 [ %indvars.iv.next207, %.critedge2 ], [ 0, %.preheader140 ]
  %.0117.neg169 = phi i32 [ %100, %.critedge2 ], [ 0, %.preheader140 ]
  %.2168 = phi i32 [ %spec.select137, %.critedge2 ], [ 0, %.preheader140 ]
  %.2109167 = phi i32 [ %spec.select136, %.critedge2 ], [ -1, %.preheader140 ]
  %56 = sext i32 %.2109167 to i64
  %57 = icmp sgt i64 %indvars.iv206, %56
  br i1 %57, label %66, label %58

58:                                               ; preds = %.lr.ph170
  %59 = add nsw i32 %.0117.neg169, 1
  %60 = add i32 %59, %.2109167
  %61 = add i32 %60, %.2168
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %62
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 %60, ptr %4, align 4, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %65 = load i32, ptr %64, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %.lr.ph170, %58
  %.pre238240 = phi i32 [ %.pre, %58 ], [ %.pre238241, %.lr.ph170 ]
  %67 = phi i32 [ %.pre, %58 ], [ %55, %.lr.ph170 ]
  %.0118 = phi i32 [ %65, %58 ], [ 0, %.lr.ph170 ]
  %68 = trunc nuw nsw i64 %indvars.iv206 to i32
  %69 = add nsw i32 %.0118, %68
  %70 = icmp slt i32 %69, %67
  br i1 %70, label %.lr.ph157.preheader, label %.critedge2

.lr.ph157.preheader:                              ; preds = %66
  %71 = sext i32 %.0118 to i64
  %72 = add nsw i64 %indvars.iv206, %71
  %73 = xor i32 %.0118, -1
  %74 = add i32 %68, %73
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %.lr.ph283, label %.critedge2.loopexit

.lr.ph157:                                        ; preds = %88
  %indvars.iv.next209 = add nsw i64 %indvars.iv208282, 1
  %76 = trunc nsw i64 %indvars.iv.next211 to i32
  %77 = xor i32 %76, -1
  %78 = add i32 %68, %77
  %79 = icmp sgt i32 %78, -1
  br i1 %79, label %.lr.ph283, label %.critedge2.loopexit, !llvm.loop !13

.lr.ph283:                                        ; preds = %.lr.ph157.preheader, %.lr.ph157
  %80 = phi i32 [ %78, %.lr.ph157 ], [ %74, %.lr.ph157.preheader ]
  %81 = phi i32 [ %76, %.lr.ph157 ], [ %.0118, %.lr.ph157.preheader ]
  %indvars.iv208282 = phi i64 [ %indvars.iv.next209, %.lr.ph157 ], [ %72, %.lr.ph157.preheader ]
  %indvars.iv210281 = phi i64 [ %indvars.iv.next211, %.lr.ph157 ], [ %71, %.lr.ph157.preheader ]
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv208282)
  %83 = load i8, ptr %82, align 1, !tbaa !9
  %84 = zext nneg i32 %80 to i64
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %84)
  %86 = load i8, ptr %85, align 1, !tbaa !9
  %87 = icmp eq i8 %83, %86
  %.pre238.pre = load i32, ptr @n, align 4, !tbaa !5
  br i1 %87, label %88, label %.critedge2.loopexit

88:                                               ; preds = %.lr.ph283
  %indvars.iv.next211 = add nsw i64 %indvars.iv210281, 1
  %89 = add nsw i64 %indvars.iv.next211, %indvars.iv206
  %90 = sext i32 %.pre238.pre to i64
  %91 = icmp slt i64 %89, %90
  br i1 %91, label %.lr.ph157, label %.critedge2.loopexit.split.loop.exit258, !llvm.loop !13

.critedge2.loopexit.split.loop.exit258:           ; preds = %88
  %indvars213.le = trunc i64 %indvars.iv.next211 to i32
  br label %.critedge2.loopexit

.critedge2.loopexit:                              ; preds = %.lr.ph157, %.lr.ph283, %.lr.ph157.preheader, %.critedge2.loopexit.split.loop.exit258
  %.pre238 = phi i32 [ %.pre238.pre, %.critedge2.loopexit.split.loop.exit258 ], [ %.pre238240, %.lr.ph157.preheader ], [ %.pre238.pre, %.lr.ph283 ], [ %.pre238.pre, %.lr.ph157 ]
  %.1119.lcssa.ph = phi i32 [ %indvars213.le, %.critedge2.loopexit.split.loop.exit258 ], [ %.0118, %.lr.ph157.preheader ], [ %81, %.lr.ph283 ], [ %76, %.lr.ph157 ]
  %.lcssa141.ph.in = phi i64 [ %89, %.critedge2.loopexit.split.loop.exit258 ], [ %72, %.lr.ph157.preheader ], [ %indvars.iv208282, %.lr.ph283 ], [ %indvars.iv.next209, %.lr.ph157 ]
  %.lcssa141.ph = trunc i64 %.lcssa141.ph.in to i32
  br label %.critedge2

.critedge2:                                       ; preds = %.critedge2.loopexit, %66
  %.pre238242 = phi i32 [ %.pre238240, %66 ], [ %.pre238, %.critedge2.loopexit ]
  %92 = phi i32 [ %67, %66 ], [ %.pre238, %.critedge2.loopexit ]
  %.1119.lcssa = phi i32 [ %.0118, %66 ], [ %.1119.lcssa.ph, %.critedge2.loopexit ]
  %.lcssa141 = phi i32 [ %69, %66 ], [ %.lcssa141.ph, %.critedge2.loopexit ]
  %93 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %indvars.iv206
  store i32 %.1119.lcssa, ptr %93, align 4, !tbaa !5
  %94 = add nsw i32 %.lcssa141, -1
  %95 = icmp sgt i32 %94, %.2109167
  %96 = sub nsw i32 %68, %.1119.lcssa
  %spec.select136 = call i32 @llvm.smax.i32(i32 %94, i32 %.2109167)
  %spec.select137 = select i1 %95, i32 %96, i32 %.2168
  %indvars.iv.next207 = add nuw nsw i64 %indvars.iv206, 1
  %97 = sext i32 %92 to i64
  %98 = icmp slt i64 %indvars.iv.next207, %97
  %99 = trunc i64 %indvars.iv206 to i32
  %100 = xor i32 %99, -1
  br i1 %98, label %.lr.ph170, label %._crit_edge, !llvm.loop !14

101:                                              ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  %102 = load i32, ptr @n, align 4, !tbaa !5
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph174, label %._crit_edge177

.preheader139:                                    ; preds = %.lr.ph174
  %104 = icmp sgt i32 %118, 0
  br i1 %104, label %.lr.ph176, label %._crit_edge177

105:                                              ; preds = %._crit_edge
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %231

.lr.ph174:                                        ; preds = %101, %.lr.ph174
  %indvars.iv217 = phi i64 [ %indvars.iv.next218, %.lr.ph174 ], [ 0, %101 ]
  %107 = getelementptr inbounds [300005 x i32], ptr %1, i64 0, i64 %indvars.iv217
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
  %109 = trunc nuw nsw i64 %indvars.iv.next218 to i32
  %110 = sub i32 %109, %108
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %111) #8
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !5
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv.next218) #8
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %115, align 4, !tbaa !5
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next218, %119
  br i1 %120, label %.lr.ph174, label %.preheader139, !llvm.loop !15

._crit_edge177:                                   ; preds = %.lr.ph176, %101, %.preheader139
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #8
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = load i64, ptr @starts, align 16, !tbaa !16
  %125 = add nsw i64 %124, %123
  store i64 %125, ptr @starts, align 16, !tbaa !16
  %126 = load i32, ptr @n, align 4, !tbaa !5
  %127 = icmp sgt i32 %126, 1
  br i1 %127, label %.lr.ph180, label %._crit_edge181

.lr.ph176:                                        ; preds = %.preheader139, %.lr.ph176
  %indvars.iv220 = phi i64 [ %indvars.iv.next221, %.lr.ph176 ], [ 0, %.preheader139 ]
  %128 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %indvars.iv220
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = trunc nuw nsw i64 %indvars.iv220 to i32
  %131 = sub nsw i32 %130, %129
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %132) #8
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %133, align 4, !tbaa !5
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv220) #8
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = add nsw i32 %137, -1
  store i32 %138, ptr %136, align 4, !tbaa !5
  %indvars.iv.next221 = add nuw nsw i64 %indvars.iv220, 1
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next221, %140
  br i1 %141, label %.lr.ph176, label %._crit_edge177, !llvm.loop !18

._crit_edge181:                                   ; preds = %.lr.ph180, %._crit_edge177
  %.lcssa = phi i32 [ %126, %._crit_edge177 ], [ %156, %.lr.ph180 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  %142 = add nsw i32 %.lcssa, 1
  %143 = sext i32 %142 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %143, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %159 unwind label %163

.lr.ph180:                                        ; preds = %._crit_edge177, %.lr.ph180
  %indvars.iv223 = phi i64 [ %indvars.iv.next224, %.lr.ph180 ], [ 1, %._crit_edge177 ]
  %144 = add nsw i64 %indvars.iv223, -1
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %144) #8
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv223) #8
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = add nsw i32 %148, %146
  store i32 %149, ptr %147, align 4, !tbaa !5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv223) #8
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [300005 x i64], ptr @starts, i64 0, i64 %indvars.iv223
  %154 = load i64, ptr %153, align 8, !tbaa !16
  %155 = add nsw i64 %154, %152
  store i64 %155, ptr %153, align 8, !tbaa !16
  %indvars.iv.next224 = add nuw nsw i64 %indvars.iv223, 1
  %156 = load i32, ptr @n, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = icmp slt i64 %indvars.iv.next224, %157
  br i1 %158, label %.lr.ph180, label %._crit_edge181, !llvm.loop !19

159:                                              ; preds = %._crit_edge181
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  %160 = load i32, ptr @n, align 4, !tbaa !5
  %161 = icmp sgt i32 %160, 0
  br i1 %161, label %.lr.ph185, label %._crit_edge188

.preheader138:                                    ; preds = %.lr.ph185
  %162 = icmp sgt i32 %176, 0
  br i1 %162, label %.lr.ph187, label %._crit_edge188

163:                                              ; preds = %._crit_edge181
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %230

.lr.ph185:                                        ; preds = %159, %.lr.ph185
  %indvars.iv226 = phi i64 [ %indvars.iv.next227, %.lr.ph185 ], [ 0, %159 ]
  %165 = getelementptr inbounds [300005 x i32], ptr %1, i64 0, i64 %indvars.iv226
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = trunc nuw nsw i64 %indvars.iv226 to i32
  %168 = add nsw i32 %166, %167
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv226) #8
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %169, align 4, !tbaa !5
  %172 = sext i32 %168 to i64
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %172) #8
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = add nsw i32 %174, -1
  store i32 %175, ptr %173, align 4, !tbaa !5
  %indvars.iv.next227 = add nuw nsw i64 %indvars.iv226, 1
  %176 = load i32, ptr @n, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = icmp slt i64 %indvars.iv.next227, %177
  br i1 %178, label %.lr.ph185, label %.preheader138, !llvm.loop !20

._crit_edge188:                                   ; preds = %.lr.ph187, %159, %.preheader138
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #8
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = load i64, ptr @ens, align 16, !tbaa !16
  %183 = add nsw i64 %182, %181
  store i64 %183, ptr @ens, align 16, !tbaa !16
  %184 = load i32, ptr @n, align 4, !tbaa !5
  %185 = icmp sgt i32 %184, 1
  br i1 %185, label %.lr.ph191, label %.preheader

.lr.ph187:                                        ; preds = %.preheader138, %.lr.ph187
  %indvars.iv229 = phi i64 [ %indvars.iv.next230, %.lr.ph187 ], [ 0, %.preheader138 ]
  %186 = getelementptr inbounds [300005 x i32], ptr %2, i64 0, i64 %indvars.iv229
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = trunc nuw nsw i64 %indvars.iv229 to i32
  %189 = add nsw i32 %187, %188
  %190 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv229) #8
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %190, align 4, !tbaa !5
  %193 = sext i32 %189 to i64
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %193) #8
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = add nsw i32 %195, -1
  store i32 %196, ptr %194, align 4, !tbaa !5
  %indvars.iv.next230 = add nuw nsw i64 %indvars.iv229, 1
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = icmp slt i64 %indvars.iv.next230, %198
  br i1 %199, label %.lr.ph187, label %._crit_edge188, !llvm.loop !21

.preheader:                                       ; preds = %.lr.ph191, %._crit_edge188
  %200 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  %201 = icmp ugt i64 %200, 1
  br i1 %201, label %.lr.ph194, label %._crit_edge195

.lr.ph191:                                        ; preds = %._crit_edge188, %.lr.ph191
  %indvars.iv232 = phi i64 [ %indvars.iv.next233, %.lr.ph191 ], [ 1, %._crit_edge188 ]
  %202 = add nsw i64 %indvars.iv232, -1
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %202) #8
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv232) #8
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = add nsw i32 %206, %204
  store i32 %207, ptr %205, align 4, !tbaa !5
  %208 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv232) #8
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [300005 x i64], ptr @ens, i64 0, i64 %indvars.iv232
  %212 = load i64, ptr %211, align 8, !tbaa !16
  %213 = add nsw i64 %212, %210
  store i64 %213, ptr %211, align 8, !tbaa !16
  %indvars.iv.next233 = add nuw nsw i64 %indvars.iv232, 1
  %214 = load i32, ptr @n, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = icmp slt i64 %indvars.iv.next233, %215
  br i1 %216, label %.lr.ph191, label %.preheader, !llvm.loop !22

._crit_edge195:                                   ; preds = %.lr.ph194, %.preheader
  %.0104.lcssa = phi i64 [ 0, %.preheader ], [ %224, %.lr.ph194 ]
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.0104.lcssa)
          to label %227 unwind label %228

.lr.ph194:                                        ; preds = %.preheader, %.lr.ph194
  %indvars.iv235 = phi i64 [ %indvars.iv.next236, %.lr.ph194 ], [ 1, %.preheader ]
  %.0104192 = phi i64 [ %224, %.lr.ph194 ], [ 0, %.preheader ]
  %218 = add nsw i64 %indvars.iv235, -1
  %219 = getelementptr inbounds [300005 x i64], ptr @ens, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !16
  %221 = getelementptr inbounds [300005 x i64], ptr @starts, i64 0, i64 %indvars.iv235
  %222 = load i64, ptr %221, align 8, !tbaa !16
  %223 = mul nsw i64 %222, %220
  %224 = add nsw i64 %223, %.0104192
  %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1
  %225 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  %226 = icmp ugt i64 %225, %indvars.iv.next236
  br i1 %226, label %.lr.ph194, label %._crit_edge195, !llvm.loop !23

227:                                              ; preds = %._crit_edge195
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %1) #8
  ret i32 0

228:                                              ; preds = %._crit_edge195
  %229 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %230

230:                                              ; preds = %228, %163
  %.pn = phi { ptr, i32 } [ %229, %228 ], [ %164, %163 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %231

231:                                              ; preds = %230, %105
  %.pn.pn = phi { ptr, i32 } [ %.pn, %230 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #1 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}


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