; LLVM IR from Tunghohin/Competitive_Coding :: Nowcoder/21791_I.ll (Z5solvev)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@f = external dso_local global [5005 x [5005 x i32]], align 16
@g = external dso_local global [1000005 x %"class.std::vector"], align 16
@dp = external dso_local global [1000005 x i64], align 16
@fact_up = external dso_local global [1000005 x i64], align 16
@fact_dw = external dso_local global [1000005 x i64], align 16
@l = external dso_local global [1000005 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %34, %0
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %37

20:                                               ; preds = %15
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %22
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %33)
  br label %34

34:                                               ; preds = %20
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %4, align 4, !tbaa !5
  br label %15, !llvm.loop !9

37:                                               ; preds = %19
  store i32 1, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %89, %37
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = icmp sle i32 %39, 5000
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %92

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

43:                                               ; preds = %85, %42
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = icmp sle i32 %44, 5000
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %43
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %50
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [5005 x i32], ptr %51, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %63
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [5005 x i32], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = mul nsw i64 %60, %69
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = srem i64 %70, %72
  %74 = add nsw i64 %57, %73
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = srem i64 %74, %76
  %78 = trunc i64 %77 to i32
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [5005 x i32], ptr %81, i64 0, i64 %83
  store i32 %78, ptr %84, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %47
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %7, align 4, !tbaa !5
  br label %43, !llvm.loop !11

88:                                               ; preds = %46
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %5, align 4, !tbaa !5
  br label %38, !llvm.loop !12

92:                                               ; preds = %41
  store i64 1, ptr @fact_up, align 16, !tbaa !13
  store i64 1, ptr @fact_dw, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %130, %92
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = icmp sle i32 %94, %95
  br i1 %96, label %98, label %97

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

98:                                               ; preds = %93
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !13
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = sub nsw i32 %104, %105
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %103, %108
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = srem i64 %109, %111
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %114
  store i64 %112, ptr %115, align 8, !tbaa !13
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sub nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [1000005 x i64], ptr @fact_dw, i64 0, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !13
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = mul nsw i64 %120, %122
  %124 = load i32, ptr %3, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = srem i64 %123, %125
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1000005 x i64], ptr @fact_dw, i64 0, i64 %128
  store i64 %126, ptr %129, align 8, !tbaa !13
  br label %130

130:                                              ; preds = %98
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %8, align 4, !tbaa !5
  br label %93, !llvm.loop !15

133:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %169, %133
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([1000005 x i32], ptr @l, i64 0, i64 1), ptr noundef nonnull align 4 dereferenceable(4) %2)
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp sle i32 %135, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %134
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %172

140:                                              ; preds = %134
  %141 = load i32, ptr getelementptr inbounds ([1000005 x i32], ptr @l, i64 0, i64 1), align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %142
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [5005 x i32], ptr %143, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([1000005 x %"class.std::vector"], ptr @g, i64 0, i64 1), i64 noundef %150) #5
  store i64 %148, ptr %151, align 8, !tbaa !13
  %152 = load i64, ptr getelementptr inbounds ([1000005 x i64], ptr @dp, i64 0, i64 1), align 8, !tbaa !13
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([1000005 x %"class.std::vector"], ptr @g, i64 0, i64 1), i64 noundef %154) #5
  %156 = load i64, ptr %155, align 8, !tbaa !13
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !13
  %161 = mul nsw i64 %156, %160
  %162 = load i32, ptr %3, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = srem i64 %161, %163
  %165 = add nsw i64 %152, %164
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = srem i64 %165, %167
  store i64 %168, ptr getelementptr inbounds ([1000005 x i64], ptr @dp, i64 0, i64 1), align 8, !tbaa !13
  br label %169

169:                                              ; preds = %140
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %9, align 4, !tbaa !5
  br label %134, !llvm.loop !16

172:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 2, ptr %10, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %303, %172
  %174 = load i32, ptr %10, align 4, !tbaa !5
  %175 = load i32, ptr %1, align 4, !tbaa !5
  %176 = icmp sle i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %306

178:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %179

179:                                              ; preds = %299, %178
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %182
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %183, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = icmp sle i32 %180, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %179
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %302

188:                                              ; preds = %179
  %189 = load i32, ptr %10, align 4, !tbaa !5
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = icmp sge i32 %193, %194
  br i1 %195, label %196, label %248

196:                                              ; preds = %188
  %197 = load i32, ptr %10, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %201
  %203 = load i32, ptr %11, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [5005 x i32], ptr %202, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = mul nsw i64 %207, 1
  %209 = load i32, ptr %10, align 4, !tbaa !5
  %210 = sub nsw i32 %209, 1
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %211
  %213 = load i64, ptr %212, align 8, !tbaa !13
  %214 = load i32, ptr %10, align 4, !tbaa !5
  %215 = sub nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %216
  %218 = load i32, ptr %11, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %217, i64 noundef %219) #5
  %221 = load i64, ptr %220, align 8, !tbaa !13
  %222 = load i32, ptr %11, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [1000005 x i64], ptr @fact_dw, i64 0, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !13
  %226 = mul nsw i64 %221, %225
  %227 = mul nsw i64 1, %226
  %228 = load i32, ptr %3, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = srem i64 %227, %229
  %231 = sub nsw i64 %213, %230
  %232 = load i32, ptr %3, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = add nsw i64 %231, %233
  %235 = mul nsw i64 %208, %234
  %236 = load i32, ptr %3, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = srem i64 %235, %237
  %239 = load i32, ptr %3, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = srem i64 %238, %240
  %242 = load i32, ptr %10, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %243
  %245 = load i32, ptr %11, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %244, i64 noundef %246) #5
  store i64 %241, ptr %247, align 8, !tbaa !13
  br label %275

248:                                              ; preds = %188
  %249 = load i32, ptr %10, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %253
  %255 = load i32, ptr %11, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [5005 x i32], ptr %254, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = load i32, ptr %10, align 4, !tbaa !5
  %261 = sub nsw i32 %260, 1
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %262
  %264 = load i64, ptr %263, align 8, !tbaa !13
  %265 = mul nsw i64 %259, %264
  %266 = load i32, ptr %3, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = srem i64 %265, %267
  %269 = load i32, ptr %10, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %270
  %272 = load i32, ptr %11, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %271, i64 noundef %273) #5
  store i64 %268, ptr %274, align 8, !tbaa !13
  br label %275

275:                                              ; preds = %248, %196
  %276 = load i32, ptr %10, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !13
  %280 = load i32, ptr %10, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %281
  %283 = load i32, ptr %11, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %282, i64 noundef %284) #5
  %286 = load i64, ptr %285, align 8, !tbaa !13
  %287 = load i32, ptr %11, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %288
  %290 = load i64, ptr %289, align 8, !tbaa !13
  %291 = mul nsw i64 %286, %290
  %292 = add nsw i64 %279, %291
  %293 = load i32, ptr %3, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = srem i64 %292, %294
  %296 = load i32, ptr %10, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %297
  store i64 %295, ptr %298, align 8, !tbaa !13
  br label %299

299:                                              ; preds = %275
  %300 = load i32, ptr %11, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %11, align 4, !tbaa !5
  br label %179, !llvm.loop !17

302:                                              ; preds = %187
  br label %303

303:                                              ; preds = %302
  %304 = load i32, ptr %10, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %10, align 4, !tbaa !5
  br label %173, !llvm.loop !18

306:                                              ; preds = %177
  %307 = load i32, ptr %1, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %308
  %310 = load i64, ptr %309, align 8, !tbaa !13
  %311 = load i32, ptr %3, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = srem i64 %310, %312
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %313)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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 = { "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 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 #4 = { 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 #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 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@f = external dso_local local_unnamed_addr global [5005 x [5005 x i32]], align 16
@g = external dso_local global [1000005 x %"class.std::vector"], align 16
@dp = external dso_local local_unnamed_addr global [1000005 x i64], align 16
@fact_up = external dso_local local_unnamed_addr global [1000005 x i64], align 16
@fact_dw = external dso_local local_unnamed_addr global [1000005 x i64], align 16
@l = external dso_local global [1000005 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %.not71 = icmp slt i32 %7, 1
  br i1 %.not71, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  store i32 1, ptr @f, align 16, !tbaa !5
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  br label %.preheader70

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %10 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %indvars.iv
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %12 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv
  %13 = load i32, ptr %10, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  %15 = sext i32 %14 to i64
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not.not = icmp slt i64 %indvars.iv, %17
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader70:                                     ; preds = %._crit_edge, %22
  %indvars.iv94 = phi i64 [ 1, %._crit_edge ], [ %indvars.iv.next95, %22 ]
  %18 = add nsw i64 %indvars.iv94, -1
  %.phi.trans.insert = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %18, i64 0
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %23

19:                                               ; preds = %22
  store i64 1, ptr @fact_up, align 16, !tbaa !11
  store i64 1, ptr @fact_dw, align 16, !tbaa !11
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %.not6375 = icmp slt i32 %20, 1
  br i1 %.not6375, label %.preheader69, label %.lr.ph78

.lr.ph78:                                         ; preds = %19
  %21 = add nuw i32 %20, 1
  %wide.trip.count = zext i32 %21 to i64
  br label %38

22:                                               ; preds = %23
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next95, 5001
  br i1 %exitcond97.not, label %19, label %.preheader70, !llvm.loop !13

23:                                               ; preds = %.preheader70, %23
  %24 = phi i32 [ %.pre, %.preheader70 ], [ %28, %23 ]
  %indvars.iv91 = phi i64 [ 1, %.preheader70 ], [ %indvars.iv.next92, %23 ]
  %25 = add nsw i64 %indvars.iv91, -1
  %26 = sext i32 %24 to i64
  %27 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %18, i64 %indvars.iv91
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = mul nsw i64 %25, %29
  %31 = srem i64 %30, %9
  %32 = add nsw i64 %31, %26
  %33 = srem i64 %32, %9
  %34 = trunc nsw i64 %33 to i32
  %35 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %indvars.iv94, i64 %indvars.iv91
  store i32 %34, ptr %35, align 4, !tbaa !5
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next92, 5001
  br i1 %exitcond.not, label %22, label %23, !llvm.loop !14

.preheader69:                                     ; preds = %38, %19
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @l, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %2)
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not6479 = icmp slt i32 %37, 1
  br i1 %.not6479, label %.preheader68, label %.lr.ph81

38:                                               ; preds = %.lr.ph78, %38
  %39 = phi i64 [ 1, %.lr.ph78 ], [ %49, %38 ]
  %40 = phi i64 [ 1, %.lr.ph78 ], [ %46, %38 ]
  %indvars.iv98 = phi i64 [ 1, %.lr.ph78 ], [ %indvars.iv.next99, %38 ]
  %41 = trunc i64 %indvars.iv98 to i32
  %42 = sub i32 %20, %41
  %43 = add i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = mul nsw i64 %40, %44
  %46 = srem i64 %45, %9
  %47 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %indvars.iv98
  store i64 %46, ptr %47, align 8, !tbaa !11
  %48 = mul nsw i64 %39, %indvars.iv98
  %49 = srem i64 %48, %9
  %50 = getelementptr inbounds [1000005 x i64], ptr @fact_dw, i64 0, i64 %indvars.iv98
  store i64 %49, ptr %50, align 8, !tbaa !11
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count
  br i1 %exitcond102.not, label %.preheader69, label %38, !llvm.loop !15

.preheader68:                                     ; preds = %.lr.ph81, %.preheader69
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %.not6586 = icmp slt i32 %51, 2
  br i1 %.not6586, label %.preheader68.._crit_edge88_crit_edge, label %.preheader

.preheader68.._crit_edge88_crit_edge:             ; preds = %.preheader68
  %.pre112 = sext i32 %51 to i64
  br label %._crit_edge88

.lr.ph81:                                         ; preds = %.preheader69, %.lr.ph81
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.lr.ph81 ], [ 1, %.preheader69 ]
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @l, i64 4), align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %53, i64 %indvars.iv103
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @g, i64 24), i64 noundef %indvars.iv103) #5
  store i64 %56, ptr %57, align 8, !tbaa !11
  %58 = load i64, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !11
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @g, i64 24), i64 noundef %indvars.iv103) #5
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %indvars.iv103
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = mul nsw i64 %62, %60
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = srem i64 %63, %65
  %67 = add nsw i64 %66, %58
  %68 = srem i64 %67, %65
  store i64 %68, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !11
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @l, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %2)
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %.not64.not = icmp slt i64 %indvars.iv103, %71
  br i1 %.not64.not, label %.lr.ph81, label %.preheader68, !llvm.loop !16

.preheader:                                       ; preds = %.preheader68, %._crit_edge85
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %._crit_edge85 ], [ 2, %.preheader68 ]
  %72 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %indvars.iv109
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %.not6682 = icmp slt i32 %74, 1
  br i1 %.not6682, label %._crit_edge85, label %.lr.ph84

.lr.ph84:                                         ; preds = %.preheader
  %75 = add nsw i64 %indvars.iv109, -1
  %76 = getelementptr inbounds [1000005 x i32], ptr @l, i64 0, i64 %75
  %77 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %75
  %78 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %75
  %79 = getelementptr inbounds [1000005 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv109
  %80 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %indvars.iv109
  br label %89

._crit_edge88:                                    ; preds = %._crit_edge85, %.preheader68.._crit_edge88_crit_edge
  %.pre-phi = phi i64 [ %.pre112, %.preheader68.._crit_edge88_crit_edge ], [ %88, %._crit_edge85 ]
  %81 = getelementptr inbounds [1000005 x i64], ptr @dp, i64 0, i64 %.pre-phi
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = srem i64 %82, %84
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %85)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void

._crit_edge85:                                    ; preds = %116, %.preheader
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %.not65.not = icmp slt i64 %indvars.iv109, %88
  br i1 %.not65.not, label %.preheader, label %._crit_edge88, !llvm.loop !17

89:                                               ; preds = %.lr.ph84, %116
  %indvars.iv106 = phi i64 [ 1, %.lr.ph84 ], [ %indvars.iv.next107, %116 ]
  %90 = load i32, ptr %76, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %.not67 = icmp sgt i64 %indvars.iv106, %91
  %92 = load i32, ptr %72, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [5005 x [5005 x i32]], ptr @f, i64 0, i64 %93, i64 %indvars.iv106
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = load i64, ptr %77, align 8, !tbaa !11
  br i1 %.not67, label %111, label %98

98:                                               ; preds = %89
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %indvars.iv106) #5
  %100 = load i64, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds [1000005 x i64], ptr @fact_dw, i64 0, i64 %indvars.iv106
  %102 = load i64, ptr %101, align 8, !tbaa !11
  %103 = mul nsw i64 %102, %100
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = srem i64 %103, %105
  %107 = sub i64 %97, %106
  %108 = add nsw i64 %107, %105
  %109 = mul nsw i64 %108, %96
  %110 = srem i64 %109, %105
  br label %116

111:                                              ; preds = %89
  %112 = mul nsw i64 %97, %96
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = srem i64 %112, %114
  br label %116

116:                                              ; preds = %111, %98
  %.sink = phi i64 [ %115, %111 ], [ %110, %98 ]
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %indvars.iv106) #5
  store i64 %.sink, ptr %117, align 8, !tbaa !11
  %118 = load i64, ptr %80, align 8, !tbaa !11
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %indvars.iv106) #5
  %120 = load i64, ptr %119, align 8, !tbaa !11
  %121 = getelementptr inbounds [1000005 x i64], ptr @fact_up, i64 0, i64 %indvars.iv106
  %122 = load i64, ptr %121, align 8, !tbaa !11
  %123 = mul nsw i64 %122, %120
  %124 = add nsw i64 %123, %118
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = srem i64 %124, %126
  store i64 %127, ptr %80, align 8, !tbaa !11
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %.not66.not = icmp slt i64 %indvars.iv106, %130
  br i1 %.not66.not, label %89, label %._crit_edge85, !llvm.loop !18
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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

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 = { "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 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 #4 = { 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 #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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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