; LLVM IR from eyangch/competitive-programming :: Codeforces/1395 (d)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::greater" = type { i8 }

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.std::greater", align 1
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"struct.std::greater", align 1
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %32 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %33 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %34 = getelementptr i8, ptr %33, i64 -24
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %35
  %37 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %36, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = call ptr @llvm.stacksave.p0()
  store ptr %42, ptr %5, align 8
  %43 = alloca i64, i64 %41, align 16
  store i64 %41, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %44

44:                                               ; preds = %53, %0
  %45 = load i64, ptr %7, align 8, !tbaa !8
  %46 = load i64, ptr %2, align 8, !tbaa !8
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %56

49:                                               ; preds = %44
  %50 = load i64, ptr %7, align 8, !tbaa !8
  %51 = getelementptr inbounds i64, ptr %43, i64 %50
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %51)
  br label %53

53:                                               ; preds = %49
  %54 = load i64, ptr %7, align 8, !tbaa !8
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %7, align 8, !tbaa !8
  br label %44, !llvm.loop !11

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %57

57:                                               ; preds = %81, %56
  %58 = load i64, ptr %10, align 8, !tbaa !8
  %59 = load i64, ptr %2, align 8, !tbaa !8
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %84

62:                                               ; preds = %57
  %63 = load i64, ptr %10, align 8, !tbaa !8
  %64 = getelementptr inbounds i64, ptr %43, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = load i64, ptr %4, align 8, !tbaa !8
  %67 = icmp sgt i64 %65, %66
  br i1 %67, label %68, label %76

68:                                               ; preds = %62
  %69 = load i64, ptr %10, align 8, !tbaa !8
  %70 = getelementptr inbounds i64, ptr %43, i64 %69
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %71 unwind label %72

71:                                               ; preds = %68
  br label %80

72:                                               ; preds = %76, %68
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %259

76:                                               ; preds = %62
  %77 = load i64, ptr %10, align 8, !tbaa !8
  %78 = getelementptr inbounds i64, ptr %43, i64 %77
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %79 unwind label %72

79:                                               ; preds = %76
  br label %80

80:                                               ; preds = %79, %71
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %10, align 8, !tbaa !8
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %10, align 8, !tbaa !8
  br label %57, !llvm.loop !13

84:                                               ; preds = %61
  %85 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEESt7greaterIxEEvT_S9_T0_(ptr %90, ptr %92)
          to label %93 unwind label %111

93:                                               ; preds = %84
  %94 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEESt7greaterIxEEvT_S9_T0_(ptr %99, ptr %101)
          to label %102 unwind label %111

102:                                              ; preds = %93
  %103 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %134

105:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %106

106:                                              ; preds = %121, %105
  %107 = load i64, ptr %20, align 8, !tbaa !8
  %108 = load i64, ptr %2, align 8, !tbaa !8
  %109 = icmp slt i64 %107, %108
  br i1 %109, label %115, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %124

111:                                              ; preds = %93, %84
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  br label %259

115:                                              ; preds = %106
  %116 = load i64, ptr %20, align 8, !tbaa !8
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %116) #8
  %118 = load i64, ptr %117, align 8, !tbaa !8
  %119 = load i64, ptr %19, align 8, !tbaa !8
  %120 = add nsw i64 %119, %118
  store i64 %120, ptr %19, align 8, !tbaa !8
  br label %121

121:                                              ; preds = %115
  %122 = load i64, ptr %20, align 8, !tbaa !8
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %20, align 8, !tbaa !8
  br label %106, !llvm.loop !14

124:                                              ; preds = %110
  %125 = load i64, ptr %19, align 8, !tbaa !8
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %125)
          to label %127 unwind label %130

127:                                              ; preds = %124
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %129 unwind label %130

129:                                              ; preds = %127
  store i32 0, ptr %1, align 4
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %256

130:                                              ; preds = %127, %124
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %11, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %259

134:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %135 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  store i64 %135, ptr %22, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %136 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  store i64 %136, ptr %23, align 8, !tbaa !8
  %137 = load i64, ptr %22, align 8, !tbaa !8
  %138 = add nsw i64 %137, 1
  %139 = alloca i64, i64 %138, align 16
  store i64 %138, ptr %24, align 8
  %140 = load i64, ptr %23, align 8, !tbaa !8
  %141 = add nsw i64 %140, 1
  %142 = alloca i64, i64 %141, align 16
  store i64 %141, ptr %25, align 8
  %143 = getelementptr inbounds i64, ptr %142, i64 0
  store i64 0, ptr %143, align 16, !tbaa !8
  %144 = getelementptr inbounds i64, ptr %139, i64 0
  store i64 0, ptr %144, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 1, ptr %26, align 8, !tbaa !8
  br label %145

145:                                              ; preds = %169, %134
  %146 = load i64, ptr %26, align 8, !tbaa !8
  %147 = load i64, ptr %22, align 8, !tbaa !8
  %148 = icmp sle i64 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %172

150:                                              ; preds = %145
  %151 = load i64, ptr %26, align 8, !tbaa !8
  %152 = sub nsw i64 %151, 1
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %152) #8
  %154 = load i64, ptr %153, align 8, !tbaa !8
  %155 = load i64, ptr %26, align 8, !tbaa !8
  %156 = getelementptr inbounds i64, ptr %139, i64 %155
  store i64 %154, ptr %156, align 8, !tbaa !8
  %157 = load i64, ptr %26, align 8, !tbaa !8
  %158 = icmp sgt i64 %157, 0
  br i1 %158, label %159, label %168

159:                                              ; preds = %150
  %160 = load i64, ptr %26, align 8, !tbaa !8
  %161 = sub nsw i64 %160, 1
  %162 = getelementptr inbounds i64, ptr %139, i64 %161
  %163 = load i64, ptr %162, align 8, !tbaa !8
  %164 = load i64, ptr %26, align 8, !tbaa !8
  %165 = getelementptr inbounds i64, ptr %139, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !8
  %167 = add nsw i64 %166, %163
  store i64 %167, ptr %165, align 8, !tbaa !8
  br label %168

168:                                              ; preds = %159, %150
  br label %169

169:                                              ; preds = %168
  %170 = load i64, ptr %26, align 8, !tbaa !8
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %26, align 8, !tbaa !8
  br label %145, !llvm.loop !15

172:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 1, ptr %27, align 8, !tbaa !8
  br label %173

173:                                              ; preds = %197, %172
  %174 = load i64, ptr %27, align 8, !tbaa !8
  %175 = load i64, ptr %23, align 8, !tbaa !8
  %176 = icmp sle i64 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 14, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %200

178:                                              ; preds = %173
  %179 = load i64, ptr %27, align 8, !tbaa !8
  %180 = sub nsw i64 %179, 1
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %180) #8
  %182 = load i64, ptr %181, align 8, !tbaa !8
  %183 = load i64, ptr %27, align 8, !tbaa !8
  %184 = getelementptr inbounds i64, ptr %142, i64 %183
  store i64 %182, ptr %184, align 8, !tbaa !8
  %185 = load i64, ptr %27, align 8, !tbaa !8
  %186 = icmp sgt i64 %185, 0
  br i1 %186, label %187, label %196

187:                                              ; preds = %178
  %188 = load i64, ptr %27, align 8, !tbaa !8
  %189 = sub nsw i64 %188, 1
  %190 = getelementptr inbounds i64, ptr %142, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !8
  %192 = load i64, ptr %27, align 8, !tbaa !8
  %193 = getelementptr inbounds i64, ptr %142, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !8
  %195 = add nsw i64 %194, %191
  store i64 %195, ptr %193, align 8, !tbaa !8
  br label %196

196:                                              ; preds = %187, %178
  br label %197

197:                                              ; preds = %196
  %198 = load i64, ptr %27, align 8, !tbaa !8
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %27, align 8, !tbaa !8
  br label %173, !llvm.loop !16

200:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store i64 0, ptr %28, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store i64 0, ptr %29, align 8, !tbaa !8
  br label %201

201:                                              ; preds = %238, %200
  %202 = load i64, ptr %29, align 8, !tbaa !8
  %203 = load i64, ptr %2, align 8, !tbaa !8
  %204 = icmp sle i64 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 17, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %245

206:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %207 = load i64, ptr %2, align 8, !tbaa !8
  %208 = load i64, ptr %29, align 8, !tbaa !8
  %209 = sub nsw i64 %208, 1
  %210 = load i64, ptr %3, align 8, !tbaa !8
  %211 = add nsw i64 %210, 1
  %212 = mul nsw i64 %209, %211
  %213 = sub nsw i64 %207, %212
  %214 = sub nsw i64 %213, 1
  store i64 %214, ptr %30, align 8, !tbaa !8
  %215 = load i64, ptr %30, align 8, !tbaa !8
  %216 = icmp slt i64 %215, 0
  br i1 %216, label %221, label %217

217:                                              ; preds = %206
  %218 = load i64, ptr %29, align 8, !tbaa !8
  %219 = load i64, ptr %23, align 8, !tbaa !8
  %220 = icmp sgt i64 %218, %219
  br i1 %220, label %221, label %222

221:                                              ; preds = %217, %206
  store i32 19, ptr %21, align 4
  br label %235

222:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %223 = load i64, ptr %29, align 8, !tbaa !8
  %224 = getelementptr inbounds i64, ptr %142, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !8
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %227 unwind label %241

227:                                              ; preds = %222
  %228 = load i64, ptr %226, align 8, !tbaa !8
  %229 = getelementptr inbounds i64, ptr %139, i64 %228
  %230 = load i64, ptr %229, align 8, !tbaa !8
  %231 = add nsw i64 %225, %230
  store i64 %231, ptr %31, align 8, !tbaa !8
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %233 unwind label %241

233:                                              ; preds = %227
  %234 = load i64, ptr %232, align 8, !tbaa !8
  store i64 %234, ptr %28, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  store i32 0, ptr %21, align 4
  br label %235

235:                                              ; preds = %233, %221
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  %236 = load i32, ptr %21, align 4
  switch i32 %236, label %265 [
    i32 0, label %237
    i32 19, label %238
  ]

237:                                              ; preds = %235
  br label %238

238:                                              ; preds = %237, %235
  %239 = load i64, ptr %29, align 8, !tbaa !8
  %240 = add nsw i64 %239, 1
  store i64 %240, ptr %29, align 8, !tbaa !8
  br label %201, !llvm.loop !17

241:                                              ; preds = %227, %222
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %11, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %255

245:                                              ; preds = %205
  %246 = load i64, ptr %28, align 8, !tbaa !8
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %246)
          to label %248 unwind label %251

248:                                              ; preds = %245
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %247, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %250 unwind label %251

250:                                              ; preds = %248
  store i32 0, ptr %1, align 4
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %256

251:                                              ; preds = %248, %245
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %11, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %12, align 4
  br label %255

255:                                              ; preds = %251, %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %259

256:                                              ; preds = %250, %129
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  %257 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %257)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %258 = load i32, ptr %1, align 4
  ret i32 %258

259:                                              ; preds = %255, %130, %111, %72
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %260

260:                                              ; preds = %259
  %261 = load ptr, ptr %11, align 8
  %262 = load i32, ptr %12, align 4
  %263 = insertvalue { ptr, i32 } poison, ptr %261, 0
  %264 = insertvalue { ptr, i32 } %263, i32 %262, 1
  resume { ptr, i32 } %264

265:                                              ; preds = %235
  unreachable
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

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

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %19 = load i64, ptr %1, align 8, !tbaa !8
  %20 = call ptr @llvm.stacksave.p0()
  %21 = alloca i64, i64 %19, align 16
  %22 = load i64, ptr %1, align 8, !tbaa !8
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %24 = load i64, ptr %1, align 8, !tbaa !8
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph59, label %._crit_edge60

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.04456 = phi i64 [ %28, %.lr.ph ], [ 0, %0 ]
  %26 = getelementptr inbounds i64, ptr %21, i64 %.04456
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = add nuw nsw i64 %.04456, 1
  %29 = load i64, ptr %1, align 8, !tbaa !8
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge60:                                    ; preds = %40, %._crit_edge
  %31 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %32 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEESt7greaterIxEEvT_S9_T0_(ptr %31, ptr %32)
          to label %44 unwind label %53

.lr.ph59:                                         ; preds = %._crit_edge, %40
  %.04557 = phi i64 [ %41, %40 ], [ 0, %._crit_edge ]
  %33 = getelementptr inbounds i64, ptr %21, i64 %.04557
  %34 = load i64, ptr %33, align 8, !tbaa !8
  %35 = load i64, ptr %3, align 8, !tbaa !8
  %36 = icmp sgt i64 %34, %35
  %37 = select i1 %36, ptr %5, ptr %4
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %40 unwind label %38

38:                                               ; preds = %.lr.ph59
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %117

40:                                               ; preds = %.lr.ph59
  %41 = add nuw nsw i64 %.04557, 1
  %42 = load i64, ptr %1, align 8, !tbaa !8
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %.lr.ph59, label %._crit_edge60, !llvm.loop !13

44:                                               ; preds = %._crit_edge60
  %45 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %46 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEESt7greaterIxEEvT_S9_T0_(ptr %45, ptr %46)
          to label %47 unwind label %53

47:                                               ; preds = %44
  %48 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %.preheader, label %65

.preheader:                                       ; preds = %47
  %50 = load i64, ptr %1, align 8, !tbaa !8
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %.lr.ph76, label %._crit_edge77

._crit_edge77:                                    ; preds = %.lr.ph76, %.preheader
  %.047.lcssa = phi i64 [ 0, %.preheader ], [ %57, %.lr.ph76 ]
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.047.lcssa)
          to label %61 unwind label %63

53:                                               ; preds = %44, %._crit_edge60
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %117

.lr.ph76:                                         ; preds = %.preheader, %.lr.ph76
  %.04675 = phi i64 [ %58, %.lr.ph76 ], [ 0, %.preheader ]
  %.04774 = phi i64 [ %57, %.lr.ph76 ], [ 0, %.preheader ]
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04675) #8
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = add nsw i64 %56, %.04774
  %58 = add nuw nsw i64 %.04675, 1
  %59 = load i64, ptr %1, align 8, !tbaa !8
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %.lr.ph76, label %._crit_edge77, !llvm.loop !14

61:                                               ; preds = %._crit_edge77
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %116 unwind label %63

63:                                               ; preds = %61, %._crit_edge77
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %117

65:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %66 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  store i64 %66, ptr %6, align 8, !tbaa !8
  %67 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %68 = add nsw i64 %66, 1
  %69 = alloca i64, i64 %68, align 16
  %70 = add i64 %67, 1
  %71 = alloca i64, i64 %70, align 16
  store i64 0, ptr %71, align 16, !tbaa !8
  store i64 0, ptr %69, align 16, !tbaa !8
  %.not61 = icmp slt i64 %66, 1
  br i1 %.not61, label %.preheader55, label %.lr.ph64

.preheader55:                                     ; preds = %.lr.ph64, %65
  %.not5165 = icmp slt i64 %67, 1
  br i1 %.not5165, label %._crit_edge68, label %.lr.ph67

.lr.ph64:                                         ; preds = %65, %.lr.ph64
  %72 = phi i64 [ %77, %.lr.ph64 ], [ 0, %65 ]
  %.04262 = phi i64 [ %78, %.lr.ph64 ], [ 1, %65 ]
  %73 = add nsw i64 %.04262, -1
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %73) #8
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = getelementptr inbounds i64, ptr %69, i64 %.04262
  %77 = add nsw i64 %72, %75
  store i64 %77, ptr %76, align 8, !tbaa !8
  %78 = add nuw nsw i64 %.04262, 1
  %.not.not = icmp slt i64 %.04262, %66
  br i1 %.not.not, label %.lr.ph64, label %.preheader55, !llvm.loop !15

._crit_edge68:                                    ; preds = %.lr.ph67, %.preheader55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store i64 0, ptr %7, align 8, !tbaa !8
  %79 = load i64, ptr %1, align 8, !tbaa !8
  %.not5269 = icmp slt i64 %79, 0
  br i1 %.not5269, label %._crit_edge73, label %.lr.ph72

.lr.ph67:                                         ; preds = %.preheader55, %.lr.ph67
  %80 = phi i64 [ %85, %.lr.ph67 ], [ 0, %.preheader55 ]
  %.04166 = phi i64 [ %86, %.lr.ph67 ], [ 1, %.preheader55 ]
  %81 = add nsw i64 %.04166, -1
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %81) #8
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = getelementptr inbounds i64, ptr %71, i64 %.04166
  %85 = add nsw i64 %80, %83
  store i64 %85, ptr %84, align 8, !tbaa !8
  %86 = add nuw i64 %.04166, 1
  %exitcond.not = icmp eq i64 %.04166, %67
  br i1 %exitcond.not, label %._crit_edge68, label %.lr.ph67, !llvm.loop !16

._crit_edge73:                                    ; preds = %107, %._crit_edge68
  %87 = phi i64 [ 0, %._crit_edge68 ], [ %108, %107 ]
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %87)
          to label %111 unwind label %114

.lr.ph72:                                         ; preds = %._crit_edge68, %107
  %89 = phi i64 [ %108, %107 ], [ 0, %._crit_edge68 ]
  %90 = phi i64 [ %109, %107 ], [ %79, %._crit_edge68 ]
  %.070 = phi i64 [ %110, %107 ], [ 0, %._crit_edge68 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %91 = add nsw i64 %.070, -1
  %92 = load i64, ptr %2, align 8, !tbaa !8
  %.neg = xor i64 %92, -1
  %.neg53 = mul i64 %91, %.neg
  %93 = add i64 %.neg53, %90
  %94 = add nsw i64 %93, -1
  store i64 %94, ptr %8, align 8, !tbaa !8
  %95 = icmp slt i64 %93, 1
  %96 = icmp sgt i64 %.070, %67
  %or.cond = or i1 %96, %95
  br i1 %or.cond, label %107, label %97

97:                                               ; preds = %.lr.ph72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %98 = getelementptr inbounds i64, ptr %71, i64 %.070
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %101 = load i64, ptr %100, align 8, !tbaa !8
  %102 = getelementptr inbounds i64, ptr %69, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !8
  %104 = add nsw i64 %103, %99
  store i64 %104, ptr %9, align 8, !tbaa !8
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %106 = load i64, ptr %105, align 8, !tbaa !8
  store i64 %106, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %.pre = load i64, ptr %1, align 8, !tbaa !8
  br label %107

107:                                              ; preds = %.lr.ph72, %97
  %108 = phi i64 [ %89, %.lr.ph72 ], [ %106, %97 ]
  %109 = phi i64 [ %90, %.lr.ph72 ], [ %.pre, %97 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %110 = add nuw nsw i64 %.070, 1
  %.not52.not = icmp slt i64 %.070, %109
  br i1 %.not52.not, label %.lr.ph72, label %._crit_edge73, !llvm.loop !17

111:                                              ; preds = %._crit_edge73
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %113 unwind label %114

113:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %116

114:                                              ; preds = %111, %._crit_edge73
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %117

116:                                              ; preds = %61, %113
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.stackrestore.p0(ptr %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0

117:                                              ; preds = %114, %63, %53, %38
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %64, %63 ], [ %115, %114 ], [ %54, %53 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn
}

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

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


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