; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2020/round2 (a)

; 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" }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }

@S = external dso_local global [1000005 x i64], align 16
@X = external dso_local global [1000005 x i64], align 16
@Y = external dso_local global [1000005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %33 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %34 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %36
  %38 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef null)
  %39 = load ptr, ptr @stdin, align 8, !tbaa !8
  %40 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %39)
  call void @llvm.lifetime.start.p0(i64 512, ptr %2) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef @.str.2, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %41 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %42 unwind label %48

42:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 1, ptr %6, align 8, !tbaa !11
  br label %43

43:                                               ; preds = %359, %42
  %44 = load i64, ptr %6, align 8, !tbaa !11
  %45 = load i64, ptr %3, align 8, !tbaa !11
  %46 = icmp sle i64 %44, %45
  br i1 %46, label %52, label %47

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

48:                                               ; preds = %0
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %374

52:                                               ; preds = %43
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %54 unwind label %76

54:                                               ; preds = %52
  %55 = load i64, ptr %6, align 8, !tbaa !11
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %53, i64 noundef %55)
          to label %57 unwind label %76

57:                                               ; preds = %54
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %59 unwind label %76

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef @.str.4)
          to label %61 unwind label %76

61:                                               ; preds = %59
  %62 = load i64, ptr %6, align 8, !tbaa !11
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %60, i64 noundef %62)
          to label %64 unwind label %76

64:                                               ; preds = %61
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef @.str.5)
          to label %66 unwind label %76

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %68 unwind label %80

68:                                               ; preds = %66
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %70 unwind label %80

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %89, %70
  %72 = load i64, ptr %10, align 8, !tbaa !11
  %73 = load i64, ptr %9, align 8, !tbaa !11
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %84, label %75

75:                                               ; preds = %71
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %96

76:                                               ; preds = %64, %61, %59, %57, %54, %52
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %4, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %5, align 4
  br label %371

80:                                               ; preds = %68, %66
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %4, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %5, align 4
  br label %370

84:                                               ; preds = %71
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %85
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %88 unwind label %92

88:                                               ; preds = %84
  br label %89

89:                                               ; preds = %88
  %90 = load i64, ptr %10, align 8, !tbaa !11
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %10, align 8, !tbaa !11
  br label %71, !llvm.loop !13

92:                                               ; preds = %84
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %4, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %370

96:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %97 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %98 unwind label %110

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %97, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %100 unwind label %110

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %99, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %102 unwind label %110

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %104 unwind label %110

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %119, %104
  %106 = load i64, ptr %15, align 8, !tbaa !11
  %107 = load i64, ptr %9, align 8, !tbaa !11
  %108 = icmp slt i64 %106, %107
  br i1 %108, label %114, label %109

109:                                              ; preds = %105
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %126

110:                                              ; preds = %102, %100, %98, %96
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %4, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %5, align 4
  br label %369

114:                                              ; preds = %105
  %115 = load i64, ptr %15, align 8, !tbaa !11
  %116 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %115
  %117 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %116)
          to label %118 unwind label %122

118:                                              ; preds = %114
  br label %119

119:                                              ; preds = %118
  %120 = load i64, ptr %15, align 8, !tbaa !11
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %15, align 8, !tbaa !11
  br label %105, !llvm.loop !15

122:                                              ; preds = %114
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %4, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %369

126:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %127 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %128 unwind label %140

128:                                              ; preds = %126
  %129 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %130 unwind label %140

130:                                              ; preds = %128
  %131 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %132 unwind label %140

132:                                              ; preds = %130
  %133 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %134 unwind label %140

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %149, %134
  %136 = load i64, ptr %20, align 8, !tbaa !11
  %137 = load i64, ptr %9, align 8, !tbaa !11
  %138 = icmp slt i64 %136, %137
  br i1 %138, label %144, label %139

139:                                              ; preds = %135
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %156

140:                                              ; preds = %132, %130, %128, %126
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %4, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %5, align 4
  br label %368

144:                                              ; preds = %135
  %145 = load i64, ptr %20, align 8, !tbaa !11
  %146 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %145
  %147 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %146)
          to label %148 unwind label %152

148:                                              ; preds = %144
  br label %149

149:                                              ; preds = %148
  %150 = load i64, ptr %20, align 8, !tbaa !11
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %20, align 8, !tbaa !11
  br label %135, !llvm.loop !16

152:                                              ; preds = %144
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %4, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %368

156:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %157 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %158 unwind label %171

158:                                              ; preds = %156
  %159 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %157, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %160 unwind label %171

160:                                              ; preds = %158
  %161 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %159, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %162 unwind label %171

162:                                              ; preds = %160
  %163 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %161, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %164 unwind label %171

164:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %165 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %165, ptr %25, align 8, !tbaa !11
  br label %166

166:                                              ; preds = %233, %164
  %167 = load i64, ptr %25, align 8, !tbaa !11
  %168 = load i64, ptr %8, align 8, !tbaa !11
  %169 = icmp slt i64 %167, %168
  br i1 %169, label %175, label %170

170:                                              ; preds = %166
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %236

171:                                              ; preds = %238, %236, %162, %160, %158, %156
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  br label %367

175:                                              ; preds = %166
  %176 = load i64, ptr %11, align 8, !tbaa !11
  %177 = load i64, ptr %25, align 8, !tbaa !11
  %178 = sub nsw i64 %177, 2
  %179 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !11
  %181 = mul nsw i64 %176, %180
  %182 = load i64, ptr %12, align 8, !tbaa !11
  %183 = load i64, ptr %25, align 8, !tbaa !11
  %184 = sub nsw i64 %183, 1
  %185 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !11
  %187 = mul nsw i64 %182, %186
  %188 = add nsw i64 %181, %187
  %189 = load i64, ptr %13, align 8, !tbaa !11
  %190 = add nsw i64 %188, %189
  %191 = load i64, ptr %14, align 8, !tbaa !11
  %192 = srem i64 %190, %191
  %193 = load i64, ptr %25, align 8, !tbaa !11
  %194 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %193
  store i64 %192, ptr %194, align 8, !tbaa !11
  %195 = load i64, ptr %16, align 8, !tbaa !11
  %196 = load i64, ptr %25, align 8, !tbaa !11
  %197 = sub nsw i64 %196, 2
  %198 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !11
  %200 = mul nsw i64 %195, %199
  %201 = load i64, ptr %17, align 8, !tbaa !11
  %202 = load i64, ptr %25, align 8, !tbaa !11
  %203 = sub nsw i64 %202, 1
  %204 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !11
  %206 = mul nsw i64 %201, %205
  %207 = add nsw i64 %200, %206
  %208 = load i64, ptr %18, align 8, !tbaa !11
  %209 = add nsw i64 %207, %208
  %210 = load i64, ptr %19, align 8, !tbaa !11
  %211 = srem i64 %209, %210
  %212 = load i64, ptr %25, align 8, !tbaa !11
  %213 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %212
  store i64 %211, ptr %213, align 8, !tbaa !11
  %214 = load i64, ptr %21, align 8, !tbaa !11
  %215 = load i64, ptr %25, align 8, !tbaa !11
  %216 = sub nsw i64 %215, 2
  %217 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !11
  %219 = mul nsw i64 %214, %218
  %220 = load i64, ptr %22, align 8, !tbaa !11
  %221 = load i64, ptr %25, align 8, !tbaa !11
  %222 = sub nsw i64 %221, 1
  %223 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %222
  %224 = load i64, ptr %223, align 8, !tbaa !11
  %225 = mul nsw i64 %220, %224
  %226 = add nsw i64 %219, %225
  %227 = load i64, ptr %23, align 8, !tbaa !11
  %228 = add nsw i64 %226, %227
  %229 = load i64, ptr %24, align 8, !tbaa !11
  %230 = srem i64 %228, %229
  %231 = load i64, ptr %25, align 8, !tbaa !11
  %232 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %231
  store i64 %230, ptr %232, align 8, !tbaa !11
  br label %233

233:                                              ; preds = %175
  %234 = load i64, ptr %25, align 8, !tbaa !11
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %25, align 8, !tbaa !11
  br label %166, !llvm.loop !17

236:                                              ; preds = %170
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
          to label %238 unwind label %171

238:                                              ; preds = %236
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %237, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %240 unwind label %171

240:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store i64 0, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store i64 0, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store i64 0, ptr %29, align 8, !tbaa !11
  br label %241

241:                                              ; preds = %266, %240
  %242 = load i64, ptr %29, align 8, !tbaa !11
  %243 = load i64, ptr %8, align 8, !tbaa !11
  %244 = icmp slt i64 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %269

246:                                              ; preds = %241
  %247 = load i64, ptr %29, align 8, !tbaa !11
  %248 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %247
  %249 = load i64, ptr %248, align 8, !tbaa !11
  %250 = load i64, ptr %26, align 8, !tbaa !11
  %251 = add nsw i64 %250, %249
  store i64 %251, ptr %26, align 8, !tbaa !11
  %252 = load i64, ptr %29, align 8, !tbaa !11
  %253 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %252
  %254 = load i64, ptr %253, align 8, !tbaa !11
  %255 = load i64, ptr %27, align 8, !tbaa !11
  %256 = add nsw i64 %255, %254
  store i64 %256, ptr %27, align 8, !tbaa !11
  %257 = load i64, ptr %29, align 8, !tbaa !11
  %258 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %257
  %259 = load i64, ptr %258, align 8, !tbaa !11
  %260 = load i64, ptr %29, align 8, !tbaa !11
  %261 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !11
  %263 = add nsw i64 %259, %262
  %264 = load i64, ptr %28, align 8, !tbaa !11
  %265 = add nsw i64 %264, %263
  store i64 %265, ptr %28, align 8, !tbaa !11
  br label %266

266:                                              ; preds = %246
  %267 = load i64, ptr %29, align 8, !tbaa !11
  %268 = add nsw i64 %267, 1
  store i64 %268, ptr %29, align 8, !tbaa !11
  br label %241, !llvm.loop !18

269:                                              ; preds = %245
  %270 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
          to label %271 unwind label %286

271:                                              ; preds = %269
  %272 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %270, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %273 unwind label %286

273:                                              ; preds = %271
  %274 = load i64, ptr %26, align 8, !tbaa !11
  %275 = load i64, ptr %27, align 8, !tbaa !11
  %276 = icmp slt i64 %274, %275
  br i1 %276, label %281, label %277

277:                                              ; preds = %273
  %278 = load i64, ptr %26, align 8, !tbaa !11
  %279 = load i64, ptr %28, align 8, !tbaa !11
  %280 = icmp sgt i64 %278, %279
  br i1 %280, label %281, label %290

281:                                              ; preds = %277, %273
  %282 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef -1)
          to label %283 unwind label %286

283:                                              ; preds = %281
  %284 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %285 unwind label %286

285:                                              ; preds = %283
  store i32 4, ptr %7, align 4
  br label %356

286:                                              ; preds = %283, %281, %271, %269
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %4, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %5, align 4
  br label %366

290:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  store i64 0, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store i64 0, ptr %31, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 0, ptr %32, align 8, !tbaa !11
  br label %291

291:                                              ; preds = %341, %290
  %292 = load i64, ptr %32, align 8, !tbaa !11
  %293 = load i64, ptr %8, align 8, !tbaa !11
  %294 = icmp slt i64 %292, %293
  br i1 %294, label %296, label %295

295:                                              ; preds = %291
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %344

296:                                              ; preds = %291
  %297 = load i64, ptr %32, align 8, !tbaa !11
  %298 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %297
  %299 = load i64, ptr %298, align 8, !tbaa !11
  %300 = load i64, ptr %32, align 8, !tbaa !11
  %301 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %300
  %302 = load i64, ptr %301, align 8, !tbaa !11
  %303 = load i64, ptr %32, align 8, !tbaa !11
  %304 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %303
  %305 = load i64, ptr %304, align 8, !tbaa !11
  %306 = add nsw i64 %302, %305
  %307 = icmp sgt i64 %299, %306
  br i1 %307, label %308, label %322

308:                                              ; preds = %296
  %309 = load i64, ptr %32, align 8, !tbaa !11
  %310 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %309
  %311 = load i64, ptr %310, align 8, !tbaa !11
  %312 = load i64, ptr %32, align 8, !tbaa !11
  %313 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %312
  %314 = load i64, ptr %313, align 8, !tbaa !11
  %315 = load i64, ptr %32, align 8, !tbaa !11
  %316 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %315
  %317 = load i64, ptr %316, align 8, !tbaa !11
  %318 = add nsw i64 %314, %317
  %319 = sub nsw i64 %311, %318
  %320 = load i64, ptr %30, align 8, !tbaa !11
  %321 = add nsw i64 %320, %319
  store i64 %321, ptr %30, align 8, !tbaa !11
  br label %322

322:                                              ; preds = %308, %296
  %323 = load i64, ptr %32, align 8, !tbaa !11
  %324 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %323
  %325 = load i64, ptr %324, align 8, !tbaa !11
  %326 = load i64, ptr %32, align 8, !tbaa !11
  %327 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %326
  %328 = load i64, ptr %327, align 8, !tbaa !11
  %329 = icmp slt i64 %325, %328
  br i1 %329, label %330, label %340

330:                                              ; preds = %322
  %331 = load i64, ptr %32, align 8, !tbaa !11
  %332 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %331
  %333 = load i64, ptr %332, align 8, !tbaa !11
  %334 = load i64, ptr %32, align 8, !tbaa !11
  %335 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %334
  %336 = load i64, ptr %335, align 8, !tbaa !11
  %337 = sub nsw i64 %333, %336
  %338 = load i64, ptr %31, align 8, !tbaa !11
  %339 = add nsw i64 %338, %337
  store i64 %339, ptr %31, align 8, !tbaa !11
  br label %340

340:                                              ; preds = %330, %322
  br label %341

341:                                              ; preds = %340
  %342 = load i64, ptr %32, align 8, !tbaa !11
  %343 = add nsw i64 %342, 1
  store i64 %343, ptr %32, align 8, !tbaa !11
  br label %291, !llvm.loop !19

344:                                              ; preds = %295
  %345 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
          to label %346 unwind label %362

346:                                              ; preds = %344
  %347 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %345, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %348 unwind label %362

348:                                              ; preds = %346
  %349 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %350 unwind label %362

350:                                              ; preds = %348
  %351 = load i64, ptr %349, align 8, !tbaa !11
  %352 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %351)
          to label %353 unwind label %362

353:                                              ; preds = %350
  %354 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %352, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %355 unwind label %362

355:                                              ; preds = %353
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  store i32 0, ptr %7, align 4
  br label %356

356:                                              ; preds = %355, %285
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %357 = load i32, ptr %7, align 4
  switch i32 %357, label %380 [
    i32 0, label %358
    i32 4, label %359
  ]

358:                                              ; preds = %356
  br label %359

359:                                              ; preds = %358, %356
  %360 = load i64, ptr %6, align 8, !tbaa !11
  %361 = add nsw i64 %360, 1
  store i64 %361, ptr %6, align 8, !tbaa !11
  br label %43, !llvm.loop !20

362:                                              ; preds = %353, %350, %348, %346, %344
  %363 = landingpad { ptr, i32 }
          cleanup
  %364 = extractvalue { ptr, i32 } %363, 0
  store ptr %364, ptr %4, align 8
  %365 = extractvalue { ptr, i32 } %363, 1
  store i32 %365, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %366

366:                                              ; preds = %362, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %367

367:                                              ; preds = %366, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %368

368:                                              ; preds = %367, %152, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %369

369:                                              ; preds = %368, %122, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %370

370:                                              ; preds = %369, %92, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %371

371:                                              ; preds = %370, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %374

372:                                              ; preds = %47
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %2) #7
  %373 = load i32, ptr %1, align 4
  ret i32 %373

374:                                              ; preds = %371, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %2) #7
  br label %375

375:                                              ; preds = %374
  %376 = load ptr, ptr %4, align 8
  %377 = load i32, ptr %5, align 4
  %378 = insertvalue { ptr, i32 } poison, ptr %376, 0
  %379 = insertvalue { ptr, i32 } %378, i32 %377, 1
  resume { ptr, i32 } %379

380:                                              ; preds = %356
  unreachable
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #2 align 2

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

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

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


; 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" }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }

@S = external dso_local global [1000005 x i64], align 16
@X = external dso_local global [1000005 x i64], align 16
@Y = external dso_local global [1000005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::basic_ofstream", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = load ptr, ptr @stdin, align 8, !tbaa !8
  %26 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %1) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %1, ptr noundef nonnull @.str.2, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %.preheader86 unwind label %29

.preheader86:                                     ; preds = %0
  %28 = load i64, ptr %2, align 8, !tbaa !11
  %.not111 = icmp slt i64 %28, 1
  br i1 %.not111, label %._crit_edge114, label %.lr.ph113

._crit_edge114:                                   ; preds = %232, %.preheader86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %1) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %1) #8
  ret i32 0

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %241

.lr.ph113:                                        ; preds = %.preheader86, %232
  %.059112 = phi i64 [ %233, %232 ], [ 1, %.preheader86 ]
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %32 unwind label %49

32:                                               ; preds = %.lr.ph113
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %31, i64 noundef %.059112)
          to label %34 unwind label %49

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %36 unwind label %49

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.4)
          to label %38 unwind label %49

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %.059112)
          to label %40 unwind label %49

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.5)
          to label %42 unwind label %49

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %44 unwind label %51

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %.preheader85 unwind label %51

.preheader85:                                     ; preds = %44
  %46 = load i64, ptr %4, align 8, !tbaa !11
  %47 = icmp sgt i64 %46, 0
  br i1 %47, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %55, %.preheader85
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %61 unwind label %70

49:                                               ; preds = %40, %38, %36, %34, %32, %.lr.ph113
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %241

51:                                               ; preds = %44, %42
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %240

.lr.ph:                                           ; preds = %.preheader85, %55
  %.05887 = phi i64 [ %56, %55 ], [ 0, %.preheader85 ]
  %53 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %.05887
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %55 unwind label %59

55:                                               ; preds = %.lr.ph
  %56 = add nuw nsw i64 %.05887, 1
  %57 = load i64, ptr %4, align 8, !tbaa !11
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !13

59:                                               ; preds = %.lr.ph
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %240

61:                                               ; preds = %._crit_edge
  %62 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %63 unwind label %70

63:                                               ; preds = %61
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %65 unwind label %70

65:                                               ; preds = %63
  %66 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.preheader84 unwind label %70

.preheader84:                                     ; preds = %65
  %67 = load i64, ptr %4, align 8, !tbaa !11
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %.lr.ph89, label %._crit_edge90

._crit_edge90:                                    ; preds = %74, %.preheader84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %80 unwind label %89

70:                                               ; preds = %65, %63, %61, %._crit_edge
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %239

.lr.ph89:                                         ; preds = %.preheader84, %74
  %.05788 = phi i64 [ %75, %74 ], [ 0, %.preheader84 ]
  %72 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %.05788
  %73 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %74 unwind label %78

74:                                               ; preds = %.lr.ph89
  %75 = add nuw nsw i64 %.05788, 1
  %76 = load i64, ptr %4, align 8, !tbaa !11
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %.lr.ph89, label %._crit_edge90, !llvm.loop !15

78:                                               ; preds = %.lr.ph89
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %239

80:                                               ; preds = %._crit_edge90
  %81 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %82 unwind label %89

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %84 unwind label %89

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %.preheader83 unwind label %89

.preheader83:                                     ; preds = %84
  %86 = load i64, ptr %4, align 8, !tbaa !11
  %87 = icmp sgt i64 %86, 0
  br i1 %87, label %.lr.ph92, label %._crit_edge93

._crit_edge93:                                    ; preds = %93, %.preheader83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %99 unwind label %123

89:                                               ; preds = %84, %82, %80, %._crit_edge90
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %238

.lr.ph92:                                         ; preds = %.preheader83, %93
  %.05691 = phi i64 [ %94, %93 ], [ 0, %.preheader83 ]
  %91 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %.05691
  %92 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %91)
          to label %93 unwind label %97

93:                                               ; preds = %.lr.ph92
  %94 = add nuw nsw i64 %.05691, 1
  %95 = load i64, ptr %4, align 8, !tbaa !11
  %96 = icmp slt i64 %94, %95
  br i1 %96, label %.lr.ph92, label %._crit_edge93, !llvm.loop !16

97:                                               ; preds = %.lr.ph92
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %238

99:                                               ; preds = %._crit_edge93
  %100 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %101 unwind label %123

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %103 unwind label %123

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %102, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %105 unwind label %123

105:                                              ; preds = %103
  %106 = load i64, ptr %4, align 8, !tbaa !11
  %107 = load i64, ptr %3, align 8, !tbaa !11
  %108 = icmp slt i64 %106, %107
  br i1 %108, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %105
  %109 = load i64, ptr %5, align 8, !tbaa !11
  %110 = load i64, ptr %6, align 8, !tbaa !11
  %111 = load i64, ptr %7, align 8, !tbaa !11
  %112 = load i64, ptr %8, align 8, !tbaa !11
  %113 = load i64, ptr %9, align 8, !tbaa !11
  %114 = load i64, ptr %10, align 8, !tbaa !11
  %115 = load i64, ptr %11, align 8, !tbaa !11
  %116 = load i64, ptr %12, align 8, !tbaa !11
  %117 = load i64, ptr %13, align 8, !tbaa !11
  %118 = load i64, ptr %14, align 8, !tbaa !11
  %119 = load i64, ptr %15, align 8, !tbaa !11
  %120 = load i64, ptr %16, align 8, !tbaa !11
  %121 = shl i64 %106, 3
  %scevgep = getelementptr i8, ptr getelementptr (i8, ptr @Y, i64 -8), i64 %121
  %load_initial = load i64, ptr %scevgep, align 8
  %scevgep137 = getelementptr i8, ptr getelementptr (i8, ptr @X, i64 -8), i64 %121
  %load_initial138 = load i64, ptr %scevgep137, align 8
  %scevgep140 = getelementptr i8, ptr getelementptr (i8, ptr @S, i64 -8), i64 %121
  %load_initial141 = load i64, ptr %scevgep140, align 8
  br label %125

._crit_edge97:                                    ; preds = %125, %105
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
          to label %152 unwind label %123

123:                                              ; preds = %152, %._crit_edge97, %103, %101, %99, %._crit_edge93
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %237

125:                                              ; preds = %.lr.ph96, %125
  %store_forwarded142 = phi i64 [ %load_initial141, %.lr.ph96 ], [ %133, %125 ]
  %store_forwarded139 = phi i64 [ %load_initial138, %.lr.ph96 ], [ %141, %125 ]
  %store_forwarded = phi i64 [ %load_initial, %.lr.ph96 ], [ %149, %125 ]
  %.05594 = phi i64 [ %106, %.lr.ph96 ], [ %151, %125 ]
  %126 = add nsw i64 %.05594, -2
  %127 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %129 = mul nsw i64 %128, %109
  %130 = mul nsw i64 %store_forwarded142, %110
  %131 = add nsw i64 %130, %129
  %132 = add nsw i64 %131, %111
  %133 = srem i64 %132, %112
  %134 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %.05594
  store i64 %133, ptr %134, align 8, !tbaa !11
  %135 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %126
  %136 = load i64, ptr %135, align 8, !tbaa !11
  %137 = mul nsw i64 %136, %113
  %138 = mul nsw i64 %store_forwarded139, %114
  %139 = add nsw i64 %138, %137
  %140 = add nsw i64 %139, %115
  %141 = srem i64 %140, %116
  %142 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %.05594
  store i64 %141, ptr %142, align 8, !tbaa !11
  %143 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %126
  %144 = load i64, ptr %143, align 8, !tbaa !11
  %145 = mul nsw i64 %144, %117
  %146 = mul nsw i64 %store_forwarded, %118
  %147 = add nsw i64 %146, %145
  %148 = add nsw i64 %147, %119
  %149 = srem i64 %148, %120
  %150 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %.05594
  store i64 %149, ptr %150, align 8, !tbaa !11
  %151 = add nsw i64 %.05594, 1
  %exitcond.not = icmp eq i64 %151, %107
  br i1 %exitcond.not, label %._crit_edge97, label %125, !llvm.loop !17

152:                                              ; preds = %._crit_edge97
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %123

.preheader:                                       ; preds = %152
  %154 = load i64, ptr %3, align 8, !tbaa !11
  %155 = icmp sgt i64 %154, 0
  br i1 %155, label %.lr.ph102.preheader, label %._crit_edge103

.lr.ph102.preheader:                              ; preds = %.preheader
  %min.iters.check = icmp ult i64 %154, 4
  br i1 %min.iters.check, label %.lr.ph102.preheader143, label %vector.ph

.lr.ph102.preheader143:                           ; preds = %middle.block, %.lr.ph102.preheader
  %.051101.ph = phi i64 [ 0, %.lr.ph102.preheader ], [ %n.vec, %middle.block ]
  %.052100.ph = phi i64 [ 0, %.lr.ph102.preheader ], [ %171, %middle.block ]
  %.05399.ph = phi i64 [ 0, %.lr.ph102.preheader ], [ %172, %middle.block ]
  %.05498.ph = phi i64 [ 0, %.lr.ph102.preheader ], [ %173, %middle.block ]
  br label %.lr.ph102

vector.ph:                                        ; preds = %.lr.ph102.preheader
  %n.vec = and i64 %154, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %168, %vector.body ]
  %vec.phi123 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %169, %vector.body ]
  %vec.phi124 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %162, %vector.body ]
  %vec.phi125 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %163, %vector.body ]
  %vec.phi126 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %158, %vector.body ]
  %vec.phi127 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %159, %vector.body ]
  %156 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %index
  %157 = getelementptr inbounds i8, ptr %156, i64 16
  %wide.load = load <2 x i64>, ptr %156, align 16, !tbaa !11
  %wide.load128 = load <2 x i64>, ptr %157, align 16, !tbaa !11
  %158 = add <2 x i64> %wide.load, %vec.phi126
  %159 = add <2 x i64> %wide.load128, %vec.phi127
  %160 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %index
  %161 = getelementptr inbounds i8, ptr %160, i64 16
  %wide.load129 = load <2 x i64>, ptr %160, align 16, !tbaa !11
  %wide.load130 = load <2 x i64>, ptr %161, align 16, !tbaa !11
  %162 = add <2 x i64> %wide.load129, %vec.phi124
  %163 = add <2 x i64> %wide.load130, %vec.phi125
  %164 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %index
  %165 = getelementptr inbounds i8, ptr %164, i64 16
  %wide.load131 = load <2 x i64>, ptr %164, align 16, !tbaa !11
  %wide.load132 = load <2 x i64>, ptr %165, align 16, !tbaa !11
  %166 = add <2 x i64> %wide.load129, %vec.phi
  %167 = add <2 x i64> %wide.load130, %vec.phi123
  %168 = add <2 x i64> %166, %wide.load131
  %169 = add <2 x i64> %167, %wide.load132
  %index.next = add nuw i64 %index, 4
  %170 = icmp eq i64 %index.next, %n.vec
  br i1 %170, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %169, %168
  %171 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %bin.rdx133 = add <2 x i64> %163, %162
  %172 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx133)
  %bin.rdx134 = add <2 x i64> %159, %158
  %173 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx134)
  %cmp.n = icmp eq i64 %154, %n.vec
  br i1 %cmp.n, label %._crit_edge103, label %.lr.ph102.preheader143

._crit_edge103:                                   ; preds = %.lr.ph102, %middle.block, %.preheader
  %.054.lcssa = phi i64 [ 0, %.preheader ], [ %173, %middle.block ], [ %177, %.lr.ph102 ]
  %.053.lcssa = phi i64 [ 0, %.preheader ], [ %172, %middle.block ], [ %180, %.lr.ph102 ]
  %.052.lcssa = phi i64 [ 0, %.preheader ], [ %171, %middle.block ], [ %184, %.lr.ph102 ]
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
          to label %186 unwind label %195

.lr.ph102:                                        ; preds = %.lr.ph102.preheader143, %.lr.ph102
  %.051101 = phi i64 [ %185, %.lr.ph102 ], [ %.051101.ph, %.lr.ph102.preheader143 ]
  %.052100 = phi i64 [ %184, %.lr.ph102 ], [ %.052100.ph, %.lr.ph102.preheader143 ]
  %.05399 = phi i64 [ %180, %.lr.ph102 ], [ %.05399.ph, %.lr.ph102.preheader143 ]
  %.05498 = phi i64 [ %177, %.lr.ph102 ], [ %.05498.ph, %.lr.ph102.preheader143 ]
  %175 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %.051101
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = add nsw i64 %176, %.05498
  %178 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %.051101
  %179 = load i64, ptr %178, align 8, !tbaa !11
  %180 = add nsw i64 %179, %.05399
  %181 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %.051101
  %182 = load i64, ptr %181, align 8, !tbaa !11
  %183 = add i64 %179, %.052100
  %184 = add i64 %183, %182
  %185 = add nuw nsw i64 %.051101, 1
  %exitcond117.not = icmp eq i64 %185, %154
  br i1 %exitcond117.not, label %._crit_edge103, label %.lr.ph102, !llvm.loop !21

186:                                              ; preds = %._crit_edge103
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %188 unwind label %195

188:                                              ; preds = %186
  %189 = icmp slt i64 %.054.lcssa, %.053.lcssa
  %190 = icmp sgt i64 %.054.lcssa, %.052.lcssa
  %or.cond = select i1 %189, i1 true, i1 %190
  br i1 %or.cond, label %191, label %197

191:                                              ; preds = %188
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef -1)
          to label %193 unwind label %195

193:                                              ; preds = %191
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %232 unwind label %195

195:                                              ; preds = %193, %191, %186, %._crit_edge103
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %237

197:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  store i64 0, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  store i64 0, ptr %18, align 8, !tbaa !11
  %198 = load i64, ptr %3, align 8, !tbaa !11
  %199 = icmp sgt i64 %198, 0
  br i1 %199, label %.lr.ph109, label %._crit_edge110

._crit_edge110:                                   ; preds = %220, %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
          to label %223 unwind label %235

.lr.ph109:                                        ; preds = %197, %220
  %.0107 = phi i64 [ %222, %220 ], [ 0, %197 ]
  %201 = phi i64 [ %215, %220 ], [ 0, %197 ]
  %202 = phi i64 [ %221, %220 ], [ 0, %197 ]
  %203 = getelementptr inbounds [1000005 x i64], ptr @S, i64 0, i64 %.0107
  %204 = load i64, ptr %203, align 8, !tbaa !11
  %205 = getelementptr inbounds [1000005 x i64], ptr @X, i64 0, i64 %.0107
  %206 = load i64, ptr %205, align 8, !tbaa !11
  %207 = getelementptr inbounds [1000005 x i64], ptr @Y, i64 0, i64 %.0107
  %208 = load i64, ptr %207, align 8, !tbaa !11
  %209 = add nsw i64 %208, %206
  %210 = icmp sgt i64 %204, %209
  br i1 %210, label %211, label %214

211:                                              ; preds = %.lr.ph109
  %212 = sub i64 %204, %209
  %213 = add nsw i64 %212, %201
  store i64 %213, ptr %17, align 8, !tbaa !11
  br label %214

214:                                              ; preds = %211, %.lr.ph109
  %215 = phi i64 [ %213, %211 ], [ %201, %.lr.ph109 ]
  %216 = icmp slt i64 %204, %206
  br i1 %216, label %217, label %220

217:                                              ; preds = %214
  %218 = sub i64 %206, %204
  %219 = add nsw i64 %218, %202
  store i64 %219, ptr %18, align 8, !tbaa !11
  br label %220

220:                                              ; preds = %214, %217
  %221 = phi i64 [ %202, %214 ], [ %219, %217 ]
  %222 = add nuw nsw i64 %.0107, 1
  %exitcond118.not = icmp eq i64 %222, %198
  br i1 %exitcond118.not, label %._crit_edge110, label %.lr.ph109, !llvm.loop !22

223:                                              ; preds = %._crit_edge110
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %225 unwind label %235

225:                                              ; preds = %223
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %227 = load i64, ptr %226, align 8, !tbaa !11
  %228 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %227)
          to label %229 unwind label %235

229:                                              ; preds = %225
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %231 unwind label %235

231:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %232

232:                                              ; preds = %193, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %233 = add nuw nsw i64 %.059112, 1
  %234 = load i64, ptr %2, align 8, !tbaa !11
  %.not.not = icmp slt i64 %.059112, %234
  br i1 %.not.not, label %.lr.ph113, label %._crit_edge114, !llvm.loop !23

235:                                              ; preds = %229, %225, %223, %._crit_edge110
  %236 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %237

237:                                              ; preds = %195, %235, %123
  %.pn.pn = phi { ptr, i32 } [ %124, %123 ], [ %196, %195 ], [ %236, %235 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %238

238:                                              ; preds = %237, %97, %89
  %.pn74 = phi { ptr, i32 } [ %98, %97 ], [ %.pn.pn, %237 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %239

239:                                              ; preds = %238, %78, %70
  %.pn76 = phi { ptr, i32 } [ %79, %78 ], [ %.pn74, %238 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %240

240:                                              ; preds = %239, %59, %51
  %.pn78 = phi { ptr, i32 } [ %60, %59 ], [ %.pn76, %239 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %241

241:                                              ; preds = %49, %240, %29
  %.pn78.pn.pn = phi { ptr, i32 } [ %30, %29 ], [ %.pn78, %240 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %1) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn78.pn.pn
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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

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

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


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