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

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

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

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@v = external dso_local global [100100 x i64], align 16
@c = external dso_local global [100100 x i64], align 16
@dp = external dso_local global [100100 x i64], align 16
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@inf = external dso_local global i64, align 8
@mx1 = external dso_local global i64, align 8
@mx2 = external dso_local global i64, align 8
@c1 = external dso_local global i32, align 4
@c2 = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %20
  %22 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %21, ptr noundef null)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %25

25:                                               ; preds = %35, %0
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %33)
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !8
  br label %25, !llvm.loop !11

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

39:                                               ; preds = %49, %38
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = load i32, ptr @n, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %52

44:                                               ; preds = %39
  %45 = load i32, ptr %3, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %46
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %47)
  br label %49

49:                                               ; preds = %44
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %3, align 4, !tbaa !8
  br label %39, !llvm.loop !13

52:                                               ; preds = %43
  br label %53

53:                                               ; preds = %283, %52
  %54 = load i32, ptr @q, align 4, !tbaa !8
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr @q, align 4, !tbaa !8
  %56 = icmp ne i32 %54, 0
  br i1 %56, label %57, label %288

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %69, %57
  %59 = load i32, ptr %4, align 4, !tbaa !8
  %60 = load i32, ptr @n, align 4, !tbaa !8
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %72

63:                                               ; preds = %58
  %64 = load i64, ptr @inf, align 8, !tbaa !14
  %65 = sub nsw i64 0, %64
  %66 = load i32, ptr %4, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !14
  br label %69

69:                                               ; preds = %63
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %4, align 4, !tbaa !8
  br label %58, !llvm.loop !16

72:                                               ; preds = %62
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) @b)
  %75 = load i64, ptr @b, align 8, !tbaa !14
  %76 = load i64, ptr @v, align 16, !tbaa !14
  %77 = mul nsw i64 %75, %76
  store i64 %77, ptr @mx1, align 8, !tbaa !14
  %78 = load i64, ptr @c, align 16, !tbaa !14
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr @c1, align 4, !tbaa !8
  %80 = load i64, ptr @mx1, align 8, !tbaa !14
  %81 = load i32, ptr @c1, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %82
  store i64 %80, ptr %83, align 8, !tbaa !14
  %84 = load i64, ptr @inf, align 8, !tbaa !14
  %85 = sub nsw i64 0, %84
  store i64 %85, ptr @mx2, align 8, !tbaa !14
  store i32 -1, ptr @c2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %280, %72
  %87 = load i32, ptr %7, align 4, !tbaa !8
  %88 = load i32, ptr @n, align 4, !tbaa !8
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %283

91:                                               ; preds = %86
  %92 = load i32, ptr %7, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !14
  %96 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !14
  %98 = load i64, ptr @inf, align 8, !tbaa !14
  %99 = sub nsw i64 0, %98
  %100 = icmp eq i64 %97, %99
  br i1 %100, label %101, label %161

101:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !14
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %103 = load i64, ptr %102, align 8, !tbaa !14
  %104 = load i64, ptr @b, align 8, !tbaa !14
  %105 = load i32, ptr %7, align 4, !tbaa !8
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !14
  %109 = mul nsw i64 %104, %108
  %110 = add nsw i64 %103, %109
  %111 = load i32, ptr %7, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !14
  %115 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %114
  store i64 %110, ptr %115, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %116 = load i32, ptr %7, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !14
  %120 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !14
  %122 = load i64, ptr @mx1, align 8, !tbaa !14
  %123 = icmp sgt i64 %121, %122
  br i1 %123, label %124, label %138

124:                                              ; preds = %101
  %125 = load i64, ptr @mx1, align 8, !tbaa !14
  store i64 %125, ptr @mx2, align 8, !tbaa !14
  %126 = load i32, ptr @c1, align 4, !tbaa !8
  store i32 %126, ptr @c2, align 4, !tbaa !8
  %127 = load i32, ptr %7, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !14
  %131 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !14
  store i64 %132, ptr @mx1, align 8, !tbaa !14
  %133 = load i32, ptr %7, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !14
  %137 = trunc i64 %136 to i32
  store i32 %137, ptr @c1, align 4, !tbaa !8
  br label %160

138:                                              ; preds = %101
  %139 = load i32, ptr %7, align 4, !tbaa !8
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !14
  %143 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !14
  %145 = load i64, ptr @mx2, align 8, !tbaa !14
  %146 = icmp sgt i64 %144, %145
  br i1 %146, label %147, label %159

147:                                              ; preds = %138
  %148 = load i32, ptr %7, align 4, !tbaa !8
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !14
  %152 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !14
  store i64 %153, ptr @mx2, align 8, !tbaa !14
  %154 = load i32, ptr %7, align 4, !tbaa !8
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %155
  %157 = load i64, ptr %156, align 8, !tbaa !14
  %158 = trunc i64 %157 to i32
  store i32 %158, ptr @c2, align 4, !tbaa !8
  br label %159

159:                                              ; preds = %147, %138
  br label %160

160:                                              ; preds = %159, %124
  br label %279

161:                                              ; preds = %91
  %162 = load i32, ptr %7, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !14
  %166 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !14
  %168 = load i64, ptr @a, align 8, !tbaa !14
  %169 = load i32, ptr %7, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !14
  %173 = mul nsw i64 %168, %172
  %174 = add nsw i64 %167, %173
  store i64 %174, ptr %5, align 8, !tbaa !14
  %175 = load i32, ptr @c1, align 4, !tbaa !8
  %176 = sext i32 %175 to i64
  %177 = load i32, ptr %7, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !14
  %181 = icmp ne i64 %176, %180
  br i1 %181, label %182, label %192

182:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !14
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %184 = load i64, ptr %183, align 8, !tbaa !14
  %185 = load i64, ptr @b, align 8, !tbaa !14
  %186 = load i32, ptr %7, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !14
  %190 = mul nsw i64 %185, %189
  %191 = add nsw i64 %184, %190
  store i64 %191, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %202

192:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !14
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx2, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %194 = load i64, ptr %193, align 8, !tbaa !14
  %195 = load i64, ptr @b, align 8, !tbaa !14
  %196 = load i32, ptr %7, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !14
  %200 = mul nsw i64 %195, %199
  %201 = add nsw i64 %194, %200
  store i64 %201, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %202

202:                                              ; preds = %192, %182
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %204 = load i64, ptr %203, align 8, !tbaa !14
  store i64 %204, ptr %5, align 8, !tbaa !14
  %205 = load i32, ptr %7, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !14
  %209 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %211 = load i64, ptr %210, align 8, !tbaa !14
  %212 = load i32, ptr %7, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %213
  %215 = load i64, ptr %214, align 8, !tbaa !14
  %216 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %215
  store i64 %211, ptr %216, align 8, !tbaa !14
  %217 = load i32, ptr @c1, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = load i32, ptr %7, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %220
  %222 = load i64, ptr %221, align 8, !tbaa !14
  %223 = icmp eq i64 %218, %222
  br i1 %223, label %224, label %231

224:                                              ; preds = %202
  %225 = load i64, ptr %5, align 8, !tbaa !14
  %226 = load i64, ptr @mx1, align 8, !tbaa !14
  %227 = icmp sgt i64 %225, %226
  br i1 %227, label %228, label %230

228:                                              ; preds = %224
  %229 = load i64, ptr %5, align 8, !tbaa !14
  store i64 %229, ptr @mx1, align 8, !tbaa !14
  br label %230

230:                                              ; preds = %228, %224
  br label %278

231:                                              ; preds = %202
  %232 = load i32, ptr @c2, align 4, !tbaa !8
  %233 = sext i32 %232 to i64
  %234 = load i32, ptr %7, align 4, !tbaa !8
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %235
  %237 = load i64, ptr %236, align 8, !tbaa !14
  %238 = icmp eq i64 %233, %237
  br i1 %238, label %239, label %251

239:                                              ; preds = %231
  %240 = load i64, ptr %5, align 8, !tbaa !14
  %241 = load i64, ptr @mx2, align 8, !tbaa !14
  %242 = icmp sgt i64 %240, %241
  br i1 %242, label %243, label %245

243:                                              ; preds = %239
  %244 = load i64, ptr %5, align 8, !tbaa !14
  store i64 %244, ptr @mx2, align 8, !tbaa !14
  br label %245

245:                                              ; preds = %243, %239
  %246 = load i64, ptr @mx2, align 8, !tbaa !14
  %247 = load i64, ptr @mx1, align 8, !tbaa !14
  %248 = icmp sgt i64 %246, %247
  br i1 %248, label %249, label %250

249:                                              ; preds = %245
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @mx2, ptr noundef nonnull align 8 dereferenceable(8) @mx1) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @c2, ptr noundef nonnull align 4 dereferenceable(4) @c1) #7
  br label %250

250:                                              ; preds = %249, %245
  br label %277

251:                                              ; preds = %231
  %252 = load i64, ptr %5, align 8, !tbaa !14
  %253 = load i64, ptr @mx1, align 8, !tbaa !14
  %254 = icmp sgt i64 %252, %253
  br i1 %254, label %255, label %264

255:                                              ; preds = %251
  %256 = load i64, ptr @mx1, align 8, !tbaa !14
  store i64 %256, ptr @mx2, align 8, !tbaa !14
  %257 = load i32, ptr @c1, align 4, !tbaa !8
  store i32 %257, ptr @c2, align 4, !tbaa !8
  %258 = load i64, ptr %5, align 8, !tbaa !14
  store i64 %258, ptr @mx1, align 8, !tbaa !14
  %259 = load i32, ptr %7, align 4, !tbaa !8
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !14
  %263 = trunc i64 %262 to i32
  store i32 %263, ptr @c1, align 4, !tbaa !8
  br label %276

264:                                              ; preds = %251
  %265 = load i64, ptr %5, align 8, !tbaa !14
  %266 = load i64, ptr @mx2, align 8, !tbaa !14
  %267 = icmp sgt i64 %265, %266
  br i1 %267, label %268, label %275

268:                                              ; preds = %264
  %269 = load i64, ptr %5, align 8, !tbaa !14
  store i64 %269, ptr @mx2, align 8, !tbaa !14
  %270 = load i32, ptr %7, align 4, !tbaa !8
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %271
  %273 = load i64, ptr %272, align 8, !tbaa !14
  %274 = trunc i64 %273 to i32
  store i32 %274, ptr @c2, align 4, !tbaa !8
  br label %275

275:                                              ; preds = %268, %264
  br label %276

276:                                              ; preds = %275, %255
  br label %277

277:                                              ; preds = %276, %250
  br label %278

278:                                              ; preds = %277, %230
  br label %279

279:                                              ; preds = %278, %160
  br label %280

280:                                              ; preds = %279
  %281 = load i32, ptr %7, align 4, !tbaa !8
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %7, align 4, !tbaa !8
  br label %86, !llvm.loop !17

283:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !14
  %284 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %285 = load i64, ptr %284, align 8, !tbaa !14
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %285)
  %287 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %286, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %53, !llvm.loop !18

288:                                              ; preds = %53
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@v = external dso_local global [100100 x i64], align 16
@c = external dso_local global [100100 x i64], align 16
@dp = external dso_local global [100100 x i64], align 16
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@inf = external dso_local local_unnamed_addr global i64, align 8
@mx1 = external dso_local global i64, align 8
@mx2 = external dso_local global i64, align 8
@c1 = external dso_local global i32, align 4
@c2 = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %15
  %17 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @q)
  %20 = load i32, ptr @n, align 4, !tbaa !8
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %.preheader44

.preheader45:                                     ; preds = %.lr.ph
  %22 = icmp sgt i32 %25, 0
  br i1 %22, label %.lr.ph48, label %.preheader44

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %indvars.iv
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !8
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %.preheader45, !llvm.loop !11

.preheader44:                                     ; preds = %.lr.ph48, %0, %.preheader45
  %28 = load i32, ptr @q, align 4, !tbaa !8
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr @q, align 4, !tbaa !8
  %.not56 = icmp eq i32 %28, 0
  br i1 %.not56, label %._crit_edge57, label %.preheader

.lr.ph48:                                         ; preds = %.preheader45, %.lr.ph48
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph48 ], [ 0, %.preheader45 ]
  %30 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %indvars.iv59
  %31 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %32 = load i32, ptr @n, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next60, %33
  br i1 %34, label %.lr.ph48, label %.preheader44, !llvm.loop !13

.preheader:                                       ; preds = %.preheader44, %._crit_edge55
  %35 = load i32, ptr @n, align 4, !tbaa !8
  %.not4249 = icmp slt i32 %35, 1
  br i1 %.not4249, label %._crit_edge, label %.lr.ph51

.lr.ph51:                                         ; preds = %.preheader
  %36 = load i64, ptr @inf, align 8, !tbaa !14
  %37 = sub nsw i64 0, %36
  %38 = add nuw i32 %35, 1
  %wide.trip.count = zext i32 %38 to i64
  %39 = zext nneg i32 %35 to i64
  %min.iters.check = icmp ult i32 %35, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph51
  %indvars.iv62.ph = phi i64 [ 1, %.lr.ph51 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph51
  %n.vec = and i64 %39, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %37, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %40 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %offset.idx
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store <2 x i64> %broadcast.splat, ptr %40, align 8, !tbaa !14
  store <2 x i64> %broadcast.splat, ptr %41, align 8, !tbaa !14
  %index.next = add nuw i64 %index, 4
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %39
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.preheader
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(8) @b)
  %45 = load i64, ptr @b, align 8, !tbaa !14
  %46 = load i64, ptr @v, align 16, !tbaa !14
  %47 = mul nsw i64 %46, %45
  store i64 %47, ptr @mx1, align 8, !tbaa !14
  %48 = load i64, ptr @c, align 16, !tbaa !14
  %49 = trunc i64 %48 to i32
  store i32 %49, ptr @c1, align 4, !tbaa !8
  %sext = shl i64 %48, 32
  %50 = ashr exact i64 %sext, 32
  %51 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %50
  store i64 %47, ptr %51, align 8, !tbaa !14
  %52 = load i64, ptr @inf, align 8, !tbaa !14
  %53 = sub nsw i64 0, %52
  store i64 %53, ptr @mx2, align 8, !tbaa !14
  store i32 -1, ptr @c2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %54 = load i32, ptr @n, align 4, !tbaa !8
  %55 = icmp sgt i32 %54, 1
  br i1 %55, label %.lr.ph54, label %._crit_edge55

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %scalar.ph ], [ %indvars.iv62.ph, %scalar.ph.preheader ]
  %56 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %indvars.iv62
  store i64 %37, ptr %56, align 8, !tbaa !14
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !19

._crit_edge55:                                    ; preds = %153, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !14
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %58 = load i64, ptr %57, align 8, !tbaa !14
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %58)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %59, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %61 = load i32, ptr @q, align 4, !tbaa !8
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr @q, align 4, !tbaa !8
  %.not = icmp eq i32 %61, 0
  br i1 %.not, label %._crit_edge57, label %.preheader, !llvm.loop !20

.lr.ph54:                                         ; preds = %._crit_edge, %153
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %153 ], [ 1, %._crit_edge ]
  %63 = getelementptr inbounds [100100 x i64], ptr @c, i64 0, i64 %indvars.iv65
  %64 = load i64, ptr %63, align 8, !tbaa !14
  %65 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !14
  %67 = load i64, ptr @inf, align 8, !tbaa !14
  %68 = sub nsw i64 0, %67
  %69 = icmp eq i64 %66, %68
  br i1 %69, label %70, label %90

70:                                               ; preds = %.lr.ph54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !14
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %72 = load i64, ptr %71, align 8, !tbaa !14
  %73 = load i64, ptr @b, align 8, !tbaa !14
  %74 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %indvars.iv65
  %75 = load i64, ptr %74, align 8, !tbaa !14
  %76 = mul nsw i64 %75, %73
  %77 = add nsw i64 %76, %72
  %78 = load i64, ptr %63, align 8, !tbaa !14
  %79 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %78
  store i64 %77, ptr %79, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %80 = load i64, ptr @mx1, align 8, !tbaa !14
  %81 = icmp sgt i64 %77, %80
  br i1 %81, label %82, label %85

82:                                               ; preds = %70
  store i64 %80, ptr @mx2, align 8, !tbaa !14
  %83 = load i32, ptr @c1, align 4, !tbaa !8
  store i32 %83, ptr @c2, align 4, !tbaa !8
  store i64 %77, ptr @mx1, align 8, !tbaa !14
  %84 = trunc i64 %78 to i32
  store i32 %84, ptr @c1, align 4, !tbaa !8
  br label %153

85:                                               ; preds = %70
  %86 = load i64, ptr @mx2, align 8, !tbaa !14
  %87 = icmp sgt i64 %77, %86
  br i1 %87, label %88, label %153

88:                                               ; preds = %85
  store i64 %77, ptr @mx2, align 8, !tbaa !14
  %89 = trunc i64 %78 to i32
  store i32 %89, ptr @c2, align 4, !tbaa !8
  br label %153

90:                                               ; preds = %.lr.ph54
  %91 = load i64, ptr @a, align 8, !tbaa !14
  %92 = getelementptr inbounds [100100 x i64], ptr @v, i64 0, i64 %indvars.iv65
  %93 = load i64, ptr %92, align 8, !tbaa !14
  %94 = mul nsw i64 %93, %91
  %95 = add nsw i64 %94, %66
  store i64 %95, ptr %1, align 8, !tbaa !14
  %96 = load i32, ptr @c1, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %.not43 = icmp eq i64 %64, %97
  br i1 %.not43, label %105, label %98

98:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr %4, align 8, !tbaa !14
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx1, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %100 = load i64, ptr %99, align 8, !tbaa !14
  %101 = load i64, ptr @b, align 8, !tbaa !14
  %102 = load i64, ptr %92, align 8, !tbaa !14
  %103 = mul nsw i64 %102, %101
  %104 = add nsw i64 %103, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %112

105:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 0, ptr %5, align 8, !tbaa !14
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx2, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %107 = load i64, ptr %106, align 8, !tbaa !14
  %108 = load i64, ptr @b, align 8, !tbaa !14
  %109 = load i64, ptr %92, align 8, !tbaa !14
  %110 = mul nsw i64 %109, %108
  %111 = add nsw i64 %110, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %112

112:                                              ; preds = %105, %98
  %.sink = phi i64 [ %111, %105 ], [ %104, %98 ]
  store i64 %.sink, ptr %2, align 8
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %114 = load i64, ptr %113, align 8, !tbaa !14
  store i64 %114, ptr %1, align 8, !tbaa !14
  %115 = load i64, ptr %63, align 8, !tbaa !14
  %116 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %115
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %118 = load i64, ptr %117, align 8, !tbaa !14
  %119 = load i64, ptr %63, align 8, !tbaa !14
  %120 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %119
  store i64 %118, ptr %120, align 8, !tbaa !14
  %121 = load i32, ptr @c1, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = icmp eq i64 %119, %122
  br i1 %123, label %124, label %129

124:                                              ; preds = %112
  %125 = load i64, ptr %1, align 8, !tbaa !14
  %126 = load i64, ptr @mx1, align 8, !tbaa !14
  %127 = icmp sgt i64 %125, %126
  br i1 %127, label %128, label %153

128:                                              ; preds = %124
  store i64 %125, ptr @mx1, align 8, !tbaa !14
  br label %153

129:                                              ; preds = %112
  %130 = load i32, ptr @c2, align 4, !tbaa !8
  %131 = sext i32 %130 to i64
  %132 = icmp eq i64 %119, %131
  %133 = load i64, ptr %1, align 8, !tbaa !14
  br i1 %132, label %134, label %143

134:                                              ; preds = %129
  %135 = load i64, ptr @mx2, align 8, !tbaa !14
  %136 = icmp sgt i64 %133, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  store i64 %133, ptr @mx2, align 8, !tbaa !14
  br label %138

138:                                              ; preds = %137, %134
  %139 = phi i64 [ %133, %137 ], [ %135, %134 ]
  %140 = load i64, ptr @mx1, align 8, !tbaa !14
  %141 = icmp sgt i64 %139, %140
  br i1 %141, label %142, label %153

142:                                              ; preds = %138
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @mx2, ptr noundef nonnull align 8 dereferenceable(8) @mx1) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @c2, ptr noundef nonnull align 4 dereferenceable(4) @c1) #7
  br label %153

143:                                              ; preds = %129
  %144 = load i64, ptr @mx1, align 8, !tbaa !14
  %145 = icmp sgt i64 %133, %144
  br i1 %145, label %146, label %148

146:                                              ; preds = %143
  store i64 %144, ptr @mx2, align 8, !tbaa !14
  store i32 %121, ptr @c2, align 4, !tbaa !8
  store i64 %133, ptr @mx1, align 8, !tbaa !14
  %147 = trunc i64 %119 to i32
  store i32 %147, ptr @c1, align 4, !tbaa !8
  br label %153

148:                                              ; preds = %143
  %149 = load i64, ptr @mx2, align 8, !tbaa !14
  %150 = icmp sgt i64 %133, %149
  br i1 %150, label %151, label %153

151:                                              ; preds = %148
  store i64 %133, ptr @mx2, align 8, !tbaa !14
  %152 = trunc i64 %119 to i32
  store i32 %152, ptr @c2, align 4, !tbaa !8
  br label %153

153:                                              ; preds = %85, %88, %82, %142, %138, %148, %151, %146, %124, %128
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %154 = load i32, ptr @n, align 4, !tbaa !8
  %155 = sext i32 %154 to i64
  %156 = icmp slt i64 %indvars.iv.next66, %155
  br i1 %156, label %.lr.ph54, label %._crit_edge55, !llvm.loop !21

._crit_edge57:                                    ; preds = %._crit_edge55, %.preheader44
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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 #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

; 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 #4 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !10, i64 0}
!16 = distinct !{!16, !12, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !12, !18, !17}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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