; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/74 Division 1/Problem C (C)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global %"class.std::vector", align 8
@l = external dso_local global %"class.std::vector", align 8
@r = external dso_local global %"class.std::vector", align 8
@u = external dso_local global %"class.std::vector", align 8
@d = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3dfsii(i32 noundef, i32 noundef) #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [5000 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca 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 @n, ptr noundef @m)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %20)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %22)
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %24)
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %26)
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %29

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

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %63

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %36) #5
  %38 = load i32, ptr @m, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39)
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %41) #5
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44)
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %46) #5
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49)
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %51) #5
  %53 = load i32, ptr @m, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54)
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %56) #5
  %58 = load i32, ptr @m, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59)
  br label %60

60:                                               ; preds = %34
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %2, align 4, !tbaa !5
  br label %29, !llvm.loop !9

63:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 5000, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %156, %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %159

69:                                               ; preds = %64
  %70 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 0
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %70)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %152, %69
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = load i32, ptr @m, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %155

77:                                               ; preds = %72
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = icmp eq i32 %82, 46
  br i1 %83, label %84, label %91

84:                                               ; preds = %77
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %86) #5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #5
  store i32 0, ptr %90, align 4, !tbaa !5
  br label %151

91:                                               ; preds = %77
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !11
  %96 = sext i8 %95 to i32
  %97 = icmp eq i32 %96, 76
  br i1 %97, label %98, label %105

98:                                               ; preds = %91
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %100) #5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #5
  store i32 1, ptr %104, align 4, !tbaa !5
  br label %150

105:                                              ; preds = %91
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !11
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %110, 82
  br i1 %111, label %112, label %119

112:                                              ; preds = %105
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %114) #5
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %117) #5
  store i32 2, ptr %118, align 4, !tbaa !5
  br label %149

119:                                              ; preds = %105
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !11
  %124 = sext i8 %123 to i32
  %125 = icmp eq i32 %124, 85
  br i1 %125, label %126, label %133

126:                                              ; preds = %119
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %128) #5
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %131) #5
  store i32 3, ptr %132, align 4, !tbaa !5
  br label %148

133:                                              ; preds = %119
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [5000 x i8], ptr %3, i64 0, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !11
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 %138, 68
  br i1 %139, label %140, label %147

140:                                              ; preds = %133
  %141 = load i32, ptr %4, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %142) #5
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %145) #5
  store i32 4, ptr %146, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %140, %133
  br label %148

148:                                              ; preds = %147, %126
  br label %149

149:                                              ; preds = %148, %112
  br label %150

150:                                              ; preds = %149, %98
  br label %151

151:                                              ; preds = %150, %84
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %6, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %6, align 4, !tbaa !5
  br label %72, !llvm.loop !12

155:                                              ; preds = %76
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %4, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %4, align 4, !tbaa !5
  br label %64, !llvm.loop !13

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

160:                                              ; preds = %257, %159
  %161 = load i32, ptr %7, align 4, !tbaa !5
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %260

165:                                              ; preds = %160
  %166 = load i32, ptr %7, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %167) #5
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef 0) #5
  store i32 -1, ptr %169, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %205, %165
  %171 = load i32, ptr %8, align 4, !tbaa !5
  %172 = load i32, ptr @m, align 4, !tbaa !5
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %208

175:                                              ; preds = %170
  %176 = load i32, ptr %7, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %177) #5
  %179 = load i32, ptr %8, align 4, !tbaa !5
  %180 = sub nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %181) #5
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = icmp sgt i32 %183, 0
  br i1 %184, label %185, label %188

185:                                              ; preds = %175
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  br label %197

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

197:                                              ; preds = %188, %185
  %198 = phi i32 [ %187, %185 ], [ %196, %188 ]
  %199 = load i32, ptr %7, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %200) #5
  %202 = load i32, ptr %8, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %203) #5
  store i32 %198, ptr %204, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %197
  %206 = load i32, ptr %8, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %8, align 4, !tbaa !5
  br label %170, !llvm.loop !14

208:                                              ; preds = %174
  %209 = load i32, ptr @m, align 4, !tbaa !5
  %210 = load i32, ptr %7, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %211) #5
  %213 = load i32, ptr @m, align 4, !tbaa !5
  %214 = sub nsw i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %215) #5
  store i32 %209, ptr %216, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %217 = load i32, ptr @m, align 4, !tbaa !5
  %218 = sub nsw i32 %217, 2
  store i32 %218, ptr %9, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %253, %208
  %220 = load i32, ptr %9, align 4, !tbaa !5
  %221 = icmp sge i32 %220, 0
  br i1 %221, label %223, label %222

222:                                              ; preds = %219
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %256

223:                                              ; preds = %219
  %224 = load i32, ptr %7, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %225) #5
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %226, i64 noundef %229) #5
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %233, label %236

233:                                              ; preds = %223
  %234 = load i32, ptr %9, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  br label %245

236:                                              ; preds = %223
  %237 = load i32, ptr %7, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %238) #5
  %240 = load i32, ptr %9, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  %242 = sext i32 %241 to i64
  %243 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %239, i64 noundef %242) #5
  %244 = load i32, ptr %243, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %236, %233
  %246 = phi i32 [ %235, %233 ], [ %244, %236 ]
  %247 = load i32, ptr %7, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %248) #5
  %250 = load i32, ptr %9, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %249, i64 noundef %251) #5
  store i32 %246, ptr %252, align 4, !tbaa !5
  br label %253

253:                                              ; preds = %245
  %254 = load i32, ptr %9, align 4, !tbaa !5
  %255 = add nsw i32 %254, -1
  store i32 %255, ptr %9, align 4, !tbaa !5
  br label %219, !llvm.loop !15

256:                                              ; preds = %222
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %7, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %7, align 4, !tbaa !5
  br label %160, !llvm.loop !16

260:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %261

261:                                              ; preds = %358, %260
  %262 = load i32, ptr %10, align 4, !tbaa !5
  %263 = load i32, ptr @m, align 4, !tbaa !5
  %264 = icmp slt i32 %262, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %261
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %361

266:                                              ; preds = %261
  %267 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef 0) #5
  %268 = load i32, ptr %10, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %269) #5
  store i32 -1, ptr %270, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %271

271:                                              ; preds = %306, %266
  %272 = load i32, ptr %11, align 4, !tbaa !5
  %273 = load i32, ptr @n, align 4, !tbaa !5
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %309

276:                                              ; preds = %271
  %277 = load i32, ptr %11, align 4, !tbaa !5
  %278 = sub nsw i32 %277, 1
  %279 = sext i32 %278 to i64
  %280 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %279) #5
  %281 = load i32, ptr %10, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %280, i64 noundef %282) #5
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = icmp sgt i32 %284, 0
  br i1 %285, label %286, label %289

286:                                              ; preds = %276
  %287 = load i32, ptr %11, align 4, !tbaa !5
  %288 = sub nsw i32 %287, 1
  br label %298

289:                                              ; preds = %276
  %290 = load i32, ptr %11, align 4, !tbaa !5
  %291 = sub nsw i32 %290, 1
  %292 = sext i32 %291 to i64
  %293 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %292) #5
  %294 = load i32, ptr %10, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %293, i64 noundef %295) #5
  %297 = load i32, ptr %296, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %289, %286
  %299 = phi i32 [ %288, %286 ], [ %297, %289 ]
  %300 = load i32, ptr %11, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %301) #5
  %303 = load i32, ptr %10, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %302, i64 noundef %304) #5
  store i32 %299, ptr %305, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %298
  %307 = load i32, ptr %11, align 4, !tbaa !5
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %11, align 4, !tbaa !5
  br label %271, !llvm.loop !17

309:                                              ; preds = %275
  %310 = load i32, ptr @n, align 4, !tbaa !5
  %311 = load i32, ptr @n, align 4, !tbaa !5
  %312 = sub nsw i32 %311, 1
  %313 = sext i32 %312 to i64
  %314 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %313) #5
  %315 = load i32, ptr %10, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %314, i64 noundef %316) #5
  store i32 %310, ptr %317, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %318 = load i32, ptr @n, align 4, !tbaa !5
  %319 = sub nsw i32 %318, 2
  store i32 %319, ptr %12, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %354, %309
  %321 = load i32, ptr %12, align 4, !tbaa !5
  %322 = icmp sge i32 %321, 0
  br i1 %322, label %324, label %323

323:                                              ; preds = %320
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %357

324:                                              ; preds = %320
  %325 = load i32, ptr %12, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  %327 = sext i32 %326 to i64
  %328 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %327) #5
  %329 = load i32, ptr %10, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %328, i64 noundef %330) #5
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = icmp sgt i32 %332, 0
  br i1 %333, label %334, label %337

334:                                              ; preds = %324
  %335 = load i32, ptr %12, align 4, !tbaa !5
  %336 = add nsw i32 %335, 1
  br label %346

337:                                              ; preds = %324
  %338 = load i32, ptr %12, align 4, !tbaa !5
  %339 = add nsw i32 %338, 1
  %340 = sext i32 %339 to i64
  %341 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %340) #5
  %342 = load i32, ptr %10, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %341, i64 noundef %343) #5
  %345 = load i32, ptr %344, align 4, !tbaa !5
  br label %346

346:                                              ; preds = %337, %334
  %347 = phi i32 [ %336, %334 ], [ %345, %337 ]
  %348 = load i32, ptr %12, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %349) #5
  %351 = load i32, ptr %10, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %350, i64 noundef %352) #5
  store i32 %347, ptr %353, align 4, !tbaa !5
  br label %354

354:                                              ; preds = %346
  %355 = load i32, ptr %12, align 4, !tbaa !5
  %356 = add nsw i32 %355, -1
  store i32 %356, ptr %12, align 4, !tbaa !5
  br label %320, !llvm.loop !18

357:                                              ; preds = %323
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %10, align 4, !tbaa !5
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %10, align 4, !tbaa !5
  br label %261, !llvm.loop !19

361:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %362

362:                                              ; preds = %405, %361
  %363 = load i32, ptr %15, align 4, !tbaa !5
  %364 = load i32, ptr @n, align 4, !tbaa !5
  %365 = icmp slt i32 %363, %364
  br i1 %365, label %367, label %366

366:                                              ; preds = %362
  store i32 29, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %408

367:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %368

368:                                              ; preds = %401, %367
  %369 = load i32, ptr %16, align 4, !tbaa !5
  %370 = load i32, ptr @m, align 4, !tbaa !5
  %371 = icmp slt i32 %369, %370
  br i1 %371, label %373, label %372

372:                                              ; preds = %368
  store i32 32, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %404

373:                                              ; preds = %368
  %374 = load i32, ptr %15, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %375) #5
  %377 = load i32, ptr %16, align 4, !tbaa !5
  %378 = sext i32 %377 to i64
  %379 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %376, i64 noundef %378) #5
  %380 = load i32, ptr %379, align 4, !tbaa !5
  %381 = icmp sgt i32 %380, 0
  br i1 %381, label %382, label %400

382:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %383 = load i32, ptr %15, align 4, !tbaa !5
  %384 = load i32, ptr %16, align 4, !tbaa !5
  %385 = call noundef i32 @_Z3dfsii(i32 noundef %383, i32 noundef %384)
  store i32 %385, ptr %17, align 4, !tbaa !5
  %386 = load i32, ptr %17, align 4, !tbaa !5
  %387 = load i32, ptr %13, align 4, !tbaa !5
  %388 = icmp sgt i32 %386, %387
  br i1 %388, label %389, label %391

389:                                              ; preds = %382
  %390 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %390, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %399

391:                                              ; preds = %382
  %392 = load i32, ptr %17, align 4, !tbaa !5
  %393 = load i32, ptr %13, align 4, !tbaa !5
  %394 = icmp eq i32 %392, %393
  br i1 %394, label %395, label %398

395:                                              ; preds = %391
  %396 = load i32, ptr %14, align 4, !tbaa !5
  %397 = add nsw i32 %396, 1
  store i32 %397, ptr %14, align 4, !tbaa !5
  br label %398

398:                                              ; preds = %395, %391
  br label %399

399:                                              ; preds = %398, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %400

400:                                              ; preds = %399, %373
  br label %401

401:                                              ; preds = %400
  %402 = load i32, ptr %16, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %16, align 4, !tbaa !5
  br label %368, !llvm.loop !20

404:                                              ; preds = %372
  br label %405

405:                                              ; preds = %404
  %406 = load i32, ptr %15, align 4, !tbaa !5
  %407 = add nsw i32 %406, 1
  store i32 %407, ptr %15, align 4, !tbaa !5
  br label %362, !llvm.loop !21

408:                                              ; preds = %366
  %409 = load i32, ptr %13, align 4, !tbaa !5
  %410 = load i32, ptr %14, align 4, !tbaa !5
  %411 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %409, i32 noundef %410)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 5000, ptr %3) #5
  %412 = load i32, ptr %1, align 4
  ret i32 %412
}

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global %"class.std::vector", align 8
@l = external dso_local global %"class.std::vector", align 8
@r = external dso_local global %"class.std::vector", align 8
@u = external dso_local global %"class.std::vector", align 8
@d = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3dfsii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca [5000 x i8], align 16
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  tail call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %4)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  tail call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %6)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  tail call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %8)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  tail call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %10)
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  tail call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %12)
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %1) #5
  br label %.preheader108

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %1) #5
  %15 = icmp sgt i32 %31, 0
  br i1 %15, label %.lr.ph118, label %.preheader108

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %16 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv) #5
  %17 = load i32, ptr @m, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %18)
  %19 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %indvars.iv) #5
  %20 = load i32, ptr @m, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21)
  %22 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %indvars.iv) #5
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %24)
  %25 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %indvars.iv) #5
  %26 = load i32, ptr @m, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %27)
  %28 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %indvars.iv) #5
  %29 = load i32, ptr @m, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader109:                                    ; preds = %._crit_edge115
  %34 = icmp sgt i32 %38, 0
  br i1 %34, label %.lr.ph128, label %.preheader108

.lr.ph118:                                        ; preds = %._crit_edge, %._crit_edge115
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %._crit_edge115 ], [ 0, %._crit_edge ]
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %1)
  %36 = load i32, ptr @m, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph114, label %._crit_edge115

._crit_edge115:                                   ; preds = %49, %.lr.ph118
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next162, %39
  br i1 %40, label %.lr.ph118, label %.preheader109, !llvm.loop !11

.lr.ph114:                                        ; preds = %.lr.ph118, %49
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %49 ], [ 0, %.lr.ph118 ]
  %41 = getelementptr inbounds [5000 x i8], ptr %1, i64 0, i64 %indvars.iv158
  %42 = load i8, ptr %41, align 1, !tbaa !12
  switch i8 %42, label %49 [
    i8 46, label %.sink.split
    i8 76, label %43
    i8 82, label %44
    i8 85, label %45
    i8 68, label %46
  ]

43:                                               ; preds = %.lr.ph114
  br label %.sink.split

44:                                               ; preds = %.lr.ph114
  br label %.sink.split

45:                                               ; preds = %.lr.ph114
  br label %.sink.split

46:                                               ; preds = %.lr.ph114
  br label %.sink.split

.sink.split:                                      ; preds = %.lr.ph114, %43, %45, %46, %44
  %.sink = phi i32 [ 2, %44 ], [ 4, %46 ], [ 3, %45 ], [ 1, %43 ], [ 0, %.lr.ph114 ]
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv161) #5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv158) #5
  store i32 %.sink, ptr %48, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %.sink.split, %.lr.ph114
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %50 = load i32, ptr @m, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next159, %51
  br i1 %52, label %.lr.ph114, label %._crit_edge115, !llvm.loop !13

.preheader108:                                    ; preds = %._crit_edge126, %._crit_edge.thread, %._crit_edge, %.preheader109
  %53 = phi i32 [ %38, %.preheader109 ], [ %13, %._crit_edge.thread ], [ %31, %._crit_edge ], [ %86, %._crit_edge126 ]
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph139, label %.preheader107

.lr.ph128:                                        ; preds = %.preheader109, %._crit_edge126
  %indvars.iv170 = phi i64 [ %indvars.iv.next171, %._crit_edge126 ], [ 0, %.preheader109 ]
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %indvars.iv170) #5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 0) #5
  store i32 -1, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr @m, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, 1
  br i1 %59, label %.lr.ph121, label %._crit_edge122

._crit_edge122:                                   ; preds = %79, %.lr.ph128
  %.lcssa110 = phi i32 [ %58, %.lr.ph128 ], [ %83, %79 ]
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %indvars.iv170) #5
  %61 = load i32, ptr @m, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %63) #5
  store i32 %.lcssa110, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr @m, align 4, !tbaa !5
  %66 = icmp sgt i32 %65, 1
  br i1 %66, label %.lr.ph125.preheader, label %._crit_edge126

.lr.ph125.preheader:                              ; preds = %._crit_edge122
  %67 = add nsw i32 %65, -2
  %68 = zext nneg i32 %67 to i64
  br label %.lr.ph125

.lr.ph121:                                        ; preds = %.lr.ph128, %79
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %79 ], [ 1, %.lr.ph128 ]
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv170) #5
  %70 = add nsw i64 %indvars.iv164, -1
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70) #5
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  %74 = trunc nuw nsw i64 %70 to i32
  br i1 %73, label %79, label %75

75:                                               ; preds = %.lr.ph121
  %76 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %indvars.iv170) #5
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %70) #5
  %78 = load i32, ptr %77, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %.lr.ph121, %75
  %80 = phi i32 [ %78, %75 ], [ %74, %.lr.ph121 ]
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @l, i64 noundef %indvars.iv170) #5
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %indvars.iv164) #5
  store i32 %80, ptr %82, align 4, !tbaa !5
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %83 = load i32, ptr @m, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %indvars.iv.next165, %84
  br i1 %85, label %.lr.ph121, label %._crit_edge122, !llvm.loop !14

._crit_edge126:                                   ; preds = %99, %._crit_edge122
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = icmp slt i64 %indvars.iv.next171, %87
  br i1 %88, label %.lr.ph128, label %.preheader108, !llvm.loop !15

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %99
  %indvars.iv167 = phi i64 [ %68, %.lr.ph125.preheader ], [ %indvars.iv.next168, %99 ]
  %89 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv170) #5
  %90 = add nuw nsw i64 %indvars.iv167, 1
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %90) #5
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp sgt i32 %92, 0
  %94 = trunc nuw nsw i64 %90 to i32
  br i1 %93, label %99, label %95

95:                                               ; preds = %.lr.ph125
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %indvars.iv170) #5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %90) #5
  %98 = load i32, ptr %97, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %.lr.ph125, %95
  %100 = phi i32 [ %98, %95 ], [ %94, %.lr.ph125 ]
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @r, i64 noundef %indvars.iv170) #5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %indvars.iv167) #5
  store i32 %100, ptr %102, align 4, !tbaa !5
  %indvars.iv.next168 = add nsw i64 %indvars.iv167, -1
  %103 = icmp sgt i64 %indvars.iv167, 0
  br i1 %103, label %.lr.ph125, label %._crit_edge126, !llvm.loop !16

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

.preheader107:                                    ; preds = %.preheader107.loopexit, %.preheader108
  %104 = phi i32 [ %137, %.preheader107.loopexit ], [ %54, %.preheader108 ]
  %105 = phi i32 [ %.pre, %.preheader107.loopexit ], [ %53, %.preheader108 ]
  %106 = icmp sgt i32 %105, 0
  %107 = icmp sgt i32 %104, 0
  %or.cond = and i1 %106, %107
  br i1 %or.cond, label %.preheader, label %._crit_edge150

.lr.ph139:                                        ; preds = %.preheader108, %._crit_edge137
  %indvars.iv179 = phi i64 [ %indvars.iv.next180, %._crit_edge137 ], [ 0, %.preheader108 ]
  %108 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef 0) #5
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %indvars.iv179) #5
  store i32 -1, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = icmp sgt i32 %110, 1
  br i1 %111, label %.lr.ph131, label %._crit_edge132

._crit_edge132:                                   ; preds = %130, %.lr.ph139
  %.lcssa = phi i32 [ %110, %.lr.ph139 ], [ %134, %130 ]
  %112 = add nsw i32 %.lcssa, -1
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %113) #5
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %indvars.iv179) #5
  store i32 %.lcssa, ptr %115, align 4, !tbaa !5
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 1
  br i1 %117, label %.lr.ph136.preheader, label %._crit_edge137

.lr.ph136.preheader:                              ; preds = %._crit_edge132
  %118 = add nsw i32 %116, -2
  %119 = zext nneg i32 %118 to i64
  br label %.lr.ph136

.lr.ph131:                                        ; preds = %.lr.ph139, %130
  %indvars.iv173 = phi i64 [ %indvars.iv.next174, %130 ], [ 1, %.lr.ph139 ]
  %120 = add nsw i64 %indvars.iv173, -1
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %120) #5
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %indvars.iv179) #5
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp sgt i32 %123, 0
  %125 = trunc nuw nsw i64 %120 to i32
  br i1 %124, label %130, label %126

126:                                              ; preds = %.lr.ph131
  %127 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %120) #5
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %indvars.iv179) #5
  %129 = load i32, ptr %128, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %.lr.ph131, %126
  %131 = phi i32 [ %129, %126 ], [ %125, %.lr.ph131 ]
  %132 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @u, i64 noundef %indvars.iv173) #5
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %indvars.iv179) #5
  store i32 %131, ptr %133, align 4, !tbaa !5
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %134 = load i32, ptr @n, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = icmp slt i64 %indvars.iv.next174, %135
  br i1 %136, label %.lr.ph131, label %._crit_edge132, !llvm.loop !17

._crit_edge137:                                   ; preds = %150, %._crit_edge132
  %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
  %137 = load i32, ptr @m, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = icmp slt i64 %indvars.iv.next180, %138
  br i1 %139, label %.lr.ph139, label %.preheader107.loopexit, !llvm.loop !18

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %150
  %indvars.iv176 = phi i64 [ %119, %.lr.ph136.preheader ], [ %indvars.iv.next177, %150 ]
  %140 = add nuw nsw i64 %indvars.iv176, 1
  %141 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %140) #5
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %indvars.iv179) #5
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = icmp sgt i32 %143, 0
  %145 = trunc nuw nsw i64 %140 to i32
  br i1 %144, label %150, label %146

146:                                              ; preds = %.lr.ph136
  %147 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %140) #5
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %indvars.iv179) #5
  %149 = load i32, ptr %148, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %.lr.ph136, %146
  %151 = phi i32 [ %149, %146 ], [ %145, %.lr.ph136 ]
  %152 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @d, i64 noundef %indvars.iv176) #5
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %indvars.iv179) #5
  store i32 %151, ptr %153, align 4, !tbaa !5
  %indvars.iv.next177 = add nsw i64 %indvars.iv176, -1
  %154 = icmp sgt i64 %indvars.iv176, 0
  br i1 %154, label %.lr.ph136, label %._crit_edge137, !llvm.loop !19

.preheader:                                       ; preds = %.preheader107, %._crit_edge144
  %155 = phi i32 [ %160, %._crit_edge144 ], [ %105, %.preheader107 ]
  %156 = phi i32 [ %161, %._crit_edge144 ], [ %104, %.preheader107 ]
  %indvars.iv185 = phi i64 [ %indvars.iv.next186, %._crit_edge144 ], [ 0, %.preheader107 ]
  %.088148 = phi i32 [ %.1.lcssa, %._crit_edge144 ], [ 0, %.preheader107 ]
  %.089147 = phi i32 [ %.190.lcssa, %._crit_edge144 ], [ 0, %.preheader107 ]
  %157 = icmp sgt i32 %156, 0
  br i1 %157, label %.lr.ph143, label %._crit_edge144

.lr.ph143:                                        ; preds = %.preheader
  %158 = trunc nuw nsw i64 %indvars.iv185 to i32
  br label %164

._crit_edge150:                                   ; preds = %._crit_edge144, %.preheader107
  %.089.lcssa = phi i32 [ 0, %.preheader107 ], [ %.190.lcssa, %._crit_edge144 ]
  %.088.lcssa = phi i32 [ 0, %.preheader107 ], [ %.1.lcssa, %._crit_edge144 ]
  %159 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.089.lcssa, i32 noundef %.088.lcssa)
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #5
  ret i32 0

._crit_edge144.loopexit:                          ; preds = %176
  %.pre188 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge144

._crit_edge144:                                   ; preds = %._crit_edge144.loopexit, %.preheader
  %160 = phi i32 [ %155, %.preheader ], [ %.pre188, %._crit_edge144.loopexit ]
  %161 = phi i32 [ %156, %.preheader ], [ %177, %._crit_edge144.loopexit ]
  %.190.lcssa = phi i32 [ %.089147, %.preheader ], [ %.392, %._crit_edge144.loopexit ]
  %.1.lcssa = phi i32 [ %.088148, %.preheader ], [ %.3, %._crit_edge144.loopexit ]
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %162 = sext i32 %160 to i64
  %163 = icmp slt i64 %indvars.iv.next186, %162
  br i1 %163, label %.preheader, label %._crit_edge150, !llvm.loop !20

164:                                              ; preds = %.lr.ph143, %176
  %indvars.iv182 = phi i64 [ 0, %.lr.ph143 ], [ %indvars.iv.next183, %176 ]
  %.1141 = phi i32 [ %.088148, %.lr.ph143 ], [ %.3, %176 ]
  %.190140 = phi i32 [ %.089147, %.lr.ph143 ], [ %.392, %176 ]
  %165 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv185) #5
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %165, i64 noundef %indvars.iv182) #5
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = icmp sgt i32 %167, 0
  br i1 %168, label %169, label %176

169:                                              ; preds = %164
  %170 = trunc nuw nsw i64 %indvars.iv182 to i32
  %171 = call noundef i32 @_Z3dfsii(i32 noundef %158, i32 noundef %170)
  %172 = icmp sgt i32 %171, %.190140
  br i1 %172, label %176, label %173

173:                                              ; preds = %169
  %174 = icmp eq i32 %171, %.190140
  %175 = zext i1 %174 to i32
  %spec.select = add nsw i32 %.1141, %175
  br label %176

176:                                              ; preds = %173, %169, %164
  %.392 = phi i32 [ %.190140, %164 ], [ %171, %169 ], [ %.190140, %173 ]
  %.3 = phi i32 [ %.1141, %164 ], [ 1, %169 ], [ %spec.select, %173 ]
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %177 = load i32, ptr @m, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = icmp slt i64 %indvars.iv.next183, %178
  br i1 %179, label %164, label %._crit_edge144.loopexit, !llvm.loop !22
}

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!7, !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}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !10}


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