; LLVM IR from kazunetakahashi/atcoder :: 2018/1222_CADDi2018 (E)

; 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
@A = external dso_local global [200010 x i64], align 16
@X = external dso_local global [200010 x i64], align 16
@imos_X = external dso_local global [200010 x i64], align 16
@ans_X = external dso_local global [200010 x i64], align 16
@B = external dso_local global [200010 x i64], align 16
@Y = external dso_local global [200010 x i64], align 16
@imos_Y = external dso_local global [200010 x i64], align 16
@ans_Y = external dso_local global [200010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxx(i64 noundef, i64 noundef) #0

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

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

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

16:                                               ; preds = %26, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

29:                                               ; preds = %20
  store i64 0, ptr @X, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %49, %29
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !11
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = call noundef i64 @_Z4calcxx(i64 noundef %40, i64 noundef %44)
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %47
  store i64 %45, ptr %48, align 8, !tbaa !11
  br label %49

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

52:                                               ; preds = %34
  store i64 0, ptr @imos_X, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %72, %52
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr @N, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %75

58:                                               ; preds = %53
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = add nsw i64 %62, %67
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %70
  store i64 %68, ptr %71, align 8, !tbaa !11
  br label %72

72:                                               ; preds = %58
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %4, align 4, !tbaa !5
  br label %53, !llvm.loop !14

75:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %76 = load i32, ptr @N, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !11
  store i64 %80, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %81 = load i32, ptr @N, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !11
  store i64 %85, ptr %6, align 8, !tbaa !11
  %86 = load i32, ptr @N, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %88
  store i64 0, ptr %89, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %90 = load i32, ptr @N, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 2
  store i32 %91, ptr %7, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %120, %75
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = icmp sge i32 %93, 0
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %123

96:                                               ; preds = %92
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %98
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %101 = load i64, ptr %100, align 8, !tbaa !11
  store i64 %101, ptr %6, align 8, !tbaa !11
  %102 = load i64, ptr %5, align 8, !tbaa !11
  %103 = load i64, ptr %6, align 8, !tbaa !11
  %104 = load i32, ptr @N, align 4, !tbaa !5
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = sub nsw i32 %104, %105
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %103, %108
  %110 = sub nsw i64 %102, %109
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %112
  store i64 %110, ptr %113, align 8, !tbaa !11
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = load i64, ptr %5, align 8, !tbaa !11
  %119 = add nsw i64 %118, %117
  store i64 %119, ptr %5, align 8, !tbaa !11
  br label %120

120:                                              ; preds = %96
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = add nsw i32 %121, -1
  store i32 %122, ptr %7, align 4, !tbaa !5
  br label %92, !llvm.loop !15

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

124:                                              ; preds = %137, %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = load i32, ptr @N, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %140

129:                                              ; preds = %124
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [200010 x i64], ptr @B, i64 0, i64 %135
  store i64 %133, ptr %136, align 8, !tbaa !11
  br label %137

137:                                              ; preds = %129
  %138 = load i32, ptr %8, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %8, align 4, !tbaa !5
  br label %124, !llvm.loop !16

140:                                              ; preds = %128
  %141 = load i32, ptr @N, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i64, ptr @B, i64 %142
  call void @_ZSt7reverseIPxEvT_S1_(ptr noundef @B, ptr noundef %143)
  store i64 0, ptr @Y, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %163, %140
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = load i32, ptr @N, align 4, !tbaa !5
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %166

149:                                              ; preds = %144
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [200010 x i64], ptr @B, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !11
  %155 = load i32, ptr %9, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [200010 x i64], ptr @B, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !11
  %159 = call noundef i64 @_Z4calcxx(i64 noundef %154, i64 noundef %158)
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %161
  store i64 %159, ptr %162, align 8, !tbaa !11
  br label %163

163:                                              ; preds = %149
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %9, align 4, !tbaa !5
  br label %144, !llvm.loop !17

166:                                              ; preds = %148
  store i64 0, ptr @imos_Y, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %186, %166
  %168 = load i32, ptr %10, align 4, !tbaa !5
  %169 = load i32, ptr @N, align 4, !tbaa !5
  %170 = icmp slt i32 %168, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %189

172:                                              ; preds = %167
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = load i32, ptr %10, align 4, !tbaa !5
  %178 = sub nsw i32 %177, 1
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %179
  %181 = load i64, ptr %180, align 8, !tbaa !11
  %182 = add nsw i64 %176, %181
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %184
  store i64 %182, ptr %185, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %172
  %187 = load i32, ptr %10, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %10, align 4, !tbaa !5
  br label %167, !llvm.loop !18

189:                                              ; preds = %171
  %190 = load i32, ptr @N, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !11
  store i64 %194, ptr %5, align 8, !tbaa !11
  %195 = load i32, ptr @N, align 4, !tbaa !5
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !11
  store i64 %199, ptr %6, align 8, !tbaa !11
  %200 = load i32, ptr @N, align 4, !tbaa !5
  %201 = sub nsw i32 %200, 1
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %202
  store i64 0, ptr %203, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %204 = load i32, ptr @N, align 4, !tbaa !5
  %205 = sub nsw i32 %204, 2
  store i32 %205, ptr %11, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %234, %189
  %207 = load i32, ptr %11, align 4, !tbaa !5
  %208 = icmp sge i32 %207, 0
  br i1 %208, label %210, label %209

209:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %237

210:                                              ; preds = %206
  %211 = load i32, ptr %11, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %212
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %215 = load i64, ptr %214, align 8, !tbaa !11
  store i64 %215, ptr %6, align 8, !tbaa !11
  %216 = load i64, ptr %5, align 8, !tbaa !11
  %217 = load i64, ptr %6, align 8, !tbaa !11
  %218 = load i32, ptr @N, align 4, !tbaa !5
  %219 = load i32, ptr %11, align 4, !tbaa !5
  %220 = sub nsw i32 %218, %219
  %221 = sub nsw i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = mul nsw i64 %217, %222
  %224 = sub nsw i64 %216, %223
  %225 = load i32, ptr %11, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %226
  store i64 %224, ptr %227, align 8, !tbaa !11
  %228 = load i32, ptr %11, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %229
  %231 = load i64, ptr %230, align 8, !tbaa !11
  %232 = load i64, ptr %5, align 8, !tbaa !11
  %233 = add nsw i64 %232, %231
  store i64 %233, ptr %5, align 8, !tbaa !11
  br label %234

234:                                              ; preds = %210
  %235 = load i32, ptr %11, align 4, !tbaa !5
  %236 = add nsw i32 %235, -1
  store i32 %236, ptr %11, align 4, !tbaa !5
  br label %206, !llvm.loop !19

237:                                              ; preds = %209
  %238 = load i32, ptr @N, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i64, ptr @ans_Y, i64 %239
  call void @_ZSt7reverseIPxEvT_S1_(ptr noundef @ans_Y, ptr noundef %240)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 10000000000000000, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %273, %237
  %242 = load i32, ptr %13, align 4, !tbaa !5
  %243 = load i32, ptr @N, align 4, !tbaa !5
  %244 = icmp sle i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %276

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %247 = load i32, ptr %13, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  store i64 %248, ptr %14, align 8, !tbaa !11
  %249 = load i32, ptr %13, align 4, !tbaa !5
  %250 = load i32, ptr @N, align 4, !tbaa !5
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %252, label %259

252:                                              ; preds = %246
  %253 = load i32, ptr %13, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !11
  %257 = load i64, ptr %14, align 8, !tbaa !11
  %258 = add nsw i64 %257, %256
  store i64 %258, ptr %14, align 8, !tbaa !11
  br label %259

259:                                              ; preds = %252, %246
  %260 = load i32, ptr %13, align 4, !tbaa !5
  %261 = icmp sgt i32 %260, 0
  br i1 %261, label %262, label %270

262:                                              ; preds = %259
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = sub nsw i32 %263, 1
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %265
  %267 = load i64, ptr %266, align 8, !tbaa !11
  %268 = load i64, ptr %14, align 8, !tbaa !11
  %269 = add nsw i64 %268, %267
  store i64 %269, ptr %14, align 8, !tbaa !11
  br label %270

270:                                              ; preds = %262, %259
  %271 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %272 = load i64, ptr %271, align 8, !tbaa !11
  store i64 %272, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %273

273:                                              ; preds = %270
  %274 = load i32, ptr %13, align 4, !tbaa !5
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %13, align 4, !tbaa !5
  br label %241, !llvm.loop !20

276:                                              ; preds = %245
  %277 = load i64, ptr %12, align 8, !tbaa !11
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %277)
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %280 = load i32, ptr %1, align 4
  ret i32 %280
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPxEvT_S1_(ptr noundef, ptr noundef) #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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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


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

%"class.std::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
@A = external dso_local global [200010 x i64], align 16
@X = external dso_local local_unnamed_addr global [200010 x i64], align 16
@imos_X = external dso_local global [200010 x i64], align 16
@ans_X = external dso_local local_unnamed_addr global [200010 x i64], align 16
@B = external dso_local global [200010 x i64], align 16
@Y = external dso_local local_unnamed_addr global [200010 x i64], align 16
@imos_Y = external dso_local global [200010 x i64], align 16
@ans_Y = external dso_local global [200010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxx(i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = 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)
  %5 = load i32, ptr @N, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  store i64 0, ptr @X, align 16, !tbaa !9
  br label %._crit_edge70.thread

._crit_edge:                                      ; preds = %.lr.ph
  store i64 0, ptr @X, align 16, !tbaa !9
  %7 = icmp sgt i32 %10, 1
  br i1 %7, label %.lr.ph69, label %._crit_edge70.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %8 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv
  %9 = 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) %8)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = icmp slt i64 %indvars.iv.next, %11
  br i1 %12, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge70.thread:                             ; preds = %._crit_edge, %._crit_edge.thread
  %.lcssa65.ph = phi i32 [ %5, %._crit_edge.thread ], [ %10, %._crit_edge ]
  store i64 0, ptr @imos_X, align 16, !tbaa !9
  %13 = add nsw i32 %.lcssa65.ph, -1
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  br label %.preheader.sink.split

._crit_edge70:                                    ; preds = %.lr.ph69
  store i64 0, ptr @imos_X, align 16, !tbaa !9
  %17 = icmp sgt i32 %32, 1
  br i1 %17, label %.lr.ph73.preheader, label %._crit_edge74.thread

._crit_edge74.thread:                             ; preds = %._crit_edge70
  %18 = add nsw i32 %32, -1
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  br label %.preheader.sink.split

.lr.ph73.preheader:                               ; preds = %._crit_edge70
  %wide.trip.count = zext nneg i32 %32 to i64
  %22 = add nsw i64 %wide.trip.count, -1
  %23 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %22, 3
  %24 = icmp ult i64 %23, 3
  br i1 %24, label %._crit_edge74.unr-lcssa, label %.lr.ph73.preheader.new

.lr.ph73.preheader.new:                           ; preds = %.lr.ph73.preheader
  %unroll_iter = and i64 %22, -4
  br label %.lr.ph73

.lr.ph69:                                         ; preds = %._crit_edge, %.lr.ph69
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph69 ], [ 1, %._crit_edge ]
  %25 = add nsw i64 %indvars.iv105, -1
  %26 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv105
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = tail call noundef i64 @_Z4calcxx(i64 noundef %27, i64 noundef %29)
  %31 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv105
  store i64 %30, ptr %31, align 8, !tbaa !9
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next106, %33
  br i1 %34, label %.lr.ph69, label %._crit_edge70, !llvm.loop !13

._crit_edge74.unr-lcssa:                          ; preds = %.lr.ph73, %.lr.ph73.preheader
  %.unr = phi i64 [ 0, %.lr.ph73.preheader ], [ %62, %.lr.ph73 ]
  %indvars.iv108.unr = phi i64 [ 1, %.lr.ph73.preheader ], [ %indvars.iv.next109.3, %.lr.ph73 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge74, label %.lr.ph73.epil

.lr.ph73.epil:                                    ; preds = %._crit_edge74.unr-lcssa, %.lr.ph73.epil
  %35 = phi i64 [ %38, %.lr.ph73.epil ], [ %.unr, %._crit_edge74.unr-lcssa ]
  %indvars.iv108.epil = phi i64 [ %indvars.iv.next109.epil, %.lr.ph73.epil ], [ %indvars.iv108.unr, %._crit_edge74.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph73.epil ], [ 0, %._crit_edge74.unr-lcssa ]
  %36 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv108.epil
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = add nsw i64 %35, %37
  %39 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv108.epil
  store i64 %38, ptr %39, align 8, !tbaa !9
  %indvars.iv.next109.epil = add nuw nsw i64 %indvars.iv108.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge74, label %.lr.ph73.epil, !llvm.loop !14

._crit_edge74:                                    ; preds = %.lr.ph73.epil, %._crit_edge74.unr-lcssa
  %40 = add nsw i32 %32, -1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 %43, ptr %1, align 8, !tbaa !9
  %44 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %41
  store i64 0, ptr %44, align 8, !tbaa !9
  br i1 %17, label %.lr.ph78.preheader, label %.preheader

.lr.ph78.preheader:                               ; preds = %._crit_edge74
  %45 = add nsw i32 %32, -2
  %46 = zext i32 %45 to i64
  br label %.lr.ph78

.lr.ph73:                                         ; preds = %.lr.ph73, %.lr.ph73.preheader.new
  %47 = phi i64 [ 0, %.lr.ph73.preheader.new ], [ %62, %.lr.ph73 ]
  %indvars.iv108 = phi i64 [ 1, %.lr.ph73.preheader.new ], [ %indvars.iv.next109.3, %.lr.ph73 ]
  %niter = phi i64 [ 0, %.lr.ph73.preheader.new ], [ %niter.next.3, %.lr.ph73 ]
  %48 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv108
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = add nsw i64 %47, %49
  %51 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv108
  store i64 %50, ptr %51, align 8, !tbaa !9
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %52 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv.next109
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = add nsw i64 %50, %53
  %55 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv.next109
  store i64 %54, ptr %55, align 8, !tbaa !9
  %indvars.iv.next109.1 = add nuw nsw i64 %indvars.iv108, 2
  %56 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv.next109.1
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = add nsw i64 %54, %57
  %59 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv.next109.1
  store i64 %58, ptr %59, align 8, !tbaa !9
  %indvars.iv.next109.2 = add nuw nsw i64 %indvars.iv108, 3
  %60 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %indvars.iv.next109.2
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = add nsw i64 %58, %61
  %63 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv.next109.2
  store i64 %62, ptr %63, align 8, !tbaa !9
  %indvars.iv.next109.3 = add nuw nsw i64 %indvars.iv108, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge74.unr-lcssa, label %.lr.ph73, !llvm.loop !16

.preheader.sink.split:                            ; preds = %._crit_edge74.thread, %._crit_edge70.thread
  %storemerge = phi i64 [ %16, %._crit_edge70.thread ], [ %21, %._crit_edge74.thread ]
  %.sink145 = phi i64 [ %14, %._crit_edge70.thread ], [ %19, %._crit_edge74.thread ]
  %.ph = phi i32 [ %.lcssa65.ph, %._crit_edge70.thread ], [ %32, %._crit_edge74.thread ]
  store i64 %storemerge, ptr %1, align 8, !tbaa !9
  %64 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %.sink145
  store i64 0, ptr %64, align 8, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph78, %.preheader.sink.split, %._crit_edge74
  %65 = phi i32 [ %32, %._crit_edge74 ], [ %.ph, %.preheader.sink.split ], [ %72, %.lr.ph78 ]
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.lr.ph80.preheader, label %._crit_edge81

.lr.ph80.preheader:                               ; preds = %.preheader
  %67 = zext nneg i32 %65 to i64
  %68 = shl nuw nsw i64 %67, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @B, ptr nonnull align 16 @A, i64 %68, i1 false), !tbaa !9
  br label %._crit_edge81

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %.lr.ph78
  %indvars.iv111 = phi i64 [ %46, %.lr.ph78.preheader ], [ %indvars.iv.next112, %.lr.ph78 ]
  %.05675 = phi i64 [ %43, %.lr.ph78.preheader ], [ %81, %.lr.ph78 ]
  %69 = getelementptr inbounds [200010 x i64], ptr @imos_X, i64 0, i64 %indvars.iv111
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %71 = load i64, ptr %70, align 8, !tbaa !9
  store i64 %71, ptr %1, align 8, !tbaa !9
  %72 = load i32, ptr @N, align 4, !tbaa !5
  %73 = trunc nuw nsw i64 %indvars.iv111 to i32
  %74 = xor i32 %73, -1
  %75 = add i32 %72, %74
  %76 = sext i32 %75 to i64
  %77 = mul nsw i64 %71, %76
  %78 = sub nsw i64 %.05675, %77
  %79 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %indvars.iv111
  store i64 %78, ptr %79, align 8, !tbaa !9
  %80 = load i64, ptr %69, align 8, !tbaa !9
  %81 = add nsw i64 %80, %.05675
  %indvars.iv.next112 = add nsw i64 %indvars.iv111, -1
  %.not146 = icmp eq i64 %indvars.iv111, 0
  br i1 %.not146, label %.preheader, label %.lr.ph78, !llvm.loop !17

._crit_edge81:                                    ; preds = %.lr.ph80.preheader, %.preheader
  %82 = sext i32 %65 to i64
  %83 = getelementptr inbounds i64, ptr @B, i64 %82
  call void @_ZSt7reverseIPxEvT_S1_(ptr noundef nonnull @B, ptr noundef nonnull %83)
  store i64 0, ptr @Y, align 16, !tbaa !9
  %84 = load i32, ptr @N, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 1
  br i1 %85, label %.lr.ph85, label %._crit_edge86.thread

._crit_edge86.thread:                             ; preds = %._crit_edge81
  store i64 0, ptr @imos_Y, align 16, !tbaa !9
  br label %._crit_edge91.thread

._crit_edge86:                                    ; preds = %.lr.ph85
  store i64 0, ptr @imos_Y, align 16, !tbaa !9
  %86 = icmp sgt i32 %97, 1
  br i1 %86, label %.lr.ph90.preheader, label %._crit_edge91.thread

.lr.ph90.preheader:                               ; preds = %._crit_edge86
  %wide.trip.count123 = zext nneg i32 %97 to i64
  %87 = add nsw i64 %wide.trip.count123, -1
  %88 = add nsw i64 %wide.trip.count123, -2
  %xtraiter160 = and i64 %87, 3
  %89 = icmp ult i64 %88, 3
  br i1 %89, label %._crit_edge91.unr-lcssa, label %.lr.ph90.preheader.new

.lr.ph90.preheader.new:                           ; preds = %.lr.ph90.preheader
  %unroll_iter164 = and i64 %87, -4
  br label %.lr.ph90

.lr.ph85:                                         ; preds = %._crit_edge81, %.lr.ph85
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.lr.ph85 ], [ 1, %._crit_edge81 ]
  %90 = add nsw i64 %indvars.iv117, -1
  %91 = getelementptr inbounds [200010 x i64], ptr @B, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds [200010 x i64], ptr @B, i64 0, i64 %indvars.iv117
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = call noundef i64 @_Z4calcxx(i64 noundef %92, i64 noundef %94)
  %96 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv117
  store i64 %95, ptr %96, align 8, !tbaa !9
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %97 = load i32, ptr @N, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next118, %98
  br i1 %99, label %.lr.ph85, label %._crit_edge86, !llvm.loop !18

._crit_edge91.thread:                             ; preds = %._crit_edge86.thread, %._crit_edge86
  %.lcssa138.ph = phi i32 [ %97, %._crit_edge86 ], [ %84, %._crit_edge86.thread ]
  %100 = add nsw i32 %.lcssa138.ph, -1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !9
  store i64 %103, ptr %1, align 8, !tbaa !9
  %104 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %101
  store i64 0, ptr %104, align 8, !tbaa !9
  br label %._crit_edge96

._crit_edge91.unr-lcssa:                          ; preds = %.lr.ph90, %.lr.ph90.preheader
  %.unr162 = phi i64 [ 0, %.lr.ph90.preheader ], [ %132, %.lr.ph90 ]
  %indvars.iv120.unr = phi i64 [ 1, %.lr.ph90.preheader ], [ %indvars.iv.next121.3, %.lr.ph90 ]
  %lcmp.mod163.not = icmp eq i64 %xtraiter160, 0
  br i1 %lcmp.mod163.not, label %._crit_edge91, label %.lr.ph90.epil

.lr.ph90.epil:                                    ; preds = %._crit_edge91.unr-lcssa, %.lr.ph90.epil
  %105 = phi i64 [ %108, %.lr.ph90.epil ], [ %.unr162, %._crit_edge91.unr-lcssa ]
  %indvars.iv120.epil = phi i64 [ %indvars.iv.next121.epil, %.lr.ph90.epil ], [ %indvars.iv120.unr, %._crit_edge91.unr-lcssa ]
  %epil.iter161 = phi i64 [ %epil.iter161.next, %.lr.ph90.epil ], [ 0, %._crit_edge91.unr-lcssa ]
  %106 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv120.epil
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = add nsw i64 %105, %107
  %109 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv120.epil
  store i64 %108, ptr %109, align 8, !tbaa !9
  %indvars.iv.next121.epil = add nuw nsw i64 %indvars.iv120.epil, 1
  %epil.iter161.next = add i64 %epil.iter161, 1
  %epil.iter161.cmp.not = icmp eq i64 %epil.iter161.next, %xtraiter160
  br i1 %epil.iter161.cmp.not, label %._crit_edge91, label %.lr.ph90.epil, !llvm.loop !19

._crit_edge91:                                    ; preds = %.lr.ph90.epil, %._crit_edge91.unr-lcssa
  %110 = add nsw i32 %97, -1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !9
  store i64 %113, ptr %1, align 8, !tbaa !9
  %114 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %111
  store i64 0, ptr %114, align 8, !tbaa !9
  br i1 %86, label %.lr.ph95.preheader, label %._crit_edge96

.lr.ph95.preheader:                               ; preds = %._crit_edge91
  %115 = add nsw i32 %97, -2
  %116 = zext i32 %115 to i64
  br label %.lr.ph95

.lr.ph90:                                         ; preds = %.lr.ph90, %.lr.ph90.preheader.new
  %117 = phi i64 [ 0, %.lr.ph90.preheader.new ], [ %132, %.lr.ph90 ]
  %indvars.iv120 = phi i64 [ 1, %.lr.ph90.preheader.new ], [ %indvars.iv.next121.3, %.lr.ph90 ]
  %niter165 = phi i64 [ 0, %.lr.ph90.preheader.new ], [ %niter165.next.3, %.lr.ph90 ]
  %118 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv120
  %119 = load i64, ptr %118, align 8, !tbaa !9
  %120 = add nsw i64 %117, %119
  %121 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv120
  store i64 %120, ptr %121, align 8, !tbaa !9
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %122 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv.next121
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = add nsw i64 %120, %123
  %125 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv.next121
  store i64 %124, ptr %125, align 8, !tbaa !9
  %indvars.iv.next121.1 = add nuw nsw i64 %indvars.iv120, 2
  %126 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv.next121.1
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = add nsw i64 %124, %127
  %129 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv.next121.1
  store i64 %128, ptr %129, align 8, !tbaa !9
  %indvars.iv.next121.2 = add nuw nsw i64 %indvars.iv120, 3
  %130 = getelementptr inbounds [200010 x i64], ptr @Y, i64 0, i64 %indvars.iv.next121.2
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = add nsw i64 %128, %131
  %133 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv.next121.2
  store i64 %132, ptr %133, align 8, !tbaa !9
  %indvars.iv.next121.3 = add nuw nsw i64 %indvars.iv120, 4
  %niter165.next.3 = add i64 %niter165, 4
  %niter165.ncmp.3 = icmp eq i64 %niter165.next.3, %unroll_iter164
  br i1 %niter165.ncmp.3, label %._crit_edge91.unr-lcssa, label %.lr.ph90, !llvm.loop !20

._crit_edge96:                                    ; preds = %.lr.ph95, %._crit_edge91.thread, %._crit_edge91
  %134 = phi i32 [ %97, %._crit_edge91 ], [ %.lcssa138.ph, %._crit_edge91.thread ], [ %147, %.lr.ph95 ]
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i64, ptr @ans_Y, i64 %135
  call void @_ZSt7reverseIPxEvT_S1_(ptr noundef nonnull @ans_Y, ptr noundef nonnull %136)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store i64 10000000000000000, ptr %2, align 8, !tbaa !9
  %137 = load i32, ptr @N, align 4, !tbaa !5
  %.not97 = icmp slt i32 %137, 0
  br i1 %.not97, label %._crit_edge101, label %.lr.ph100.preheader

.lr.ph100.preheader:                              ; preds = %._crit_edge96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store i64 0, ptr %3, align 8, !tbaa !9
  %.not = icmp eq i32 %137, 0
  br i1 %.not, label %140, label %138

138:                                              ; preds = %.lr.ph100.preheader
  %139 = load i64, ptr @ans_X, align 16, !tbaa !9
  store i64 %139, ptr %3, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %.lr.ph100.preheader, %138
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %142 = load i64, ptr %141, align 8, !tbaa !9
  store i64 %142, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %143 = load i32, ptr @N, align 4, !tbaa !5
  %.not.not.peel = icmp sgt i32 %143, 0
  br i1 %.not.not.peel, label %.lr.ph100, label %._crit_edge101

.lr.ph95:                                         ; preds = %.lr.ph95.preheader, %.lr.ph95
  %indvars.iv125 = phi i64 [ %116, %.lr.ph95.preheader ], [ %indvars.iv.next126, %.lr.ph95 ]
  %.192 = phi i64 [ %113, %.lr.ph95.preheader ], [ %156, %.lr.ph95 ]
  %144 = getelementptr inbounds [200010 x i64], ptr @imos_Y, i64 0, i64 %indvars.iv125
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %146 = load i64, ptr %145, align 8, !tbaa !9
  store i64 %146, ptr %1, align 8, !tbaa !9
  %147 = load i32, ptr @N, align 4, !tbaa !5
  %148 = trunc nuw nsw i64 %indvars.iv125 to i32
  %149 = xor i32 %148, -1
  %150 = add i32 %147, %149
  %151 = sext i32 %150 to i64
  %152 = mul nsw i64 %146, %151
  %153 = sub nsw i64 %.192, %152
  %154 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %indvars.iv125
  store i64 %153, ptr %154, align 8, !tbaa !9
  %155 = load i64, ptr %144, align 8, !tbaa !9
  %156 = add nsw i64 %155, %.192
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, -1
  %.not147 = icmp eq i64 %indvars.iv125, 0
  br i1 %.not147, label %._crit_edge96, label %.lr.ph95, !llvm.loop !21

._crit_edge101:                                   ; preds = %167, %140, %._crit_edge96
  %157 = phi i64 [ 10000000000000000, %._crit_edge96 ], [ %142, %140 ], [ %174, %167 ]
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %157)
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0

.lr.ph100:                                        ; preds = %140, %167
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %167 ], [ 1, %140 ]
  %160 = phi i32 [ %175, %167 ], [ %143, %140 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %161 = sext i32 %160 to i64
  %162 = icmp slt i64 %indvars.iv128, %161
  br i1 %162, label %163, label %167

163:                                              ; preds = %.lr.ph100
  %164 = getelementptr inbounds [200010 x i64], ptr @ans_X, i64 0, i64 %indvars.iv128
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = add nsw i64 %165, %indvars.iv128
  br label %167

167:                                              ; preds = %163, %.lr.ph100
  %168 = phi i64 [ %166, %163 ], [ %indvars.iv128, %.lr.ph100 ]
  %169 = add nsw i64 %indvars.iv128, -1
  %170 = getelementptr inbounds [200010 x i64], ptr @ans_Y, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !9
  %172 = add nsw i64 %168, %171
  store i64 %172, ptr %3, align 8, !tbaa !9
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %174 = load i64, ptr %173, align 8, !tbaa !9
  store i64 %174, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %175 = load i32, ptr @N, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %.not.not = icmp slt i64 %indvars.iv128, %176
  br i1 %.not.not, label %.lr.ph100, label %._crit_edge101, !llvm.loop !22
}

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 #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPxEvT_S1_(ptr noundef, ptr noundef) 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass