; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/369 Division 2/Problem B (B)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@g = external dso_local global [510 x [510 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %29
  %31 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  %32 = 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)
  %33 = load i32, ptr @n, align 4, !tbaa !8
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %38

35:                                               ; preds = %0
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %294

38:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %74, %38
  %40 = load i32, ptr %4, align 4, !tbaa !8
  %41 = load i32, ptr @n, align 4, !tbaa !8
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

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

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

45:                                               ; preds = %70, %44
  %46 = load i32, ptr %6, align 4, !tbaa !8
  %47 = load i32, ptr @n, align 4, !tbaa !8
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %73

50:                                               ; preds = %45
  %51 = load i32, ptr %4, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %52
  %54 = load i32, ptr %6, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [510 x i64], ptr %53, i64 0, i64 %55
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = load i32, ptr %4, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %59
  %61 = load i32, ptr %6, align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [510 x i64], ptr %60, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !11
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %69, label %66

66:                                               ; preds = %50
  %67 = load i32, ptr %4, align 4, !tbaa !8
  store i32 %67, ptr %2, align 4, !tbaa !8
  %68 = load i32, ptr %6, align 4, !tbaa !8
  store i32 %68, ptr %3, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %66, %50
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %6, align 4, !tbaa !8
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %6, align 4, !tbaa !8
  br label %45, !llvm.loop !13

73:                                               ; preds = %49
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %4, align 4, !tbaa !8
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !8
  br label %39, !llvm.loop !15

77:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %78 = load i32, ptr %2, align 4, !tbaa !8
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %83

80:                                               ; preds = %77
  %81 = load i32, ptr %2, align 4, !tbaa !8
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !8
  br label %86

83:                                               ; preds = %77
  %84 = load i32, ptr %2, align 4, !tbaa !8
  %85 = sub nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %83, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %87

87:                                               ; preds = %102, %86
  %88 = load i32, ptr %9, align 4, !tbaa !8
  %89 = load i32, ptr @n, align 4, !tbaa !8
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %105

92:                                               ; preds = %87
  %93 = load i32, ptr %7, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %94
  %96 = load i32, ptr %9, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [510 x i64], ptr %95, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !11
  %100 = load i64, ptr %8, align 8, !tbaa !11
  %101 = add nsw i64 %100, %99
  store i64 %101, ptr %8, align 8, !tbaa !11
  br label %102

102:                                              ; preds = %92
  %103 = load i32, ptr %9, align 4, !tbaa !8
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %9, align 4, !tbaa !8
  br label %87, !llvm.loop !16

105:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %106

106:                                              ; preds = %121, %105
  %107 = load i32, ptr %11, align 4, !tbaa !8
  %108 = load i32, ptr @n, align 4, !tbaa !8
  %109 = icmp sle i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %124

111:                                              ; preds = %106
  %112 = load i32, ptr %2, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %113
  %115 = load i32, ptr %11, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [510 x i64], ptr %114, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = load i64, ptr %10, align 8, !tbaa !11
  %120 = add nsw i64 %119, %118
  store i64 %120, ptr %10, align 8, !tbaa !11
  br label %121

121:                                              ; preds = %111
  %122 = load i32, ptr %11, align 4, !tbaa !8
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %11, align 4, !tbaa !8
  br label %106, !llvm.loop !17

124:                                              ; preds = %110
  %125 = load i64, ptr %8, align 8, !tbaa !11
  %126 = load i64, ptr %10, align 8, !tbaa !11
  %127 = sub nsw i64 %125, %126
  %128 = load i32, ptr %2, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %129
  %131 = load i32, ptr %3, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [510 x i64], ptr %130, i64 0, i64 %132
  store i64 %127, ptr %133, align 8, !tbaa !11
  %134 = load i32, ptr %2, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %135
  %137 = load i32, ptr %3, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [510 x i64], ptr %136, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = icmp sle i64 %140, 0
  br i1 %141, label %142, label %145

142:                                              ; preds = %124
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %293

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

146:                                              ; preds = %181, %145
  %147 = load i32, ptr %12, align 4, !tbaa !8
  %148 = load i32, ptr @n, align 4, !tbaa !8
  %149 = icmp sle i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  store i32 14, ptr %5, align 4
  br label %184

151:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %152

152:                                              ; preds = %167, %151
  %153 = load i32, ptr %14, align 4, !tbaa !8
  %154 = load i32, ptr @n, align 4, !tbaa !8
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %170

157:                                              ; preds = %152
  %158 = load i32, ptr %12, align 4, !tbaa !8
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %159
  %161 = load i32, ptr %14, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [510 x i64], ptr %160, i64 0, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !11
  %165 = load i64, ptr %13, align 8, !tbaa !11
  %166 = add nsw i64 %165, %164
  store i64 %166, ptr %13, align 8, !tbaa !11
  br label %167

167:                                              ; preds = %157
  %168 = load i32, ptr %14, align 4, !tbaa !8
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %14, align 4, !tbaa !8
  br label %152, !llvm.loop !18

170:                                              ; preds = %156
  %171 = load i64, ptr %13, align 8, !tbaa !11
  %172 = load i64, ptr %8, align 8, !tbaa !11
  %173 = icmp ne i64 %171, %172
  br i1 %173, label %174, label %177

174:                                              ; preds = %170
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %178

177:                                              ; preds = %170
  store i32 0, ptr %5, align 4
  br label %178

178:                                              ; preds = %177, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %179 = load i32, ptr %5, align 4
  switch i32 %179, label %184 [
    i32 0, label %180
  ]

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %12, align 4, !tbaa !8
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %12, align 4, !tbaa !8
  br label %146, !llvm.loop !19

184:                                              ; preds = %178, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %185 = load i32, ptr %5, align 4
  switch i32 %185, label %293 [
    i32 14, label %186
  ]

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

187:                                              ; preds = %222, %186
  %188 = load i32, ptr %15, align 4, !tbaa !8
  %189 = load i32, ptr @n, align 4, !tbaa !8
  %190 = icmp sle i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 20, ptr %5, align 4
  br label %225

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

193:                                              ; preds = %208, %192
  %194 = load i32, ptr %17, align 4, !tbaa !8
  %195 = load i32, ptr @n, align 4, !tbaa !8
  %196 = icmp sle i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %193
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %211

198:                                              ; preds = %193
  %199 = load i32, ptr %17, align 4, !tbaa !8
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %200
  %202 = load i32, ptr %15, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [510 x i64], ptr %201, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !11
  %206 = load i64, ptr %16, align 8, !tbaa !11
  %207 = add nsw i64 %206, %205
  store i64 %207, ptr %16, align 8, !tbaa !11
  br label %208

208:                                              ; preds = %198
  %209 = load i32, ptr %17, align 4, !tbaa !8
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %17, align 4, !tbaa !8
  br label %193, !llvm.loop !20

211:                                              ; preds = %197
  %212 = load i64, ptr %16, align 8, !tbaa !11
  %213 = load i64, ptr %8, align 8, !tbaa !11
  %214 = icmp ne i64 %212, %213
  br i1 %214, label %215, label %218

215:                                              ; preds = %211
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %219

218:                                              ; preds = %211
  store i32 0, ptr %5, align 4
  br label %219

219:                                              ; preds = %218, %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %220 = load i32, ptr %5, align 4
  switch i32 %220, label %225 [
    i32 0, label %221
  ]

221:                                              ; preds = %219
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %15, align 4, !tbaa !8
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %15, align 4, !tbaa !8
  br label %187, !llvm.loop !21

225:                                              ; preds = %219, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  %226 = load i32, ptr %5, align 4
  switch i32 %226, label %293 [
    i32 20, label %227
  ]

227:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !8
  br label %228

228:                                              ; preds = %243, %227
  %229 = load i32, ptr %19, align 4, !tbaa !8
  %230 = load i32, ptr @n, align 4, !tbaa !8
  %231 = icmp sle i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %246

233:                                              ; preds = %228
  %234 = load i32, ptr %19, align 4, !tbaa !8
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %235
  %237 = load i32, ptr %19, align 4, !tbaa !8
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [510 x i64], ptr %236, i64 0, i64 %238
  %240 = load i64, ptr %239, align 8, !tbaa !11
  %241 = load i64, ptr %18, align 8, !tbaa !11
  %242 = add nsw i64 %241, %240
  store i64 %242, ptr %18, align 8, !tbaa !11
  br label %243

243:                                              ; preds = %233
  %244 = load i32, ptr %19, align 4, !tbaa !8
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %19, align 4, !tbaa !8
  br label %228, !llvm.loop !22

246:                                              ; preds = %232
  %247 = load i64, ptr %18, align 8, !tbaa !11
  %248 = load i64, ptr %8, align 8, !tbaa !11
  %249 = icmp ne i64 %247, %248
  br i1 %249, label %250, label %253

250:                                              ; preds = %246
  %251 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %251, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %292

253:                                              ; preds = %246
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !8
  br label %254

254:                                              ; preds = %272, %253
  %255 = load i32, ptr %20, align 4, !tbaa !8
  %256 = load i32, ptr @n, align 4, !tbaa !8
  %257 = icmp sle i32 %255, %256
  br i1 %257, label %259, label %258

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

259:                                              ; preds = %254
  %260 = load i32, ptr %20, align 4, !tbaa !8
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %261
  %263 = load i32, ptr @n, align 4, !tbaa !8
  %264 = load i32, ptr %20, align 4, !tbaa !8
  %265 = sub nsw i32 %263, %264
  %266 = add nsw i32 %265, 1
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [510 x i64], ptr %262, i64 0, i64 %267
  %269 = load i64, ptr %268, align 8, !tbaa !11
  %270 = load i64, ptr %18, align 8, !tbaa !11
  %271 = add nsw i64 %270, %269
  store i64 %271, ptr %18, align 8, !tbaa !11
  br label %272

272:                                              ; preds = %259
  %273 = load i32, ptr %20, align 4, !tbaa !8
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %20, align 4, !tbaa !8
  br label %254, !llvm.loop !23

275:                                              ; preds = %258
  %276 = load i64, ptr %18, align 8, !tbaa !11
  %277 = load i64, ptr %8, align 8, !tbaa !11
  %278 = icmp ne i64 %276, %277
  br i1 %278, label %279, label %282

279:                                              ; preds = %275
  %280 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %280, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %292

282:                                              ; preds = %275
  %283 = load i32, ptr %2, align 4, !tbaa !8
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %284
  %286 = load i32, ptr %3, align 4, !tbaa !8
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [510 x i64], ptr %285, i64 0, i64 %287
  %289 = load i64, ptr %288, align 8, !tbaa !11
  %290 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %289)
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %290, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %292

292:                                              ; preds = %282, %279, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %293

293:                                              ; preds = %292, %225, %184, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %294

294:                                              ; preds = %293, %35
  %295 = load i32, ptr %1, align 4
  ret i32 %295
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), 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) #3

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

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

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

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

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@g = external dso_local global [510 x [510 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = 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)
  %13 = load i32, ptr @n, align 4, !tbaa !8
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %15, label %.preheader125

.preheader125:                                    ; preds = %0
  %.not132 = icmp slt i32 %13, 1
  br i1 %.not132, label %.preheader123.._crit_edge152_crit_edge, label %.preheader124

15:                                               ; preds = %0
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  br label %149

.preheader124:                                    ; preds = %.preheader125, %._crit_edge
  %17 = phi i32 [ %30, %._crit_edge ], [ %13, %.preheader125 ]
  %indvars.iv193 = phi i64 [ %indvars.iv.next194, %._crit_edge ], [ 1, %.preheader125 ]
  %.088134 = phi i32 [ %.189.lcssa, %._crit_edge ], [ undef, %.preheader125 ]
  %.091133 = phi i32 [ %.192.lcssa, %._crit_edge ], [ undef, %.preheader125 ]
  %.not111127 = icmp slt i32 %17, 1
  br i1 %.not111127, label %.preheader124.._crit_edge_crit_edge, label %.lr.ph

.preheader124.._crit_edge_crit_edge:              ; preds = %.preheader124
  %.pre234 = sext i32 %17 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader124
  %18 = trunc nuw nsw i64 %indvars.iv193 to i32
  br label %31

._crit_edge136:                                   ; preds = %._crit_edge
  %.not99142 = icmp slt i32 %30, 1
  br i1 %.not99142, label %.preheader123.._crit_edge152_crit_edge, label %.lr.ph146

.lr.ph146:                                        ; preds = %._crit_edge136
  %19 = icmp eq i32 %.192.lcssa, 1
  %20 = add nsw i32 %.192.lcssa, -1
  %.083 = select i1 %19, i32 2, i32 %20
  %21 = sext i32 %.083 to i64
  %22 = add nuw i32 %30, 1
  %wide.trip.count = zext i32 %22 to i64
  %23 = zext nneg i32 %30 to i64
  %min.iters.check = icmp ult i32 %30, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph146
  %indvars.iv196.ph = phi i64 [ 1, %.lr.ph146 ], [ %ind.end, %middle.block ]
  %.082143.ph = phi i64 [ 0, %.lr.ph146 ], [ %29, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph146
  %n.vec = and i64 %23, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %vec.phi274 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %27, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %24 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %21, i64 %offset.idx
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <2 x i64>, ptr %24, align 8, !tbaa !11
  %wide.load275 = load <2 x i64>, ptr %25, align 8, !tbaa !11
  %26 = add <2 x i64> %wide.load, %vec.phi
  %27 = add <2 x i64> %wide.load275, %vec.phi274
  %index.next = add nuw i64 %index, 4
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %27, %26
  %29 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %23
  br i1 %cmp.n, label %.preheader123, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %31, %.preheader124.._crit_edge_crit_edge
  %.pre-phi235 = phi i64 [ %.pre234, %.preheader124.._crit_edge_crit_edge ], [ %37, %31 ]
  %30 = phi i32 [ %17, %.preheader124.._crit_edge_crit_edge ], [ %36, %31 ]
  %.192.lcssa = phi i32 [ %.091133, %.preheader124.._crit_edge_crit_edge ], [ %spec.select, %31 ]
  %.189.lcssa = phi i32 [ %.088134, %.preheader124.._crit_edge_crit_edge ], [ %spec.select113, %31 ]
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %.not.not = icmp slt i64 %indvars.iv193, %.pre-phi235
  br i1 %.not.not, label %.preheader124, label %._crit_edge136, !llvm.loop !17

31:                                               ; preds = %.lr.ph, %31
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %31 ]
  %.189129 = phi i32 [ %.088134, %.lr.ph ], [ %spec.select113, %31 ]
  %.192128 = phi i32 [ %.091133, %.lr.ph ], [ %spec.select, %31 ]
  %32 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv193, i64 %indvars.iv
  %33 = 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) %32)
  %34 = load i64, ptr %32, align 8, !tbaa !11
  %.not112 = icmp eq i64 %34, 0
  %spec.select = select i1 %.not112, i32 %18, i32 %.192128
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select113 = select i1 %.not112, i32 %35, i32 %.189129
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr @n, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %.not111.not = icmp slt i64 %indvars.iv, %37
  br i1 %.not111.not, label %31, label %._crit_edge, !llvm.loop !19

.preheader123:                                    ; preds = %scalar.ph, %middle.block
  %.lcssa270 = phi i64 [ %29, %middle.block ], [ %49, %scalar.ph ]
  br i1 %.not99142, label %.preheader123.._crit_edge152_crit_edge, label %.lr.ph151

.preheader123.._crit_edge152_crit_edge:           ; preds = %.preheader125, %._crit_edge136, %.preheader123
  %.082.lcssa257 = phi i64 [ %.lcssa270, %.preheader123 ], [ 0, %._crit_edge136 ], [ 0, %.preheader125 ]
  %.091.lcssa240255 = phi i32 [ %.192.lcssa, %.preheader123 ], [ %.192.lcssa, %._crit_edge136 ], [ undef, %.preheader125 ]
  %.088.lcssa241254 = phi i32 [ %.189.lcssa, %.preheader123 ], [ %.189.lcssa, %._crit_edge136 ], [ undef, %.preheader125 ]
  %.lcssa126242252 = phi i32 [ %30, %.preheader123 ], [ %30, %._crit_edge136 ], [ %13, %.preheader125 ]
  %.pre = sext i32 %.091.lcssa240255 to i64
  br label %._crit_edge152

.lr.ph151:                                        ; preds = %.preheader123
  %38 = sext i32 %.192.lcssa to i64
  %39 = add nuw i32 %30, 1
  %wide.trip.count202 = zext i32 %39 to i64
  %40 = zext nneg i32 %30 to i64
  %min.iters.check278 = icmp ult i32 %30, 4
  br i1 %min.iters.check278, label %scalar.ph277.preheader, label %vector.ph279

scalar.ph277.preheader:                           ; preds = %middle.block276, %.lr.ph151
  %indvars.iv199.ph = phi i64 [ 1, %.lr.ph151 ], [ %ind.end282, %middle.block276 ]
  %.080149.ph = phi i64 [ 0, %.lr.ph151 ], [ %46, %middle.block276 ]
  br label %scalar.ph277

vector.ph279:                                     ; preds = %.lr.ph151
  %n.vec281 = and i64 %40, 2147483644
  %ind.end282 = or disjoint i64 %n.vec281, 1
  br label %vector.body284

vector.body284:                                   ; preds = %vector.body284, %vector.ph279
  %index285 = phi i64 [ 0, %vector.ph279 ], [ %index.next291, %vector.body284 ]
  %vec.phi286 = phi <2 x i64> [ zeroinitializer, %vector.ph279 ], [ %43, %vector.body284 ]
  %vec.phi287 = phi <2 x i64> [ zeroinitializer, %vector.ph279 ], [ %44, %vector.body284 ]
  %offset.idx288 = or disjoint i64 %index285, 1
  %41 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %38, i64 %offset.idx288
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load289 = load <2 x i64>, ptr %41, align 8, !tbaa !11
  %wide.load290 = load <2 x i64>, ptr %42, align 8, !tbaa !11
  %43 = add <2 x i64> %wide.load289, %vec.phi286
  %44 = add <2 x i64> %wide.load290, %vec.phi287
  %index.next291 = add nuw i64 %index285, 4
  %45 = icmp eq i64 %index.next291, %n.vec281
  br i1 %45, label %middle.block276, label %vector.body284, !llvm.loop !20

middle.block276:                                  ; preds = %vector.body284
  %bin.rdx292 = add <2 x i64> %44, %43
  %46 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx292)
  %cmp.n293 = icmp eq i64 %n.vec281, %40
  br i1 %cmp.n293, label %._crit_edge152, label %scalar.ph277.preheader

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv196 = phi i64 [ %indvars.iv.next197, %scalar.ph ], [ %indvars.iv196.ph, %scalar.ph.preheader ]
  %.082143 = phi i64 [ %49, %scalar.ph ], [ %.082143.ph, %scalar.ph.preheader ]
  %47 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %21, i64 %indvars.iv196
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = add nsw i64 %48, %.082143
  %indvars.iv.next197 = add nuw nsw i64 %indvars.iv196, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next197, %wide.trip.count
  br i1 %exitcond.not, label %.preheader123, label %scalar.ph, !llvm.loop !21

._crit_edge152:                                   ; preds = %scalar.ph277, %middle.block276, %.preheader123.._crit_edge152_crit_edge
  %.082.lcssa256 = phi i64 [ %.082.lcssa257, %.preheader123.._crit_edge152_crit_edge ], [ %.lcssa270, %middle.block276 ], [ %.lcssa270, %scalar.ph277 ]
  %.088.lcssa241253 = phi i32 [ %.088.lcssa241254, %.preheader123.._crit_edge152_crit_edge ], [ %.189.lcssa, %middle.block276 ], [ %.189.lcssa, %scalar.ph277 ]
  %.lcssa126242251 = phi i32 [ %.lcssa126242252, %.preheader123.._crit_edge152_crit_edge ], [ %30, %middle.block276 ], [ %30, %scalar.ph277 ]
  %.not99142243249 = phi i1 [ true, %.preheader123.._crit_edge152_crit_edge ], [ %.not99142, %middle.block276 ], [ %.not99142, %scalar.ph277 ]
  %.pre-phi = phi i64 [ %.pre, %.preheader123.._crit_edge152_crit_edge ], [ %38, %middle.block276 ], [ %38, %scalar.ph277 ]
  %.080.lcssa = phi i64 [ 0, %.preheader123.._crit_edge152_crit_edge ], [ %46, %middle.block276 ], [ %58, %scalar.ph277 ]
  %50 = sub nsw i64 %.082.lcssa256, %.080.lcssa
  %51 = sext i32 %.088.lcssa241253 to i64
  %52 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %.pre-phi, i64 %51
  store i64 %50, ptr %52, align 8, !tbaa !11
  %53 = icmp slt i64 %50, 1
  br i1 %53, label %59, label %.preheader122

.preheader122:                                    ; preds = %._crit_edge152
  br i1 %.not99142243249, label %.critedge115, label %.preheader121.preheader

.preheader121.preheader:                          ; preds = %.preheader122
  %54 = add nuw i32 %.lcssa126242251, 1
  %wide.trip.count212 = zext i32 %54 to i64
  %55 = zext i32 %.lcssa126242251 to i64
  %min.iters.check297 = icmp ult i32 %.lcssa126242251, 4
  %n.vec300 = and i64 %55, 4294967292
  %ind.end301 = or disjoint i64 %n.vec300, 1
  %cmp.n312 = icmp eq i64 %n.vec300, %55
  br label %.preheader121

scalar.ph277:                                     ; preds = %scalar.ph277.preheader, %scalar.ph277
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %scalar.ph277 ], [ %indvars.iv199.ph, %scalar.ph277.preheader ]
  %.080149 = phi i64 [ %58, %scalar.ph277 ], [ %.080149.ph, %scalar.ph277.preheader ]
  %56 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %38, i64 %indvars.iv199
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = add nsw i64 %57, %.080149
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %exitcond203.not = icmp eq i64 %indvars.iv.next200, %wide.trip.count202
  br i1 %exitcond203.not, label %._crit_edge152, label %scalar.ph277, !llvm.loop !22

59:                                               ; preds = %._crit_edge152
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %149

61:                                               ; preds = %._crit_edge158
  %indvars.iv.next210 = add nuw nsw i64 %indvars.iv209, 1
  %exitcond213.not = icmp eq i64 %indvars.iv.next210, %wide.trip.count212
  br i1 %exitcond213.not, label %.critedge115, label %.preheader121, !llvm.loop !23

.preheader121:                                    ; preds = %.preheader121.preheader, %61
  %indvars.iv209 = phi i64 [ 1, %.preheader121.preheader ], [ %indvars.iv.next210, %61 ]
  br i1 %min.iters.check297, label %scalar.ph296.preheader, label %vector.body303

scalar.ph296.preheader:                           ; preds = %middle.block295, %.preheader121
  %indvars.iv204.ph = phi i64 [ 1, %.preheader121 ], [ %ind.end301, %middle.block295 ]
  %.077155.ph = phi i64 [ 0, %.preheader121 ], [ %67, %middle.block295 ]
  br label %scalar.ph296

vector.body303:                                   ; preds = %.preheader121, %vector.body303
  %index304 = phi i64 [ %index.next310, %vector.body303 ], [ 0, %.preheader121 ]
  %vec.phi305 = phi <2 x i64> [ %64, %vector.body303 ], [ zeroinitializer, %.preheader121 ]
  %vec.phi306 = phi <2 x i64> [ %65, %vector.body303 ], [ zeroinitializer, %.preheader121 ]
  %offset.idx307 = or disjoint i64 %index304, 1
  %62 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv209, i64 %offset.idx307
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %wide.load308 = load <2 x i64>, ptr %62, align 8, !tbaa !11
  %wide.load309 = load <2 x i64>, ptr %63, align 8, !tbaa !11
  %64 = add <2 x i64> %wide.load308, %vec.phi305
  %65 = add <2 x i64> %wide.load309, %vec.phi306
  %index.next310 = add nuw i64 %index304, 4
  %66 = icmp eq i64 %index.next310, %n.vec300
  br i1 %66, label %middle.block295, label %vector.body303, !llvm.loop !24

middle.block295:                                  ; preds = %vector.body303
  %bin.rdx311 = add <2 x i64> %65, %64
  %67 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx311)
  br i1 %cmp.n312, label %._crit_edge158, label %scalar.ph296.preheader

._crit_edge158:                                   ; preds = %scalar.ph296, %middle.block295
  %.lcssa268 = phi i64 [ %67, %middle.block295 ], [ %70, %scalar.ph296 ]
  %.not103 = icmp eq i64 %.lcssa268, %.082.lcssa256
  br i1 %.not103, label %61, label %.split

scalar.ph296:                                     ; preds = %scalar.ph296.preheader, %scalar.ph296
  %indvars.iv204 = phi i64 [ %indvars.iv.next205, %scalar.ph296 ], [ %indvars.iv204.ph, %scalar.ph296.preheader ]
  %.077155 = phi i64 [ %70, %scalar.ph296 ], [ %.077155.ph, %scalar.ph296.preheader ]
  %68 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv209, i64 %indvars.iv204
  %69 = load i64, ptr %68, align 8, !tbaa !11
  %70 = add nsw i64 %69, %.077155
  %indvars.iv.next205 = add nuw nsw i64 %indvars.iv204, 1
  %exitcond208.not = icmp eq i64 %indvars.iv.next205, %wide.trip.count212
  br i1 %exitcond208.not, label %._crit_edge158, label %scalar.ph296, !llvm.loop !25

.split:                                           ; preds = %._crit_edge158
  %71 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %149

.critedge115:                                     ; preds = %61, %.preheader122
  %.not104168 = icmp slt i32 %.lcssa126242251, 1
  br i1 %.not104168, label %._crit_edge176, label %.preheader120.preheader

.preheader120.preheader:                          ; preds = %.critedge115
  %72 = add nuw i32 %.lcssa126242251, 1
  %wide.trip.count222 = zext i32 %72 to i64
  %73 = zext nneg i32 %.lcssa126242251 to i64
  %74 = add nsw i64 %wide.trip.count222, -2
  %xtraiter = and i64 %73, 3
  %75 = icmp ult i64 %74, 3
  %unroll_iter = and i64 %73, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader120

76:                                               ; preds = %._crit_edge166
  %indvars.iv.next220 = add nuw nsw i64 %indvars.iv219, 1
  %exitcond223.not = icmp eq i64 %indvars.iv.next220, %wide.trip.count222
  br i1 %exitcond223.not, label %.critedge119, label %.preheader120, !llvm.loop !26

.preheader120:                                    ; preds = %.preheader120.preheader, %76
  %indvars.iv219 = phi i64 [ 1, %.preheader120.preheader ], [ %indvars.iv.next220, %76 ]
  br i1 %75, label %._crit_edge166.unr-lcssa, label %.preheader120.new

._crit_edge166.unr-lcssa:                         ; preds = %.preheader120.new, %.preheader120
  %.lcssa315.ph = phi i64 [ poison, %.preheader120 ], [ %91, %.preheader120.new ]
  %indvars.iv214.unr = phi i64 [ 1, %.preheader120 ], [ %indvars.iv.next215.3, %.preheader120.new ]
  %.074163.unr = phi i64 [ 0, %.preheader120 ], [ %91, %.preheader120.new ]
  br i1 %lcmp.mod.not, label %._crit_edge166, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge166.unr-lcssa, %.epil.preheader
  %indvars.iv214.epil = phi i64 [ %indvars.iv.next215.epil, %.epil.preheader ], [ %indvars.iv214.unr, %._crit_edge166.unr-lcssa ]
  %.074163.epil = phi i64 [ %79, %.epil.preheader ], [ %.074163.unr, %._crit_edge166.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge166.unr-lcssa ]
  %77 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv214.epil, i64 %indvars.iv219
  %78 = load i64, ptr %77, align 8, !tbaa !11
  %79 = add nsw i64 %78, %.074163.epil
  %indvars.iv.next215.epil = add nuw nsw i64 %indvars.iv214.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge166, label %.epil.preheader, !llvm.loop !27

._crit_edge166:                                   ; preds = %.epil.preheader, %._crit_edge166.unr-lcssa
  %.lcssa315 = phi i64 [ %.lcssa315.ph, %._crit_edge166.unr-lcssa ], [ %79, %.epil.preheader ]
  %.not106 = icmp eq i64 %.lcssa315, %.082.lcssa256
  br i1 %.not106, label %76, label %.split171

.preheader120.new:                                ; preds = %.preheader120, %.preheader120.new
  %indvars.iv214 = phi i64 [ %indvars.iv.next215.3, %.preheader120.new ], [ 1, %.preheader120 ]
  %.074163 = phi i64 [ %91, %.preheader120.new ], [ 0, %.preheader120 ]
  %niter = phi i64 [ %niter.next.3, %.preheader120.new ], [ 0, %.preheader120 ]
  %80 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv214, i64 %indvars.iv219
  %81 = load i64, ptr %80, align 8, !tbaa !11
  %82 = add nsw i64 %81, %.074163
  %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1
  %83 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next215, i64 %indvars.iv219
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = add nsw i64 %84, %82
  %indvars.iv.next215.1 = add nuw nsw i64 %indvars.iv214, 2
  %86 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next215.1, i64 %indvars.iv219
  %87 = load i64, ptr %86, align 8, !tbaa !11
  %88 = add nsw i64 %87, %85
  %indvars.iv.next215.2 = add nuw nsw i64 %indvars.iv214, 3
  %89 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next215.2, i64 %indvars.iv219
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = add nsw i64 %90, %88
  %indvars.iv.next215.3 = add nuw nsw i64 %indvars.iv214, 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_edge166.unr-lcssa, label %.preheader120.new, !llvm.loop !29

.split171:                                        ; preds = %._crit_edge166
  %92 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %149

.critedge119:                                     ; preds = %76
  br i1 %.not104168, label %._crit_edge176, label %.lr.ph175.preheader

.lr.ph175.preheader:                              ; preds = %.critedge119
  %xtraiter329 = and i64 %73, 3
  %93 = icmp ult i64 %74, 3
  br i1 %93, label %._crit_edge176.loopexit.unr-lcssa, label %.lr.ph175.preheader.new

.lr.ph175.preheader.new:                          ; preds = %.lr.ph175.preheader
  %unroll_iter333 = and i64 %73, 2147483644
  br label %.lr.ph175

._crit_edge176.loopexit.unr-lcssa:                ; preds = %.lr.ph175, %.lr.ph175.preheader
  %.lcssa314.ph = phi i64 [ poison, %.lr.ph175.preheader ], [ %111, %.lr.ph175 ]
  %indvars.iv224.unr = phi i64 [ 1, %.lr.ph175.preheader ], [ %indvars.iv.next225.3, %.lr.ph175 ]
  %.072173.unr = phi i64 [ 0, %.lr.ph175.preheader ], [ %111, %.lr.ph175 ]
  %lcmp.mod331.not = icmp eq i64 %xtraiter329, 0
  br i1 %lcmp.mod331.not, label %._crit_edge176, label %.lr.ph175.epil

.lr.ph175.epil:                                   ; preds = %._crit_edge176.loopexit.unr-lcssa, %.lr.ph175.epil
  %indvars.iv224.epil = phi i64 [ %indvars.iv.next225.epil, %.lr.ph175.epil ], [ %indvars.iv224.unr, %._crit_edge176.loopexit.unr-lcssa ]
  %.072173.epil = phi i64 [ %96, %.lr.ph175.epil ], [ %.072173.unr, %._crit_edge176.loopexit.unr-lcssa ]
  %epil.iter330 = phi i64 [ %epil.iter330.next, %.lr.ph175.epil ], [ 0, %._crit_edge176.loopexit.unr-lcssa ]
  %94 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv224.epil, i64 %indvars.iv224.epil
  %95 = load i64, ptr %94, align 8, !tbaa !11
  %96 = add nsw i64 %95, %.072173.epil
  %indvars.iv.next225.epil = add nuw nsw i64 %indvars.iv224.epil, 1
  %epil.iter330.next = add i64 %epil.iter330, 1
  %epil.iter330.cmp.not = icmp eq i64 %epil.iter330.next, %xtraiter329
  br i1 %epil.iter330.cmp.not, label %._crit_edge176, label %.lr.ph175.epil, !llvm.loop !30

._crit_edge176:                                   ; preds = %._crit_edge176.loopexit.unr-lcssa, %.lr.ph175.epil, %.critedge115, %.critedge119
  %.072.lcssa = phi i64 [ 0, %.critedge119 ], [ 0, %.critedge115 ], [ %.lcssa314.ph, %._crit_edge176.loopexit.unr-lcssa ], [ %96, %.lr.ph175.epil ]
  %.not108 = icmp eq i64 %.072.lcssa, %.082.lcssa256
  br i1 %.not108, label %.preheader, label %112

.preheader:                                       ; preds = %._crit_edge176
  br i1 %.not104168, label %._crit_edge183, label %.lr.ph182

.lr.ph182:                                        ; preds = %.preheader
  %97 = add nuw i32 %.lcssa126242251, 1
  %98 = zext nneg i32 %.lcssa126242251 to i64
  %xtraiter336 = and i64 %98, 3
  %99 = icmp ult i32 %.lcssa126242251, 4
  br i1 %99, label %._crit_edge183.loopexit.unr-lcssa, label %.lr.ph182.new

.lr.ph182.new:                                    ; preds = %.lr.ph182
  %unroll_iter340 = and i64 %98, 2147483644
  br label %120

.lr.ph175:                                        ; preds = %.lr.ph175, %.lr.ph175.preheader.new
  %indvars.iv224 = phi i64 [ 1, %.lr.ph175.preheader.new ], [ %indvars.iv.next225.3, %.lr.ph175 ]
  %.072173 = phi i64 [ 0, %.lr.ph175.preheader.new ], [ %111, %.lr.ph175 ]
  %niter334 = phi i64 [ 0, %.lr.ph175.preheader.new ], [ %niter334.next.3, %.lr.ph175 ]
  %100 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv224, i64 %indvars.iv224
  %101 = load i64, ptr %100, align 8, !tbaa !11
  %102 = add nsw i64 %101, %.072173
  %indvars.iv.next225 = add nuw nsw i64 %indvars.iv224, 1
  %103 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next225, i64 %indvars.iv.next225
  %104 = load i64, ptr %103, align 8, !tbaa !11
  %105 = add nsw i64 %104, %102
  %indvars.iv.next225.1 = add nuw nsw i64 %indvars.iv224, 2
  %106 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next225.1, i64 %indvars.iv.next225.1
  %107 = load i64, ptr %106, align 8, !tbaa !11
  %108 = add nsw i64 %107, %105
  %indvars.iv.next225.2 = add nuw nsw i64 %indvars.iv224, 3
  %109 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next225.2, i64 %indvars.iv.next225.2
  %110 = load i64, ptr %109, align 8, !tbaa !11
  %111 = add nsw i64 %110, %108
  %indvars.iv.next225.3 = add nuw nsw i64 %indvars.iv224, 4
  %niter334.next.3 = add i64 %niter334, 4
  %niter334.ncmp.3 = icmp eq i64 %niter334.next.3, %unroll_iter333
  br i1 %niter334.ncmp.3, label %._crit_edge176.loopexit.unr-lcssa, label %.lr.ph175, !llvm.loop !31

112:                                              ; preds = %._crit_edge176
  %113 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %149

._crit_edge183.loopexit.unr-lcssa:                ; preds = %120, %.lr.ph182
  %.lcssa.ph = phi i64 [ poison, %.lr.ph182 ], [ %144, %120 ]
  %indvars.iv229.unr = phi i64 [ 1, %.lr.ph182 ], [ %indvars.iv.next230.3, %120 ]
  %.1180.unr = phi i64 [ 0, %.lr.ph182 ], [ %144, %120 ]
  %lcmp.mod338.not = icmp eq i64 %xtraiter336, 0
  br i1 %lcmp.mod338.not, label %._crit_edge183, label %.epil.preheader335

.epil.preheader335:                               ; preds = %._crit_edge183.loopexit.unr-lcssa, %.epil.preheader335
  %indvars.iv229.epil = phi i64 [ %indvars.iv.next230.epil, %.epil.preheader335 ], [ %indvars.iv229.unr, %._crit_edge183.loopexit.unr-lcssa ]
  %.1180.epil = phi i64 [ %119, %.epil.preheader335 ], [ %.1180.unr, %._crit_edge183.loopexit.unr-lcssa ]
  %epil.iter337 = phi i64 [ %epil.iter337.next, %.epil.preheader335 ], [ 0, %._crit_edge183.loopexit.unr-lcssa ]
  %114 = trunc nuw nsw i64 %indvars.iv229.epil to i32
  %115 = sub i32 %97, %114
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv229.epil, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = add nsw i64 %118, %.1180.epil
  %indvars.iv.next230.epil = add nuw nsw i64 %indvars.iv229.epil, 1
  %epil.iter337.next = add i64 %epil.iter337, 1
  %epil.iter337.cmp.not = icmp eq i64 %epil.iter337.next, %xtraiter336
  br i1 %epil.iter337.cmp.not, label %._crit_edge183, label %.epil.preheader335, !llvm.loop !32

._crit_edge183:                                   ; preds = %._crit_edge183.loopexit.unr-lcssa, %.epil.preheader335, %.preheader
  %.1.lcssa = phi i64 [ 0, %.preheader ], [ %.lcssa.ph, %._crit_edge183.loopexit.unr-lcssa ], [ %119, %.epil.preheader335 ]
  %.not110 = icmp eq i64 %.1.lcssa, %.082.lcssa256
  br i1 %.not110, label %147, label %145

120:                                              ; preds = %120, %.lr.ph182.new
  %indvars.iv229 = phi i64 [ 1, %.lr.ph182.new ], [ %indvars.iv.next230.3, %120 ]
  %.1180 = phi i64 [ 0, %.lr.ph182.new ], [ %144, %120 ]
  %niter341 = phi i64 [ 0, %.lr.ph182.new ], [ %niter341.next.3, %120 ]
  %121 = trunc nuw nsw i64 %indvars.iv229 to i32
  %122 = sub i32 %97, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv229, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !11
  %126 = add nsw i64 %125, %.1180
  %indvars.iv.next230 = add nuw nsw i64 %indvars.iv229, 1
  %127 = trunc nuw nsw i64 %indvars.iv.next230 to i32
  %128 = sub i32 %97, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next230, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !11
  %132 = add nsw i64 %131, %126
  %indvars.iv.next230.1 = add nuw nsw i64 %indvars.iv229, 2
  %133 = trunc nuw nsw i64 %indvars.iv.next230.1 to i32
  %134 = sub i32 %97, %133
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next230.1, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !11
  %138 = add nsw i64 %137, %132
  %indvars.iv.next230.2 = add nuw nsw i64 %indvars.iv229, 3
  %139 = trunc nuw nsw i64 %indvars.iv.next230.2 to i32
  %140 = sub i32 %97, %139
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [510 x [510 x i64]], ptr @g, i64 0, i64 %indvars.iv.next230.2, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !11
  %144 = add nsw i64 %143, %138
  %indvars.iv.next230.3 = add nuw nsw i64 %indvars.iv229, 4
  %niter341.next.3 = add i64 %niter341, 4
  %niter341.ncmp.3 = icmp eq i64 %niter341.next.3, %unroll_iter340
  br i1 %niter341.ncmp.3, label %._crit_edge183.loopexit.unr-lcssa, label %120, !llvm.loop !33

145:                                              ; preds = %._crit_edge183
  %146 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %149

147:                                              ; preds = %._crit_edge183
  %148 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %50)
  br label %149

149:                                              ; preds = %.split171, %.split, %59, %147, %145, %112, %15
  %.sink = phi ptr [ %92, %.split171 ], [ %71, %.split ], [ %60, %59 ], [ %148, %147 ], [ %146, %145 ], [ %113, %112 ], [ %16, %15 ]
  %150 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14, !15, !16}
!21 = distinct !{!21, !14, !16, !15}
!22 = distinct !{!22, !14, !16, !15}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14, !15, !16}
!25 = distinct !{!25, !14, !16, !15}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !14}


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