; LLVM IR from kazunetakahashi/atcoder :: 2018/1014_code-festival-2018-qualb (D)

; 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" }
%"struct.std::_Setprecision" = type { i32 }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@q = external dso_local global i64, align 8
@x = external dso_local global [2010 x i64], align 16
@p = external dso_local global [2010 x i64], align 16
@r = external dso_local global [2010 x i64], align 16
@ok = external dso_local global [2010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Setprecision", align 4
  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)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %32, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr @M, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %18
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %30)
  br label %32

32:                                               ; preds = %23
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !9

35:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %64, %35
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load i32, ptr @M, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

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

41:                                               ; preds = %36
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = load i32, ptr @N, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = mul nsw i64 %45, %47
  %49 = load i64, ptr @q, align 8, !tbaa !11
  %50 = sdiv i64 %48, %49
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %52
  store i64 %50, ptr %53, align 8, !tbaa !11
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %54, i32 noundef %55)
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @.str.1)
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %57, i64 noundef %61)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %64

64:                                               ; preds = %41
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %3, align 4, !tbaa !5
  br label %36, !llvm.loop !13

67:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %68 = load i32, ptr @N, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  store i64 %69, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %82, %67
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr @M, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %85

75:                                               ; preds = %70
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = load i64, ptr %4, align 8, !tbaa !11
  %81 = sub nsw i64 %80, %79
  store i64 %81, ptr %4, align 8, !tbaa !11
  br label %82

82:                                               ; preds = %75
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !5
  br label %70, !llvm.loop !14

85:                                               ; preds = %74
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %87 = load i64, ptr %4, align 8, !tbaa !11
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %86, i64 noundef %87)
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %185, %85
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = load i32, ptr @M, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

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

95:                                               ; preds = %90
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !11
  %100 = load i32, ptr @N, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = mul nsw i64 %99, %101
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !11
  %107 = load i64, ptr @q, align 8, !tbaa !11
  %108 = mul nsw i64 %106, %107
  %109 = sub nsw i64 %102, %108
  %110 = call noundef i64 @_ZSt3absx(i64 noundef %109)
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = load i32, ptr @N, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = mul nsw i64 %114, %116
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !11
  %122 = add nsw i64 %121, 1
  %123 = load i64, ptr @q, align 8, !tbaa !11
  %124 = mul nsw i64 %122, %123
  %125 = sub nsw i64 %117, %124
  %126 = call noundef i64 @_ZSt3absx(i64 noundef %125)
  %127 = icmp sgt i64 %110, %126
  br i1 %127, label %128, label %132

128:                                              ; preds = %95
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %130
  store i32 2, ptr %131, align 4, !tbaa !5
  br label %174

132:                                              ; preds = %95
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !11
  %137 = load i32, ptr @N, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = mul nsw i64 %136, %138
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !11
  %144 = load i64, ptr @q, align 8, !tbaa !11
  %145 = mul nsw i64 %143, %144
  %146 = sub nsw i64 %139, %145
  %147 = call noundef i64 @_ZSt3absx(i64 noundef %146)
  %148 = load i32, ptr %6, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !11
  %152 = load i32, ptr @N, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %151, %153
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !11
  %159 = add nsw i64 %158, 1
  %160 = load i64, ptr @q, align 8, !tbaa !11
  %161 = mul nsw i64 %159, %160
  %162 = sub nsw i64 %154, %161
  %163 = call noundef i64 @_ZSt3absx(i64 noundef %162)
  %164 = icmp eq i64 %147, %163
  br i1 %164, label %165, label %169

165:                                              ; preds = %132
  %166 = load i32, ptr %6, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %167
  store i32 1, ptr %168, align 4, !tbaa !5
  br label %173

169:                                              ; preds = %132
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %171
  store i32 0, ptr %172, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %169, %165
  br label %174

174:                                              ; preds = %173, %128
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
  %176 = load i32, ptr %6, align 4, !tbaa !5
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %175, i32 noundef %176)
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef @.str.1)
  %179 = load i32, ptr %6, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %178, i32 noundef %182)
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %185

185:                                              ; preds = %174
  %186 = load i32, ptr %6, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %6, align 4, !tbaa !5
  br label %90, !llvm.loop !15

188:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %189 = load i32, ptr @M, align 4, !tbaa !5
  %190 = sub nsw i32 %189, 1
  store i32 %190, ptr %7, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %213, %188
  %192 = load i32, ptr %7, align 4, !tbaa !5
  %193 = icmp sge i32 %192, 0
  br i1 %193, label %195, label %194

194:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %216

195:                                              ; preds = %191
  %196 = load i32, ptr %7, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = icmp eq i32 %199, 2
  br i1 %200, label %201, label %212

201:                                              ; preds = %195
  %202 = load i64, ptr %4, align 8, !tbaa !11
  %203 = icmp sgt i64 %202, 0
  br i1 %203, label %204, label %212

204:                                              ; preds = %201
  %205 = load i32, ptr %7, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !11
  %209 = add nsw i64 %208, 1
  store i64 %209, ptr %207, align 8, !tbaa !11
  %210 = load i64, ptr %4, align 8, !tbaa !11
  %211 = add nsw i64 %210, -1
  store i64 %211, ptr %4, align 8, !tbaa !11
  br label %212

212:                                              ; preds = %204, %201, %195
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %7, align 4, !tbaa !5
  %215 = add nsw i32 %214, -1
  store i32 %215, ptr %7, align 4, !tbaa !5
  br label %191, !llvm.loop !16

216:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %217 = load i32, ptr @M, align 4, !tbaa !5
  %218 = sub nsw i32 %217, 1
  store i32 %218, ptr %8, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %241, %216
  %220 = load i32, ptr %8, align 4, !tbaa !5
  %221 = icmp sge i32 %220, 0
  br i1 %221, label %223, label %222

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

223:                                              ; preds = %219
  %224 = load i32, ptr %8, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = icmp eq i32 %227, 1
  br i1 %228, label %229, label %240

229:                                              ; preds = %223
  %230 = load i64, ptr %4, align 8, !tbaa !11
  %231 = icmp sgt i64 %230, 0
  br i1 %231, label %232, label %240

232:                                              ; preds = %229
  %233 = load i32, ptr %8, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !11
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %235, align 8, !tbaa !11
  %238 = load i64, ptr %4, align 8, !tbaa !11
  %239 = add nsw i64 %238, -1
  store i64 %239, ptr %4, align 8, !tbaa !11
  br label %240

240:                                              ; preds = %232, %229, %223
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %8, align 4, !tbaa !5
  %243 = add nsw i32 %242, -1
  store i32 %243, ptr %8, align 4, !tbaa !5
  br label %219, !llvm.loop !17

244:                                              ; preds = %222
  %245 = load i64, ptr %4, align 8, !tbaa !11
  %246 = load i64, ptr @r, align 16, !tbaa !11
  %247 = add nsw i64 %246, %245
  store i64 %247, ptr @r, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %248

248:                                              ; preds = %264, %244
  %249 = load i32, ptr %9, align 4, !tbaa !5
  %250 = load i32, ptr @M, align 4, !tbaa !5
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %253, label %252

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

253:                                              ; preds = %248
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %255 = load i32, ptr %9, align 4, !tbaa !5
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %254, i32 noundef %255)
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @.str.1)
  %258 = load i32, ptr %9, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %259
  %261 = load i64, ptr %260, align 8, !tbaa !11
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %257, i64 noundef %261)
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %262, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %264

264:                                              ; preds = %253
  %265 = load i32, ptr %9, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %9, align 4, !tbaa !5
  br label %248, !llvm.loop !18

267:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store double 0.000000e+00, ptr %10, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %268

268:                                              ; preds = %286, %267
  %269 = load i32, ptr %11, align 4, !tbaa !5
  %270 = load i32, ptr @M, align 4, !tbaa !5
  %271 = icmp slt i32 %269, %270
  br i1 %271, label %273, label %272

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

273:                                              ; preds = %268
  %274 = load i32, ptr %11, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %275
  %277 = load i64, ptr %276, align 8, !tbaa !11
  %278 = load i32, ptr %11, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %279
  %281 = load i64, ptr %280, align 8, !tbaa !11
  %282 = mul nsw i64 %277, %281
  %283 = sitofp i64 %282 to double
  %284 = load double, ptr %10, align 8, !tbaa !19
  %285 = fadd double %284, %283
  store double %285, ptr %10, align 8, !tbaa !19
  br label %286

286:                                              ; preds = %273
  %287 = load i32, ptr %11, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %11, align 4, !tbaa !5
  br label %268, !llvm.loop !21

289:                                              ; preds = %272
  %290 = load i32, ptr @N, align 4, !tbaa !5
  %291 = sitofp i32 %290 to double
  %292 = load double, ptr %10, align 8, !tbaa !19
  %293 = fdiv double %292, %291
  store double %293, ptr %10, align 8, !tbaa !19
  %294 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
  %295 = load double, ptr %10, align 8, !tbaa !19
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %294, double noundef %295)
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %296, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store double 0.000000e+00, ptr %12, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %332, %289
  %299 = load i32, ptr %13, align 4, !tbaa !5
  %300 = load i32, ptr @M, align 4, !tbaa !5
  %301 = icmp slt i32 %299, %300
  br i1 %301, label %303, label %302

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

303:                                              ; preds = %298
  %304 = load i32, ptr %13, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %305
  %307 = load i64, ptr %306, align 8, !tbaa !11
  %308 = sitofp i64 %307 to double
  %309 = load i64, ptr @q, align 8, !tbaa !11
  %310 = sitofp i64 %309 to double
  %311 = fdiv double %308, %310
  %312 = load i32, ptr %13, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %313
  %315 = load i64, ptr %314, align 8, !tbaa !11
  %316 = sitofp i64 %315 to double
  %317 = load i32, ptr @N, align 4, !tbaa !5
  %318 = sitofp i32 %317 to double
  %319 = fdiv double %316, %318
  %320 = fsub double %311, %319
  %321 = call noundef double @_ZSt3absd(double noundef %320)
  %322 = load i32, ptr %13, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %323
  %325 = load i64, ptr %324, align 8, !tbaa !11
  %326 = sitofp i64 %325 to double
  %327 = load double, ptr %10, align 8, !tbaa !19
  %328 = fsub double %326, %327
  %329 = call noundef double @_ZSt3absd(double noundef %328)
  %330 = load double, ptr %12, align 8, !tbaa !19
  %331 = call double @llvm.fmuladd.f64(double %321, double %329, double %330)
  store double %331, ptr %12, align 8, !tbaa !19
  br label %332

332:                                              ; preds = %303
  %333 = load i32, ptr %13, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %13, align 4, !tbaa !5
  br label %298, !llvm.loop !22

335:                                              ; preds = %302
  %336 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %337 = call i32 @_ZSt12setprecisioni(i32 noundef 12)
  %338 = getelementptr inbounds %"struct.std::_Setprecision", ptr %14, i32 0, i32 0
  store i32 %337, ptr %338, align 4
  %339 = getelementptr inbounds %"struct.std::_Setprecision", ptr %14, i32 0, i32 0
  %340 = load i32, ptr %339, align 4
  %341 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %336, i32 %340)
  %342 = load double, ptr %12, align 8, !tbaa !19
  %343 = load i32, ptr @N, align 4, !tbaa !5
  %344 = sitofp i32 %343 to double
  %345 = fmul double %342, %344
  %346 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %341, double noundef %345)
  %347 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %346, 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 %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %348 = load i32, ptr %1, align 4
  ret i32 %348
}

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

; Function Attrs: 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)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 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) #2 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)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #5

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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
@M = external dso_local global i32, align 4
@q = external dso_local global i64, align 8
@x = external dso_local global [2010 x i64], align 16
@p = external dso_local global [2010 x i64], align 16
@r = external dso_local local_unnamed_addr global [2010 x i64], align 16
@ok = external dso_local local_unnamed_addr global [2010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = 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)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) @q)
  %4 = load i32, ptr @M, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge.thread

.preheader82:                                     ; preds = %.lr.ph
  %6 = icmp sgt i32 %11, 0
  br i1 %6, label %.lr.ph87, label %._crit_edge.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %7 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv
  %8 = 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) %7)
  %9 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %indvars.iv
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr @M, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = icmp slt i64 %indvars.iv.next, %12
  br i1 %13, label %.lr.ph, label %.preheader82, !llvm.loop !9

._crit_edge.thread:                               ; preds = %.preheader82, %0
  %14 = load i32, ptr @N, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  br label %._crit_edge92

._crit_edge:                                      ; preds = %.lr.ph87
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp sgt i32 %41, 0
  br i1 %18, label %.lr.ph91.preheader, label %._crit_edge92

.lr.ph91.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %41 to i64
  %min.iters.check = icmp ult i32 %41, 4
  br i1 %min.iters.check, label %.lr.ph91.preheader183, label %vector.ph

.lr.ph91.preheader183:                            ; preds = %middle.block, %.lr.ph91.preheader
  %indvars.iv134.ph = phi i64 [ 0, %.lr.ph91.preheader ], [ %n.vec, %middle.block ]
  %.07488.ph = phi i64 [ %17, %.lr.ph91.preheader ], [ %25, %middle.block ]
  br label %.lr.ph91

vector.ph:                                        ; preds = %.lr.ph91.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  %19 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %17, i64 0
  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> [ %19, %vector.ph ], [ %22, %vector.body ]
  %vec.phi177 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %23, %vector.body ]
  %20 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <2 x i64>, ptr %20, align 16, !tbaa !11
  %wide.load178 = load <2 x i64>, ptr %21, align 16, !tbaa !11
  %22 = sub <2 x i64> %vec.phi, %wide.load
  %23 = sub <2 x i64> %vec.phi177, %wide.load178
  %index.next = add nuw i64 %index, 4
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %23, %22
  %25 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge92, label %.lr.ph91.preheader183

.lr.ph87:                                         ; preds = %.preheader82, %.lr.ph87
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %.lr.ph87 ], [ 0, %.preheader82 ]
  %26 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %indvars.iv131
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = mul nsw i64 %27, %29
  %31 = load i64, ptr @q, align 8, !tbaa !11
  %32 = sdiv i64 %30, %31
  %33 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv131
  store i64 %32, ptr %33, align 8, !tbaa !11
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %35 = trunc nuw nsw i64 %indvars.iv131 to i32
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 noundef %35)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.1)
  %38 = load i64, ptr %33, align 8, !tbaa !11
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %38)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %41 = load i32, ptr @M, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next132, %42
  br i1 %43, label %.lr.ph87, label %._crit_edge, !llvm.loop !16

._crit_edge92:                                    ; preds = %.lr.ph91, %middle.block, %._crit_edge.thread, %._crit_edge
  %.074.lcssa = phi i64 [ %17, %._crit_edge ], [ %15, %._crit_edge.thread ], [ %25, %middle.block ], [ %51, %.lr.ph91 ]
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %44, i64 noundef %.074.lcssa)
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %47 = load i32, ptr @M, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph96, label %._crit_edge107.thread

.lr.ph91:                                         ; preds = %.lr.ph91.preheader183, %.lr.ph91
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %.lr.ph91 ], [ %indvars.iv134.ph, %.lr.ph91.preheader183 ]
  %.07488 = phi i64 [ %51, %.lr.ph91 ], [ %.07488.ph, %.lr.ph91.preheader183 ]
  %49 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv134
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = sub nsw i64 %.07488, %50
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge92, label %.lr.ph91, !llvm.loop !17

.preheader81:                                     ; preds = %109
  %52 = icmp sgt i32 %118, 0
  br i1 %52, label %.lr.ph101.preheader, label %._crit_edge107.thread

.lr.ph101.preheader:                              ; preds = %.preheader81
  %53 = zext nneg i32 %118 to i64
  %54 = add nsw i64 %53, -1
  %xtraiter = and i64 %53, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph101.prol.loopexit, label %.lr.ph101.prol

.lr.ph101.prol:                                   ; preds = %.lr.ph101.preheader
  %indvars.iv.next141.prol = add nsw i64 %53, -1
  %55 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next141.prol
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 2
  %58 = icmp sgt i64 %.074.lcssa, 0
  %or.cond.prol = select i1 %57, i1 %58, i1 false
  br i1 %or.cond.prol, label %59, label %.lr.ph101.prol.loopexit

59:                                               ; preds = %.lr.ph101.prol
  %60 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next141.prol
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %60, align 8, !tbaa !11
  %63 = add nsw i64 %.074.lcssa, -1
  br label %.lr.ph101.prol.loopexit

.lr.ph101.prol.loopexit:                          ; preds = %.lr.ph101.prol, %59, %.lr.ph101.preheader
  %indvars.iv140.unr = phi i64 [ %53, %.lr.ph101.preheader ], [ %indvars.iv.next141.prol, %59 ], [ %indvars.iv.next141.prol, %.lr.ph101.prol ]
  %.199.unr = phi i64 [ %.074.lcssa, %.lr.ph101.preheader ], [ %63, %59 ], [ %.074.lcssa, %.lr.ph101.prol ]
  %.2.lcssa.unr = phi i64 [ poison, %.lr.ph101.preheader ], [ %63, %59 ], [ %.074.lcssa, %.lr.ph101.prol ]
  %64 = icmp eq i64 %54, 0
  br i1 %64, label %.preheader80, label %.lr.ph101

.lr.ph96:                                         ; preds = %._crit_edge92, %109
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %109 ], [ 0, %._crit_edge92 ]
  %65 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %indvars.iv137
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = load i32, ptr @N, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = mul nsw i64 %66, %68
  %70 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv137
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = load i64, ptr @q, align 8, !tbaa !11
  %73 = mul nsw i64 %72, %71
  %74 = sub nsw i64 %69, %73
  %75 = tail call noundef i64 @_ZSt3absx(i64 noundef %74)
  %76 = load i64, ptr %65, align 8, !tbaa !11
  %77 = load i32, ptr @N, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = mul nsw i64 %76, %78
  %80 = load i64, ptr %70, align 8, !tbaa !11
  %.neg = xor i64 %80, -1
  %81 = load i64, ptr @q, align 8, !tbaa !11
  %.neg77 = mul i64 %81, %.neg
  %82 = add i64 %.neg77, %79
  %83 = tail call noundef i64 @_ZSt3absx(i64 noundef %82)
  %84 = icmp sgt i64 %75, %83
  br i1 %84, label %85, label %87

85:                                               ; preds = %.lr.ph96
  %86 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv137
  store i32 2, ptr %86, align 4, !tbaa !5
  br label %109

87:                                               ; preds = %.lr.ph96
  %88 = load i64, ptr %65, align 8, !tbaa !11
  %89 = load i32, ptr @N, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %88, %90
  %92 = load i64, ptr %70, align 8, !tbaa !11
  %93 = load i64, ptr @q, align 8, !tbaa !11
  %94 = mul nsw i64 %93, %92
  %95 = sub nsw i64 %91, %94
  %96 = tail call noundef i64 @_ZSt3absx(i64 noundef %95)
  %97 = load i64, ptr %65, align 8, !tbaa !11
  %98 = load i32, ptr @N, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = mul nsw i64 %97, %99
  %101 = load i64, ptr %70, align 8, !tbaa !11
  %.neg78 = xor i64 %101, -1
  %102 = load i64, ptr @q, align 8, !tbaa !11
  %.neg79 = mul i64 %102, %.neg78
  %103 = add i64 %.neg79, %100
  %104 = tail call noundef i64 @_ZSt3absx(i64 noundef %103)
  %105 = icmp eq i64 %96, %104
  %106 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv137
  br i1 %105, label %107, label %108

107:                                              ; preds = %87
  store i32 1, ptr %106, align 4, !tbaa !5
  br label %109

108:                                              ; preds = %87
  store i32 0, ptr %106, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %107, %108, %85
  %110 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
  %111 = trunc nuw nsw i64 %indvars.iv137 to i32
  %112 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %110, i32 noundef %111)
  %113 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @.str.1)
  %114 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv137
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef %115)
  %117 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %118 = load i32, ptr @M, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next138, %119
  br i1 %120, label %.lr.ph96, label %.preheader81, !llvm.loop !18

.preheader80:                                     ; preds = %150, %.lr.ph101.prol.loopexit
  %.2.lcssa = phi i64 [ %.2.lcssa.unr, %.lr.ph101.prol.loopexit ], [ %.2.1, %150 ]
  br i1 %52, label %.lr.ph106.preheader, label %._crit_edge107.thread

.lr.ph106.preheader:                              ; preds = %.preheader80
  %121 = zext nneg i32 %118 to i64
  %xtraiter189 = and i64 %53, 1
  %lcmp.mod190.not = icmp eq i64 %xtraiter189, 0
  br i1 %lcmp.mod190.not, label %.lr.ph106.prol.loopexit, label %.lr.ph106.prol

.lr.ph106.prol:                                   ; preds = %.lr.ph106.preheader
  %indvars.iv.next144.prol = add nsw i64 %121, -1
  %122 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next144.prol
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 1
  %125 = icmp sgt i64 %.2.lcssa, 0
  %or.cond3.prol = select i1 %124, i1 %125, i1 false
  br i1 %or.cond3.prol, label %126, label %.lr.ph106.prol.loopexit

126:                                              ; preds = %.lr.ph106.prol
  %127 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next144.prol
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %127, align 8, !tbaa !11
  %130 = add nsw i64 %.2.lcssa, -1
  br label %.lr.ph106.prol.loopexit

.lr.ph106.prol.loopexit:                          ; preds = %.lr.ph106.prol, %126, %.lr.ph106.preheader
  %indvars.iv143.unr = phi i64 [ %121, %.lr.ph106.preheader ], [ %indvars.iv.next144.prol, %126 ], [ %indvars.iv.next144.prol, %.lr.ph106.prol ]
  %.3104.unr = phi i64 [ %.2.lcssa, %.lr.ph106.preheader ], [ %130, %126 ], [ %.2.lcssa, %.lr.ph106.prol ]
  %.4.lcssa.unr = phi i64 [ poison, %.lr.ph106.preheader ], [ %130, %126 ], [ %.2.lcssa, %.lr.ph106.prol ]
  %131 = icmp eq i64 %54, 0
  br i1 %131, label %._crit_edge107, label %.lr.ph106

.lr.ph101:                                        ; preds = %.lr.ph101.prol.loopexit, %150
  %indvars.iv140 = phi i64 [ %indvars.iv.next141.1, %150 ], [ %indvars.iv140.unr, %.lr.ph101.prol.loopexit ]
  %.199 = phi i64 [ %.2.1, %150 ], [ %.199.unr, %.lr.ph101.prol.loopexit ]
  %indvars.iv.next141 = add nsw i64 %indvars.iv140, -1
  %132 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next141
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = icmp eq i32 %133, 2
  %135 = icmp sgt i64 %.199, 0
  %or.cond = select i1 %134, i1 %135, i1 false
  br i1 %or.cond, label %136, label %.lr.ph101.1

136:                                              ; preds = %.lr.ph101
  %137 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next141
  %138 = load i64, ptr %137, align 8, !tbaa !11
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %137, align 8, !tbaa !11
  %140 = add nsw i64 %.199, -1
  br label %.lr.ph101.1

.lr.ph101.1:                                      ; preds = %.lr.ph101, %136
  %.2 = phi i64 [ %140, %136 ], [ %.199, %.lr.ph101 ]
  %indvars.iv.next141.1 = add nsw i64 %indvars.iv140, -2
  %141 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next141.1
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = icmp eq i32 %142, 2
  %144 = icmp sgt i64 %.2, 0
  %or.cond.1 = select i1 %143, i1 %144, i1 false
  br i1 %or.cond.1, label %145, label %150

145:                                              ; preds = %.lr.ph101.1
  %146 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next141.1
  %147 = load i64, ptr %146, align 8, !tbaa !11
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %146, align 8, !tbaa !11
  %149 = add nsw i64 %.2, -1
  br label %150

150:                                              ; preds = %145, %.lr.ph101.1
  %.2.1 = phi i64 [ %149, %145 ], [ %.2, %.lr.ph101.1 ]
  %151 = icmp ugt i64 %indvars.iv.next141, 1
  br i1 %151, label %.lr.ph101, label %.preheader80, !llvm.loop !19

._crit_edge107.thread:                            ; preds = %.preheader80, %.preheader81, %._crit_edge92
  %.ph160 = phi i32 [ %118, %.preheader80 ], [ %118, %.preheader81 ], [ %47, %._crit_edge92 ]
  %.3.lcssa.ph = phi i64 [ %.2.lcssa, %.preheader80 ], [ %.074.lcssa, %.preheader81 ], [ %.074.lcssa, %._crit_edge92 ]
  %152 = load i64, ptr @r, align 16, !tbaa !11
  %153 = add nsw i64 %152, %.3.lcssa.ph
  store i64 %153, ptr @r, align 16, !tbaa !11
  br label %.preheader

._crit_edge107:                                   ; preds = %174, %.lr.ph106.prol.loopexit
  %.4.lcssa = phi i64 [ %.4.lcssa.unr, %.lr.ph106.prol.loopexit ], [ %.4.1, %174 ]
  %154 = load i64, ptr @r, align 16, !tbaa !11
  %155 = add nsw i64 %154, %.4.lcssa
  store i64 %155, ptr @r, align 16, !tbaa !11
  br i1 %52, label %.lr.ph111, label %.preheader

.lr.ph106:                                        ; preds = %.lr.ph106.prol.loopexit, %174
  %indvars.iv143 = phi i64 [ %indvars.iv.next144.1, %174 ], [ %indvars.iv143.unr, %.lr.ph106.prol.loopexit ]
  %.3104 = phi i64 [ %.4.1, %174 ], [ %.3104.unr, %.lr.ph106.prol.loopexit ]
  %indvars.iv.next144 = add nsw i64 %indvars.iv143, -1
  %156 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next144
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp eq i32 %157, 1
  %159 = icmp sgt i64 %.3104, 0
  %or.cond3 = select i1 %158, i1 %159, i1 false
  br i1 %or.cond3, label %160, label %.lr.ph106.1

160:                                              ; preds = %.lr.ph106
  %161 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next144
  %162 = load i64, ptr %161, align 8, !tbaa !11
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %161, align 8, !tbaa !11
  %164 = add nsw i64 %.3104, -1
  br label %.lr.ph106.1

.lr.ph106.1:                                      ; preds = %.lr.ph106, %160
  %.4 = phi i64 [ %164, %160 ], [ %.3104, %.lr.ph106 ]
  %indvars.iv.next144.1 = add nsw i64 %indvars.iv143, -2
  %165 = getelementptr inbounds [2010 x i32], ptr @ok, i64 0, i64 %indvars.iv.next144.1
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = icmp eq i32 %166, 1
  %168 = icmp sgt i64 %.4, 0
  %or.cond3.1 = select i1 %167, i1 %168, i1 false
  br i1 %or.cond3.1, label %169, label %174

169:                                              ; preds = %.lr.ph106.1
  %170 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next144.1
  %171 = load i64, ptr %170, align 8, !tbaa !11
  %172 = add nsw i64 %171, 1
  store i64 %172, ptr %170, align 8, !tbaa !11
  %173 = add nsw i64 %.4, -1
  br label %174

174:                                              ; preds = %169, %.lr.ph106.1
  %.4.1 = phi i64 [ %173, %169 ], [ %.4, %.lr.ph106.1 ]
  %175 = icmp ugt i64 %indvars.iv.next144, 1
  br i1 %175, label %.lr.ph106, label %._crit_edge107, !llvm.loop !20

.preheader:                                       ; preds = %.lr.ph111, %._crit_edge107.thread, %._crit_edge107
  %.lcssa = phi i32 [ %118, %._crit_edge107 ], [ %.ph160, %._crit_edge107.thread ], [ %186, %.lr.ph111 ]
  %176 = icmp sgt i32 %.lcssa, 0
  br i1 %176, label %.lr.ph115.preheader, label %._crit_edge116

.lr.ph115.preheader:                              ; preds = %.preheader
  %wide.trip.count152 = zext nneg i32 %.lcssa to i64
  %xtraiter191 = and i64 %wide.trip.count152, 3
  %177 = icmp ult i32 %.lcssa, 4
  br i1 %177, label %._crit_edge116.loopexit.unr-lcssa, label %.lr.ph115.preheader.new

.lr.ph115.preheader.new:                          ; preds = %.lr.ph115.preheader
  %unroll_iter = and i64 %wide.trip.count152, 2147483644
  br label %.lr.ph115

.lr.ph111:                                        ; preds = %._crit_edge107, %.lr.ph111
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph111 ], [ 0, %._crit_edge107 ]
  %178 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %179 = trunc nuw nsw i64 %indvars.iv146 to i32
  %180 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %178, i32 noundef %179)
  %181 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef nonnull @.str.1)
  %182 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv146
  %183 = load i64, ptr %182, align 8, !tbaa !11
  %184 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %181, i64 noundef %183)
  %185 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %186 = load i32, ptr @M, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = icmp slt i64 %indvars.iv.next147, %187
  br i1 %188, label %.lr.ph111, label %.preheader, !llvm.loop !21

._crit_edge116.loopexit.unr-lcssa:                ; preds = %.lr.ph115, %.lr.ph115.preheader
  %.lcssa180.ph = phi double [ poison, %.lr.ph115.preheader ], [ %231, %.lr.ph115 ]
  %indvars.iv149.unr = phi i64 [ 0, %.lr.ph115.preheader ], [ %indvars.iv.next150.3, %.lr.ph115 ]
  %.068113.unr = phi double [ 0.000000e+00, %.lr.ph115.preheader ], [ %231, %.lr.ph115 ]
  %lcmp.mod192.not = icmp eq i64 %xtraiter191, 0
  br i1 %lcmp.mod192.not, label %._crit_edge116, label %.lr.ph115.epil

.lr.ph115.epil:                                   ; preds = %._crit_edge116.loopexit.unr-lcssa, %.lr.ph115.epil
  %indvars.iv149.epil = phi i64 [ %indvars.iv.next150.epil, %.lr.ph115.epil ], [ %indvars.iv149.unr, %._crit_edge116.loopexit.unr-lcssa ]
  %.068113.epil = phi double [ %195, %.lr.ph115.epil ], [ %.068113.unr, %._crit_edge116.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph115.epil ], [ 0, %._crit_edge116.loopexit.unr-lcssa ]
  %189 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv149.epil
  %190 = load i64, ptr %189, align 8, !tbaa !11
  %191 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv149.epil
  %192 = load i64, ptr %191, align 8, !tbaa !11
  %193 = mul nsw i64 %192, %190
  %194 = sitofp i64 %193 to double
  %195 = fadd double %.068113.epil, %194
  %indvars.iv.next150.epil = add nuw nsw i64 %indvars.iv149.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter191
  br i1 %epil.iter.cmp.not, label %._crit_edge116, label %.lr.ph115.epil, !llvm.loop !22

._crit_edge116:                                   ; preds = %._crit_edge116.loopexit.unr-lcssa, %.lr.ph115.epil, %.preheader
  %.068.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %.lcssa180.ph, %._crit_edge116.loopexit.unr-lcssa ], [ %195, %.lr.ph115.epil ]
  %196 = load i32, ptr @N, align 4, !tbaa !5
  %197 = sitofp i32 %196 to double
  %198 = fdiv double %.068.lcssa, %197
  %199 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
  %200 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %199, double noundef %198)
  %201 = tail call 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_)
  %202 = load i32, ptr @M, align 4, !tbaa !5
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %.lr.ph121, label %._crit_edge122

.lr.ph115:                                        ; preds = %.lr.ph115, %.lr.ph115.preheader.new
  %indvars.iv149 = phi i64 [ 0, %.lr.ph115.preheader.new ], [ %indvars.iv.next150.3, %.lr.ph115 ]
  %.068113 = phi double [ 0.000000e+00, %.lr.ph115.preheader.new ], [ %231, %.lr.ph115 ]
  %niter = phi i64 [ 0, %.lr.ph115.preheader.new ], [ %niter.next.3, %.lr.ph115 ]
  %204 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv149
  %205 = load i64, ptr %204, align 16, !tbaa !11
  %206 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv149
  %207 = load i64, ptr %206, align 16, !tbaa !11
  %208 = mul nsw i64 %207, %205
  %209 = sitofp i64 %208 to double
  %210 = fadd double %.068113, %209
  %indvars.iv.next150 = or disjoint i64 %indvars.iv149, 1
  %211 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next150
  %212 = load i64, ptr %211, align 8, !tbaa !11
  %213 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv.next150
  %214 = load i64, ptr %213, align 8, !tbaa !11
  %215 = mul nsw i64 %214, %212
  %216 = sitofp i64 %215 to double
  %217 = fadd double %210, %216
  %indvars.iv.next150.1 = or disjoint i64 %indvars.iv149, 2
  %218 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next150.1
  %219 = load i64, ptr %218, align 16, !tbaa !11
  %220 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv.next150.1
  %221 = load i64, ptr %220, align 16, !tbaa !11
  %222 = mul nsw i64 %221, %219
  %223 = sitofp i64 %222 to double
  %224 = fadd double %217, %223
  %indvars.iv.next150.2 = or disjoint i64 %indvars.iv149, 3
  %225 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv.next150.2
  %226 = load i64, ptr %225, align 8, !tbaa !11
  %227 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv.next150.2
  %228 = load i64, ptr %227, align 8, !tbaa !11
  %229 = mul nsw i64 %228, %226
  %230 = sitofp i64 %229 to double
  %231 = fadd double %224, %230
  %indvars.iv.next150.3 = add nuw nsw i64 %indvars.iv149, 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_edge116.loopexit.unr-lcssa, label %.lr.ph115, !llvm.loop !24

._crit_edge122:                                   ; preds = %.lr.ph121, %._crit_edge116
  %.066.lcssa = phi double [ 0.000000e+00, %._crit_edge116 ], [ %259, %.lr.ph121 ]
  %232 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %233 = tail call i32 @_ZSt12setprecisioni(i32 noundef 12)
  %234 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %232, i32 %233)
  %235 = load i32, ptr @N, align 4, !tbaa !5
  %236 = sitofp i32 %235 to double
  %237 = fmul double %.066.lcssa, %236
  %238 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %234, double noundef %237)
  %239 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph121:                                        ; preds = %._crit_edge116, %.lr.ph121
  %indvars.iv154 = phi i64 [ %indvars.iv.next155, %.lr.ph121 ], [ 0, %._crit_edge116 ]
  %.066118 = phi double [ %259, %.lr.ph121 ], [ 0.000000e+00, %._crit_edge116 ]
  %240 = getelementptr inbounds [2010 x i64], ptr @p, i64 0, i64 %indvars.iv154
  %241 = load i64, ptr %240, align 8, !tbaa !11
  %242 = sitofp i64 %241 to double
  %243 = load i64, ptr @q, align 8, !tbaa !11
  %244 = sitofp i64 %243 to double
  %245 = fdiv double %242, %244
  %246 = getelementptr inbounds [2010 x i64], ptr @r, i64 0, i64 %indvars.iv154
  %247 = load i64, ptr %246, align 8, !tbaa !11
  %248 = sitofp i64 %247 to double
  %249 = load i32, ptr @N, align 4, !tbaa !5
  %250 = sitofp i32 %249 to double
  %251 = fdiv double %248, %250
  %252 = fsub double %245, %251
  %253 = tail call noundef double @_ZSt3absd(double noundef %252)
  %254 = getelementptr inbounds [2010 x i64], ptr @x, i64 0, i64 %indvars.iv154
  %255 = load i64, ptr %254, align 8, !tbaa !11
  %256 = sitofp i64 %255 to double
  %257 = fsub double %256, %198
  %258 = tail call noundef double @_ZSt3absd(double noundef %257)
  %259 = tail call double @llvm.fmuladd.f64(double %253, double %258, double %.066118)
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %260 = load i32, ptr @M, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = icmp slt i64 %indvars.iv.next155, %261
  br i1 %262, label %.lr.ph121, label %._crit_edge122, !llvm.loop !25
}

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

; Function Attrs: mustprogress 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 #2 align 2

; 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 #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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 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 #2 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)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #4

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

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

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


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