; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-04-04 (J - Black Company - lzy)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global [100009 x i32], align 16
@ind = external dso_local global [100009 x i32], align 16
@s = external dso_local global [100009 x i32], align 16
@p = external dso_local global [100009 x i32], align 16
@nei = external dso_local global [100009 x %"class.std::vector"], align 16
@lnk = external dso_local global [100009 x %"class.std::vector"], align 16
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@q = external dso_local global [100009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #1

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

28:                                               ; preds = %42, %0
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %36
  store i32 %34, ptr %37, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr @c, i64 %39
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %40)
  br label %42

42:                                               ; preds = %33
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %2, align 4, !tbaa !5
  br label %28, !llvm.loop !9

45:                                               ; preds = %32
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  br label %47

47:                                               ; preds = %51, %45
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr @m, align 4, !tbaa !5
  %50 = icmp ne i32 %48, 0
  br i1 %50, label %51, label %59

51:                                               ; preds = %47
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @a, ptr noundef @b)
  %53 = load i32, ptr @a, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %54
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %56 = load i32, ptr @b, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %57
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 4 dereferenceable(4) @a)
  br label %47, !llvm.loop !11

59:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %122, %59
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = icmp sle i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %125

65:                                               ; preds = %60
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %67
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %70
  %72 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #7
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %75
  %77 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #7
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEPFbiiEEvT_S9_T0_(ptr %80, ptr %82, ptr noundef @_Z3cmpii)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %84
  store ptr %85, ptr %8, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %86 = load ptr, ptr %8, align 8, !tbaa !12
  %87 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #7
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %89 = load ptr, ptr %8, align 8, !tbaa !12
  %90 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #7
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  br label %92

92:                                               ; preds = %119, %65
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %93, label %95, label %94

94:                                               ; preds = %92
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %121

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %11, align 4, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %117

100:                                              ; preds = %95
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = icmp eq i32 %104, %108
  br i1 %109, label %110, label %117

110:                                              ; preds = %100
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = call noundef i32 @_Z4findi(i32 noundef %111)
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = call noundef i32 @_Z4findi(i32 noundef %113)
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %115
  store i32 %112, ptr %116, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %110, %100, %95
  %118 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %118, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %119

119:                                              ; preds = %117
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %92

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

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

125:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %177, %125
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = load i32, ptr @n, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 12, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %180

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %133
  store ptr %134, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %135 = load ptr, ptr %14, align 8, !tbaa !12
  %136 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #7
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %138 = load ptr, ptr %14, align 8, !tbaa !12
  %139 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %138) #7
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  br label %141

141:                                              ; preds = %174, %131
  %142 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br i1 %142, label %144, label %143

143:                                              ; preds = %141
  store i32 15, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %176

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %146 = load i32, ptr %145, align 4, !tbaa !5
  store i32 %146, ptr %17, align 4, !tbaa !5
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %172

149:                                              ; preds = %144
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %17, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp ne i32 %153, %157
  br i1 %158, label %159, label %172

159:                                              ; preds = %149
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = call noundef i32 @_Z4findi(i32 noundef %160)
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %163, align 4, !tbaa !5
  %166 = load i32, ptr %13, align 4, !tbaa !5
  %167 = call noundef i32 @_Z4findi(i32 noundef %166)
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @lnk, i64 0, i64 %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %170 = load i32, ptr %17, align 4, !tbaa !5
  %171 = call noundef i32 @_Z4findi(i32 noundef %170)
  store i32 %171, ptr %18, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %169, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %172

172:                                              ; preds = %159, %149, %144
  %173 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %173, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %174

174:                                              ; preds = %172
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %141

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

177:                                              ; preds = %176
  %178 = load i32, ptr %12, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %12, align 4, !tbaa !5
  br label %126, !llvm.loop !15

180:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %208, %180
  %182 = load i32, ptr %19, align 4, !tbaa !5
  %183 = load i32, ptr @n, align 4, !tbaa !5
  %184 = icmp sle i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %211

186:                                              ; preds = %181
  %187 = load i32, ptr %19, align 4, !tbaa !5
  %188 = load i32, ptr %19, align 4, !tbaa !5
  %189 = call noundef i32 @_Z4findi(i32 noundef %188)
  %190 = icmp eq i32 %187, %189
  br i1 %190, label %191, label %207

191:                                              ; preds = %186
  %192 = load i32, ptr %19, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %193
  store i32 1, ptr %194, align 4, !tbaa !5
  %195 = load i32, ptr %19, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %206, label %200

200:                                              ; preds = %191
  %201 = load i32, ptr %19, align 4, !tbaa !5
  %202 = load i32, ptr @r, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr @r, align 4, !tbaa !5
  %204 = sext i32 %202 to i64
  %205 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %204
  store i32 %201, ptr %205, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %200, %191
  br label %207

207:                                              ; preds = %206, %186
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %19, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %19, align 4, !tbaa !5
  br label %181, !llvm.loop !16

211:                                              ; preds = %185
  store i32 0, ptr @l, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %271, %211
  %213 = load i32, ptr @l, align 4, !tbaa !5
  %214 = load i32, ptr @r, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %216, label %274

216:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %217 = load i32, ptr @l, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  store i32 %220, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %221 = load i32, ptr %20, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @lnk, i64 0, i64 %222
  store ptr %223, ptr %21, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %224 = load ptr, ptr %21, align 8, !tbaa !12
  %225 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %224) #7
  %226 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %225, ptr %226, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %227 = load ptr, ptr %21, align 8, !tbaa !12
  %228 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %227) #7
  %229 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %228, ptr %229, align 8
  br label %230

230:                                              ; preds = %268, %216
  %231 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br i1 %231, label %233, label %232

232:                                              ; preds = %230
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %270

233:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %235 = load i32, ptr %234, align 4, !tbaa !5
  store i32 %235, ptr %24, align 4, !tbaa !5
  %236 = load i32, ptr %24, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = icmp sle i32 %239, %243
  br i1 %244, label %245, label %254

245:                                              ; preds = %233
  %246 = load i32, ptr %20, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  %251 = load i32, ptr %24, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %252
  store i32 %250, ptr %253, align 4, !tbaa !5
  br label %254

254:                                              ; preds = %245, %233
  %255 = load i32, ptr %24, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = add nsw i32 %258, -1
  store i32 %259, ptr %257, align 4, !tbaa !5
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %267, label %261

261:                                              ; preds = %254
  %262 = load i32, ptr %24, align 4, !tbaa !5
  %263 = load i32, ptr @r, align 4, !tbaa !5
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr @r, align 4, !tbaa !5
  %265 = sext i32 %263 to i64
  %266 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %265
  store i32 %262, ptr %266, align 4, !tbaa !5
  br label %267

267:                                              ; preds = %261, %254
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %268

268:                                              ; preds = %267
  %269 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br label %230

270:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr @l, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr @l, align 4, !tbaa !5
  br label %212, !llvm.loop !17

274:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %289, %274
  %276 = load i32, ptr %26, align 4, !tbaa !5
  %277 = load i32, ptr @n, align 4, !tbaa !5
  %278 = icmp sle i32 %276, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %275
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %292

280:                                              ; preds = %275
  %281 = load i32, ptr %26, align 4, !tbaa !5
  %282 = call noundef i32 @_Z4findi(i32 noundef %281)
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = load i64, ptr %25, align 8, !tbaa !18
  %288 = add nsw i64 %287, %286
  store i64 %288, ptr %25, align 8, !tbaa !18
  br label %289

289:                                              ; preds = %280
  %290 = load i32, ptr %26, align 4, !tbaa !5
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %26, align 4, !tbaa !5
  br label %275, !llvm.loop !20

292:                                              ; preds = %279
  %293 = load i64, ptr %25, align 8, !tbaa !18
  %294 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %293)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %295 = load i32, ptr %1, align 4
  ret i32 %295
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = distinct !{!20, !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::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.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global [100009 x i32], align 16
@ind = external dso_local local_unnamed_addr global [100009 x i32], align 16
@s = external dso_local local_unnamed_addr global [100009 x i32], align 16
@p = external dso_local local_unnamed_addr global [100009 x i32], align 16
@nei = external dso_local global [100009 x %"class.std::vector"], align 16
@lnk = external dso_local global [100009 x %"class.std::vector"], align 16
@l = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global [100009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not70 = icmp slt i32 %10, 1
  br i1 %.not70, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @m, align 4, !tbaa !5
  %.not5672 = icmp eq i32 %12, 0
  br i1 %.not5672, label %._crit_edge75, label %.lr.ph74

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %14 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %indvars.iv
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %15, ptr %14, align 4, !tbaa !5
  %16 = getelementptr inbounds i32, ptr @c, i64 %indvars.iv
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph74:                                         ; preds = %._crit_edge, %.lr.ph74
  %20 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @a, ptr noundef nonnull @b)
  %21 = load i32, ptr @a, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %22
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %24 = load i32, ptr @b, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %25
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %27 = load i32, ptr @m, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr @m, align 4, !tbaa !5
  %.not56 = icmp eq i32 %27, 0
  br i1 %.not56, label %._crit_edge75, label %.lr.ph74, !llvm.loop !11

._crit_edge75:                                    ; preds = %.lr.ph74, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 1, ptr %1, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %.not5780 = icmp slt i32 %29, 1
  br i1 %.not5780, label %._crit_edge84.thread, label %.lr.ph83

._crit_edge84.thread:                             ; preds = %._crit_edge75
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  br label %.preheader68

._crit_edge84:                                    ; preds = %._crit_edge79
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %.not5889 = icmp slt i32 %48, 1
  br i1 %.not5889, label %.preheader68, label %.lr.ph92

.lr.ph83:                                         ; preds = %._crit_edge75, %._crit_edge79
  %storemerge81 = phi i32 [ %47, %._crit_edge79 ], [ 1, %._crit_edge75 ]
  %30 = sext i32 %storemerge81 to i64
  %31 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %30
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %33
  %35 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %37
  %39 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEPFbiiEEvT_S9_T0_(ptr %35, ptr %39, ptr noundef nonnull @_Z3cmpii)
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %43 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  store ptr %43, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %44 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  store ptr %44, ptr %3, align 8
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br i1 %45, label %.lr.ph78, label %._crit_edge79

._crit_edge79:                                    ; preds = %64, %.lr.ph83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %1, align 4, !tbaa !5
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %.not57.not = icmp slt i32 %46, %48
  br i1 %.not57.not, label %.lr.ph83, label %._crit_edge84, !llvm.loop !12

.lr.ph78:                                         ; preds = %.lr.ph83, %64
  %.05076 = phi i32 [ %50, %64 ], [ 0, %.lr.ph83 ]
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %.not67 = icmp eq i32 %.05076, 0
  br i1 %.not67, label %64, label %51

51:                                               ; preds = %.lr.ph78
  %52 = sext i32 %.05076 to i64
  %53 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %50 to i64
  %56 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp eq i32 %54, %57
  br i1 %58, label %59, label %64

59:                                               ; preds = %51
  %60 = call noundef i32 @_Z4findi(i32 noundef %.05076)
  %61 = call noundef i32 @_Z4findi(i32 noundef %50)
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100009 x i32], ptr @p, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %59, %51, %.lr.ph78
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br i1 %66, label %.lr.ph78, label %._crit_edge79

.preheader69:                                     ; preds = %._crit_edge88
  %.not5993 = icmp slt i32 %71, 1
  br i1 %.not5993, label %.preheader68, label %.lr.ph95

.lr.ph92:                                         ; preds = %._crit_edge84, %._crit_edge88
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %._crit_edge88 ], [ 1, %._crit_edge84 ]
  %67 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @nei, i64 0, i64 %indvars.iv107
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %68 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #7
  store ptr %68, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %69 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #7
  store ptr %69, ptr %5, align 8
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %70, label %.lr.ph87, label %._crit_edge88

._crit_edge88:                                    ; preds = %92, %.lr.ph92
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %.not58.not = icmp slt i64 %indvars.iv107, %72
  br i1 %.not58.not, label %.lr.ph92, label %.preheader69, !llvm.loop !13

.lr.ph87:                                         ; preds = %.lr.ph92, %92
  %.05285 = phi i32 [ %74, %92 ], [ 0, %.lr.ph92 ]
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %.not65 = icmp eq i32 %.05285, 0
  br i1 %.not65, label %92, label %75

75:                                               ; preds = %.lr.ph87
  %76 = sext i32 %.05285 to i64
  %77 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %74 to i64
  %80 = getelementptr inbounds [100009 x i32], ptr @c, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %.not66 = icmp eq i32 %78, %81
  br i1 %.not66, label %92, label %82

82:                                               ; preds = %75
  %83 = call noundef i32 @_Z4findi(i32 noundef %74)
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %85, align 4, !tbaa !5
  %88 = call noundef i32 @_Z4findi(i32 noundef %.05285)
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @lnk, i64 0, i64 %89
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %91 = call noundef i32 @_Z4findi(i32 noundef %74)
  store i32 %91, ptr %6, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %92

92:                                               ; preds = %82, %75, %.lr.ph87
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %94 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %94, label %.lr.ph87, label %._crit_edge88

.preheader68:                                     ; preds = %111, %._crit_edge84.thread, %._crit_edge84, %.preheader69
  %95 = phi i32 [ %71, %.preheader69 ], [ %29, %._crit_edge84.thread ], [ %48, %._crit_edge84 ], [ %112, %111 ]
  store i32 0, ptr @l, align 4, !tbaa !5
  %96 = load i32, ptr @r, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph100, label %.preheader

.lr.ph95:                                         ; preds = %.preheader69, %111
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %111 ], [ 1, %.preheader69 ]
  %98 = trunc nuw nsw i64 %indvars.iv110 to i32
  %99 = call noundef i32 @_Z4findi(i32 noundef %98)
  %100 = zext i32 %99 to i64
  %101 = icmp eq i64 %indvars.iv110, %100
  br i1 %101, label %102, label %111

102:                                              ; preds = %.lr.ph95
  %103 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %indvars.iv110
  store i32 1, ptr %103, align 4, !tbaa !5
  %104 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %indvars.iv110
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %.not64 = icmp eq i32 %105, 0
  br i1 %.not64, label %106, label %111

106:                                              ; preds = %102
  %107 = load i32, ptr @r, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr @r, align 4, !tbaa !5
  %109 = sext i32 %107 to i64
  %110 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %109
  store i32 %98, ptr %110, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %.lr.ph95, %106, %102
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %.not59.not = icmp slt i64 %indvars.iv110, %113
  br i1 %.not59.not, label %.lr.ph95, label %.preheader68, !llvm.loop !14

.preheader.loopexit:                              ; preds = %._crit_edge98
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader68
  %114 = phi i32 [ %.pre, %.preheader.loopexit ], [ %95, %.preheader68 ]
  %.not61101 = icmp slt i32 %114, 1
  br i1 %.not61101, label %._crit_edge105, label %.lr.ph104

.lr.ph100:                                        ; preds = %.preheader68, %._crit_edge98
  %storemerge6099 = phi i32 [ %125, %._crit_edge98 ], [ 0, %.preheader68 ]
  %115 = sext i32 %storemerge6099 to i64
  %116 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100009 x %"class.std::vector"], ptr @lnk, i64 0, i64 %118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %120 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #7
  store ptr %120, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %121 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #7
  store ptr %121, ptr %8, align 8
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %122, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %.lr.ph100
  %123 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %118
  br label %128

._crit_edge98:                                    ; preds = %146, %.lr.ph100
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %124 = load i32, ptr @l, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr @l, align 4, !tbaa !5
  %126 = load i32, ptr @r, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %.lr.ph100, label %.preheader.loopexit, !llvm.loop !15

128:                                              ; preds = %.lr.ph97, %146
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = load i32, ptr %123, align 4, !tbaa !5
  %.not62 = icmp sgt i32 %133, %134
  br i1 %.not62, label %137, label %135

135:                                              ; preds = %128
  %136 = add nsw i32 %134, 1
  store i32 %136, ptr %132, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %135, %128
  %138 = getelementptr inbounds [100009 x i32], ptr @ind, i64 0, i64 %131
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = add nsw i32 %139, -1
  store i32 %140, ptr %138, align 4, !tbaa !5
  %.not63 = icmp eq i32 %140, 0
  br i1 %.not63, label %141, label %146

141:                                              ; preds = %137
  %142 = load i32, ptr @r, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr @r, align 4, !tbaa !5
  %144 = sext i32 %142 to i64
  %145 = getelementptr inbounds [100009 x i32], ptr @q, i64 0, i64 %144
  store i32 %130, ptr %145, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %141, %137
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %148 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %148, label %128, label %._crit_edge98

._crit_edge105:                                   ; preds = %.lr.ph104, %.preheader
  %.047.lcssa = phi i64 [ 0, %.preheader ], [ %155, %.lr.ph104 ]
  %149 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %.047.lcssa)
  ret i32 0

.lr.ph104:                                        ; preds = %.preheader, %.lr.ph104
  %.0103 = phi i32 [ %156, %.lr.ph104 ], [ 1, %.preheader ]
  %.047102 = phi i64 [ %155, %.lr.ph104 ], [ 0, %.preheader ]
  %150 = call noundef i32 @_Z4findi(i32 noundef %.0103)
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100009 x i32], ptr @s, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = add nsw i64 %.047102, %154
  %156 = add nuw nsw i32 %.0103, 1
  %157 = load i32, ptr @n, align 4, !tbaa !5
  %.not61.not = icmp slt i32 %.0103, %157
  br i1 %.not61.not, label %.lr.ph104, label %._crit_edge105, !llvm.loop !16
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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