; LLVM IR from kazunetakahashi/atcoder :: 2017/0701_ARC077 (E)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [100010 x i64], align 16
@imos = external dso_local global [3 x [100010 x i64]], 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 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 i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %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) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %29, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = load i64, ptr @n, align 8, !tbaa !9
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %24, label %23

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

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

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !11

32:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %80, %32
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = load i64, ptr @n, align 8, !tbaa !9
  %37 = sub nsw i64 %36, 1
  %38 = icmp slt i64 %35, %37
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %33
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = icmp sgt i64 %45, %49
  br i1 %50, label %51, label %64

51:                                               ; preds = %40
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = sub nsw i64 %56, %60
  %62 = load i64, ptr %3, align 8, !tbaa !9
  %63 = add nsw i64 %62, %61
  store i64 %63, ptr %3, align 8, !tbaa !9
  br label %79

64:                                               ; preds = %40
  %65 = load i64, ptr @m, align 8, !tbaa !9
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = sub nsw i64 %65, %69
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = add nsw i64 %70, %75
  %77 = load i64, ptr %3, align 8, !tbaa !9
  %78 = add nsw i64 %77, %76
  store i64 %78, ptr %3, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %64, %51
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %4, align 4, !tbaa !5
  br label %33, !llvm.loop !13

83:                                               ; preds = %39
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %85 = load i64, ptr %3, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %84, i64 noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @imos, ptr noundef getelementptr inbounds (i64, ptr @imos, i64 300030), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %197, %83
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = load i64, ptr @n, align 8, !tbaa !9
  %92 = sub nsw i64 %91, 1
  %93 = icmp slt i64 %90, %92
  br i1 %93, label %95, label %94

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

95:                                               ; preds = %88
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = icmp slt i64 %99, %104
  br i1 %105, label %106, label %144

106:                                              ; preds = %95
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = add nsw i64 %110, 2
  %112 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %112, align 8, !tbaa !9
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !9
  %120 = add nsw i64 %119, 1
  %121 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  store i64 %123, ptr %121, align 8, !tbaa !9
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = add nsw i64 %132, 1
  %134 = sub nsw i64 %128, %133
  %135 = load i32, ptr %6, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = add nsw i64 %139, 1
  %141 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !9
  %143 = sub nsw i64 %142, %134
  store i64 %143, ptr %141, align 8, !tbaa !9
  br label %196

144:                                              ; preds = %95
  %145 = load i64, ptr getelementptr inbounds ([100010 x i64], ptr @imos, i64 0, i64 1), align 8, !tbaa !9
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr getelementptr inbounds ([100010 x i64], ptr @imos, i64 0, i64 1), align 8, !tbaa !9
  %147 = load i32, ptr %6, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !9
  %152 = add nsw i64 %151, 1
  %153 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = sub nsw i64 %154, 1
  store i64 %155, ptr %153, align 8, !tbaa !9
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !9
  %160 = add nsw i64 %159, 2
  %161 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %161, align 8, !tbaa !9
  %164 = load i64, ptr @m, align 8, !tbaa !9
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !9
  %169 = add nsw i64 %168, 1
  %170 = sub nsw i64 %164, %169
  %171 = load i64, ptr getelementptr inbounds ([100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 1), align 8, !tbaa !9
  %172 = add nsw i64 %171, %170
  store i64 %172, ptr getelementptr inbounds ([100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 1), align 8, !tbaa !9
  %173 = load i64, ptr @m, align 8, !tbaa !9
  %174 = load i32, ptr %6, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %175
  %177 = load i64, ptr %176, align 8, !tbaa !9
  %178 = add nsw i64 %177, 1
  %179 = sub nsw i64 %173, %178
  %180 = load i32, ptr %6, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !9
  %185 = add nsw i64 %184, 1
  %186 = add nsw i64 %179, %185
  %187 = load i32, ptr %6, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !9
  %192 = add nsw i64 %191, 1
  %193 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !9
  %195 = sub nsw i64 %194, %186
  store i64 %195, ptr %193, align 8, !tbaa !9
  br label %196

196:                                              ; preds = %144, %106
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %6, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %6, align 4, !tbaa !5
  br label %88, !llvm.loop !14

200:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %201

201:                                              ; preds = %234, %200
  %202 = load i32, ptr %7, align 4, !tbaa !5
  %203 = icmp slt i32 %202, 3
  br i1 %203, label %205, label %204

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

205:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %230, %205
  %207 = load i32, ptr %9, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = load i64, ptr @m, align 8, !tbaa !9
  %210 = add nsw i64 %209, 2
  %211 = icmp slt i64 %208, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %206
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %233

213:                                              ; preds = %206
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
  %215 = load i32, ptr %7, align 4, !tbaa !5
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %214, i32 noundef %215)
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef @.str.2)
  %218 = load i32, ptr %9, align 4, !tbaa !5
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %217, i32 noundef %218)
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef @.str.3)
  %221 = load i32, ptr %7, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 %222
  %224 = load i32, ptr %9, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100010 x i64], ptr %223, i64 0, i64 %225
  %227 = load i64, ptr %226, align 8, !tbaa !9
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %220, i64 noundef %227)
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %230

230:                                              ; preds = %213
  %231 = load i32, ptr %9, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %9, align 4, !tbaa !5
  br label %206, !llvm.loop !15

233:                                              ; preds = %212
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %7, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %7, align 4, !tbaa !5
  br label %201, !llvm.loop !16

237:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %303, %237
  %239 = load i32, ptr %10, align 4, !tbaa !5
  %240 = icmp slt i32 %239, 3
  br i1 %240, label %242, label %241

241:                                              ; preds = %238
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %306

242:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %267, %242
  %244 = load i32, ptr %11, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = load i64, ptr @m, align 8, !tbaa !9
  %247 = add nsw i64 %246, 2
  %248 = icmp slt i64 %245, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %243
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %270

250:                                              ; preds = %243
  %251 = load i32, ptr %10, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 %252
  %254 = load i32, ptr %11, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [100010 x i64], ptr %253, i64 0, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !9
  %258 = load i32, ptr %10, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 %259
  %261 = load i32, ptr %11, align 4, !tbaa !5
  %262 = add nsw i32 %261, 1
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [100010 x i64], ptr %260, i64 0, i64 %263
  %265 = load i64, ptr %264, align 8, !tbaa !9
  %266 = add nsw i64 %265, %257
  store i64 %266, ptr %264, align 8, !tbaa !9
  br label %267

267:                                              ; preds = %250
  %268 = load i32, ptr %11, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %11, align 4, !tbaa !5
  br label %243, !llvm.loop !17

270:                                              ; preds = %249
  %271 = load i32, ptr %10, align 4, !tbaa !5
  %272 = icmp slt i32 %271, 2
  br i1 %272, label %273, label %302

273:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %298, %273
  %275 = load i32, ptr %12, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = load i64, ptr @m, align 8, !tbaa !9
  %278 = add nsw i64 %277, 2
  %279 = icmp sle i64 %276, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %274
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %301

281:                                              ; preds = %274
  %282 = load i32, ptr %10, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 %283
  %285 = load i32, ptr %12, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [100010 x i64], ptr %284, i64 0, i64 %286
  %288 = load i64, ptr %287, align 8, !tbaa !9
  %289 = load i32, ptr %10, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 %291
  %293 = load i32, ptr %12, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [100010 x i64], ptr %292, i64 0, i64 %294
  %296 = load i64, ptr %295, align 8, !tbaa !9
  %297 = add nsw i64 %296, %288
  store i64 %297, ptr %295, align 8, !tbaa !9
  br label %298

298:                                              ; preds = %281
  %299 = load i32, ptr %12, align 4, !tbaa !5
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %12, align 4, !tbaa !5
  br label %274, !llvm.loop !18

301:                                              ; preds = %280
  br label %302

302:                                              ; preds = %301, %270
  br label %303

303:                                              ; preds = %302
  %304 = load i32, ptr %10, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %10, align 4, !tbaa !5
  br label %238, !llvm.loop !19

306:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %327, %306
  %308 = load i32, ptr %13, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = load i64, ptr @m, align 8, !tbaa !9
  %311 = add nsw i64 %310, 2
  %312 = icmp slt i64 %309, %311
  br i1 %312, label %314, label %313

313:                                              ; preds = %307
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %330

314:                                              ; preds = %307
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %315, i32 noundef 2)
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %316, ptr noundef @.str.2)
  %318 = load i32, ptr %13, align 4, !tbaa !5
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %317, i32 noundef %318)
  %320 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %319, ptr noundef @.str.3)
  %321 = load i32, ptr %13, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 %322
  %324 = load i64, ptr %323, align 8, !tbaa !9
  %325 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %320, i64 noundef %324)
  %326 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %325, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %327

327:                                              ; preds = %314
  %328 = load i32, ptr %13, align 4, !tbaa !5
  %329 = add nsw i32 %328, 1
  store i32 %329, ptr %13, align 4, !tbaa !5
  br label %307, !llvm.loop !20

330:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %331

331:                                              ; preds = %343, %330
  %332 = load i32, ptr %15, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = load i64, ptr @m, align 8, !tbaa !9
  %335 = icmp sle i64 %333, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %331
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %346

337:                                              ; preds = %331
  %338 = load i32, ptr %15, align 4, !tbaa !5
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([3 x [100010 x i64]], ptr @imos, i64 0, i64 2), i64 0, i64 %339
  %341 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %340)
  %342 = load i64, ptr %341, align 8, !tbaa !9
  store i64 %342, ptr %14, align 8, !tbaa !9
  br label %343

343:                                              ; preds = %337
  %344 = load i32, ptr %15, align 4, !tbaa !5
  %345 = add nsw i32 %344, 1
  store i32 %345, ptr %15, align 4, !tbaa !5
  br label %331, !llvm.loop !21

346:                                              ; preds = %336
  %347 = load i64, ptr %3, align 8, !tbaa !9
  %348 = load i64, ptr %14, align 8, !tbaa !9
  %349 = sub nsw i64 %347, %348
  %350 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %349)
  %351 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %350, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %352 = load i32, ptr %1, align 4
  ret i32 %352
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #3

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

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

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

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nounwind }

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

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


; 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 i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [100010 x i64], align 16
@imos = external dso_local global [3 x [100010 x i64]], 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 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 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = 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) @n)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %5 = load i64, ptr @n, align 8, !tbaa !5
  %6 = icmp sgt i64 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.preheader99:                                     ; preds = %.lr.ph
  %7 = icmp sgt i64 %30, 1
  br i1 %7, label %.lr.ph104, label %._crit_edge

.lr.ph104:                                        ; preds = %.preheader99
  %8 = load i64, ptr @m, align 8
  %.pre = load i64, ptr @a, align 16, !tbaa !5
  %9 = add nsw i64 %30, -2
  %10 = add nsw i64 %30, -1
  %min.iters.check = icmp ult i64 %30, 5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph104
  %.ph = phi i64 [ %.pre, %.lr.ph104 ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv133.ph = phi i64 [ 0, %.lr.ph104 ], [ %n.vec, %middle.block ]
  %.069102.ph = phi i64 [ 0, %.lr.ph104 ], [ %27, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph104
  %n.vec = and i64 %10, -4
  %vector.recur.init = insertelement <2 x i64> poison, i64 %.pre, i64 1
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %8, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x i64> [ %vector.recur.init, %vector.ph ], [ %wide.load188, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %24, %vector.body ]
  %vec.phi187 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ]
  %11 = or disjoint i64 %index, 1
  %12 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %wide.load = load <2 x i64>, ptr %12, align 8, !tbaa !5
  %wide.load188 = load <2 x i64>, ptr %13, align 8, !tbaa !5
  %14 = shufflevector <2 x i64> %vector.recur, <2 x i64> %wide.load, <2 x i32> <i32 1, i32 2>
  %15 = shufflevector <2 x i64> %wide.load, <2 x i64> %wide.load188, <2 x i32> <i32 1, i32 2>
  %16 = icmp sgt <2 x i64> %wide.load, %14
  %17 = icmp sgt <2 x i64> %wide.load188, %15
  %18 = select <2 x i1> %16, <2 x i64> zeroinitializer, <2 x i64> %broadcast.splat
  %19 = select <2 x i1> %17, <2 x i64> zeroinitializer, <2 x i64> %broadcast.splat
  %20 = add <2 x i64> %wide.load, %vec.phi
  %21 = add <2 x i64> %wide.load188, %vec.phi187
  %22 = sub <2 x i64> %20, %14
  %23 = sub <2 x i64> %21, %15
  %24 = add <2 x i64> %22, %18
  %25 = add <2 x i64> %23, %19
  %index.next = add nuw i64 %index, 4
  %26 = icmp eq i64 %index.next, %n.vec
  br i1 %26, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %25, %24
  %27 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %vector.recur.extract = extractelement <2 x i64> %wide.load188, i64 1
  %cmp.n = icmp eq i64 %10, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %28 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %29 = 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) %28)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i64, ptr @n, align 8, !tbaa !5
  %31 = icmp sgt i64 %30, %indvars.iv.next
  br i1 %31, label %.lr.ph, label %.preheader99, !llvm.loop !13

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %0, %.preheader99
  %.069.lcssa = phi i64 [ 0, %.preheader99 ], [ 0, %0 ], [ %27, %middle.block ], [ %.1, %scalar.ph ]
  %32 = 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)
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %32, i64 noundef %.069.lcssa)
  %34 = tail call 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_)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !14
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @imos, ptr noundef nonnull getelementptr inbounds (i8, ptr @imos, i64 2400240), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %35 = load i64, ptr @n, align 8, !tbaa !5
  %36 = icmp sgt i64 %35, 1
  %.pre167 = load i64, ptr @m, align 8
  br i1 %36, label %.lr.ph108, label %.preheader98

.lr.ph108:                                        ; preds = %._crit_edge
  %.pre166 = load i64, ptr @a, align 16, !tbaa !5
  %37 = add nsw i64 %35, -2
  br label %43

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %38 = phi i64 [ %40, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %scalar.ph ], [ %indvars.iv133.ph, %scalar.ph.preheader ]
  %.069102 = phi i64 [ %.1, %scalar.ph ], [ %.069102.ph, %scalar.ph.preheader ]
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %39 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv.next134
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = icmp sgt i64 %40, %38
  %.pn.p.v = select i1 %41, i64 0, i64 %8
  %.pn.p = add i64 %40, %.069102
  %.pn = sub i64 %.pn.p, %38
  %.1 = add i64 %.pn, %.pn.p.v
  %exitcond.not = icmp eq i64 %indvars.iv133, %9
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !16

.preheader98:                                     ; preds = %77, %._crit_edge
  %42 = icmp sgt i64 %.pre167, -1
  br i1 %42, label %.lr.ph110, label %.preheader96

43:                                               ; preds = %.lr.ph108, %77
  %44 = phi i64 [ %.pre166, %.lr.ph108 ], [ %46, %77 ]
  %indvars.iv136 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next137, %77 ]
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %45 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv.next137
  %46 = load i64, ptr %45, align 8, !tbaa !5
  %47 = icmp slt i64 %44, %46
  br i1 %47, label %48, label %60

48:                                               ; preds = %43
  %49 = add nsw i64 %44, 2
  %50 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %50, align 8, !tbaa !5
  %53 = add nsw i64 %46, 1
  %54 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = add nsw i64 %55, -1
  store i64 %56, ptr %54, align 8, !tbaa !5
  %.neg87.neg130 = add nsw i64 %44, 1
  %57 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @imos, i64 1600160), i64 0, i64 %53
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %.neg92 = sub i64 %.neg87.neg130, %46
  %59 = add i64 %.neg92, %58
  store i64 %59, ptr %57, align 8, !tbaa !5
  br label %77

60:                                               ; preds = %43
  %61 = load i64, ptr getelementptr inbounds (i8, ptr @imos, i64 8), align 8, !tbaa !5
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr getelementptr inbounds (i8, ptr @imos, i64 8), align 8, !tbaa !5
  %63 = add nsw i64 %46, 1
  %64 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = add nsw i64 %65, -1
  store i64 %66, ptr %64, align 8, !tbaa !5
  %67 = add nsw i64 %44, 2
  %68 = getelementptr inbounds [100010 x i64], ptr @imos, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %68, align 8, !tbaa !5
  %.neg = xor i64 %44, -1
  %71 = add i64 %.pre167, %.neg
  %72 = load i64, ptr getelementptr inbounds (i8, ptr @imos, i64 1600168), align 8, !tbaa !5
  %73 = add nsw i64 %72, %71
  store i64 %73, ptr getelementptr inbounds (i8, ptr @imos, i64 1600168), align 8, !tbaa !5
  %74 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @imos, i64 1600160), i64 0, i64 %63
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %.neg88 = xor i64 %46, -1
  %.neg90 = sub i64 %.neg88, %71
  %76 = add i64 %.neg90, %75
  store i64 %76, ptr %74, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %48, %60
  %exitcond139.not = icmp eq i64 %indvars.iv136, %37
  br i1 %exitcond139.not, label %.preheader98, label %43, !llvm.loop !17

.preheader96:                                     ; preds = %.lr.ph110.2, %._crit_edge111, %._crit_edge111.1, %.preheader98
  %78 = phi i64 [ %.pre167, %.preheader98 ], [ %92, %._crit_edge111.1 ], [ %115, %._crit_edge111 ], [ %104, %.lr.ph110.2 ]
  %79 = add i64 %78, 2
  %80 = icmp sgt i64 %78, -2
  %.not85117 = icmp slt i64 %78, -2
  %smax = call i64 @llvm.smax.i64(i64 %79, i64 1)
  %smax154 = call i64 @llvm.smax.i64(i64 %79, i64 0)
  br i1 %80, label %.lr.ph114, label %._crit_edge115

._crit_edge111:                                   ; preds = %.lr.ph110
  %81 = icmp sgt i64 %115, -1
  br i1 %81, label %.lr.ph110.1, label %.preheader96

.lr.ph110.1:                                      ; preds = %._crit_edge111, %.lr.ph110.1
  %indvars.iv140.1 = phi i64 [ %indvars.iv.next141.1, %.lr.ph110.1 ], [ 1, %._crit_edge111 ]
  %82 = 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.1)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef 1)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str.2)
  %85 = trunc nuw nsw i64 %indvars.iv140.1 to i32
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %84, i32 noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @.str.3)
  %88 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv140.1
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %87, i64 noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next141.1 = add nuw nsw i64 %indvars.iv140.1, 1
  %92 = load i64, ptr @m, align 8, !tbaa !5
  %.not172 = icmp slt i64 %92, %indvars.iv140.1
  br i1 %.not172, label %._crit_edge111.1, label %.lr.ph110.1, !llvm.loop !18

._crit_edge111.1:                                 ; preds = %.lr.ph110.1
  %93 = icmp sgt i64 %92, -1
  br i1 %93, label %.lr.ph110.2, label %.preheader96

.lr.ph110.2:                                      ; preds = %._crit_edge111.1, %.lr.ph110.2
  %indvars.iv140.2 = phi i64 [ %indvars.iv.next141.2, %.lr.ph110.2 ], [ 1, %._crit_edge111.1 ]
  %94 = 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.1)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef 2)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str.2)
  %97 = trunc nuw nsw i64 %indvars.iv140.2 to i32
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %96, i32 noundef %97)
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.3)
  %100 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv140.2
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %99, i64 noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next141.2 = add nuw nsw i64 %indvars.iv140.2, 1
  %104 = load i64, ptr @m, align 8, !tbaa !5
  %.not173 = icmp slt i64 %104, %indvars.iv140.2
  br i1 %.not173, label %.preheader96, label %.lr.ph110.2, !llvm.loop !18

.lr.ph110:                                        ; preds = %.preheader98, %.lr.ph110
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %.lr.ph110 ], [ 1, %.preheader98 ]
  %105 = 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.1)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %105, i32 noundef 0)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @.str.2)
  %108 = trunc nuw nsw i64 %indvars.iv140 to i32
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 noundef %108)
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @.str.3)
  %111 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv140
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %110, i64 noundef %112)
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %115 = load i64, ptr @m, align 8, !tbaa !5
  %.not171 = icmp slt i64 %115, %indvars.iv140
  br i1 %.not171, label %._crit_edge111, label %.lr.ph110, !llvm.loop !18

.lr.ph114:                                        ; preds = %.preheader96
  %.pre168 = load i64, ptr @imos, align 16, !tbaa !5
  %xtraiter = and i64 %smax, 3
  %116 = icmp slt i64 %79, 4
  br i1 %116, label %._crit_edge115.loopexit.unr-lcssa, label %.lr.ph114.new

.lr.ph114.new:                                    ; preds = %.lr.ph114
  %unroll_iter = and i64 %smax, 9223372036854775804
  br label %126

._crit_edge115.loopexit.unr-lcssa:                ; preds = %126, %.lr.ph114
  %.unr = phi i64 [ %.pre168, %.lr.ph114 ], [ %139, %126 ]
  %indvars.iv147.unr = phi i64 [ 0, %.lr.ph114 ], [ %indvars.iv.next148.3, %126 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge115, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge115.loopexit.unr-lcssa, %.epil.preheader
  %117 = phi i64 [ %120, %.epil.preheader ], [ %.unr, %._crit_edge115.loopexit.unr-lcssa ]
  %indvars.iv147.epil = phi i64 [ %indvars.iv.next148.epil, %.epil.preheader ], [ %indvars.iv147.unr, %._crit_edge115.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge115.loopexit.unr-lcssa ]
  %indvars.iv.next148.epil = add nuw nsw i64 %indvars.iv147.epil, 1
  %118 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv.next148.epil
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %120 = add nsw i64 %119, %117
  store i64 %120, ptr %118, align 8, !tbaa !5
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge115, label %.epil.preheader, !llvm.loop !19

._crit_edge115:                                   ; preds = %._crit_edge115.loopexit.unr-lcssa, %.epil.preheader, %.preheader96
  br i1 %.not85117, label %._crit_edge124.thread, label %.lr.ph119.preheader

.lr.ph119.preheader:                              ; preds = %._crit_edge115
  %121 = add nuw i64 %smax154, 1
  %min.iters.check191 = icmp slt i64 %79, 1
  br i1 %min.iters.check191, label %.lr.ph119.preheader217, label %vector.ph192

.lr.ph119.preheader217:                           ; preds = %middle.block189, %.lr.ph119.preheader
  %indvars.iv151.ph = phi i64 [ 0, %.lr.ph119.preheader ], [ %n.vec194, %middle.block189 ]
  br label %.lr.ph119

vector.ph192:                                     ; preds = %.lr.ph119.preheader
  %n.vec194 = and i64 %121, -2
  br label %vector.body196

vector.body196:                                   ; preds = %vector.body196, %vector.ph192
  %index197 = phi i64 [ 0, %vector.ph192 ], [ %index.next200, %vector.body196 ]
  %122 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %index197
  %wide.load198 = load <2 x i64>, ptr %122, align 16, !tbaa !5
  %123 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %index197
  %wide.load199 = load <2 x i64>, ptr %123, align 16, !tbaa !5
  %124 = add nsw <2 x i64> %wide.load199, %wide.load198
  store <2 x i64> %124, ptr %123, align 16, !tbaa !5
  %index.next200 = add nuw i64 %index197, 2
  %125 = icmp eq i64 %index.next200, %n.vec194
  br i1 %125, label %middle.block189, label %vector.body196, !llvm.loop !21

middle.block189:                                  ; preds = %vector.body196
  %cmp.n201 = icmp eq i64 %121, %n.vec194
  br i1 %cmp.n201, label %.loopexit, label %.lr.ph119.preheader217

126:                                              ; preds = %126, %.lr.ph114.new
  %127 = phi i64 [ %.pre168, %.lr.ph114.new ], [ %139, %126 ]
  %indvars.iv147 = phi i64 [ 0, %.lr.ph114.new ], [ %indvars.iv.next148.3, %126 ]
  %niter = phi i64 [ 0, %.lr.ph114.new ], [ %niter.next.3, %126 ]
  %indvars.iv.next148 = or disjoint i64 %indvars.iv147, 1
  %128 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv.next148
  %129 = load i64, ptr %128, align 8, !tbaa !5
  %130 = add nsw i64 %129, %127
  store i64 %130, ptr %128, align 8, !tbaa !5
  %indvars.iv.next148.1225 = or disjoint i64 %indvars.iv147, 2
  %131 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv.next148.1225
  %132 = load i64, ptr %131, align 16, !tbaa !5
  %133 = add nsw i64 %132, %130
  store i64 %133, ptr %131, align 16, !tbaa !5
  %indvars.iv.next148.2227 = or disjoint i64 %indvars.iv147, 3
  %134 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv.next148.2227
  %135 = load i64, ptr %134, align 8, !tbaa !5
  %136 = add nsw i64 %135, %133
  store i64 %136, ptr %134, align 8, !tbaa !5
  %indvars.iv.next148.3 = add nuw nsw i64 %indvars.iv147, 4
  %137 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv.next148.3
  %138 = load i64, ptr %137, align 16, !tbaa !5
  %139 = add nsw i64 %138, %136
  store i64 %139, ptr %137, align 16, !tbaa !5
  %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_edge115.loopexit.unr-lcssa, label %126, !llvm.loop !22

.lr.ph119:                                        ; preds = %.lr.ph119.preheader217, %.lr.ph119
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %.lr.ph119 ], [ %indvars.iv151.ph, %.lr.ph119.preheader217 ]
  %140 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 0, i64 %indvars.iv151
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv151
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = add nsw i64 %143, %141
  store i64 %144, ptr %142, align 8, !tbaa !5
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155 = icmp eq i64 %indvars.iv151, %smax154
  br i1 %exitcond155, label %.loopexit, label %.lr.ph119, !llvm.loop !23

.loopexit:                                        ; preds = %.lr.ph119, %middle.block189
  br i1 %80, label %.lr.ph114.1, label %._crit_edge115.1

.lr.ph114.1:                                      ; preds = %.loopexit
  %.pre169 = load i64, ptr getelementptr inbounds (i8, ptr @imos, i64 800080), align 16, !tbaa !5
  %xtraiter229 = and i64 %smax, 3
  %145 = icmp slt i64 %79, 4
  br i1 %145, label %._crit_edge115.1.loopexit.unr-lcssa, label %.lr.ph114.1.new

.lr.ph114.1.new:                                  ; preds = %.lr.ph114.1
  %unroll_iter233 = and i64 %smax, 9223372036854775804
  br label %146

146:                                              ; preds = %146, %.lr.ph114.1.new
  %147 = phi i64 [ %.pre169, %.lr.ph114.1.new ], [ %159, %146 ]
  %indvars.iv147.1 = phi i64 [ 0, %.lr.ph114.1.new ], [ %indvars.iv.next148.1.3, %146 ]
  %niter234 = phi i64 [ 0, %.lr.ph114.1.new ], [ %niter234.next.3, %146 ]
  %indvars.iv.next148.1 = or disjoint i64 %indvars.iv147.1, 1
  %148 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv.next148.1
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = add nsw i64 %149, %147
  store i64 %150, ptr %148, align 8, !tbaa !5
  %indvars.iv.next148.1.1 = or disjoint i64 %indvars.iv147.1, 2
  %151 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv.next148.1.1
  %152 = load i64, ptr %151, align 16, !tbaa !5
  %153 = add nsw i64 %152, %150
  store i64 %153, ptr %151, align 16, !tbaa !5
  %indvars.iv.next148.1.2 = or disjoint i64 %indvars.iv147.1, 3
  %154 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv.next148.1.2
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = add nsw i64 %155, %153
  store i64 %156, ptr %154, align 8, !tbaa !5
  %indvars.iv.next148.1.3 = add nuw nsw i64 %indvars.iv147.1, 4
  %157 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv.next148.1.3
  %158 = load i64, ptr %157, align 16, !tbaa !5
  %159 = add nsw i64 %158, %156
  store i64 %159, ptr %157, align 16, !tbaa !5
  %niter234.next.3 = add i64 %niter234, 4
  %niter234.ncmp.3 = icmp eq i64 %niter234.next.3, %unroll_iter233
  br i1 %niter234.ncmp.3, label %._crit_edge115.1.loopexit.unr-lcssa, label %146, !llvm.loop !22

._crit_edge115.1.loopexit.unr-lcssa:              ; preds = %146, %.lr.ph114.1
  %.unr231 = phi i64 [ %.pre169, %.lr.ph114.1 ], [ %159, %146 ]
  %indvars.iv147.1.unr = phi i64 [ 0, %.lr.ph114.1 ], [ %indvars.iv.next148.1.3, %146 ]
  %lcmp.mod232.not = icmp eq i64 %xtraiter229, 0
  br i1 %lcmp.mod232.not, label %._crit_edge115.1, label %.epil.preheader228

.epil.preheader228:                               ; preds = %._crit_edge115.1.loopexit.unr-lcssa, %.epil.preheader228
  %160 = phi i64 [ %163, %.epil.preheader228 ], [ %.unr231, %._crit_edge115.1.loopexit.unr-lcssa ]
  %indvars.iv147.1.epil = phi i64 [ %indvars.iv.next148.1.epil, %.epil.preheader228 ], [ %indvars.iv147.1.unr, %._crit_edge115.1.loopexit.unr-lcssa ]
  %epil.iter230 = phi i64 [ %epil.iter230.next, %.epil.preheader228 ], [ 0, %._crit_edge115.1.loopexit.unr-lcssa ]
  %indvars.iv.next148.1.epil = add nuw nsw i64 %indvars.iv147.1.epil, 1
  %161 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv.next148.1.epil
  %162 = load i64, ptr %161, align 8, !tbaa !5
  %163 = add nsw i64 %162, %160
  store i64 %163, ptr %161, align 8, !tbaa !5
  %epil.iter230.next = add i64 %epil.iter230, 1
  %epil.iter230.cmp.not = icmp eq i64 %epil.iter230.next, %xtraiter229
  br i1 %epil.iter230.cmp.not, label %._crit_edge115.1, label %.epil.preheader228, !llvm.loop !24

._crit_edge115.1:                                 ; preds = %._crit_edge115.1.loopexit.unr-lcssa, %.epil.preheader228, %.loopexit
  br i1 %.not85117, label %._crit_edge124.thread, label %.lr.ph119.1.preheader

.lr.ph119.1.preheader:                            ; preds = %._crit_edge115.1
  %164 = add nuw i64 %smax154, 1
  %min.iters.check204 = icmp slt i64 %79, 1
  br i1 %min.iters.check204, label %.lr.ph119.1.preheader216, label %vector.ph205

vector.ph205:                                     ; preds = %.lr.ph119.1.preheader
  %n.vec207 = and i64 %164, -2
  br label %vector.body209

vector.body209:                                   ; preds = %vector.body209, %vector.ph205
  %index210 = phi i64 [ 0, %vector.ph205 ], [ %index.next213, %vector.body209 ]
  %165 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %index210
  %wide.load211 = load <2 x i64>, ptr %165, align 16, !tbaa !5
  %166 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %index210
  %wide.load212 = load <2 x i64>, ptr %166, align 16, !tbaa !5
  %167 = add nsw <2 x i64> %wide.load212, %wide.load211
  store <2 x i64> %167, ptr %166, align 16, !tbaa !5
  %index.next213 = add nuw i64 %index210, 2
  %168 = icmp eq i64 %index.next213, %n.vec207
  br i1 %168, label %middle.block202, label %vector.body209, !llvm.loop !25

middle.block202:                                  ; preds = %vector.body209
  %cmp.n214 = icmp eq i64 %164, %n.vec207
  br i1 %cmp.n214, label %.loopexit.1, label %.lr.ph119.1.preheader216

.lr.ph119.1.preheader216:                         ; preds = %middle.block202, %.lr.ph119.1.preheader
  %indvars.iv151.1.ph = phi i64 [ 0, %.lr.ph119.1.preheader ], [ %n.vec207, %middle.block202 ]
  br label %.lr.ph119.1

.lr.ph119.1:                                      ; preds = %.lr.ph119.1.preheader216, %.lr.ph119.1
  %indvars.iv151.1 = phi i64 [ %indvars.iv.next152.1, %.lr.ph119.1 ], [ %indvars.iv151.1.ph, %.lr.ph119.1.preheader216 ]
  %169 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 1, i64 %indvars.iv151.1
  %170 = load i64, ptr %169, align 8, !tbaa !5
  %171 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv151.1
  %172 = load i64, ptr %171, align 8, !tbaa !5
  %173 = add nsw i64 %172, %170
  store i64 %173, ptr %171, align 8, !tbaa !5
  %indvars.iv.next152.1 = add nuw nsw i64 %indvars.iv151.1, 1
  %exitcond155.1 = icmp eq i64 %indvars.iv151.1, %smax154
  br i1 %exitcond155.1, label %.loopexit.1, label %.lr.ph119.1, !llvm.loop !26

.loopexit.1:                                      ; preds = %.lr.ph119.1, %middle.block202
  br i1 %80, label %.lr.ph114.2, label %._crit_edge124.thread

.lr.ph114.2:                                      ; preds = %.loopexit.1
  %.pre170 = load i64, ptr getelementptr inbounds (i8, ptr @imos, i64 1600160), align 16, !tbaa !5
  %xtraiter236 = and i64 %smax, 3
  %174 = icmp slt i64 %79, 4
  br i1 %174, label %.loopexit.2.unr-lcssa, label %.lr.ph114.2.new

.lr.ph114.2.new:                                  ; preds = %.lr.ph114.2
  %unroll_iter240 = and i64 %smax, 9223372036854775804
  br label %175

175:                                              ; preds = %175, %.lr.ph114.2.new
  %176 = phi i64 [ %.pre170, %.lr.ph114.2.new ], [ %188, %175 ]
  %indvars.iv147.2 = phi i64 [ 0, %.lr.ph114.2.new ], [ %indvars.iv.next148.2.3, %175 ]
  %niter241 = phi i64 [ 0, %.lr.ph114.2.new ], [ %niter241.next.3, %175 ]
  %indvars.iv.next148.2 = or disjoint i64 %indvars.iv147.2, 1
  %177 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv.next148.2
  %178 = load i64, ptr %177, align 8, !tbaa !5
  %179 = add nsw i64 %178, %176
  store i64 %179, ptr %177, align 8, !tbaa !5
  %indvars.iv.next148.2.1 = or disjoint i64 %indvars.iv147.2, 2
  %180 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv.next148.2.1
  %181 = load i64, ptr %180, align 16, !tbaa !5
  %182 = add nsw i64 %181, %179
  store i64 %182, ptr %180, align 16, !tbaa !5
  %indvars.iv.next148.2.2 = or disjoint i64 %indvars.iv147.2, 3
  %183 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv.next148.2.2
  %184 = load i64, ptr %183, align 8, !tbaa !5
  %185 = add nsw i64 %184, %182
  store i64 %185, ptr %183, align 8, !tbaa !5
  %indvars.iv.next148.2.3 = add nuw nsw i64 %indvars.iv147.2, 4
  %186 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv.next148.2.3
  %187 = load i64, ptr %186, align 16, !tbaa !5
  %188 = add nsw i64 %187, %185
  store i64 %188, ptr %186, align 16, !tbaa !5
  %niter241.next.3 = add i64 %niter241, 4
  %niter241.ncmp.3 = icmp eq i64 %niter241.next.3, %unroll_iter240
  br i1 %niter241.ncmp.3, label %.loopexit.2.unr-lcssa, label %175, !llvm.loop !22

.loopexit.2.unr-lcssa:                            ; preds = %175, %.lr.ph114.2
  %.unr238 = phi i64 [ %.pre170, %.lr.ph114.2 ], [ %188, %175 ]
  %indvars.iv147.2.unr = phi i64 [ 0, %.lr.ph114.2 ], [ %indvars.iv.next148.2.3, %175 ]
  %lcmp.mod239.not = icmp eq i64 %xtraiter236, 0
  br i1 %lcmp.mod239.not, label %.loopexit.2, label %.epil.preheader235

.epil.preheader235:                               ; preds = %.loopexit.2.unr-lcssa, %.epil.preheader235
  %189 = phi i64 [ %192, %.epil.preheader235 ], [ %.unr238, %.loopexit.2.unr-lcssa ]
  %indvars.iv147.2.epil = phi i64 [ %indvars.iv.next148.2.epil, %.epil.preheader235 ], [ %indvars.iv147.2.unr, %.loopexit.2.unr-lcssa ]
  %epil.iter237 = phi i64 [ %epil.iter237.next, %.epil.preheader235 ], [ 0, %.loopexit.2.unr-lcssa ]
  %indvars.iv.next148.2.epil = add nuw nsw i64 %indvars.iv147.2.epil, 1
  %190 = getelementptr inbounds [3 x [100010 x i64]], ptr @imos, i64 0, i64 2, i64 %indvars.iv.next148.2.epil
  %191 = load i64, ptr %190, align 8, !tbaa !5
  %192 = add nsw i64 %191, %189
  store i64 %192, ptr %190, align 8, !tbaa !5
  %epil.iter237.next = add i64 %epil.iter237, 1
  %epil.iter237.cmp.not = icmp eq i64 %epil.iter237.next, %xtraiter236
  br i1 %epil.iter237.cmp.not, label %.loopexit.2, label %.epil.preheader235, !llvm.loop !27

.loopexit.2:                                      ; preds = %.epil.preheader235, %.loopexit.2.unr-lcssa
  %193 = icmp sgt i64 %78, -1
  br i1 %193, label %.lr.ph123, label %._crit_edge124.thread

._crit_edge124.thread:                            ; preds = %.loopexit.2, %.loopexit.1, %._crit_edge115.1, %._crit_edge115
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !5
  br label %._crit_edge129

._crit_edge124:                                   ; preds = %.lr.ph123
  %194 = icmp slt i64 %205, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !5
  br i1 %194, label %._crit_edge129, label %.lr.ph128

.lr.ph123:                                        ; preds = %.loopexit.2, %.lr.ph123
  %indvars.iv160 = phi i64 [ %indvars.iv.next161, %.lr.ph123 ], [ 1, %.loopexit.2 ]
  %195 = 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.1)
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %195, i32 noundef 2)
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull @.str.2)
  %198 = trunc nuw nsw i64 %indvars.iv160 to i32
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %197, i32 noundef %198)
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef nonnull @.str.3)
  %201 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @imos, i64 1600160), i64 0, i64 %indvars.iv160
  %202 = load i64, ptr %201, align 8, !tbaa !5
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %200, i64 noundef %202)
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %203, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %205 = load i64, ptr @m, align 8, !tbaa !5
  %.not174 = icmp slt i64 %205, %indvars.iv160
  br i1 %.not174, label %._crit_edge124, label %.lr.ph123, !llvm.loop !28

._crit_edge129:                                   ; preds = %.lr.ph128, %._crit_edge124.thread, %._crit_edge124
  %206 = phi i64 [ 0, %._crit_edge124 ], [ 0, %._crit_edge124.thread ], [ %212, %.lr.ph128 ]
  %207 = sub nsw i64 %.069.lcssa, %206
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %207)
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret i32 0

.lr.ph128:                                        ; preds = %._crit_edge124, %.lr.ph128
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %.lr.ph128 ], [ 1, %._crit_edge124 ]
  %210 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @imos, i64 1600160), i64 0, i64 %indvars.iv163
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %210)
  %212 = load i64, ptr %211, align 8, !tbaa !5
  store i64 %212, ptr %2, align 8, !tbaa !5
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %213 = load i64, ptr @m, align 8, !tbaa !5
  %.not.not = icmp sgt i64 %213, %indvars.iv163
  br i1 %.not.not, label %.lr.ph128, label %._crit_edge129, !llvm.loop !29
}

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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

; 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 #1 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 #1 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 uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) 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 #4

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

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

; 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !10, !12, !11}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !10, !11, !12}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !12, !11}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !10, !11, !12}
!26 = distinct !{!26, !10, !12, !11}
!27 = distinct !{!27, !20}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}


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