; LLVM IR from tangjz/acm-icpc :: codeforces/gym/100554F.ll (Z3pfsi)

; 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.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@mx = external dso_local global i32, align 4
@l = external dso_local global [51 x i32], align 16
@r = external dso_local global [51 x i32], align 16
@mu = external dso_local global [50001 x i32], align 16
@f = external dso_local global [51 x [50001 x i32]], align 16
@g = external dso_local global [51 x [50001 x i32]], align 16
@h = external dso_local global [51 x [50001 x i32]], align 16
@pre = external dso_local global [51 x [50001 x i32]], align 16
@suf = external dso_local global [51 x [50001 x i32]], align 16
@e = external dso_local global [51 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3pfsi(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %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
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %32
  %34 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %80, %1
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %83

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #7
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr %5, align 4, !tbaa !5
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %53
  %55 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #7
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %58
  %60 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #7
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  %66 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %63, ptr %65, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %69
  %71 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #7
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %71, ptr %72, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %6, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %10, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8
  %77 = call ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr %74, ptr %76)
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %79 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z3pfsi(i32 noundef %79)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %80

80:                                               ; preds = %41
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %4, align 4, !tbaa !5
  br label %36, !llvm.loop !9

83:                                               ; preds = %40
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %85
  %87 = getelementptr inbounds [50001 x i32], ptr %86, i64 0, i64 0
  %88 = getelementptr inbounds i32, ptr %87, i64 1
  %89 = load i32, ptr @mx, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = mul i64 %90, 4
  call void @llvm.memset.p0.i64(ptr align 4 %88, i8 0, i64 %91, i1 false)
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %94, label %325

94:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %96
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef 0) #7
  %99 = load i32, ptr %98, align 4, !tbaa !5
  store i32 %99, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %15, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %119, %94
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp sle i32 %105, %109
  br i1 %110, label %112, label %111

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

112:                                              ; preds = %104
  %113 = load i32, ptr %14, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %114
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [50001 x i32], ptr %115, i64 0, i64 %117
  store i32 1, ptr %118, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %112
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %15, align 4, !tbaa !5
  br label %104, !llvm.loop !11

122:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %179, %122
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %182

128:                                              ; preds = %123
  %129 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %129, ptr %13, align 4, !tbaa !5
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %131
  %133 = load i32, ptr %16, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %134) #7
  %136 = load i32, ptr %135, align 4, !tbaa !5
  store i32 %136, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %18, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %175, %128
  %142 = load i32, ptr %18, align 4, !tbaa !5
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = icmp sle i32 %142, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %141
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %178

149:                                              ; preds = %141
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %151
  %153 = load i32, ptr %18, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [50001 x i32], ptr %152, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = load i32, ptr %13, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %159
  %161 = load i32, ptr %18, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [50001 x i32], ptr %160, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = mul nsw i64 %157, %165
  %167 = srem i64 %166, 1000000007
  %168 = trunc i64 %167 to i32
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %170
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [50001 x i32], ptr %171, i64 0, i64 %173
  store i32 %168, ptr %174, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %149
  %176 = load i32, ptr %18, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %18, align 4, !tbaa !5
  br label %141, !llvm.loop !12

178:                                              ; preds = %148
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %16, align 4, !tbaa !5
  br label %123, !llvm.loop !13

182:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %183 = load i32, ptr %2, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %184
  %186 = load i32, ptr %3, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %188) #7
  %190 = load i32, ptr %189, align 4, !tbaa !5
  store i32 %190, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %191 = load i32, ptr %2, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  store i32 %194, ptr %21, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %210, %182
  %196 = load i32, ptr %21, align 4, !tbaa !5
  %197 = load i32, ptr %2, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = icmp sle i32 %196, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %195
  store i32 14, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %213

203:                                              ; preds = %195
  %204 = load i32, ptr %20, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %205
  %207 = load i32, ptr %21, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [50001 x i32], ptr %206, i64 0, i64 %208
  store i32 1, ptr %209, align 4, !tbaa !5
  br label %210

210:                                              ; preds = %203
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %21, align 4, !tbaa !5
  br label %195, !llvm.loop !14

213:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %214 = load i32, ptr %3, align 4, !tbaa !5
  %215 = sub nsw i32 %214, 2
  store i32 %215, ptr %22, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %271, %213
  %217 = load i32, ptr %22, align 4, !tbaa !5
  %218 = icmp sge i32 %217, 0
  br i1 %218, label %220, label %219

219:                                              ; preds = %216
  store i32 17, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %274

220:                                              ; preds = %216
  %221 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %221, ptr %19, align 4, !tbaa !5
  %222 = load i32, ptr %2, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %223
  %225 = load i32, ptr %22, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %224, i64 noundef %226) #7
  %228 = load i32, ptr %227, align 4, !tbaa !5
  store i32 %228, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %229 = load i32, ptr %2, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  store i32 %232, ptr %23, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %267, %220
  %234 = load i32, ptr %23, align 4, !tbaa !5
  %235 = load i32, ptr %2, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = icmp sle i32 %234, %238
  br i1 %239, label %241, label %240

240:                                              ; preds = %233
  store i32 20, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %270

241:                                              ; preds = %233
  %242 = load i32, ptr %19, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %243
  %245 = load i32, ptr %23, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [50001 x i32], ptr %244, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = load i32, ptr %19, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %251
  %253 = load i32, ptr %23, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [50001 x i32], ptr %252, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = mul nsw i64 %249, %257
  %259 = srem i64 %258, 1000000007
  %260 = trunc i64 %259 to i32
  %261 = load i32, ptr %20, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %262
  %264 = load i32, ptr %23, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [50001 x i32], ptr %263, i64 0, i64 %265
  store i32 %260, ptr %266, align 4, !tbaa !5
  br label %267

267:                                              ; preds = %241
  %268 = load i32, ptr %23, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %23, align 4, !tbaa !5
  br label %233, !llvm.loop !15

270:                                              ; preds = %240
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %22, align 4, !tbaa !5
  %273 = add nsw i32 %272, -1
  store i32 %273, ptr %22, align 4, !tbaa !5
  br label %216, !llvm.loop !16

274:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %275 = load i32, ptr %2, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !5
  store i32 %278, ptr %24, align 4, !tbaa !5
  br label %279

279:                                              ; preds = %321, %274
  %280 = load i32, ptr %24, align 4, !tbaa !5
  %281 = load i32, ptr %2, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = icmp sle i32 %280, %284
  br i1 %285, label %287, label %286

286:                                              ; preds = %279
  store i32 23, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %324

287:                                              ; preds = %279
  %288 = load i32, ptr %2, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %289
  %291 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %290, i64 noundef 0) #7
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %293
  %295 = load i32, ptr %24, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [50001 x i32], ptr %294, i64 0, i64 %296
  %298 = load i32, ptr %297, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = load i32, ptr %2, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %301
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %302, i64 noundef 0) #7
  %304 = load i32, ptr %303, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %305
  %307 = load i32, ptr %24, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [50001 x i32], ptr %306, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = mul nsw i64 %299, %311
  %313 = srem i64 %312, 1000000007
  %314 = trunc i64 %313 to i32
  %315 = load i32, ptr %2, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %316
  %318 = load i32, ptr %24, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [50001 x i32], ptr %317, i64 0, i64 %319
  store i32 %314, ptr %320, align 4, !tbaa !5
  br label %321

321:                                              ; preds = %287
  %322 = load i32, ptr %24, align 4, !tbaa !5
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %24, align 4, !tbaa !5
  br label %279, !llvm.loop !17

324:                                              ; preds = %286
  br label %349

325:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %326 = load i32, ptr %2, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %327
  %329 = load i32, ptr %328, align 4, !tbaa !5
  store i32 %329, ptr %25, align 4, !tbaa !5
  br label %330

330:                                              ; preds = %345, %325
  %331 = load i32, ptr %25, align 4, !tbaa !5
  %332 = load i32, ptr %2, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %333
  %335 = load i32, ptr %334, align 4, !tbaa !5
  %336 = icmp sle i32 %331, %335
  br i1 %336, label %338, label %337

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

338:                                              ; preds = %330
  %339 = load i32, ptr %2, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %340
  %342 = load i32, ptr %25, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [50001 x i32], ptr %341, i64 0, i64 %343
  store i32 1, ptr %344, align 4, !tbaa !5
  br label %345

345:                                              ; preds = %338
  %346 = load i32, ptr %25, align 4, !tbaa !5
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %25, align 4, !tbaa !5
  br label %330, !llvm.loop !18

348:                                              ; preds = %337
  br label %349

349:                                              ; preds = %348, %324
  %350 = load i32, ptr %2, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %351
  %353 = getelementptr inbounds [50001 x i32], ptr %352, i64 0, i64 0
  %354 = getelementptr inbounds i32, ptr %353, i64 1
  %355 = load i32, ptr %2, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %356
  %358 = getelementptr inbounds [50001 x i32], ptr %357, i64 0, i64 0
  %359 = getelementptr inbounds i32, ptr %358, i64 1
  %360 = load i32, ptr @mx, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = mul i64 %361, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %354, ptr align 4 %359, i64 %362, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %363

363:                                              ; preds = %396, %349
  %364 = load i32, ptr %26, align 4, !tbaa !5
  %365 = load i32, ptr @mx, align 4, !tbaa !5
  %366 = icmp sle i32 %364, %365
  br i1 %366, label %368, label %367

367:                                              ; preds = %363
  store i32 29, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %399

368:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %369 = load i32, ptr %26, align 4, !tbaa !5
  %370 = load i32, ptr %26, align 4, !tbaa !5
  %371 = add nsw i32 %369, %370
  store i32 %371, ptr %27, align 4, !tbaa !5
  br label %372

372:                                              ; preds = %391, %368
  %373 = load i32, ptr %27, align 4, !tbaa !5
  %374 = load i32, ptr @mx, align 4, !tbaa !5
  %375 = icmp sle i32 %373, %374
  br i1 %375, label %377, label %376

376:                                              ; preds = %372
  store i32 32, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %395

377:                                              ; preds = %372
  %378 = load i32, ptr %2, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %379
  %381 = load i32, ptr %26, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [50001 x i32], ptr %380, i64 0, i64 %382
  %384 = load i32, ptr %2, align 4, !tbaa !5
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %385
  %387 = load i32, ptr %27, align 4, !tbaa !5
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds [50001 x i32], ptr %386, i64 0, i64 %388
  %390 = load i32, ptr %389, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %383, i32 noundef %390)
  br label %391

391:                                              ; preds = %377
  %392 = load i32, ptr %26, align 4, !tbaa !5
  %393 = load i32, ptr %27, align 4, !tbaa !5
  %394 = add nsw i32 %393, %392
  store i32 %394, ptr %27, align 4, !tbaa !5
  br label %372, !llvm.loop !19

395:                                              ; preds = %376
  br label %396

396:                                              ; preds = %395
  %397 = load i32, ptr %26, align 4, !tbaa !5
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %26, align 4, !tbaa !5
  br label %363, !llvm.loop !20

399:                                              ; preds = %367
  %400 = load i32, ptr %2, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %401
  %403 = getelementptr inbounds [50001 x i32], ptr %402, i64 0, i64 0
  %404 = getelementptr inbounds i32, ptr %403, i64 1
  %405 = load i32, ptr @mx, align 4, !tbaa !5
  %406 = sext i32 %405 to i64
  %407 = mul i64 %406, 4
  call void @llvm.memset.p0.i64(ptr align 4 %404, i8 0, i64 %407, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %408

408:                                              ; preds = %479, %399
  %409 = load i32, ptr %28, align 4, !tbaa !5
  %410 = load i32, ptr @mx, align 4, !tbaa !5
  %411 = icmp sle i32 %409, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %408
  store i32 35, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %482

413:                                              ; preds = %408
  %414 = load i32, ptr %28, align 4, !tbaa !5
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [50001 x i32], ptr @mu, i64 0, i64 %415
  %417 = load i32, ptr %416, align 4, !tbaa !5
  %418 = icmp sgt i32 %417, 0
  br i1 %418, label %419, label %445

419:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %420 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %420, ptr %29, align 4, !tbaa !5
  br label %421

421:                                              ; preds = %440, %419
  %422 = load i32, ptr %29, align 4, !tbaa !5
  %423 = load i32, ptr @mx, align 4, !tbaa !5
  %424 = icmp sle i32 %422, %423
  br i1 %424, label %426, label %425

425:                                              ; preds = %421
  store i32 38, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %444

426:                                              ; preds = %421
  %427 = load i32, ptr %2, align 4, !tbaa !5
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %428
  %430 = load i32, ptr %29, align 4, !tbaa !5
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [50001 x i32], ptr %429, i64 0, i64 %431
  %433 = load i32, ptr %2, align 4, !tbaa !5
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %434
  %436 = load i32, ptr %28, align 4, !tbaa !5
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [50001 x i32], ptr %435, i64 0, i64 %437
  %439 = load i32, ptr %438, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %432, i32 noundef %439)
  br label %440

440:                                              ; preds = %426
  %441 = load i32, ptr %28, align 4, !tbaa !5
  %442 = load i32, ptr %29, align 4, !tbaa !5
  %443 = add nsw i32 %442, %441
  store i32 %443, ptr %29, align 4, !tbaa !5
  br label %421, !llvm.loop !21

444:                                              ; preds = %425
  br label %478

445:                                              ; preds = %413
  %446 = load i32, ptr %28, align 4, !tbaa !5
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [50001 x i32], ptr @mu, i64 0, i64 %447
  %449 = load i32, ptr %448, align 4, !tbaa !5
  %450 = icmp slt i32 %449, 0
  br i1 %450, label %451, label %477

451:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %452 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %452, ptr %30, align 4, !tbaa !5
  br label %453

453:                                              ; preds = %472, %451
  %454 = load i32, ptr %30, align 4, !tbaa !5
  %455 = load i32, ptr @mx, align 4, !tbaa !5
  %456 = icmp sle i32 %454, %455
  br i1 %456, label %458, label %457

457:                                              ; preds = %453
  store i32 41, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %476

458:                                              ; preds = %453
  %459 = load i32, ptr %2, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %460
  %462 = load i32, ptr %30, align 4, !tbaa !5
  %463 = sext i32 %462 to i64
  %464 = getelementptr inbounds [50001 x i32], ptr %461, i64 0, i64 %463
  %465 = load i32, ptr %2, align 4, !tbaa !5
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %466
  %468 = load i32, ptr %28, align 4, !tbaa !5
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds [50001 x i32], ptr %467, i64 0, i64 %469
  %471 = load i32, ptr %470, align 4, !tbaa !5
  call void @_Z7mod_decRii(ptr noundef nonnull align 4 dereferenceable(4) %464, i32 noundef %471)
  br label %472

472:                                              ; preds = %458
  %473 = load i32, ptr %28, align 4, !tbaa !5
  %474 = load i32, ptr %30, align 4, !tbaa !5
  %475 = add nsw i32 %474, %473
  store i32 %475, ptr %30, align 4, !tbaa !5
  br label %453, !llvm.loop !22

476:                                              ; preds = %457
  br label %477

477:                                              ; preds = %476, %445
  br label %478

478:                                              ; preds = %477, %444
  br label %479

479:                                              ; preds = %478
  %480 = load i32, ptr %28, align 4, !tbaa !5
  %481 = add nsw i32 %480, 1
  store i32 %481, ptr %28, align 4, !tbaa !5
  br label %408, !llvm.loop !23

482:                                              ; preds = %412
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void
}

; 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 i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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: mustprogress uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

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

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


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

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

@mx = external dso_local local_unnamed_addr global i32, align 4
@l = external dso_local local_unnamed_addr global [51 x i32], align 16
@r = external dso_local local_unnamed_addr global [51 x i32], align 16
@mu = external dso_local local_unnamed_addr global [50001 x i32], align 16
@f = external dso_local local_unnamed_addr global [51 x [50001 x i32]], align 16
@g = external dso_local global [51 x [50001 x i32]], align 16
@h = external dso_local global [51 x [50001 x i32]], align 16
@pre = external dso_local local_unnamed_addr global [51 x [50001 x i32]], align 16
@suf = external dso_local local_unnamed_addr global [51 x [50001 x i32]], align 16
@e = external dso_local global [51 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3pfsi(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %7 = sext i32 %0 to i64
  %8 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %7
  %9 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %1
  %12 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %7, i64 1
  %13 = load i32, ptr @mx, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = shl nsw i64 %14, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %12, i8 0, i64 %15, i1 false)
  br label %203

.lr.ph.preheader:                                 ; preds = %1
  %wide.trip.count = and i64 %9, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre230 = sext i32 %.pre to i64
  %16 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %.pre230, i64 1
  %17 = load i32, ptr @mx, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = shl nsw i64 %18, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %16, i8 0, i64 %19, i1 false)
  br i1 %11, label %34, label %203

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %21
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv) #8
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %27 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %28 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %29 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %27, ptr %28, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store ptr %29, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %30 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  store ptr %30, ptr %6, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %31 = load ptr, ptr %3, align 8
  %32 = load ptr, ptr %5, align 8
  %33 = call ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr %31, ptr %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_Z3pfsi(i32 noundef %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

34:                                               ; preds = %._crit_edge
  %35 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %.pre230
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef 0) #8
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %39
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not98118 = icmp sgt i32 %41, %43
  br i1 %.not98118, label %.preheader111, label %.lr.ph121

.lr.ph121:                                        ; preds = %34
  %44 = sext i32 %37 to i64
  %45 = sext i32 %41 to i64
  %46 = add i32 %43, 1
  %47 = sub i32 %43, %41
  %48 = zext i32 %47 to i64
  %49 = add nuw nsw i64 %48, 1
  %min.iters.check269 = icmp ult i32 %47, 7
  br i1 %min.iters.check269, label %scalar.ph268.preheader, label %vector.ph270

scalar.ph268.preheader:                           ; preds = %middle.block267, %.lr.ph121
  %indvars.iv181.ph = phi i64 [ %45, %.lr.ph121 ], [ %ind.end273, %middle.block267 ]
  br label %scalar.ph268

vector.ph270:                                     ; preds = %.lr.ph121
  %n.vec272 = and i64 %49, 8589934584
  %ind.end273 = add nsw i64 %n.vec272, %45
  br label %vector.body275

vector.body275:                                   ; preds = %vector.body275, %vector.ph270
  %index276 = phi i64 [ 0, %vector.ph270 ], [ %index.next278, %vector.body275 ]
  %offset.idx277 = add i64 %index276, %45
  %50 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %44, i64 %offset.idx277
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %50, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %51, align 4, !tbaa !5
  %index.next278 = add nuw i64 %index276, 8
  %52 = icmp eq i64 %index.next278, %n.vec272
  br i1 %52, label %middle.block267, label %vector.body275, !llvm.loop !11

middle.block267:                                  ; preds = %vector.body275
  %cmp.n279 = icmp eq i64 %49, %n.vec272
  br i1 %cmp.n279, label %.preheader111, label %scalar.ph268.preheader

.preheader111:                                    ; preds = %scalar.ph268, %middle.block267, %34
  %.not = icmp eq i32 %10, 1
  br i1 %.not, label %._crit_edge130, label %.lr.ph129.preheader

.lr.ph129.preheader:                              ; preds = %.preheader111
  %smax = call i32 @llvm.smax.i32(i32 %10, i32 2)
  %wide.trip.count194 = zext nneg i32 %smax to i64
  br label %.lr.ph129

scalar.ph268:                                     ; preds = %scalar.ph268.preheader, %scalar.ph268
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %scalar.ph268 ], [ %indvars.iv181.ph, %scalar.ph268.preheader ]
  %53 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %44, i64 %indvars.iv181
  store i32 1, ptr %53, align 4, !tbaa !5
  %indvars.iv.next182 = add nsw i64 %indvars.iv181, 1
  %lftr.wideiv184 = trunc i64 %indvars.iv.next182 to i32
  %exitcond185.not = icmp eq i32 %46, %lftr.wideiv184
  br i1 %exitcond185.not, label %.preheader111, label %scalar.ph268, !llvm.loop !14

._crit_edge130:                                   ; preds = %._crit_edge126, %.preheader111
  %.pre-phi232 = phi i64 [ %39, %.preheader111 ], [ %80, %._crit_edge126 ]
  %54 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %.pre-phi232
  %55 = add i64 %9, 4294967295
  %56 = and i64 %55, 4294967295
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #8
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %60
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %.not99131 = icmp sgt i32 %62, %64
  br i1 %.not99131, label %._crit_edge135, label %.lr.ph134

.lr.ph134:                                        ; preds = %._crit_edge130
  %65 = sext i32 %58 to i64
  %66 = sext i32 %62 to i64
  %67 = add i32 %64, 1
  %68 = sub i32 %64, %62
  %69 = zext i32 %68 to i64
  %70 = add nuw nsw i64 %69, 1
  %min.iters.check282 = icmp ult i32 %68, 7
  br i1 %min.iters.check282, label %scalar.ph281.preheader, label %vector.ph283

scalar.ph281.preheader:                           ; preds = %middle.block280, %.lr.ph134
  %indvars.iv196.ph = phi i64 [ %66, %.lr.ph134 ], [ %ind.end286, %middle.block280 ]
  br label %scalar.ph281

vector.ph283:                                     ; preds = %.lr.ph134
  %n.vec285 = and i64 %70, 8589934584
  %ind.end286 = add nsw i64 %n.vec285, %66
  br label %vector.body288

vector.body288:                                   ; preds = %vector.body288, %vector.ph283
  %index289 = phi i64 [ 0, %vector.ph283 ], [ %index.next291, %vector.body288 ]
  %offset.idx290 = add i64 %index289, %66
  %71 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %65, i64 %offset.idx290
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %71, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %72, align 4, !tbaa !5
  %index.next291 = add nuw i64 %index289, 8
  %73 = icmp eq i64 %index.next291, %n.vec285
  br i1 %73, label %middle.block280, label %vector.body288, !llvm.loop !15

middle.block280:                                  ; preds = %vector.body288
  %cmp.n292 = icmp eq i64 %70, %n.vec285
  br i1 %cmp.n292, label %._crit_edge135, label %scalar.ph281.preheader

.lr.ph129:                                        ; preds = %.lr.ph129.preheader, %._crit_edge126
  %74 = phi i32 [ %38, %.lr.ph129.preheader ], [ %79, %._crit_edge126 ]
  %indvars.iv191 = phi i64 [ 1, %.lr.ph129.preheader ], [ %indvars.iv.next192, %._crit_edge126 ]
  %.094127 = phi i32 [ %37, %.lr.ph129.preheader ], [ %78, %._crit_edge126 ]
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %75
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %indvars.iv191) #8
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %80
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %.not107122 = icmp sgt i32 %82, %84
  br i1 %.not107122, label %._crit_edge126, label %.lr.ph125

.lr.ph125:                                        ; preds = %.lr.ph129
  %85 = sext i32 %.094127 to i64
  %86 = sext i32 %78 to i64
  %87 = sext i32 %82 to i64
  %88 = add i32 %84, 1
  %89 = sub i32 %88, %82
  %xtraiter = and i32 %89, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph125
  %90 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %85, i64 %87
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %85, i64 %87
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = mul nsw i64 %95, %92
  %97 = srem i64 %96, 1000000007
  %98 = trunc nsw i64 %97 to i32
  %99 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %86, i64 %87
  store i32 %98, ptr %99, align 4, !tbaa !5
  %indvars.iv.next187.prol = add nsw i64 %87, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph125
  %indvars.iv186.unr = phi i64 [ %87, %.lr.ph125 ], [ %indvars.iv.next187.prol, %.prol.loopexit.unr-lcssa ]
  %100 = icmp eq i32 %84, %82
  br i1 %100, label %._crit_edge126, label %.lr.ph125.new

._crit_edge126:                                   ; preds = %.prol.loopexit, %.lr.ph125.new, %.lr.ph129
  %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1
  %exitcond195.not = icmp eq i64 %indvars.iv.next192, %wide.trip.count194
  br i1 %exitcond195.not, label %._crit_edge130, label %.lr.ph129, !llvm.loop !16

.lr.ph125.new:                                    ; preds = %.prol.loopexit, %.lr.ph125.new
  %indvars.iv186 = phi i64 [ %indvars.iv.next187.1, %.lr.ph125.new ], [ %indvars.iv186.unr, %.prol.loopexit ]
  %101 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %85, i64 %indvars.iv186
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %85, i64 %indvars.iv186
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = mul nsw i64 %106, %103
  %108 = srem i64 %107, 1000000007
  %109 = trunc nsw i64 %108 to i32
  %110 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %86, i64 %indvars.iv186
  store i32 %109, ptr %110, align 4, !tbaa !5
  %indvars.iv.next187 = add nsw i64 %indvars.iv186, 1
  %111 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %85, i64 %indvars.iv.next187
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %85, i64 %indvars.iv.next187
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = mul nsw i64 %116, %113
  %118 = srem i64 %117, 1000000007
  %119 = trunc nsw i64 %118 to i32
  %120 = getelementptr inbounds [51 x [50001 x i32]], ptr @pre, i64 0, i64 %86, i64 %indvars.iv.next187
  store i32 %119, ptr %120, align 4, !tbaa !5
  %indvars.iv.next187.1 = add nsw i64 %indvars.iv186, 2
  %lftr.wideiv189.1 = trunc i64 %indvars.iv.next187.1 to i32
  %exitcond190.not.1 = icmp eq i32 %88, %lftr.wideiv189.1
  br i1 %exitcond190.not.1, label %._crit_edge126, label %.lr.ph125.new, !llvm.loop !17

._crit_edge135:                                   ; preds = %scalar.ph281, %middle.block280, %._crit_edge130
  br i1 %.not, label %._crit_edge145, label %.lr.ph144.preheader

.lr.ph144.preheader:                              ; preds = %._crit_edge135
  %121 = add i64 %9, 4294967294
  %122 = and i64 %121, 4294967295
  br label %.lr.ph144

scalar.ph281:                                     ; preds = %scalar.ph281.preheader, %scalar.ph281
  %indvars.iv196 = phi i64 [ %indvars.iv.next197, %scalar.ph281 ], [ %indvars.iv196.ph, %scalar.ph281.preheader ]
  %123 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %65, i64 %indvars.iv196
  store i32 1, ptr %123, align 4, !tbaa !5
  %indvars.iv.next197 = add nsw i64 %indvars.iv196, 1
  %lftr.wideiv199 = trunc i64 %indvars.iv.next197 to i32
  %exitcond200.not = icmp eq i32 %67, %lftr.wideiv199
  br i1 %exitcond200.not, label %._crit_edge135, label %scalar.ph281, !llvm.loop !18

._crit_edge145:                                   ; preds = %._crit_edge140, %._crit_edge135
  %124 = phi i32 [ %64, %._crit_edge135 ], [ %138, %._crit_edge140 ]
  %125 = phi i32 [ %62, %._crit_edge135 ], [ %136, %._crit_edge140 ]
  %.pre-phi = phi i64 [ %60, %._crit_edge135 ], [ %134, %._crit_edge140 ]
  %126 = phi i32 [ %59, %._crit_edge135 ], [ %133, %._crit_edge140 ]
  %.not100146 = icmp sgt i32 %125, %124
  br i1 %.not100146, label %.loopexit110, label %.lr.ph149.preheader

.lr.ph149.preheader:                              ; preds = %._crit_edge145
  %127 = sext i32 %125 to i64
  br label %.lr.ph149

.lr.ph144:                                        ; preds = %.lr.ph144.preheader, %._crit_edge140
  %128 = phi i32 [ %59, %.lr.ph144.preheader ], [ %133, %._crit_edge140 ]
  %indvars.iv206 = phi i64 [ %122, %.lr.ph144.preheader ], [ %indvars.iv.next207, %._crit_edge140 ]
  %.089141 = phi i32 [ %58, %.lr.ph144.preheader ], [ %132, %._crit_edge140 ]
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %129
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %indvars.iv206) #8
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %134
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %.not106136 = icmp sgt i32 %136, %138
  br i1 %.not106136, label %._crit_edge140, label %.lr.ph139

.lr.ph139:                                        ; preds = %.lr.ph144
  %139 = sext i32 %.089141 to i64
  %140 = sext i32 %132 to i64
  %141 = sext i32 %136 to i64
  %142 = add i32 %138, 1
  %143 = sub i32 %142, %136
  %xtraiter307 = and i32 %143, 1
  %lcmp.mod308.not = icmp eq i32 %xtraiter307, 0
  br i1 %lcmp.mod308.not, label %.prol.loopexit306, label %.prol.loopexit306.unr-lcssa

.prol.loopexit306.unr-lcssa:                      ; preds = %.lr.ph139
  %144 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %139, i64 %141
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %139, i64 %141
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = mul nsw i64 %149, %146
  %151 = srem i64 %150, 1000000007
  %152 = trunc nsw i64 %151 to i32
  %153 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %140, i64 %141
  store i32 %152, ptr %153, align 4, !tbaa !5
  %indvars.iv.next202.prol = add nsw i64 %141, 1
  br label %.prol.loopexit306

.prol.loopexit306:                                ; preds = %.prol.loopexit306.unr-lcssa, %.lr.ph139
  %indvars.iv201.unr = phi i64 [ %141, %.lr.ph139 ], [ %indvars.iv.next202.prol, %.prol.loopexit306.unr-lcssa ]
  %154 = icmp eq i32 %138, %136
  br i1 %154, label %._crit_edge140, label %.lr.ph139.new

._crit_edge140:                                   ; preds = %.prol.loopexit306, %.lr.ph139.new, %.lr.ph144
  %indvars.iv.next207 = add nsw i64 %indvars.iv206, -1
  %155 = trunc nuw i64 %indvars.iv206 to i32
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %.lr.ph144, label %._crit_edge145, !llvm.loop !19

.lr.ph139.new:                                    ; preds = %.prol.loopexit306, %.lr.ph139.new
  %indvars.iv201 = phi i64 [ %indvars.iv.next202.1, %.lr.ph139.new ], [ %indvars.iv201.unr, %.prol.loopexit306 ]
  %157 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %139, i64 %indvars.iv201
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %139, i64 %indvars.iv201
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = mul nsw i64 %162, %159
  %164 = srem i64 %163, 1000000007
  %165 = trunc nsw i64 %164 to i32
  %166 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %140, i64 %indvars.iv201
  store i32 %165, ptr %166, align 4, !tbaa !5
  %indvars.iv.next202 = add nsw i64 %indvars.iv201, 1
  %167 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %139, i64 %indvars.iv.next202
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %139, i64 %indvars.iv.next202
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = mul nsw i64 %172, %169
  %174 = srem i64 %173, 1000000007
  %175 = trunc nsw i64 %174 to i32
  %176 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %140, i64 %indvars.iv.next202
  store i32 %175, ptr %176, align 4, !tbaa !5
  %indvars.iv.next202.1 = add nsw i64 %indvars.iv201, 2
  %lftr.wideiv204.1 = trunc i64 %indvars.iv.next202.1 to i32
  %exitcond205.not.1 = icmp eq i32 %142, %lftr.wideiv204.1
  br i1 %exitcond205.not.1, label %._crit_edge140, label %.lr.ph139.new, !llvm.loop !20

.lr.ph149:                                        ; preds = %.lr.ph149.preheader, %.lr.ph149
  %indvars.iv209 = phi i64 [ %127, %.lr.ph149.preheader ], [ %indvars.iv.next210, %.lr.ph149 ]
  %177 = phi i64 [ %.pre-phi, %.lr.ph149.preheader ], [ %198, %.lr.ph149 ]
  %178 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %177
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef 0) #8
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [51 x [50001 x i32]], ptr @suf, i64 0, i64 %181, i64 %indvars.iv209
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = load i32, ptr %2, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [51 x %"class.std::vector"], ptr @e, i64 0, i64 %186
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef 0) #8
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %190, i64 %indvars.iv209
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = mul nsw i64 %193, %184
  %195 = srem i64 %194, 1000000007
  %196 = trunc nsw i64 %195 to i32
  %197 = load i32, ptr %2, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %198, i64 %indvars.iv209
  store i32 %196, ptr %199, align 4, !tbaa !5
  %indvars.iv.next210 = add nsw i64 %indvars.iv209, 1
  %200 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %198
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %.not100.not = icmp slt i64 %indvars.iv209, %202
  br i1 %.not100.not, label %.lr.ph149, label %.loopexit110, !llvm.loop !21

203:                                              ; preds = %._crit_edge.thread, %._crit_edge
  %204 = phi i32 [ %0, %._crit_edge.thread ], [ %.pre, %._crit_edge ]
  %.pre-phi231241 = phi i64 [ %7, %._crit_edge.thread ], [ %.pre230, %._crit_edge ]
  %205 = getelementptr inbounds [51 x i32], ptr @l, i64 0, i64 %.pre-phi231241
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = getelementptr inbounds [51 x i32], ptr @r, i64 0, i64 %.pre-phi231241
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %.not114 = icmp sgt i32 %206, %208
  br i1 %.not114, label %.loopexit110, label %.lr.ph117.preheader

.lr.ph117.preheader:                              ; preds = %203
  %209 = sext i32 %206 to i64
  %210 = add i32 %208, 1
  %211 = sub i32 %208, %206
  %212 = zext i32 %211 to i64
  %213 = add nuw nsw i64 %212, 1
  %min.iters.check = icmp ult i32 %211, 7
  br i1 %min.iters.check, label %.lr.ph117.preheader303, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph117.preheader
  %n.vec = and i64 %213, 8589934584
  %ind.end = add nsw i64 %n.vec, %209
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %209
  %214 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %.pre-phi231241, i64 %offset.idx
  %215 = getelementptr inbounds i8, ptr %214, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %214, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %215, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %216 = icmp eq i64 %index.next, %n.vec
  br i1 %216, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %213, %n.vec
  br i1 %cmp.n, label %.loopexit110, label %.lr.ph117.preheader303

.lr.ph117.preheader303:                           ; preds = %middle.block, %.lr.ph117.preheader
  %indvars.iv177.ph = phi i64 [ %209, %.lr.ph117.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph117

.lr.ph117:                                        ; preds = %.lr.ph117.preheader303, %.lr.ph117
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %.lr.ph117 ], [ %indvars.iv177.ph, %.lr.ph117.preheader303 ]
  %217 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %.pre-phi231241, i64 %indvars.iv177
  store i32 1, ptr %217, align 4, !tbaa !5
  %indvars.iv.next178 = add nsw i64 %indvars.iv177, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next178 to i32
  %exitcond180.not = icmp eq i32 %210, %lftr.wideiv
  br i1 %exitcond180.not, label %.loopexit110, label %.lr.ph117, !llvm.loop !23

.loopexit110:                                     ; preds = %.lr.ph117, %.lr.ph149, %middle.block, %203, %._crit_edge145
  %218 = phi i32 [ %204, %203 ], [ %126, %._crit_edge145 ], [ %204, %middle.block ], [ %197, %.lr.ph149 ], [ %204, %.lr.ph117 ]
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %219, i64 1
  %221 = getelementptr inbounds [51 x [50001 x i32]], ptr @f, i64 0, i64 %219, i64 1
  %222 = load i32, ptr @mx, align 4
  %223 = sext i32 %222 to i64
  %224 = shl nsw i64 %223, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %220, ptr nonnull align 4 %221, i64 %224, i1 false)
  %.not101155 = icmp slt i32 %222, 1
  br i1 %.not101155, label %._crit_edge159.thread, label %.lr.ph158

._crit_edge159.thread:                            ; preds = %.loopexit110
  %225 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %219, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %225, i8 0, i64 %224, i1 false)
  br label %._crit_edge171

._crit_edge159:                                   ; preds = %._crit_edge154
  %.pre229 = load i32, ptr %2, align 4, !tbaa !5
  %.pre233 = sext i32 %.pre229 to i64
  %.pre236 = shl nsw i64 %.pre-phi239, 2
  %226 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %.pre233, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %226, i8 0, i64 %.pre236, i1 false)
  %.not102166 = icmp slt i32 %230, 1
  br i1 %.not102166, label %._crit_edge171, label %.lr.ph170

.lr.ph158:                                        ; preds = %.loopexit110, %._crit_edge154
  %227 = phi i32 [ %230, %._crit_edge154 ], [ %222, %.loopexit110 ]
  %indvars.iv214 = phi i64 [ %indvars.iv.next215, %._crit_edge154 ], [ 1, %.loopexit110 ]
  %indvars.iv212 = phi i64 [ %indvars.iv.next213, %._crit_edge154 ], [ 2, %.loopexit110 ]
  %228 = shl nuw nsw i64 %indvars.iv214, 1
  %229 = sext i32 %227 to i64
  %.not105150 = icmp sgt i64 %228, %229
  br i1 %.not105150, label %._crit_edge154, label %.lr.ph153

._crit_edge154.loopexit:                          ; preds = %.lr.ph153
  %.pre238 = sext i32 %236 to i64
  br label %._crit_edge154

._crit_edge154:                                   ; preds = %._crit_edge154.loopexit, %.lr.ph158
  %.pre-phi239 = phi i64 [ %.pre238, %._crit_edge154.loopexit ], [ %229, %.lr.ph158 ]
  %230 = phi i32 [ %236, %._crit_edge154.loopexit ], [ %227, %.lr.ph158 ]
  %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1
  %.not101.not = icmp slt i64 %indvars.iv214, %.pre-phi239
  %indvars.iv.next213 = add nuw nsw i64 %indvars.iv212, 2
  br i1 %.not101.not, label %.lr.ph158, label %._crit_edge159, !llvm.loop !24

.lr.ph153:                                        ; preds = %.lr.ph158, %.lr.ph153
  %indvars.iv216 = phi i64 [ %indvars.iv.next217, %.lr.ph153 ], [ %indvars.iv212, %.lr.ph158 ]
  %231 = load i32, ptr %2, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %232, i64 %indvars.iv214
  %234 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %232, i64 %indvars.iv216
  %235 = load i32, ptr %234, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %233, i32 noundef %235)
  %indvars.iv.next217 = add nuw nsw i64 %indvars.iv216, %indvars.iv214
  %236 = load i32, ptr @mx, align 4
  %237 = trunc nuw i64 %indvars.iv.next217 to i32
  %.not105 = icmp slt i32 %236, %237
  br i1 %.not105, label %._crit_edge154.loopexit, label %.lr.ph153, !llvm.loop !25

._crit_edge171:                                   ; preds = %.loopexit, %._crit_edge159.thread, %._crit_edge159
  ret void

.lr.ph170:                                        ; preds = %._crit_edge159, %.loopexit
  %238 = phi i32 [ %260, %.loopexit ], [ %230, %._crit_edge159 ]
  %indvars.iv220 = phi i64 [ %indvars.iv.next221, %.loopexit ], [ 1, %._crit_edge159 ]
  %239 = getelementptr inbounds [50001 x i32], ptr @mu, i64 0, i64 %indvars.iv220
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = icmp sgt i32 %240, 0
  br i1 %241, label %.preheader, label %250

.preheader:                                       ; preds = %.lr.ph170
  %242 = sext i32 %238 to i64
  %.not104163 = icmp sgt i64 %indvars.iv220, %242
  br i1 %.not104163, label %.loopexit, label %.lr.ph165

.lr.ph165:                                        ; preds = %.preheader, %.lr.ph165
  %indvars.iv225 = phi i64 [ %indvars.iv.next226, %.lr.ph165 ], [ %indvars.iv220, %.preheader ]
  %243 = load i32, ptr %2, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %244, i64 %indvars.iv225
  %246 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %244, i64 %indvars.iv220
  %247 = load i32, ptr %246, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %245, i32 noundef %247)
  %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, %indvars.iv220
  %248 = load i32, ptr @mx, align 4
  %249 = trunc nuw i64 %indvars.iv.next226 to i32
  %.not104 = icmp slt i32 %248, %249
  br i1 %.not104, label %.loopexit, label %.lr.ph165, !llvm.loop !26

250:                                              ; preds = %.lr.ph170
  %251 = icmp eq i32 %240, 0
  %252 = sext i32 %238 to i64
  %.not103160 = icmp sgt i64 %indvars.iv220, %252
  %or.cond = or i1 %251, %.not103160
  br i1 %or.cond, label %.loopexit, label %.lr.ph162

.lr.ph162:                                        ; preds = %250, %.lr.ph162
  %indvars.iv222 = phi i64 [ %indvars.iv.next223, %.lr.ph162 ], [ %indvars.iv220, %250 ]
  %253 = load i32, ptr %2, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [51 x [50001 x i32]], ptr @h, i64 0, i64 %254, i64 %indvars.iv222
  %256 = getelementptr inbounds [51 x [50001 x i32]], ptr @g, i64 0, i64 %254, i64 %indvars.iv220
  %257 = load i32, ptr %256, align 4, !tbaa !5
  call void @_Z7mod_decRii(ptr noundef nonnull align 4 dereferenceable(4) %255, i32 noundef %257)
  %indvars.iv.next223 = add nuw nsw i64 %indvars.iv222, %indvars.iv220
  %258 = load i32, ptr @mx, align 4
  %259 = trunc nuw i64 %indvars.iv.next223 to i32
  %.not103 = icmp slt i32 %258, %259
  br i1 %.not103, label %.loopexit, label %.lr.ph162, !llvm.loop !27

.loopexit:                                        ; preds = %.lr.ph162, %.lr.ph165, %.preheader, %250
  %260 = phi i32 [ %238, %.preheader ], [ %238, %250 ], [ %248, %.lr.ph165 ], [ %258, %.lr.ph162 ]
  %indvars.iv.next221 = add nuw nsw i64 %indvars.iv220, 1
  %261 = sext i32 %260 to i64
  %.not102.not = icmp slt i64 %indvars.iv220, %261
  br i1 %.not102.not, label %.lr.ph170, label %._crit_edge171, !llvm.loop !28
}

; 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 i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = distinct !{!15, !10, !12, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !13, !12}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !12, !13}
!23 = distinct !{!23, !10, !13, !12}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}


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