; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan/330_CERC2014_L.ll (Z5solvev)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }

@a = external dso_local global [310 x i32], align 16
@b = external dso_local global [310 x i32], align 16
@d = external dso_local global [310 x i32], align 16
@dp = external dso_local global [620 x [620 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %66, %0
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %73

42:                                               ; preds = %37
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %44
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %47 unwind label %69

47:                                               ; preds = %42
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %49
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %52 unwind label %69

52:                                               ; preds = %47
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %54
  %56 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %55)
          to label %57 unwind label %69

57:                                               ; preds = %52
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %59
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %61 unwind label %69

61:                                               ; preds = %57
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %63
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %64)
          to label %65 unwind label %69

65:                                               ; preds = %61
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %3, align 4, !tbaa !5
  br label %37, !llvm.loop !9

69:                                               ; preds = %61, %57, %52, %47, %42
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %4, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %358

73:                                               ; preds = %41
  %74 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  %76 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %79, ptr %81)
          to label %82 unwind label %110

82:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %83 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  %85 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = invoke ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %88, ptr %90)
          to label %92 unwind label %114

92:                                               ; preds = %82
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %91, ptr %93, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %94 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %8, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %12, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8
  %100 = invoke ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr %97, ptr %99)
          to label %101 unwind label %118

101:                                              ; preds = %92
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %100, ptr %102, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %103 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %104 = trunc i64 %103 to i32
  store i32 %104, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %168, %101
  %106 = load i32, ptr %16, align 4, !tbaa !5
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = icmp sle i32 %106, %107
  br i1 %108, label %123, label %109

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %180

110:                                              ; preds = %73
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %4, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %5, align 4
  br label %358

114:                                              ; preds = %82
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %4, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %5, align 4
  br label %122

118:                                              ; preds = %92
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %4, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %122

122:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %358

123:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %124 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  %128 = load i32, ptr %16, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %129
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8
  %135 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %132, ptr %134, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %136 unwind label %171

136:                                              ; preds = %123
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %135, ptr %137, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %138 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  %140 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %141 = trunc i64 %140 to i32
  %142 = add nsw i32 %141, 1
  %143 = load i32, ptr %16, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %144
  store i32 %142, ptr %145, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %146 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %147 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  %148 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %149 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  %150 = load i32, ptr %16, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %151
  %153 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8
  %157 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %154, ptr %156, ptr noundef nonnull align 4 dereferenceable(4) %152)
          to label %158 unwind label %175

158:                                              ; preds = %136
  %159 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %157, ptr %159, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %160 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %160, ptr %161, align 8
  %162 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %163 = trunc i64 %162 to i32
  %164 = add nsw i32 %163, 1
  %165 = load i32, ptr %16, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %166
  store i32 %164, ptr %167, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %168

168:                                              ; preds = %158
  %169 = load i32, ptr %16, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %16, align 4, !tbaa !5
  br label %105, !llvm.loop !11

171:                                              ; preds = %123
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %179

175:                                              ; preds = %136
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %4, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %179

179:                                              ; preds = %175, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %357

180:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 1, ptr %25, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %203, %180
  %182 = load i32, ptr %25, align 4, !tbaa !5
  %183 = load i32, ptr %15, align 4, !tbaa !5
  %184 = icmp sle i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 8, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %206

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

187:                                              ; preds = %199, %186
  %188 = load i32, ptr %27, align 4, !tbaa !5
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = icmp sle i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %202

192:                                              ; preds = %187
  %193 = load i32, ptr %25, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %194
  %196 = load i32, ptr %27, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [620 x i32], ptr %195, i64 0, i64 %197
  store i32 1061109567, ptr %198, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %192
  %200 = load i32, ptr %27, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %27, align 4, !tbaa !5
  br label %187, !llvm.loop !12

202:                                              ; preds = %191
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %25, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %25, align 4, !tbaa !5
  br label %181, !llvm.loop !13

206:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %207

207:                                              ; preds = %341, %206
  %208 = load i32, ptr %28, align 4, !tbaa !5
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = icmp slt i32 %208, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %207
  store i32 14, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %344

212:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 1, ptr %29, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %337, %212
  %214 = load i32, ptr %29, align 4, !tbaa !5
  %215 = load i32, ptr %28, align 4, !tbaa !5
  %216 = add nsw i32 %214, %215
  %217 = load i32, ptr %15, align 4, !tbaa !5
  %218 = icmp sle i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %213
  store i32 17, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %340

220:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %221 = load i32, ptr %29, align 4, !tbaa !5
  %222 = load i32, ptr %28, align 4, !tbaa !5
  %223 = add nsw i32 %221, %222
  store i32 %223, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 -1, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 -1, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 1, ptr %33, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %258, %220
  %225 = load i32, ptr %33, align 4, !tbaa !5
  %226 = load i32, ptr %1, align 4, !tbaa !5
  %227 = icmp sle i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  store i32 20, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %261

229:                                              ; preds = %224
  %230 = load i32, ptr %33, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %231
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = load i32, ptr %29, align 4, !tbaa !5
  %235 = icmp sge i32 %233, %234
  br i1 %235, label %236, label %257

236:                                              ; preds = %229
  %237 = load i32, ptr %33, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = load i32, ptr %30, align 4, !tbaa !5
  %242 = icmp sle i32 %240, %241
  br i1 %242, label %243, label %257

243:                                              ; preds = %236
  %244 = load i32, ptr %33, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = load i32, ptr %31, align 4, !tbaa !5
  %249 = icmp sgt i32 %247, %248
  br i1 %249, label %250, label %256

250:                                              ; preds = %243
  %251 = load i32, ptr %33, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  store i32 %254, ptr %31, align 4, !tbaa !5
  %255 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %255, ptr %32, align 4, !tbaa !5
  br label %256

256:                                              ; preds = %250, %243
  br label %257

257:                                              ; preds = %256, %236, %229
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %33, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %33, align 4, !tbaa !5
  br label %224, !llvm.loop !14

261:                                              ; preds = %228
  %262 = load i32, ptr %31, align 4, !tbaa !5
  %263 = icmp eq i32 %262, -1
  br i1 %263, label %264, label %271

264:                                              ; preds = %261
  %265 = load i32, ptr %29, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %266
  %268 = load i32, ptr %30, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [620 x i32], ptr %267, i64 0, i64 %269
  store i32 0, ptr %270, align 4, !tbaa !5
  store i32 19, ptr %26, align 4
  br label %334

271:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %272 = load i32, ptr %32, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !5
  store i32 %275, ptr %34, align 4, !tbaa !5
  br label %276

276:                                              ; preds = %317, %271
  %277 = load i32, ptr %34, align 4, !tbaa !5
  %278 = load i32, ptr %32, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = icmp sle i32 %277, %281
  br i1 %282, label %284, label %283

283:                                              ; preds = %276
  store i32 23, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %324

284:                                              ; preds = %276
  %285 = load i32, ptr %29, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %286
  %288 = load i32, ptr %30, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [620 x i32], ptr %287, i64 0, i64 %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %291 = load i32, ptr %29, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %292
  %294 = load i32, ptr %34, align 4, !tbaa !5
  %295 = sub nsw i32 %294, 1
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [620 x i32], ptr %293, i64 0, i64 %296
  %298 = load i32, ptr %297, align 4, !tbaa !5
  %299 = load i32, ptr %34, align 4, !tbaa !5
  %300 = add nsw i32 %299, 1
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %301
  %303 = load i32, ptr %30, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [620 x i32], ptr %302, i64 0, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !5
  %307 = add nsw i32 %298, %306
  store i32 %307, ptr %35, align 4, !tbaa !5
  %308 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %290, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %309 unwind label %320

309:                                              ; preds = %284
  %310 = load i32, ptr %308, align 4, !tbaa !5
  %311 = load i32, ptr %29, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %312
  %314 = load i32, ptr %30, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [620 x i32], ptr %313, i64 0, i64 %315
  store i32 %310, ptr %316, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %317

317:                                              ; preds = %309
  %318 = load i32, ptr %34, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %34, align 4, !tbaa !5
  br label %276, !llvm.loop !15

320:                                              ; preds = %284
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %4, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %357

324:                                              ; preds = %283
  %325 = load i32, ptr %31, align 4, !tbaa !5
  %326 = load i32, ptr %29, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %327
  %329 = load i32, ptr %30, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [620 x i32], ptr %328, i64 0, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = add nsw i32 %332, %325
  store i32 %333, ptr %331, align 4, !tbaa !5
  store i32 0, ptr %26, align 4
  br label %334

334:                                              ; preds = %324, %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  %335 = load i32, ptr %26, align 4
  switch i32 %335, label %364 [
    i32 0, label %336
    i32 19, label %337
  ]

336:                                              ; preds = %334
  br label %337

337:                                              ; preds = %336, %334
  %338 = load i32, ptr %29, align 4, !tbaa !5
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %29, align 4, !tbaa !5
  br label %213, !llvm.loop !16

340:                                              ; preds = %219
  br label %341

341:                                              ; preds = %340
  %342 = load i32, ptr %28, align 4, !tbaa !5
  %343 = add nsw i32 %342, 1
  store i32 %343, ptr %28, align 4, !tbaa !5
  br label %207, !llvm.loop !17

344:                                              ; preds = %211
  %345 = load i32, ptr %15, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [620 x i32], ptr getelementptr inbounds ([620 x [620 x i32]], ptr @dp, i64 0, i64 1), i64 0, i64 %346
  %348 = load i32, ptr %347, align 4, !tbaa !5
  %349 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %348)
          to label %350 unwind label %353

350:                                              ; preds = %344
  %351 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %349, i8 noundef signext 10)
          to label %352 unwind label %353

352:                                              ; preds = %350
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

353:                                              ; preds = %350, %344
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %4, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %5, align 4
  br label %357

357:                                              ; preds = %353, %320, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %358

358:                                              ; preds = %357, %122, %110, %69
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %359

359:                                              ; preds = %358
  %360 = load ptr, ptr %4, align 8
  %361 = load i32, ptr %5, align 4
  %362 = insertvalue { ptr, i32 } poison, ptr %360, 0
  %363 = insertvalue { ptr, i32 } %362, i32 %361, 1
  resume { ptr, i32 } %363

364:                                              ; preds = %334
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@a = external dso_local global [310 x i32], align 16
@b = external dso_local global [310 x i32], align 16
@d = external dso_local global [310 x i32], align 16
@dp = external dso_local global [620 x [620 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %.not107 = icmp slt i32 %13, 1
  br i1 %.not107, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %26, %0
  %14 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %15 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %14, ptr %15)
          to label %31 unwind label %48

.lr.ph:                                           ; preds = %0, %26
  %indvars.iv = phi i64 [ %indvars.iv.next, %26 ], [ 1, %0 ]
  %16 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %18 unwind label %29

18:                                               ; preds = %.lr.ph
  %19 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %indvars.iv
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %21 unwind label %29

21:                                               ; preds = %18
  %22 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %indvars.iv
  %23 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %24 unwind label %29

24:                                               ; preds = %21
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %25 unwind label %29

25:                                               ; preds = %24
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %26 unwind label %29

26:                                               ; preds = %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %.not.not = icmp slt i64 %indvars.iv, %28
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

29:                                               ; preds = %25, %24, %21, %18, %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %163

31:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %32 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %33 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %34 = invoke ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %32, ptr %33)
          to label %35 unwind label %50

35:                                               ; preds = %31
  store ptr %34, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %36 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %36, ptr %6, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %37 = load ptr, ptr %3, align 8
  %38 = load ptr, ptr %5, align 8
  %39 = invoke ptr @_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr %37, ptr %38)
          to label %40 unwind label %52

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %41 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %42 = trunc i64 %41 to i32
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %.not89109 = icmp slt i32 %43, 1
  br i1 %.not89109, label %.preheader106, label %.lr.ph112

.preheader106:                                    ; preds = %68, %40
  %.not90117 = icmp slt i32 %42, 1
  br i1 %.not90117, label %._crit_edge135, label %.preheader105.preheader

.preheader105.preheader:                          ; preds = %.preheader106
  %44 = and i64 %41, 2147483647
  %45 = shl nuw nsw i64 %44, 2
  %46 = add nsw i64 %44, -1
  %xtraiter = and i64 %41, 7
  %47 = icmp ult i64 %46, 7
  br i1 %47, label %.preheader103.preheader.unr-lcssa, label %.preheader105.preheader.new

.preheader105.preheader.new:                      ; preds = %.preheader105.preheader
  %unroll_iter = sub nsw i64 %44, %xtraiter
  br label %.preheader105

48:                                               ; preds = %._crit_edge
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %163

50:                                               ; preds = %31
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %35
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %54

54:                                               ; preds = %52, %50
  %.pn = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %163

.lr.ph112:                                        ; preds = %40, %68
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %68 ], [ 1, %40 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %55 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %56 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %57 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv137
  %58 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %55, ptr %56, ptr noundef nonnull align 4 dereferenceable(4) %57)
          to label %59 unwind label %75

59:                                               ; preds = %.lr.ph112
  store ptr %58, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %60 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %60, ptr %8, align 8
  %61 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %62 = trunc i64 %61 to i32
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %57, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %64 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %65 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %66 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %indvars.iv137
  %67 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %64, ptr %65, ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %68 unwind label %77

68:                                               ; preds = %59
  store ptr %67, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %69 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  store ptr %69, ptr %10, align 8
  %70 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %71 = trunc i64 %70 to i32
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %66, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %73 = load i32, ptr %1, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %.not89.not = icmp slt i64 %indvars.iv137, %74
  br i1 %.not89.not, label %.lr.ph112, label %.preheader106, !llvm.loop !11

75:                                               ; preds = %.lr.ph112
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %163

77:                                               ; preds = %59
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %163

.preheader105:                                    ; preds = %.preheader105, %.preheader105.preheader.new
  %indvar = phi i64 [ 0, %.preheader105.preheader.new ], [ %indvar.next.7, %.preheader105 ]
  %niter = phi i64 [ 0, %.preheader105.preheader.new ], [ %niter.next.7, %.preheader105 ]
  %79 = mul nuw nsw i64 %indvar, 2480
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 %79
  call void @llvm.memset.p0.i64(ptr align 4 %gep, i8 63, i64 %45, i1 false), !tbaa !5
  %80 = mul nuw i64 %indvar, 2480
  %gep169 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 2480), i64 %80
  call void @llvm.memset.p0.i64(ptr align 4 %gep169, i8 63, i64 %45, i1 false), !tbaa !5
  %81 = mul nuw i64 %indvar, 2480
  %gep170 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 4960), i64 %81
  call void @llvm.memset.p0.i64(ptr align 4 %gep170, i8 63, i64 %45, i1 false), !tbaa !5
  %82 = mul nuw i64 %indvar, 2480
  %gep171 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 7440), i64 %82
  call void @llvm.memset.p0.i64(ptr align 4 %gep171, i8 63, i64 %45, i1 false), !tbaa !5
  %83 = mul nuw i64 %indvar, 2480
  %gep172 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 9920), i64 %83
  call void @llvm.memset.p0.i64(ptr align 4 %gep172, i8 63, i64 %45, i1 false), !tbaa !5
  %84 = mul nuw i64 %indvar, 2480
  %gep173 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 12400), i64 %84
  call void @llvm.memset.p0.i64(ptr align 4 %gep173, i8 63, i64 %45, i1 false), !tbaa !5
  %85 = mul nuw i64 %indvar, 2480
  %gep174 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 14880), i64 %85
  call void @llvm.memset.p0.i64(ptr align 4 %gep174, i8 63, i64 %45, i1 false), !tbaa !5
  %86 = mul nuw i64 %indvar, 2480
  %gep175 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 17360), i64 %86
  call void @llvm.memset.p0.i64(ptr align 4 %gep175, i8 63, i64 %45, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader103.preheader.unr-lcssa, label %.preheader105, !llvm.loop !12

.preheader103.preheader.unr-lcssa:                ; preds = %.preheader105, %.preheader105.preheader
  %indvar.unr = phi i64 [ 0, %.preheader105.preheader ], [ %indvar.next.7, %.preheader105 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader103.preheader, label %.preheader105.epil

.preheader105.epil:                               ; preds = %.preheader103.preheader.unr-lcssa, %.preheader105.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader105.epil ], [ %indvar.unr, %.preheader103.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader105.epil ], [ 0, %.preheader103.preheader.unr-lcssa ]
  %87 = mul nuw nsw i64 %indvar.epil, 2480
  %gep.epil = getelementptr i8, ptr getelementptr inbounds (i8, ptr @dp, i64 2484), i64 %87
  call void @llvm.memset.p0.i64(ptr align 4 %gep.epil, i8 63, i64 %45, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.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 %.preheader103.preheader, label %.preheader105.epil, !llvm.loop !13

.preheader103.preheader:                          ; preds = %.preheader105.epil, %.preheader103.preheader.unr-lcssa
  %wide.trip.count157 = and i64 %41, 2147483647
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge133, %.preheader103.preheader
  %indvars.iv154 = phi i64 [ 0, %.preheader103.preheader ], [ %indvars.iv.next155, %._crit_edge133 ]
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %88 = trunc nuw nsw i64 %indvars.iv.next155 to i32
  br label %.preheader

._crit_edge135:                                   ; preds = %._crit_edge133, %.preheader106
  %sext = shl i64 %41, 32
  %89 = ashr exact i64 %sext, 32
  %90 = getelementptr inbounds [620 x i32], ptr getelementptr inbounds (i8, ptr @dp, i64 2480), i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %91)
          to label %158 unwind label %161

.preheader:                                       ; preds = %.preheader.preheader, %155
  %indvars.iv151 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next152, %155 ]
  %93 = phi i32 [ %88, %.preheader.preheader ], [ %157, %155 ]
  %94 = load i32, ptr %1, align 4, !tbaa !5
  %.not92119 = icmp slt i32 %94, 1
  br i1 %.not92119, label %._crit_edge124.thread, label %.lr.ph123.preheader

.lr.ph123.preheader:                              ; preds = %.preheader
  %95 = zext nneg i32 %94 to i64
  %xtraiter162 = and i64 %95, 1
  %96 = icmp eq i32 %94, 1
  br i1 %96, label %._crit_edge124.unr-lcssa, label %.lr.ph123.preheader.new

.lr.ph123.preheader.new:                          ; preds = %.lr.ph123.preheader
  %unroll_iter167 = and i64 %95, 2147483646
  br label %.lr.ph123

._crit_edge133:                                   ; preds = %155
  %exitcond158.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count157
  br i1 %exitcond158.not, label %._crit_edge135, label %.preheader.preheader, !llvm.loop !15

._crit_edge124.unr-lcssa:                         ; preds = %131, %.lr.ph123.preheader
  %.171.lcssa.ph = phi i32 [ poison, %.lr.ph123.preheader ], [ %.171.1, %131 ]
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph123.preheader ], [ %.1.1, %131 ]
  %indvars.iv143.unr = phi i64 [ 1, %.lr.ph123.preheader ], [ %indvars.iv.next144.1, %131 ]
  %.069121.unr = phi i32 [ -1, %.lr.ph123.preheader ], [ %.1.1, %131 ]
  %.070120.unr = phi i32 [ -1, %.lr.ph123.preheader ], [ %.171.1, %131 ]
  %lcmp.mod164.not = icmp eq i64 %xtraiter162, 0
  br i1 %lcmp.mod164.not, label %._crit_edge124, label %.lr.ph123.epil

.lr.ph123.epil:                                   ; preds = %._crit_edge124.unr-lcssa
  %97 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv143.unr
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %.not94.epil = icmp sgt i64 %indvars.iv151, %99
  br i1 %.not94.epil, label %._crit_edge124, label %100

100:                                              ; preds = %.lr.ph123.epil
  %101 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %indvars.iv143.unr
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %.not95.epil = icmp sgt i32 %102, %93
  br i1 %.not95.epil, label %._crit_edge124, label %103

103:                                              ; preds = %100
  %104 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %indvars.iv143.unr
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sgt i32 %105, %.070120.unr
  %spec.select.epil = call i32 @llvm.smax.i32(i32 %105, i32 %.070120.unr)
  %107 = trunc nuw nsw i64 %indvars.iv143.unr to i32
  %spec.select102.epil = select i1 %106, i32 %107, i32 %.069121.unr
  br label %._crit_edge124

._crit_edge124:                                   ; preds = %.lr.ph123.epil, %100, %103, %._crit_edge124.unr-lcssa
  %.171.lcssa = phi i32 [ %.171.lcssa.ph, %._crit_edge124.unr-lcssa ], [ %.070120.unr, %100 ], [ %.070120.unr, %.lr.ph123.epil ], [ %spec.select.epil, %103 ]
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge124.unr-lcssa ], [ %.069121.unr, %100 ], [ %.069121.unr, %.lr.ph123.epil ], [ %spec.select102.epil, %103 ]
  %108 = icmp eq i32 %.171.lcssa, -1
  br i1 %108, label %._crit_edge124.thread, label %134

.lr.ph123:                                        ; preds = %131, %.lr.ph123.preheader.new
  %indvars.iv143 = phi i64 [ 1, %.lr.ph123.preheader.new ], [ %indvars.iv.next144.1, %131 ]
  %.069121 = phi i32 [ -1, %.lr.ph123.preheader.new ], [ %.1.1, %131 ]
  %.070120 = phi i32 [ -1, %.lr.ph123.preheader.new ], [ %.171.1, %131 ]
  %niter168 = phi i64 [ 0, %.lr.ph123.preheader.new ], [ %niter168.next.1, %131 ]
  %109 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv143
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %.not94 = icmp sgt i64 %indvars.iv151, %111
  br i1 %.not94, label %.lr.ph123.1, label %112

112:                                              ; preds = %.lr.ph123
  %113 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %indvars.iv143
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %.not95 = icmp sgt i32 %114, %93
  br i1 %.not95, label %.lr.ph123.1, label %115

115:                                              ; preds = %112
  %116 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %indvars.iv143
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = icmp sgt i32 %117, %.070120
  %spec.select = call i32 @llvm.smax.i32(i32 %117, i32 %.070120)
  %119 = trunc nuw nsw i64 %indvars.iv143 to i32
  %spec.select102 = select i1 %118, i32 %119, i32 %.069121
  br label %.lr.ph123.1

.lr.ph123.1:                                      ; preds = %115, %.lr.ph123, %112
  %.171 = phi i32 [ %.070120, %112 ], [ %.070120, %.lr.ph123 ], [ %spec.select, %115 ]
  %.1 = phi i32 [ %.069121, %112 ], [ %.069121, %.lr.ph123 ], [ %spec.select102, %115 ]
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %120 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv.next144
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %.not94.1 = icmp sgt i64 %indvars.iv151, %122
  br i1 %.not94.1, label %131, label %123

123:                                              ; preds = %.lr.ph123.1
  %124 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %indvars.iv.next144
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %.not95.1 = icmp sgt i32 %125, %93
  br i1 %.not95.1, label %131, label %126

126:                                              ; preds = %123
  %127 = getelementptr inbounds [310 x i32], ptr @d, i64 0, i64 %indvars.iv.next144
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = icmp sgt i32 %128, %.171
  %spec.select.1 = call i32 @llvm.smax.i32(i32 %128, i32 %.171)
  %130 = trunc nuw nsw i64 %indvars.iv.next144 to i32
  %spec.select102.1 = select i1 %129, i32 %130, i32 %.1
  br label %131

131:                                              ; preds = %126, %123, %.lr.ph123.1
  %.171.1 = phi i32 [ %.171, %123 ], [ %.171, %.lr.ph123.1 ], [ %spec.select.1, %126 ]
  %.1.1 = phi i32 [ %.1, %123 ], [ %.1, %.lr.ph123.1 ], [ %spec.select102.1, %126 ]
  %indvars.iv.next144.1 = add nuw nsw i64 %indvars.iv143, 2
  %niter168.next.1 = add i64 %niter168, 2
  %niter168.ncmp.1 = icmp eq i64 %niter168.next.1, %unroll_iter167
  br i1 %niter168.ncmp.1, label %._crit_edge124.unr-lcssa, label %.lr.ph123, !llvm.loop !16

._crit_edge124.thread:                            ; preds = %.preheader, %._crit_edge124
  %132 = zext nneg i32 %93 to i64
  %133 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %indvars.iv151, i64 %132
  store i32 0, ptr %133, align 4, !tbaa !5
  br label %155

134:                                              ; preds = %._crit_edge124
  %135 = sext i32 %.1.lcssa to i64
  %136 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = getelementptr inbounds [310 x i32], ptr @b, i64 0, i64 %135
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %.not93126 = icmp sgt i32 %137, %139
  %.phi.trans.insert = zext i32 %93 to i64
  %.phi.trans.insert159 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %indvars.iv151, i64 %.phi.trans.insert
  br i1 %.not93126, label %.._crit_edge130_crit_edge, label %.lr.ph129

.._crit_edge130_crit_edge:                        ; preds = %134
  %.pre = load i32, ptr %.phi.trans.insert159, align 4, !tbaa !5
  br label %._crit_edge130

.lr.ph129:                                        ; preds = %134
  %140 = sext i32 %137 to i64
  br label %144

._crit_edge130:                                   ; preds = %144, %.._crit_edge130_crit_edge
  %141 = phi i32 [ %.pre, %.._crit_edge130_crit_edge ], [ %152, %144 ]
  %142 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %indvars.iv151, i64 %.phi.trans.insert
  %143 = add nsw i32 %141, %.171.lcssa
  store i32 %143, ptr %142, align 4, !tbaa !5
  br label %155

144:                                              ; preds = %.lr.ph129, %144
  %indvars.iv148 = phi i64 [ %140, %.lr.ph129 ], [ %indvars.iv.next149, %144 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %145 = add nsw i64 %indvars.iv148, -1
  %146 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %indvars.iv151, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %indvars.iv.next149 = add nsw i64 %indvars.iv148, 1
  %148 = getelementptr inbounds [620 x [620 x i32]], ptr @dp, i64 0, i64 %indvars.iv.next149, i64 %.phi.trans.insert
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = add nsw i32 %149, %147
  store i32 %150, ptr %11, align 4, !tbaa !5
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %.phi.trans.insert159, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %152 = load i32, ptr %151, align 4, !tbaa !5
  store i32 %152, ptr %.phi.trans.insert159, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %153 = load i32, ptr %138, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %.not93.not = icmp slt i64 %indvars.iv148, %154
  br i1 %.not93.not, label %144, label %._crit_edge130, !llvm.loop !17

155:                                              ; preds = %._crit_edge130, %._crit_edge124.thread
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %156 = add nuw nsw i64 %indvars.iv.next152, %indvars.iv154
  %157 = trunc nuw i64 %156 to i32
  %.not91 = icmp sgt i32 %157, %42
  br i1 %.not91, label %._crit_edge133, label %.preheader, !llvm.loop !18

158:                                              ; preds = %._crit_edge135
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %92, i8 noundef signext 10)
          to label %160 unwind label %161

160:                                              ; preds = %158
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret void

161:                                              ; preds = %158, %._crit_edge135
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %163

163:                                              ; preds = %161, %77, %75, %54, %48, %29
  %.pn100 = phi { ptr, i32 } [ %30, %29 ], [ %.pn, %54 ], [ %49, %48 ], [ %162, %161 ], [ %78, %77 ], [ %76, %75 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn100
}

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

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 #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass