; LLVM IR from ShahjalalShohag/code-library :: Dynamic Programming Optimizations (Subset Union of Bitsets)

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

@x = external dso_local global [200009 x i32], align 16
@y = external dso_local global [200009 x i32], align 16
@c = external dso_local global [200009 x i32], align 16
@dp = external dso_local global [1048576 x i32], align 16
@msk = external dso_local global [200009 x i32], align 16
@ans = external dso_local global [200009 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 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 i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %29

29:                                               ; preds = %43, %0
  %30 = load i32, ptr %5, align 4, !tbaa !8
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  %35 = load i32, ptr %5, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200009 x i32], ptr @x, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load i32, ptr %5, align 4, !tbaa !8
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200009 x i32], ptr @y, i64 0, i64 %40
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %41)
  br label %43

43:                                               ; preds = %34
  %44 = load i32, ptr %5, align 4, !tbaa !8
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !8
  br label %29, !llvm.loop !11

46:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %47

47:                                               ; preds = %119, %46
  %48 = load i32, ptr %6, align 4, !tbaa !8
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %55 = load i32, ptr %6, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %56
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 4 dereferenceable(4) %57)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !8
  br label %59

59:                                               ; preds = %115, %52
  %60 = load i32, ptr %10, align 4, !tbaa !8
  %61 = load i32, ptr %2, align 4, !tbaa !8
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %118

64:                                               ; preds = %59
  %65 = load i32, ptr %8, align 4, !tbaa !8
  %66 = load i32, ptr %10, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200009 x i32], ptr @x, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %70 = sub nsw i32 %65, %69
  %71 = sext i32 %70 to i64
  %72 = mul nsw i64 1, %71
  %73 = load i32, ptr %8, align 4, !tbaa !8
  %74 = load i32, ptr %10, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200009 x i32], ptr @x, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = sub nsw i32 %73, %77
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %72, %79
  %81 = load i32, ptr %9, align 4, !tbaa !8
  %82 = load i32, ptr %10, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200009 x i32], ptr @y, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !8
  %86 = sub nsw i32 %81, %85
  %87 = sext i32 %86 to i64
  %88 = mul nsw i64 1, %87
  %89 = load i32, ptr %9, align 4, !tbaa !8
  %90 = load i32, ptr %10, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200009 x i32], ptr @y, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !8
  %94 = sub nsw i32 %89, %93
  %95 = sext i32 %94 to i64
  %96 = mul nsw i64 %88, %95
  %97 = add nsw i64 %80, %96
  %98 = load i32, ptr %4, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = mul nsw i64 1, %99
  %101 = load i32, ptr %4, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = mul nsw i64 %100, %102
  %104 = icmp sle i64 %97, %103
  br i1 %104, label %105, label %114

105:                                              ; preds = %64
  %106 = load i32, ptr %6, align 4, !tbaa !8
  %107 = sub nsw i32 %106, 1
  %108 = shl i32 1, %107
  %109 = load i32, ptr %10, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = or i32 %112, %108
  store i32 %113, ptr %111, align 4, !tbaa !8
  br label %114

114:                                              ; preds = %105, %64
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %10, align 4, !tbaa !8
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %10, align 4, !tbaa !8
  br label %59, !llvm.loop !13

118:                                              ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %6, align 4, !tbaa !8
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !8
  br label %47, !llvm.loop !14

122:                                              ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %123

123:                                              ; preds = %141, %122
  %124 = load i32, ptr %11, align 4, !tbaa !8
  %125 = load i32, ptr %2, align 4, !tbaa !8
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

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

128:                                              ; preds = %123
  %129 = load i32, ptr %11, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !8
  %133 = load i32, ptr %3, align 4, !tbaa !8
  %134 = shl i32 1, %133
  %135 = sub nsw i32 %134, 1
  %136 = xor i32 %132, %135
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !8
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %138, align 4, !tbaa !8
  br label %141

141:                                              ; preds = %128
  %142 = load i32, ptr %11, align 4, !tbaa !8
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %11, align 4, !tbaa !8
  br label %123, !llvm.loop !15

144:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %145

145:                                              ; preds = %183, %144
  %146 = load i32, ptr %12, align 4, !tbaa !8
  %147 = load i32, ptr %3, align 4, !tbaa !8
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %186

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %151 = load i32, ptr %3, align 4, !tbaa !8
  %152 = shl i32 1, %151
  %153 = sub nsw i32 %152, 1
  store i32 %153, ptr %13, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %179, %150
  %155 = load i32, ptr %13, align 4, !tbaa !8
  %156 = icmp sge i32 %155, 0
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %182

158:                                              ; preds = %154
  %159 = load i32, ptr %13, align 4, !tbaa !8
  %160 = xor i32 %159, -1
  %161 = load i32, ptr %12, align 4, !tbaa !8
  %162 = ashr i32 %160, %161
  %163 = and i32 %162, 1
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %178

165:                                              ; preds = %158
  %166 = load i32, ptr %13, align 4, !tbaa !8
  %167 = load i32, ptr %12, align 4, !tbaa !8
  %168 = shl i32 1, %167
  %169 = xor i32 %166, %168
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !8
  %173 = load i32, ptr %13, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !8
  %177 = add nsw i32 %176, %172
  store i32 %177, ptr %175, align 4, !tbaa !8
  br label %178

178:                                              ; preds = %165, %158
  br label %179

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

182:                                              ; preds = %157
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %12, align 4, !tbaa !8
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %12, align 4, !tbaa !8
  br label %145, !llvm.loop !17

186:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %187

187:                                              ; preds = %196, %186
  %188 = load i32, ptr %14, align 4, !tbaa !8
  %189 = load i32, ptr %2, align 4, !tbaa !8
  %190 = icmp sle i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %199

192:                                              ; preds = %187
  %193 = load i32, ptr %14, align 4, !tbaa !8
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %194
  store i32 2000000009, ptr %195, align 4, !tbaa !8
  br label %196

196:                                              ; preds = %192
  %197 = load i32, ptr %14, align 4, !tbaa !8
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %14, align 4, !tbaa !8
  br label %187, !llvm.loop !18

199:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %200

200:                                              ; preds = %249, %199
  %201 = load i32, ptr %15, align 4, !tbaa !8
  %202 = load i32, ptr %3, align 4, !tbaa !8
  %203 = shl i32 1, %202
  %204 = icmp slt i32 %201, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %200
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %252

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %207

207:                                              ; preds = %227, %206
  %208 = load i32, ptr %17, align 4, !tbaa !8
  %209 = load i32, ptr %3, align 4, !tbaa !8
  %210 = icmp slt i32 %208, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %207
  store i32 26, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %230

212:                                              ; preds = %207
  %213 = load i32, ptr %15, align 4, !tbaa !8
  %214 = load i32, ptr %17, align 4, !tbaa !8
  %215 = ashr i32 %213, %214
  %216 = and i32 %215, 1
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %218, label %226

218:                                              ; preds = %212
  %219 = load i32, ptr %17, align 4, !tbaa !8
  %220 = add nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !8
  %224 = load i32, ptr %16, align 4, !tbaa !8
  %225 = add nsw i32 %224, %223
  store i32 %225, ptr %16, align 4, !tbaa !8
  br label %226

226:                                              ; preds = %218, %212
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %17, align 4, !tbaa !8
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %17, align 4, !tbaa !8
  br label %207, !llvm.loop !19

230:                                              ; preds = %211
  %231 = load i32, ptr %2, align 4, !tbaa !8
  %232 = load i32, ptr %15, align 4, !tbaa !8
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !8
  %236 = sub nsw i32 %231, %235
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %237
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %238, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %240 = load i32, ptr %239, align 4, !tbaa !8
  %241 = load i32, ptr %2, align 4, !tbaa !8
  %242 = load i32, ptr %15, align 4, !tbaa !8
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !8
  %246 = sub nsw i32 %241, %245
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %247
  store i32 %240, ptr %248, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %249

249:                                              ; preds = %230
  %250 = load i32, ptr %15, align 4, !tbaa !8
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %15, align 4, !tbaa !8
  br label %200, !llvm.loop !20

252:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %253 = load i32, ptr %2, align 4, !tbaa !8
  %254 = sub nsw i32 %253, 1
  store i32 %254, ptr %18, align 4, !tbaa !8
  br label %255

255:                                              ; preds = %272, %252
  %256 = load i32, ptr %18, align 4, !tbaa !8
  %257 = icmp sge i32 %256, 1
  br i1 %257, label %259, label %258

258:                                              ; preds = %255
  store i32 29, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %275

259:                                              ; preds = %255
  %260 = load i32, ptr %18, align 4, !tbaa !8
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %261
  %263 = load i32, ptr %18, align 4, !tbaa !8
  %264 = add nsw i32 %263, 1
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %265
  %267 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %262, ptr noundef nonnull align 4 dereferenceable(4) %266)
  %268 = load i32, ptr %267, align 4, !tbaa !8
  %269 = load i32, ptr %18, align 4, !tbaa !8
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %270
  store i32 %268, ptr %271, align 4, !tbaa !8
  br label %272

272:                                              ; preds = %259
  %273 = load i32, ptr %18, align 4, !tbaa !8
  %274 = add nsw i32 %273, -1
  store i32 %274, ptr %18, align 4, !tbaa !8
  br label %255, !llvm.loop !21

275:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !8
  br label %276

276:                                              ; preds = %299, %275
  %277 = load i32, ptr %19, align 4, !tbaa !8
  %278 = load i32, ptr %2, align 4, !tbaa !8
  %279 = icmp sle i32 %277, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %276
  store i32 32, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %302

281:                                              ; preds = %276
  %282 = load i32, ptr %19, align 4, !tbaa !8
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !8
  %286 = sitofp i32 %285 to double
  %287 = fcmp oeq double %286, 0x41DDCD6502400000
  br i1 %287, label %288, label %292

288:                                              ; preds = %281
  %289 = load i32, ptr %19, align 4, !tbaa !8
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %290
  store i32 -1, ptr %291, align 4, !tbaa !8
  br label %292

292:                                              ; preds = %288, %281
  %293 = load i32, ptr %19, align 4, !tbaa !8
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %294
  %296 = load i32, ptr %295, align 4, !tbaa !8
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %296)
  %298 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %297, i8 noundef signext 10)
  br label %299

299:                                              ; preds = %292
  %300 = load i32, ptr %19, align 4, !tbaa !8
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %19, align 4, !tbaa !8
  br label %276, !llvm.loop !22

302:                                              ; preds = %280
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %303 = load i32, ptr %1, align 4
  ret i32 %303
}

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

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

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.end.p0(i64 immarg, ptr nocapture) #3

; 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)) #4

; 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) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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 = { 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 #5 = { 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 #6 = { 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 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !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" }

@x = external dso_local global [200009 x i32], align 16
@y = external dso_local global [200009 x i32], align 16
@c = external dso_local global [200009 x i32], align 16
@dp = external dso_local local_unnamed_addr global [1048576 x i32], align 16
@msk = external dso_local local_unnamed_addr global [200009 x i32], align 16
@ans = external dso_local global [200009 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #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 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %13 = 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)
  %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) %2)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %16 = load i32, ptr %1, align 4, !tbaa !8
  %.not77 = icmp slt i32 %16, 1
  br i1 %.not77, label %.preheader75, label %.lr.ph

.preheader75:                                     ; preds = %.lr.ph, %0
  %17 = phi i32 [ %16, %0 ], [ %23, %.lr.ph ]
  %18 = load i32, ptr %2, align 4, !tbaa !8
  %.not6182 = icmp slt i32 %18, 1
  br i1 %.not6182, label %.preheader74, label %.lr.ph84

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %19 = getelementptr inbounds [200009 x i32], ptr @x, i64 0, i64 %indvars.iv
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %21 = getelementptr inbounds [200009 x i32], ptr @y, i64 0, i64 %indvars.iv
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %.not.not = icmp slt i64 %indvars.iv, %24
  br i1 %.not.not, label %.lr.ph, label %.preheader75, !llvm.loop !11

.preheader74:                                     ; preds = %._crit_edge, %.preheader75
  %25 = phi i32 [ %17, %.preheader75 ], [ %33, %._crit_edge ]
  %26 = phi i32 [ %18, %.preheader75 ], [ %43, %._crit_edge ]
  %.not6285 = icmp slt i32 %25, 1
  br i1 %.not6285, label %.preheader73, label %.lr.ph87

.lr.ph87:                                         ; preds = %.preheader74
  %notmask68 = shl nsw i32 -1, %26
  %27 = zext nneg i32 %25 to i64
  %xtraiter = and i64 %27, 1
  %28 = icmp eq i32 %25, 1
  br i1 %28, label %.preheader73.loopexit.unr-lcssa, label %.lr.ph87.new

.lr.ph87.new:                                     ; preds = %.lr.ph87
  %unroll_iter = and i64 %27, 2147483646
  br label %109

.lr.ph84:                                         ; preds = %.preheader75, %._crit_edge
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %._crit_edge ], [ 1, %.preheader75 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %31 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %indvars.iv117
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = load i32, ptr %1, align 4, !tbaa !8
  %.not6979 = icmp slt i32 %33, 1
  br i1 %.not6979, label %._crit_edge, label %.lr.ph81

.lr.ph81:                                         ; preds = %.lr.ph84
  %34 = load i32, ptr %4, align 4, !tbaa !8
  %35 = load i32, ptr %5, align 4, !tbaa !8
  %36 = load i32, ptr %3, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = mul nsw i64 %37, %37
  %39 = trunc i64 %indvars.iv117 to i32
  %40 = add i32 %39, -1
  %41 = shl nuw i32 1, %40
  %42 = add nuw i32 %33, 1
  %wide.trip.count = zext i32 %42 to i64
  br label %45

._crit_edge:                                      ; preds = %61, %.lr.ph84
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %.not61.not = icmp slt i64 %indvars.iv117, %44
  br i1 %.not61.not, label %.lr.ph84, label %.preheader74, !llvm.loop !13

45:                                               ; preds = %.lr.ph81, %61
  %indvars.iv114 = phi i64 [ 1, %.lr.ph81 ], [ %indvars.iv.next115, %61 ]
  %46 = getelementptr inbounds [200009 x i32], ptr @x, i64 0, i64 %indvars.iv114
  %47 = load i32, ptr %46, align 4, !tbaa !8
  %48 = sub nsw i32 %34, %47
  %49 = sext i32 %48 to i64
  %50 = mul nsw i64 %49, %49
  %51 = getelementptr inbounds [200009 x i32], ptr @y, i64 0, i64 %indvars.iv114
  %52 = load i32, ptr %51, align 4, !tbaa !8
  %53 = sub nsw i32 %35, %52
  %54 = sext i32 %53 to i64
  %55 = mul nsw i64 %54, %54
  %56 = add nuw nsw i64 %55, %50
  %.not70 = icmp ugt i64 %56, %38
  br i1 %.not70, label %61, label %57

57:                                               ; preds = %45
  %58 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %indvars.iv114
  %59 = load i32, ptr %58, align 4, !tbaa !8
  %60 = or i32 %59, %41
  store i32 %60, ptr %58, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %45, %57
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next115, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %45, !llvm.loop !14

.preheader73.loopexit.unr-lcssa:                  ; preds = %109, %.lr.ph87
  %indvars.iv120.unr = phi i64 [ 1, %.lr.ph87 ], [ %indvars.iv.next121.1, %109 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader73, label %.preheader73.loopexit.epilog-lcssa

.preheader73.loopexit.epilog-lcssa:               ; preds = %.preheader73.loopexit.unr-lcssa
  %62 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %indvars.iv120.unr
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = xor i32 %notmask68, %63
  %65 = xor i32 %64, -1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !8
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !8
  br label %.preheader73

.preheader73:                                     ; preds = %.preheader73.loopexit.epilog-lcssa, %.preheader73.loopexit.unr-lcssa, %.preheader74
  %70 = icmp sgt i32 %26, 0
  br i1 %70, label %.lr.ph91.us.preheader, label %.preheader72

.lr.ph91.us.preheader:                            ; preds = %.preheader73
  %notmask = shl nsw i32 -1, %26
  %71 = xor i32 %notmask, -1
  %72 = zext nneg i32 %71 to i64
  %73 = and i64 %72, 1
  %lcmp.mod160.not.not = icmp eq i64 %73, 0
  %74 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %72
  %indvars.iv.next126.prol = add nsw i64 %72, -1
  br label %.lr.ph91.us

.lr.ph91.us:                                      ; preds = %.lr.ph91.us.preheader, %._crit_edge92.us
  %.05593.us = phi i32 [ %108, %._crit_edge92.us ], [ 0, %.lr.ph91.us.preheader ]
  %75 = shl nuw i32 1, %.05593.us
  br i1 %lcmp.mod160.not.not, label %.prol.preheader, label %.lr.ph91.us.new

.prol.preheader:                                  ; preds = %.lr.ph91.us
  %76 = and i32 %75, %notmask
  %.not67.not.us.prol.not = icmp eq i32 %76, 0
  br i1 %.not67.not.us.prol.not, label %.lr.ph91.us.new, label %77

77:                                               ; preds = %.prol.preheader
  %78 = xor i32 %75, %71
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !8
  %82 = load i32, ptr %74, align 4, !tbaa !8
  %83 = add nsw i32 %82, %81
  store i32 %83, ptr %74, align 4, !tbaa !8
  br label %.lr.ph91.us.new

.lr.ph91.us.new:                                  ; preds = %.lr.ph91.us, %77, %.prol.preheader
  %indvars.iv125.unr = phi i64 [ %72, %.lr.ph91.us ], [ %indvars.iv.next126.prol, %77 ], [ %indvars.iv.next126.prol, %.prol.preheader ]
  br label %84

84:                                               ; preds = %106, %.lr.ph91.us.new
  %indvars.iv125 = phi i64 [ %indvars.iv125.unr, %.lr.ph91.us.new ], [ %indvars.iv.next126.1, %106 ]
  %85 = trunc nuw nsw i64 %indvars.iv125 to i32
  %86 = and i32 %75, %85
  %.not67.not.us = icmp eq i32 %86, 0
  br i1 %.not67.not.us, label %87, label %95

87:                                               ; preds = %84
  %88 = xor i32 %75, %85
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !8
  %92 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv125
  %93 = load i32, ptr %92, align 4, !tbaa !8
  %94 = add nsw i32 %93, %91
  store i32 %94, ptr %92, align 4, !tbaa !8
  br label %95

95:                                               ; preds = %87, %84
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, -1
  %96 = trunc nuw nsw i64 %indvars.iv.next126 to i32
  %97 = and i32 %75, %96
  %.not67.not.us.1 = icmp eq i32 %97, 0
  br i1 %.not67.not.us.1, label %98, label %106

98:                                               ; preds = %95
  %99 = xor i32 %75, %96
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !8
  %103 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv.next126
  %104 = load i32, ptr %103, align 4, !tbaa !8
  %105 = add nsw i32 %104, %102
  store i32 %105, ptr %103, align 4, !tbaa !8
  br label %106

106:                                              ; preds = %98, %95
  %indvars.iv.next126.1 = add nsw i64 %indvars.iv125, -2
  %107 = icmp sgt i64 %indvars.iv125, 1
  br i1 %107, label %84, label %._crit_edge92.us, !llvm.loop !15

._crit_edge92.us:                                 ; preds = %106
  %108 = add nuw nsw i32 %.05593.us, 1
  %exitcond128.not = icmp eq i32 %108, %26
  br i1 %exitcond128.not, label %.preheader72, label %.lr.ph91.us, !llvm.loop !16

109:                                              ; preds = %109, %.lr.ph87.new
  %indvars.iv120 = phi i64 [ 1, %.lr.ph87.new ], [ %indvars.iv.next121.1, %109 ]
  %niter = phi i64 [ 0, %.lr.ph87.new ], [ %niter.next.1, %109 ]
  %110 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %indvars.iv120
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = xor i32 %notmask68, %111
  %113 = xor i32 %112, -1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %115, align 4, !tbaa !8
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %118 = getelementptr inbounds [200009 x i32], ptr @msk, i64 0, i64 %indvars.iv.next121
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = xor i32 %notmask68, %119
  %121 = xor i32 %120, -1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !8
  %indvars.iv.next121.1 = add nuw nsw i64 %indvars.iv120, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader73.loopexit.unr-lcssa, label %109, !llvm.loop !17

.preheader72:                                     ; preds = %._crit_edge92.us, %.preheader73
  br i1 %.not6285, label %.preheader71, label %.lr.ph97.preheader

.lr.ph97.preheader:                               ; preds = %.preheader72
  %126 = add nuw i32 %25, 1
  %wide.trip.count132 = zext i32 %126 to i64
  %127 = zext nneg i32 %25 to i64
  %min.iters.check = icmp ult i32 %25, 8
  br i1 %min.iters.check, label %.lr.ph97.preheader155, label %vector.ph

.lr.ph97.preheader155:                            ; preds = %middle.block, %.lr.ph97.preheader
  %indvars.iv129.ph = phi i64 [ 1, %.lr.ph97.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph97

vector.ph:                                        ; preds = %.lr.ph97.preheader
  %n.vec = and i64 %127, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  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
  %128 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %offset.idx
  %129 = getelementptr inbounds i8, ptr %128, i64 16
  store <4 x i32> <i32 2000000009, i32 2000000009, i32 2000000009, i32 2000000009>, ptr %128, align 4, !tbaa !8
  store <4 x i32> <i32 2000000009, i32 2000000009, i32 2000000009, i32 2000000009>, ptr %129, align 4, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %130 = icmp eq i64 %index.next, %n.vec
  br i1 %130, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %127
  br i1 %cmp.n, label %.preheader71, label %.lr.ph97.preheader155

.preheader71:                                     ; preds = %.lr.ph97, %middle.block, %.preheader72
  %.not = icmp eq i32 %26, 31
  br i1 %.not, label %._crit_edge104, label %.lr.ph103

.lr.ph97:                                         ; preds = %.lr.ph97.preheader155, %.lr.ph97
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.lr.ph97 ], [ %indvars.iv129.ph, %.lr.ph97.preheader155 ]
  %131 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv129
  store i32 2000000009, ptr %131, align 4, !tbaa !8
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next130, %wide.trip.count132
  br i1 %exitcond133.not, label %.preheader71, label %.lr.ph97, !llvm.loop !21

._crit_edge104:                                   ; preds = %._crit_edge101, %.preheader71
  %132 = phi i32 [ %25, %.preheader71 ], [ %154, %._crit_edge101 ]
  %133 = icmp sgt i32 %132, 1
  br i1 %133, label %.lr.ph107.preheader, label %.preheader

.lr.ph107.preheader:                              ; preds = %._crit_edge104
  %134 = zext nneg i32 %132 to i64
  br label %.lr.ph107

.lr.ph103:                                        ; preds = %.preheader71, %._crit_edge101
  %135 = phi i32 [ %154, %._crit_edge101 ], [ %25, %.preheader71 ]
  %indvars.iv139 = phi i64 [ %indvars.iv.next140, %._crit_edge101 ], [ 0, %.preheader71 ]
  %136 = phi i32 [ %159, %._crit_edge101 ], [ %26, %.preheader71 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 0, ptr %6, align 4, !tbaa !8
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %.lr.ph100.preheader, label %._crit_edge101

.lr.ph100.preheader:                              ; preds = %.lr.ph103
  %wide.trip.count137 = zext nneg i32 %136 to i64
  %138 = trunc nuw nsw i64 %indvars.iv139 to i32
  %xtraiter161 = and i64 %wide.trip.count137, 1
  %139 = icmp eq i32 %136, 1
  br i1 %139, label %._crit_edge101.loopexit.unr-lcssa, label %.lr.ph100.preheader.new

.lr.ph100.preheader.new:                          ; preds = %.lr.ph100.preheader
  %unroll_iter163 = and i64 %wide.trip.count137, 2147483646
  br label %.lr.ph100

._crit_edge101.loopexit.unr-lcssa:                ; preds = %.lr.ph100._crit_edge.1, %.lr.ph100.preheader
  %indvars.iv134.unr = phi i64 [ 0, %.lr.ph100.preheader ], [ %.pre148.1, %.lr.ph100._crit_edge.1 ]
  %.unr = phi i32 [ 0, %.lr.ph100.preheader ], [ %179, %.lr.ph100._crit_edge.1 ]
  %lcmp.mod162.not = icmp eq i64 %xtraiter161, 0
  br i1 %lcmp.mod162.not, label %._crit_edge101, label %.lr.ph100.epil

.lr.ph100.epil:                                   ; preds = %._crit_edge101.loopexit.unr-lcssa
  %140 = trunc nuw nsw i64 %indvars.iv134.unr to i32
  %141 = shl nuw i32 1, %140
  %142 = and i32 %141, %138
  %.not65.epil = icmp eq i32 %142, 0
  br i1 %.not65.epil, label %._crit_edge101, label %143

143:                                              ; preds = %.lr.ph100.epil
  %.pre148.epil = add nuw nsw i64 %indvars.iv134.unr, 1
  %144 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %.pre148.epil
  %145 = load i32, ptr %144, align 4, !tbaa !8
  %146 = add nsw i32 %.unr, %145
  store i32 %146, ptr %6, align 4, !tbaa !8
  br label %._crit_edge101

._crit_edge101:                                   ; preds = %._crit_edge101.loopexit.unr-lcssa, %143, %.lr.ph100.epil, %.lr.ph103
  %147 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv139
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = sub nsw i32 %135, %148
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %150
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %151, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %153 = load i32, ptr %152, align 4, !tbaa !8
  %154 = load i32, ptr %1, align 4, !tbaa !8
  %155 = load i32, ptr %147, align 4, !tbaa !8
  %156 = sub nsw i32 %154, %155
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %157
  store i32 %153, ptr %158, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %159 = load i32, ptr %2, align 4, !tbaa !8
  %160 = shl nuw i32 1, %159
  %161 = sext i32 %160 to i64
  %162 = icmp slt i64 %indvars.iv.next140, %161
  br i1 %162, label %.lr.ph103, label %._crit_edge104, !llvm.loop !22

.lr.ph100:                                        ; preds = %.lr.ph100._crit_edge.1, %.lr.ph100.preheader.new
  %indvars.iv134 = phi i64 [ 0, %.lr.ph100.preheader.new ], [ %.pre148.1, %.lr.ph100._crit_edge.1 ]
  %163 = phi i32 [ 0, %.lr.ph100.preheader.new ], [ %179, %.lr.ph100._crit_edge.1 ]
  %niter164 = phi i64 [ 0, %.lr.ph100.preheader.new ], [ %niter164.next.1, %.lr.ph100._crit_edge.1 ]
  %164 = trunc nuw nsw i64 %indvars.iv134 to i32
  %165 = shl nuw i32 1, %164
  %166 = and i32 %165, %138
  %.not65 = icmp eq i32 %166, 0
  %.pre148 = or disjoint i64 %indvars.iv134, 1
  br i1 %.not65, label %.lr.ph100._crit_edge, label %167

167:                                              ; preds = %.lr.ph100
  %168 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %.pre148
  %169 = load i32, ptr %168, align 4, !tbaa !8
  %170 = add nsw i32 %163, %169
  store i32 %170, ptr %6, align 4, !tbaa !8
  br label %.lr.ph100._crit_edge

.lr.ph100._crit_edge:                             ; preds = %.lr.ph100, %167
  %171 = phi i32 [ %170, %167 ], [ %163, %.lr.ph100 ]
  %172 = trunc nuw nsw i64 %.pre148 to i32
  %173 = shl nuw i32 1, %172
  %174 = and i32 %173, %138
  %.not65.1 = icmp eq i32 %174, 0
  %.pre148.1 = add nuw nsw i64 %indvars.iv134, 2
  br i1 %.not65.1, label %.lr.ph100._crit_edge.1, label %175

175:                                              ; preds = %.lr.ph100._crit_edge
  %176 = getelementptr inbounds [200009 x i32], ptr @c, i64 0, i64 %.pre148.1
  %177 = load i32, ptr %176, align 8, !tbaa !8
  %178 = add nsw i32 %171, %177
  store i32 %178, ptr %6, align 4, !tbaa !8
  br label %.lr.ph100._crit_edge.1

.lr.ph100._crit_edge.1:                           ; preds = %175, %.lr.ph100._crit_edge
  %179 = phi i32 [ %178, %175 ], [ %171, %.lr.ph100._crit_edge ]
  %niter164.next.1 = add i64 %niter164, 2
  %niter164.ncmp.1 = icmp eq i64 %niter164.next.1, %unroll_iter163
  br i1 %niter164.ncmp.1, label %._crit_edge101.loopexit.unr-lcssa, label %.lr.ph100, !llvm.loop !23

.preheader.loopexit:                              ; preds = %.lr.ph107
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge104
  %180 = phi i32 [ %.pre, %.preheader.loopexit ], [ %132, %._crit_edge104 ]
  %.not64108 = icmp slt i32 %180, 1
  br i1 %.not64108, label %._crit_edge111, label %.lr.ph110

.lr.ph107:                                        ; preds = %.lr.ph107.preheader, %.lr.ph107
  %indvars.iv142 = phi i64 [ %134, %.lr.ph107.preheader ], [ %indvars.iv.next143, %.lr.ph107 ]
  %indvars.iv.next143 = add nsw i64 %indvars.iv142, -1
  %181 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv.next143
  %182 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv142
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %181, ptr noundef nonnull align 4 dereferenceable(4) %182)
  %184 = load i32, ptr %183, align 4, !tbaa !8
  store i32 %184, ptr %181, align 4, !tbaa !8
  %185 = icmp ugt i64 %indvars.iv142, 2
  br i1 %185, label %.lr.ph107, label %.preheader.loopexit, !llvm.loop !24

._crit_edge111:                                   ; preds = %190, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph110:                                        ; preds = %.preheader, %190
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %190 ], [ 1, %.preheader ]
  %186 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv145
  %187 = load i32, ptr %186, align 4, !tbaa !8
  %188 = icmp eq i32 %187, 2000000009
  br i1 %188, label %189, label %190

189:                                              ; preds = %.lr.ph110
  store i32 -1, ptr %186, align 4, !tbaa !8
  br label %190

190:                                              ; preds = %189, %.lr.ph110
  %191 = phi i32 [ -1, %189 ], [ %187, %.lr.ph110 ]
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %191)
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %192, i8 noundef signext 10)
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %194 = load i32, ptr %1, align 4, !tbaa !8
  %195 = sext i32 %194 to i64
  %.not64.not = icmp slt i64 %indvars.iv145, %195
  br i1 %.not64.not, label %.lr.ph110, label %._crit_edge111, !llvm.loop !25
}

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

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

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.end.p0(i64 immarg, ptr nocapture) #3

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

; 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 #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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 = { 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 #5 = { 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 #6 = { 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 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !12, !20, !19}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}


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