; LLVM IR from eyangch/competitive-programming :: AtCoder/abc260 (f)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }

@S = external dso_local global i64, align 8
@T = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@V = external dso_local global [3000 x [3000 x i64]], align 16
@G = external dso_local global [400000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @S)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %30

30:                                               ; preds = %46, %0
  %31 = load i64, ptr %2, align 8, !tbaa !8
  %32 = load i64, ptr @M, align 8, !tbaa !8
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %49

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %38 = load i64, ptr %3, align 8, !tbaa !8
  %39 = add nsw i64 %38, -1
  store i64 %39, ptr %3, align 8, !tbaa !8
  %40 = load i64, ptr %4, align 8, !tbaa !8
  %41 = add nsw i64 %40, -1
  store i64 %41, ptr %4, align 8, !tbaa !8
  %42 = load i64, ptr %3, align 8, !tbaa !8
  %43 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %42
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %44 = load i64, ptr %4, align 8, !tbaa !8
  %45 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %44
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %46

46:                                               ; preds = %35
  %47 = load i64, ptr %2, align 8, !tbaa !8
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %2, align 8, !tbaa !8
  br label %30, !llvm.loop !11

49:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %50

50:                                               ; preds = %70, %49
  %51 = load i64, ptr %5, align 8, !tbaa !8
  %52 = load i64, ptr @T, align 8, !tbaa !8
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %56

56:                                               ; preds = %66, %55
  %57 = load i64, ptr %7, align 8, !tbaa !8
  %58 = load i64, ptr @T, align 8, !tbaa !8
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %61, label %60

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

61:                                               ; preds = %56
  %62 = load i64, ptr %5, align 8, !tbaa !8
  %63 = getelementptr inbounds [3000 x [3000 x i64]], ptr @V, i64 0, i64 %62
  %64 = load i64, ptr %7, align 8, !tbaa !8
  %65 = getelementptr inbounds [3000 x i64], ptr %63, i64 0, i64 %64
  store i64 -1, ptr %65, align 8, !tbaa !8
  br label %66

66:                                               ; preds = %61
  %67 = load i64, ptr %7, align 8, !tbaa !8
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %7, align 8, !tbaa !8
  br label %56, !llvm.loop !13

69:                                               ; preds = %60
  br label %70

70:                                               ; preds = %69
  %71 = load i64, ptr %5, align 8, !tbaa !8
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %5, align 8, !tbaa !8
  br label %50, !llvm.loop !14

73:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 -1, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 -1, ptr %9, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 -1, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 -1, ptr %11, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %74

74:                                               ; preds = %166, %73
  %75 = load i64, ptr %12, align 8, !tbaa !8
  %76 = load i64, ptr @S, align 8, !tbaa !8
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 11, ptr %6, align 4
  br label %169

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %80 = load i64, ptr %12, align 8, !tbaa !8
  %81 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %80
  store ptr %81, ptr %13, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %82 = load ptr, ptr %13, align 8, !tbaa !15
  %83 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #7
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %85 = load ptr, ptr %13, align 8, !tbaa !15
  %86 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #7
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  br label %88

88:                                               ; preds = %158, %79
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %89, label %91, label %90

90:                                               ; preds = %88
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %160

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %93 = load i64, ptr %92, align 8, !tbaa !8
  store i64 %93, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %94 = load i64, ptr %12, align 8, !tbaa !8
  %95 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %94
  store ptr %95, ptr %17, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %96 = load ptr, ptr %17, align 8, !tbaa !15
  %97 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #7
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %99 = load ptr, ptr %17, align 8, !tbaa !15
  %100 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #7
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  br label %102

102:                                              ; preds = %155, %91
  %103 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %103, label %105, label %104

104:                                              ; preds = %102
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %157

105:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %107 = load i64, ptr %106, align 8, !tbaa !8
  store i64 %107, ptr %20, align 8, !tbaa !8
  %108 = load i64, ptr %16, align 8, !tbaa !8
  %109 = load i64, ptr %20, align 8, !tbaa !8
  %110 = icmp eq i64 %108, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %105
  store i32 17, ptr %6, align 4
  br label %152

112:                                              ; preds = %105
  %113 = load i64, ptr %16, align 8, !tbaa !8
  %114 = load i64, ptr @S, align 8, !tbaa !8
  %115 = sub nsw i64 %113, %114
  %116 = getelementptr inbounds [3000 x [3000 x i64]], ptr @V, i64 0, i64 %115
  %117 = load i64, ptr %20, align 8, !tbaa !8
  %118 = load i64, ptr @S, align 8, !tbaa !8
  %119 = sub nsw i64 %117, %118
  %120 = getelementptr inbounds [3000 x i64], ptr %116, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = xor i64 %121, -1
  %123 = icmp ne i64 %122, 0
  br i1 %123, label %124, label %141

124:                                              ; preds = %112
  %125 = load i64, ptr %12, align 8, !tbaa !8
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %8, align 8, !tbaa !8
  %127 = load i64, ptr %16, align 8, !tbaa !8
  %128 = load i64, ptr @S, align 8, !tbaa !8
  %129 = sub nsw i64 %127, %128
  %130 = getelementptr inbounds [3000 x [3000 x i64]], ptr @V, i64 0, i64 %129
  %131 = load i64, ptr %20, align 8, !tbaa !8
  %132 = load i64, ptr @S, align 8, !tbaa !8
  %133 = sub nsw i64 %131, %132
  %134 = getelementptr inbounds [3000 x i64], ptr %130, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !8
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %9, align 8, !tbaa !8
  %137 = load i64, ptr %16, align 8, !tbaa !8
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %10, align 8, !tbaa !8
  %139 = load i64, ptr %20, align 8, !tbaa !8
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %11, align 8, !tbaa !8
  br label %151

141:                                              ; preds = %112
  %142 = load i64, ptr %12, align 8, !tbaa !8
  %143 = load i64, ptr %16, align 8, !tbaa !8
  %144 = load i64, ptr @S, align 8, !tbaa !8
  %145 = sub nsw i64 %143, %144
  %146 = getelementptr inbounds [3000 x [3000 x i64]], ptr @V, i64 0, i64 %145
  %147 = load i64, ptr %20, align 8, !tbaa !8
  %148 = load i64, ptr @S, align 8, !tbaa !8
  %149 = sub nsw i64 %147, %148
  %150 = getelementptr inbounds [3000 x i64], ptr %146, i64 0, i64 %149
  store i64 %142, ptr %150, align 8, !tbaa !8
  br label %151

151:                                              ; preds = %141, %124
  store i32 0, ptr %6, align 4
  br label %152

152:                                              ; preds = %151, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %153 = load i32, ptr %6, align 4
  switch i32 %153, label %192 [
    i32 0, label %154
    i32 17, label %155
  ]

154:                                              ; preds = %152
  br label %155

155:                                              ; preds = %154, %152
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %102

157:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %158

158:                                              ; preds = %157
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %88

160:                                              ; preds = %90
  %161 = load i64, ptr %8, align 8, !tbaa !8
  %162 = xor i64 %161, -1
  %163 = icmp ne i64 %162, 0
  br i1 %163, label %164, label %165

164:                                              ; preds = %160
  store i32 11, ptr %6, align 4
  br label %169

165:                                              ; preds = %160
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %12, align 8, !tbaa !8
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %12, align 8, !tbaa !8
  br label %74, !llvm.loop !17

169:                                              ; preds = %164, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %8, align 8, !tbaa !8
  %172 = xor i64 %171, -1
  %173 = icmp ne i64 %172, 0
  br i1 %173, label %174, label %187

174:                                              ; preds = %170
  %175 = load i64, ptr %8, align 8, !tbaa !8
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %175)
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %176, i8 noundef signext 32)
  %178 = load i64, ptr %9, align 8, !tbaa !8
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %177, i64 noundef %178)
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %179, i8 noundef signext 32)
  %181 = load i64, ptr %10, align 8, !tbaa !8
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %180, i64 noundef %181)
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %182, i8 noundef signext 32)
  %184 = load i64, ptr %11, align 8, !tbaa !8
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %183, i64 noundef %184)
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %185, i8 noundef signext 10)
  br label %190

187:                                              ; preds = %170
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %188, i8 noundef signext 10)
  br label %190

190:                                              ; preds = %187, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %191 = load i32, ptr %1, align 4
  ret i32 %191

192:                                              ; preds = %152
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }

@S = external dso_local global i64, align 8
@T = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@V = external dso_local local_unnamed_addr global [3000 x [3000 x i64]], align 16
@G = external dso_local global [400000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, 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 zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = 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) @S)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %16 = load i64, ptr @M, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph, label %.preheader66

.preheader66:                                     ; preds = %.lr.ph, %0
  %18 = load i64, ptr @T, align 8, !tbaa !8
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %.preheader65.us.preheader, label %.preheader

.preheader65.us.preheader:                        ; preds = %.preheader66
  %20 = shl nuw i64 %18, 3
  %xtraiter = and i64 %18, 7
  %21 = icmp ult i64 %18, 8
  br i1 %21, label %.preheader.loopexit.unr-lcssa, label %.preheader65.us.preheader.new

.preheader65.us.preheader.new:                    ; preds = %.preheader65.us.preheader
  %unroll_iter = and i64 %18, 9223372036854775800
  br label %.preheader65.us

.preheader65.us:                                  ; preds = %.preheader65.us, %.preheader65.us.preheader.new
  %.03470.us = phi i64 [ 0, %.preheader65.us.preheader.new ], [ %30, %.preheader65.us ]
  %niter = phi i64 [ 0, %.preheader65.us.preheader.new ], [ %niter.next.7, %.preheader65.us ]
  %22 = mul nuw nsw i64 %.03470.us, 24000
  %scevgep = getelementptr i8, ptr @V, i64 %22
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 -1, i64 %20, i1 false), !tbaa !8
  %23 = mul nuw i64 %.03470.us, 24000
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 24000), i64 %23
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 -1, i64 %20, i1 false), !tbaa !8
  %24 = mul nuw i64 %.03470.us, 24000
  %gep108 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 48000), i64 %24
  call void @llvm.memset.p0.i64(ptr align 16 %gep108, i8 -1, i64 %20, i1 false), !tbaa !8
  %25 = mul nuw i64 %.03470.us, 24000
  %gep109 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 72000), i64 %25
  call void @llvm.memset.p0.i64(ptr align 16 %gep109, i8 -1, i64 %20, i1 false), !tbaa !8
  %26 = mul nuw i64 %.03470.us, 24000
  %gep110 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 96000), i64 %26
  call void @llvm.memset.p0.i64(ptr align 16 %gep110, i8 -1, i64 %20, i1 false), !tbaa !8
  %27 = mul nuw i64 %.03470.us, 24000
  %gep111 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 120000), i64 %27
  call void @llvm.memset.p0.i64(ptr align 16 %gep111, i8 -1, i64 %20, i1 false), !tbaa !8
  %28 = mul nuw i64 %.03470.us, 24000
  %gep112 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 144000), i64 %28
  call void @llvm.memset.p0.i64(ptr align 16 %gep112, i8 -1, i64 %20, i1 false), !tbaa !8
  %29 = mul nuw i64 %.03470.us, 24000
  %gep113 = getelementptr i8, ptr getelementptr (i8, ptr @V, i64 168000), i64 %29
  call void @llvm.memset.p0.i64(ptr align 16 %gep113, i8 -1, i64 %20, i1 false), !tbaa !8
  %30 = add nuw nsw i64 %.03470.us, 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 %.preheader.loopexit.unr-lcssa, label %.preheader65.us, !llvm.loop !11

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.067 = phi i64 [ %40, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %33 = load i64, ptr %1, align 8, !tbaa !8
  %34 = add nsw i64 %33, -1
  store i64 %34, ptr %1, align 8, !tbaa !8
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  store i64 %36, ptr %2, align 8, !tbaa !8
  %37 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %34
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %38
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %40 = add nuw nsw i64 %.067, 1
  %41 = load i64, ptr @M, align 8, !tbaa !8
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %.lr.ph, label %.preheader66, !llvm.loop !13

.preheader.loopexit.unr-lcssa:                    ; preds = %.preheader65.us, %.preheader65.us.preheader
  %.03470.us.unr = phi i64 [ 0, %.preheader65.us.preheader ], [ %30, %.preheader65.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.preheader65.us.epil

.preheader65.us.epil:                             ; preds = %.preheader.loopexit.unr-lcssa, %.preheader65.us.epil
  %.03470.us.epil = phi i64 [ %44, %.preheader65.us.epil ], [ %.03470.us.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader65.us.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %43 = mul nuw nsw i64 %.03470.us.epil, 24000
  %scevgep.epil = getelementptr i8, ptr @V, i64 %43
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 -1, i64 %20, i1 false), !tbaa !8
  %44 = add nuw nsw i64 %.03470.us.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 %.preheader, label %.preheader65.us.epil, !llvm.loop !14

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.preheader65.us.epil, %.preheader66
  %45 = load i64, ptr @S, align 8, !tbaa !8
  %46 = icmp sgt i64 %45, 0
  br i1 %46, label %.lr.ph94, label %._crit_edge95

47:                                               ; preds = %._crit_edge85.thread, %._crit_edge85
  %.1.lcssa107 = phi i64 [ %.03792, %._crit_edge85.thread ], [ %.2.lcssa, %._crit_edge85 ]
  %.139.lcssa106 = phi i64 [ %.03891, %._crit_edge85.thread ], [ %.240.lcssa, %._crit_edge85 ]
  %.145.lcssa105 = phi i64 [ %.04490, %._crit_edge85.thread ], [ %.246.lcssa, %._crit_edge85 ]
  %48 = add nuw nsw i64 %.03693, 1
  %49 = load i64, ptr @S, align 8, !tbaa !8
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %.lr.ph94, label %._crit_edge95, !llvm.loop !16

.lr.ph94:                                         ; preds = %.preheader, %47
  %.03693 = phi i64 [ %48, %47 ], [ 0, %.preheader ]
  %.03792 = phi i64 [ %.1.lcssa107, %47 ], [ -1, %.preheader ]
  %.03891 = phi i64 [ %.139.lcssa106, %47 ], [ -1, %.preheader ]
  %.04490 = phi i64 [ %.145.lcssa105, %47 ], [ -1, %.preheader ]
  %51 = getelementptr inbounds [400000 x %"class.std::vector"], ptr @G, i64 0, i64 %.03693
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %52 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #8
  store ptr %52, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %53 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #8
  store ptr %53, ptr %4, align 8
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %54, label %.lr.ph84, label %._crit_edge85.thread

._crit_edge85.thread:                             ; preds = %.lr.ph94
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %47

.lr.ph84:                                         ; preds = %.lr.ph94
  %55 = add nuw nsw i64 %.03693, 1
  br label %56

._crit_edge85:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %.not = icmp eq i64 %.252.lcssa, -1
  br i1 %.not, label %47, label %82

56:                                               ; preds = %.lr.ph84, %._crit_edge
  %.182 = phi i64 [ %.03792, %.lr.ph84 ], [ %.2.lcssa, %._crit_edge ]
  %.13981 = phi i64 [ %.03891, %.lr.ph84 ], [ %.240.lcssa, %._crit_edge ]
  %.14580 = phi i64 [ %.04490, %.lr.ph84 ], [ %.246.lcssa, %._crit_edge ]
  %.15179 = phi i64 [ -1, %.lr.ph84 ], [ %.252.lcssa, %._crit_edge ]
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %58 = load i64, ptr %57, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %59 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #8
  store ptr %59, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %60 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #8
  store ptr %60, ptr %6, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %61, label %.lr.ph75, label %._crit_edge

.lr.ph75:                                         ; preds = %56
  %62 = add nsw i64 %58, 1
  br label %65

._crit_edge:                                      ; preds = %79, %56
  %.252.lcssa = phi i64 [ %.15179, %56 ], [ %.454, %79 ]
  %.246.lcssa = phi i64 [ %.14580, %56 ], [ %.448, %79 ]
  %.240.lcssa = phi i64 [ %.13981, %56 ], [ %.442, %79 ]
  %.2.lcssa = phi i64 [ %.182, %56 ], [ %.4, %79 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %64 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %64, label %56, label %._crit_edge85

65:                                               ; preds = %.lr.ph75, %79
  %.274 = phi i64 [ %.182, %.lr.ph75 ], [ %.4, %79 ]
  %.24073 = phi i64 [ %.13981, %.lr.ph75 ], [ %.442, %79 ]
  %.24672 = phi i64 [ %.14580, %.lr.ph75 ], [ %.448, %79 ]
  %.25271 = phi i64 [ %.15179, %.lr.ph75 ], [ %.454, %79 ]
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %67 = load i64, ptr %66, align 8, !tbaa !8
  %68 = icmp eq i64 %58, %67
  br i1 %68, label %79, label %69

69:                                               ; preds = %65
  %70 = load i64, ptr @S, align 8, !tbaa !8
  %71 = sub nsw i64 %58, %70
  %72 = sub nsw i64 %67, %70
  %73 = getelementptr inbounds [3000 x [3000 x i64]], ptr @V, i64 0, i64 %71, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !8
  %.not59 = icmp eq i64 %74, -1
  br i1 %.not59, label %78, label %75

75:                                               ; preds = %69
  %76 = add nuw nsw i64 %74, 1
  %77 = add nsw i64 %67, 1
  br label %79

78:                                               ; preds = %69
  store i64 %.03693, ptr %73, align 8, !tbaa !8
  br label %79

79:                                               ; preds = %75, %78, %65
  %.454 = phi i64 [ %.25271, %65 ], [ %55, %75 ], [ %.25271, %78 ]
  %.448 = phi i64 [ %.24672, %65 ], [ %76, %75 ], [ %.24672, %78 ]
  %.442 = phi i64 [ %.24073, %65 ], [ %62, %75 ], [ %.24073, %78 ]
  %.4 = phi i64 [ %.274, %65 ], [ %77, %75 ], [ %.274, %78 ]
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %81, label %65, label %._crit_edge

82:                                               ; preds = %._crit_edge85
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.252.lcssa)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 32)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %84, i64 noundef %.246.lcssa)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %85, i8 noundef signext 32)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %86, i64 noundef %.240.lcssa)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %87, i8 noundef signext 32)
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %88, i64 noundef %.2.lcssa)
  br label %91

._crit_edge95:                                    ; preds = %47, %.preheader
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %91

91:                                               ; preds = %._crit_edge95, %82
  %.sink = phi ptr [ %90, %._crit_edge95 ], [ %89, %82 ]
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %.sink, i8 noundef signext 10)
  ret i32 0
}

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

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

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

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

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

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

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

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

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

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

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

; 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 #6

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

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

; 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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !12}


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