; LLVM IR from tangjz/acm-icpc :: lydsy (4910)

; 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 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@fa = external dso_local global [20001 x i32], align 16
@c = external dso_local global [20001 x i32], align 16
@w = external dso_local global [20001 x i32], align 16
@st = external dso_local global i32, align 4
@pos = external dso_local global [2 x [20001 x i32]], align 16
@P = external dso_local global ptr, align 8
@ord = external dso_local global [20001 x i32], align 16
@f = external dso_local global [25020001 x i32], align 16
@g = external dso_local global [25020001 x i32], align 16
@s = external dso_local global [20001 x i32], align 16
@F = external dso_local global ptr, align 8
@stg = external dso_local global i32, align 4
@e = external dso_local global [20001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

; Function Attrs: 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %19

19:                                               ; preds = %213, %0
  %20 = load i32, ptr @t, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr @t, align 4, !tbaa !5
  %22 = icmp ne i32 %20, 0
  br i1 %22, label %23, label %216

23:                                               ; preds = %19
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  %25 = load i32, ptr @m, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %36, %23
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %34
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %35) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  br label %36

36:                                               ; preds = %32
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !9

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

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

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

45:                                               ; preds = %40
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr @fa, i64 %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @c, i64 %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr @w, i64 %53
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %48, ptr noundef %51, ptr noundef %54)
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %58, align 4, !tbaa !5
  %61 = icmp sge i32 %60, 0
  br i1 %61, label %62, label %69

62:                                               ; preds = %45
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %67
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %69

69:                                               ; preds = %62, %45
  br label %70

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

73:                                               ; preds = %44
  store i32 0, ptr @st, align 4, !tbaa !5
  store ptr @pos, ptr @P, align 8, !tbaa !12
  store ptr @f, ptr @F, align 8, !tbaa !12
  store i32 0, ptr @stg, align 4, !tbaa !5
  %74 = load ptr, ptr @F, align 8, !tbaa !12
  %75 = load i32, ptr @m, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = mul i64 %76, 4
  call void @llvm.memset.p0.i64(ptr align 4 %74, i8 0, i64 %77, i1 false)
  call void @_Z3dfsi(i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %98, %73
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %101

83:                                               ; preds = %78
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %85
  %87 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #8
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %90
  %92 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #8
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %95, ptr %97)
  br label %98

98:                                               ; preds = %83
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %5, align 4, !tbaa !5
  br label %78, !llvm.loop !14

101:                                              ; preds = %82
  store i32 0, ptr @st, align 4, !tbaa !5
  store ptr getelementptr inbounds ([2 x [20001 x i32]], ptr @pos, i64 0, i64 1), ptr @P, align 8, !tbaa !12
  store ptr @g, ptr @F, align 8, !tbaa !12
  store i32 1, ptr @stg, align 4, !tbaa !5
  %102 = load ptr, ptr @F, align 8, !tbaa !12
  %103 = load i32, ptr @m, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = mul i64 %104, 4
  call void @llvm.memset.p0.i64(ptr align 4 %102, i8 0, i64 %105, i1 false)
  call void @_Z3dfsi(i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %122, %101
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = load i32, ptr @n, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %125

111:                                              ; preds = %106
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = load ptr, ptr @P, align 8, !tbaa !12
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i32, ptr %113, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = load i32, ptr @m, align 4, !tbaa !5
  %119 = sdiv i32 %117, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %120
  store i32 %112, ptr %121, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %111
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !5
  br label %106, !llvm.loop !15

125:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %126

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

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

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %13, align 4, !tbaa !5
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = icmp sge i32 %139, 0
  br i1 %140, label %141, label %149

141:                                              ; preds = %131
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [20001 x i32], ptr @s, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  br label %150

149:                                              ; preds = %131
  br label %150

150:                                              ; preds = %149, %141
  %151 = phi i32 [ %148, %141 ], [ 0, %149 ]
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [20001 x i32], ptr @w, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = add nsw i32 %151, %155
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [20001 x i32], ptr @s, i64 0, i64 %158
  store i32 %156, ptr %159, align 4, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %161
  %163 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %162) #8
  %164 = icmp ugt i64 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %150
  store i32 18, ptr %12, align 4
  br label %204

166:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [20001 x i32], ptr @pos, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr @m, align 4, !tbaa !5
  %172 = add nsw i32 %170, %171
  %173 = sub nsw i32 %172, 1
  store i32 %173, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %174 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %174, ptr %17, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %190, %166
  %176 = load i32, ptr %15, align 4, !tbaa !5
  %177 = load i32, ptr @m, align 4, !tbaa !5
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %197

180:                                              ; preds = %175
  %181 = load i32, ptr %16, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [25020001 x i32], ptr @f, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = load i32, ptr %17, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [25020001 x i32], ptr @g, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = add nsw i32 %184, %188
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 noundef %189)
  br label %190

190:                                              ; preds = %180
  %191 = load i32, ptr %15, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !5
  %193 = load i32, ptr %16, align 4, !tbaa !5
  %194 = add nsw i32 %193, -1
  store i32 %194, ptr %16, align 4, !tbaa !5
  %195 = load i32, ptr %17, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %17, align 4, !tbaa !5
  br label %175, !llvm.loop !16

197:                                              ; preds = %179
  %198 = load i32, ptr %14, align 4, !tbaa !5
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [20001 x i32], ptr @s, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = add nsw i32 %198, %202
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %203)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  store i32 0, ptr %12, align 4
  br label %204

204:                                              ; preds = %197, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %205 = load i32, ptr %12, align 4
  switch i32 %205, label %217 [
    i32 0, label %206
    i32 18, label %207
  ]

206:                                              ; preds = %204
  br label %207

207:                                              ; preds = %206, %204
  %208 = load i32, ptr %10, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %10, align 4, !tbaa !5
  %210 = load i32, ptr @m, align 4, !tbaa !5
  %211 = load i32, ptr %11, align 4, !tbaa !5
  %212 = add nsw i32 %211, %210
  store i32 %212, ptr %11, align 4, !tbaa !5
  br label %126, !llvm.loop !17

213:                                              ; preds = %130
  %214 = load i32, ptr %9, align 4, !tbaa !5
  %215 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %214)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %19, !llvm.loop !18

216:                                              ; preds = %19
  ret i32 0

217:                                              ; preds = %204
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #7

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = 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 = distinct !{!18, !10}


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

%"class.std::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 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@fa = external dso_local global [20001 x i32], align 16
@c = external dso_local global [20001 x i32], align 16
@w = external dso_local global [20001 x i32], align 16
@st = external dso_local local_unnamed_addr global i32, align 4
@pos = external dso_local global [2 x [20001 x i32]], align 16
@P = external dso_local local_unnamed_addr global ptr, align 8
@ord = external dso_local local_unnamed_addr global [20001 x i32], align 16
@f = external dso_local global [25020001 x i32], align 16
@g = external dso_local global [25020001 x i32], align 16
@s = external dso_local local_unnamed_addr global [20001 x i32], align 16
@F = external dso_local local_unnamed_addr global ptr, align 8
@stg = external dso_local local_unnamed_addr global i32, align 4
@e = external dso_local global [20001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %.not65 = icmp eq i32 %6, 0
  br i1 %.not65, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %0, %._crit_edge64
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = add nsw i32 %9, 1
  store i32 %10, ptr @m, align 4, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  br label %._crit_edge44

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  %13 = icmp sgt i32 %15, 0
  br i1 %13, label %.lr.ph43, label %._crit_edge44

.lr.ph:                                           ; preds = %.lr.ph67, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph67 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  %14 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge44:                                    ; preds = %37, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr @st, align 4, !tbaa !5
  store ptr @pos, ptr @P, align 8, !tbaa !11
  store ptr @f, ptr @F, align 8, !tbaa !11
  store i32 0, ptr @stg, align 4, !tbaa !5
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = shl nsw i64 %19, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @f, i8 0, i64 %20, i1 false)
  call void @_Z3dfsi(i32 noundef 0)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph47, label %._crit_edge48

.lr.ph43:                                         ; preds = %._crit_edge, %37
  %storemerge41 = phi i32 [ %39, %37 ], [ 0, %._crit_edge ]
  %23 = sext i32 %storemerge41 to i64
  %24 = getelementptr inbounds i32, ptr @fa, i64 %23
  %25 = getelementptr inbounds i32, ptr @c, i64 %23
  %26 = getelementptr inbounds i32, ptr @w, i64 %23
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %30, align 4, !tbaa !5
  %33 = icmp sgt i32 %31, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %.lr.ph43
  %35 = zext nneg i32 %32 to i64
  %36 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %35
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %.lr.ph43, %34
  %38 = phi i32 [ %28, %.lr.ph43 ], [ %.pre, %34 ]
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %.lr.ph43, label %._crit_edge44, !llvm.loop !13

._crit_edge48:                                    ; preds = %.lr.ph47, %._crit_edge44
  store i32 0, ptr @st, align 4, !tbaa !5
  store ptr getelementptr inbounds (i8, ptr @pos, i64 80004), ptr @P, align 8, !tbaa !11
  store ptr @g, ptr @F, align 8, !tbaa !11
  store i32 1, ptr @stg, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = shl nsw i64 %43, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @g, i8 0, i64 %44, i1 false)
  call void @_Z3dfsi(i32 noundef 0)
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.lr.ph51, label %._crit_edge52.thread

._crit_edge52.thread:                             ; preds = %._crit_edge48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %._crit_edge64

.lr.ph51:                                         ; preds = %._crit_edge48
  %47 = load ptr, ptr @P, align 8, !tbaa !11
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %wide.trip.count = zext nneg i32 %45 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %49 = icmp eq i32 %45, 1
  br i1 %49, label %._crit_edge52.unr-lcssa, label %.lr.ph51.new

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

.lr.ph47:                                         ; preds = %._crit_edge44, %.lr.ph47
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph47 ], [ 0, %._crit_edge44 ]
  %50 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv70
  %51 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #8
  %52 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %51, ptr %52)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv.next71, %54
  br i1 %55, label %.lr.ph47, label %._crit_edge48, !llvm.loop !14

._crit_edge52.unr-lcssa:                          ; preds = %62, %.lr.ph51
  %indvars.iv73.unr = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next74.1, %62 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge52, label %._crit_edge52.epilog-lcssa

._crit_edge52.epilog-lcssa:                       ; preds = %._crit_edge52.unr-lcssa
  %56 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv73.unr
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sdiv i32 %57, %48
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %59
  %61 = trunc nuw nsw i64 %indvars.iv73.unr to i32
  store i32 %61, ptr %60, align 4, !tbaa !5
  br label %._crit_edge52

._crit_edge52:                                    ; preds = %._crit_edge52.unr-lcssa, %._crit_edge52.epilog-lcssa
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br i1 %46, label %.lr.ph63, label %._crit_edge64

62:                                               ; preds = %62, %.lr.ph51.new
  %indvars.iv73 = phi i64 [ 0, %.lr.ph51.new ], [ %indvars.iv.next74.1, %62 ]
  %niter = phi i64 [ 0, %.lr.ph51.new ], [ %niter.next.1, %62 ]
  %63 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv73
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sdiv i32 %64, %48
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %66
  %68 = trunc nuw nsw i64 %indvars.iv73 to i32
  store i32 %68, ptr %67, align 4, !tbaa !5
  %indvars.iv.next74 = or disjoint i64 %indvars.iv73, 1
  %69 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next74
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sdiv i32 %70, %48
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %72
  %74 = trunc nuw nsw i64 %indvars.iv.next74 to i32
  store i32 %74, ptr %73, align 4, !tbaa !5
  %indvars.iv.next74.1 = add nuw nsw i64 %indvars.iv73, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge52.unr-lcssa, label %62, !llvm.loop !15

._crit_edge64.loopexit:                           ; preds = %116
  %.pre87 = load i32, ptr %3, align 4, !tbaa !5
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge52.thread, %._crit_edge64.loopexit, %._crit_edge52
  %75 = phi i32 [ %.pre87, %._crit_edge64.loopexit ], [ 0, %._crit_edge52 ], [ 0, %._crit_edge52.thread ]
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %75)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %77 = load i32, ptr @t, align 4, !tbaa !5
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %77, 0
  br i1 %.not, label %._crit_edge68, label %.lr.ph67, !llvm.loop !16

.lr.ph63:                                         ; preds = %._crit_edge52, %116
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %116 ], [ 0, %._crit_edge52 ]
  %.03360 = phi i32 [ %118, %116 ], [ 0, %._crit_edge52 ]
  %79 = getelementptr inbounds [20001 x i32], ptr @ord, i64 0, i64 %indvars.iv83
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [20001 x i32], ptr @fa, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, -1
  br i1 %84, label %85, label %89

85:                                               ; preds = %.lr.ph63
  %86 = zext nneg i32 %83 to i64
  %87 = getelementptr inbounds [20001 x i32], ptr @s, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %.lr.ph63, %85
  %90 = phi i32 [ %88, %85 ], [ 0, %.lr.ph63 ]
  %91 = getelementptr inbounds [20001 x i32], ptr @w, i64 0, i64 %81
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %92, %90
  %94 = getelementptr inbounds [20001 x i32], ptr @s, i64 0, i64 %81
  store i32 %93, ptr %94, align 4, !tbaa !5
  %95 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @e, i64 0, i64 %81
  %96 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %95) #8
  %.not39 = icmp eq i64 %96, 0
  br i1 %.not39, label %97, label %116

97:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  %98 = load i32, ptr @m, align 4, !tbaa !5
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %.lr.ph57.preheader, label %._crit_edge58

.lr.ph57.preheader:                               ; preds = %97
  %100 = getelementptr inbounds [20001 x i32], ptr @pos, i64 0, i64 %81
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add i32 %98, %101
  %103 = sext i32 %.03360 to i64
  %104 = sext i32 %102 to i64
  br label %.lr.ph57

._crit_edge58.loopexit:                           ; preds = %.lr.ph57
  %.pre86 = load i32, ptr %4, align 4, !tbaa !5
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit, %97
  %105 = phi i32 [ %.pre86, %._crit_edge58.loopexit ], [ 0, %97 ]
  %106 = load i32, ptr %94, align 4, !tbaa !5
  %107 = add nsw i32 %106, %105
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %107)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %116

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %.lr.ph57
  %indvars.iv78 = phi i64 [ %104, %.lr.ph57.preheader ], [ %indvars.iv.next79, %.lr.ph57 ]
  %indvars.iv76 = phi i64 [ %103, %.lr.ph57.preheader ], [ %indvars.iv.next77, %.lr.ph57 ]
  %.03153 = phi i32 [ 0, %.lr.ph57.preheader ], [ %113, %.lr.ph57 ]
  %indvars.iv.next79 = add nsw i64 %indvars.iv78, -1
  %108 = getelementptr inbounds [25020001 x i32], ptr @f, i64 0, i64 %indvars.iv.next79
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = getelementptr inbounds [25020001 x i32], ptr @g, i64 0, i64 %indvars.iv76
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = add nsw i32 %111, %109
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %112)
  %113 = add nuw nsw i32 %.03153, 1
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, 1
  %114 = load i32, ptr @m, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %.lr.ph57, label %._crit_edge58.loopexit, !llvm.loop !17

116:                                              ; preds = %89, %._crit_edge58
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %117 = load i32, ptr @m, align 4, !tbaa !5
  %118 = add nsw i32 %117, %.03360
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %indvars.iv.next84, %120
  br i1 %121, label %.lr.ph63, label %._crit_edge64.loopexit, !llvm.loop !18

._crit_edge68:                                    ; preds = %._crit_edge64, %0
  ret i32 0
}

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

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

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

; 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 @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #7

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

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

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

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


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