; LLVM IR from VAR-solutions/Algorithms :: Dynamic Programming/minimized cost of binary search tree (solution)

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

@level = external dso_local global [10000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printSt6vectorIS_IxSaIxEESaIS1_EExxPxx(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 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) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %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 %"class.std::vector.0", align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %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 %"class.std::vector.0", align 8
  %29 = alloca i64, align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %33 = 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)
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = call ptr @llvm.stacksave.p0()
  store ptr %35, ptr %3, align 8
  %36 = alloca %"struct.std::pair", i64 %34, align 16
  store i64 %34, ptr %4, align 8
  %37 = icmp eq i64 %34, 0
  br i1 %37, label %44, label %38

38:                                               ; preds = %0
  %39 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %34
  br label %40

40:                                               ; preds = %40, %38
  %41 = phi ptr [ %36, %38 ], [ %42, %40 ]
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
  %42 = getelementptr inbounds %"struct.std::pair", ptr %41, i64 1
  %43 = icmp eq ptr %42, %39
  br i1 %43, label %44, label %40

44:                                               ; preds = %40, %0
  %45 = load i64, ptr %2, align 8, !tbaa !5
  %46 = alloca i64, i64 %45, align 16
  store i64 %45, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %61, %44
  %48 = load i64, ptr %6, align 8, !tbaa !5
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %64

52:                                               ; preds = %47
  %53 = load i64, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %53
  %55 = getelementptr inbounds %"struct.std::pair", ptr %54, i32 0, i32 0
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %55)
  %57 = load i64, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %57
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 1
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(8) %59)
  br label %61

61:                                               ; preds = %52
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = add nsw i64 %62, 1
  store i64 %63, ptr %6, align 8, !tbaa !5
  br label %47, !llvm.loop !9

64:                                               ; preds = %51
  %65 = load i64, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %65
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef %36, ptr noundef %66)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %79, %64
  %68 = load i64, ptr %7, align 8, !tbaa !5
  %69 = load i64, ptr %2, align 8, !tbaa !5
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %82

72:                                               ; preds = %67
  %73 = load i64, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %73
  %75 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 0
  %76 = load i64, ptr %75, align 16, !tbaa !11
  %77 = load i64, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds i64, ptr %46, i64 %77
  store i64 %76, ptr %78, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %72
  %80 = load i64, ptr %7, align 8, !tbaa !5
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %7, align 8, !tbaa !5
  br label %67, !llvm.loop !13

82:                                               ; preds = %71
  %83 = load i64, ptr %2, align 8, !tbaa !5
  %84 = add nsw i64 %83, 1
  %85 = alloca i64, i64 %84, align 16
  store i64 %84, ptr %8, align 8
  %86 = getelementptr inbounds i64, ptr %85, i64 0
  store i64 0, ptr %86, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %104, %82
  %88 = load i64, ptr %9, align 8, !tbaa !5
  %89 = load i64, ptr %2, align 8, !tbaa !5
  %90 = icmp slt i64 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %107

92:                                               ; preds = %87
  %93 = load i64, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds i64, ptr %85, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %96 = load i64, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %96
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !14
  %100 = add nsw i64 %95, %99
  %101 = load i64, ptr %9, align 8, !tbaa !5
  %102 = add nsw i64 %101, 1
  %103 = getelementptr inbounds i64, ptr %85, i64 %102
  store i64 %100, ptr %103, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %92
  %105 = load i64, ptr %9, align 8, !tbaa !5
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %9, align 8, !tbaa !5
  br label %87, !llvm.loop !15

107:                                              ; preds = %91
  %108 = load i64, ptr %2, align 8, !tbaa !5
  %109 = load i64, ptr %2, align 8, !tbaa !5
  %110 = mul nuw i64 %108, %109
  %111 = alloca i64, i64 %110, align 16
  store i64 %108, ptr %10, align 8
  store i64 %109, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %139, %107
  %113 = load i64, ptr %13, align 8, !tbaa !5
  %114 = load i64, ptr %2, align 8, !tbaa !5
  %115 = icmp slt i64 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %147

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %130, %117
  %119 = load i64, ptr %16, align 8, !tbaa !5
  %120 = load i64, ptr %2, align 8, !tbaa !5
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %137

123:                                              ; preds = %118
  %124 = load i64, ptr %13, align 8, !tbaa !5
  %125 = mul nsw i64 %124, %109
  %126 = getelementptr inbounds i64, ptr %111, i64 %125
  %127 = load i64, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds i64, ptr %126, i64 %127
  store i64 0, ptr %128, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 -1, ptr %17, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %129 unwind label %133

129:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %16, align 8, !tbaa !5
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %16, align 8, !tbaa !5
  br label %118, !llvm.loop !16

133:                                              ; preds = %123
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %18, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %146

137:                                              ; preds = %122
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %138 unwind label %142

138:                                              ; preds = %137
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  br label %139

139:                                              ; preds = %138
  %140 = load i64, ptr %13, align 8, !tbaa !5
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %13, align 8, !tbaa !5
  br label %112, !llvm.loop !17

142:                                              ; preds = %137
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %18, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %19, align 4
  br label %146

146:                                              ; preds = %142, %133
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %318

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

148:                                              ; preds = %231, %147
  %149 = load i64, ptr %20, align 8, !tbaa !5
  %150 = load i64, ptr %2, align 8, !tbaa !5
  %151 = icmp slt i64 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %234

153:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %154 = load i64, ptr %20, align 8, !tbaa !5
  store i64 %154, ptr %22, align 8, !tbaa !5
  br label %155

155:                                              ; preds = %227, %153
  %156 = load i64, ptr %22, align 8, !tbaa !5
  %157 = load i64, ptr %2, align 8, !tbaa !5
  %158 = icmp slt i64 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %230

160:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 9223372036854775807, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %161 = load i64, ptr %22, align 8, !tbaa !5
  store i64 %161, ptr %24, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %215, %160
  %163 = load i64, ptr %24, align 8, !tbaa !5
  %164 = load i64, ptr %21, align 8, !tbaa !5
  %165 = icmp sge i64 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %218

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !5
  %168 = load i64, ptr %21, align 8, !tbaa !5
  %169 = load i64, ptr %24, align 8, !tbaa !5
  %170 = icmp slt i64 %168, %169
  br i1 %170, label %171, label %179

171:                                              ; preds = %167
  %172 = load i64, ptr %21, align 8, !tbaa !5
  %173 = mul nsw i64 %172, %109
  %174 = getelementptr inbounds i64, ptr %111, i64 %173
  %175 = load i64, ptr %24, align 8, !tbaa !5
  %176 = sub nsw i64 %175, 1
  %177 = getelementptr inbounds i64, ptr %174, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !5
  store i64 %178, ptr %25, align 8, !tbaa !5
  br label %179

179:                                              ; preds = %171, %167
  %180 = load i64, ptr %24, align 8, !tbaa !5
  %181 = load i64, ptr %22, align 8, !tbaa !5
  %182 = icmp slt i64 %180, %181
  br i1 %182, label %183, label %191

183:                                              ; preds = %179
  %184 = load i64, ptr %24, align 8, !tbaa !5
  %185 = add nsw i64 %184, 1
  %186 = mul nsw i64 %185, %109
  %187 = getelementptr inbounds i64, ptr %111, i64 %186
  %188 = load i64, ptr %22, align 8, !tbaa !5
  %189 = getelementptr inbounds i64, ptr %187, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !5
  store i64 %190, ptr %26, align 8, !tbaa !5
  br label %191

191:                                              ; preds = %183, %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %192 = load i64, ptr %25, align 8, !tbaa !5
  %193 = load i64, ptr %26, align 8, !tbaa !5
  %194 = add nsw i64 %192, %193
  %195 = load i64, ptr %22, align 8, !tbaa !5
  %196 = add nsw i64 %195, 1
  %197 = getelementptr inbounds i64, ptr %85, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !5
  %199 = load i64, ptr %21, align 8, !tbaa !5
  %200 = getelementptr inbounds i64, ptr %85, i64 %199
  %201 = load i64, ptr %200, align 8, !tbaa !5
  %202 = sub nsw i64 %198, %201
  %203 = add nsw i64 %194, %202
  store i64 %203, ptr %27, align 8, !tbaa !5
  %204 = load i64, ptr %23, align 8, !tbaa !5
  %205 = load i64, ptr %27, align 8, !tbaa !5
  %206 = icmp sge i64 %204, %205
  br i1 %206, label %207, label %214

207:                                              ; preds = %191
  %208 = load i64, ptr %27, align 8, !tbaa !5
  store i64 %208, ptr %23, align 8, !tbaa !5
  %209 = load i64, ptr %24, align 8, !tbaa !5
  %210 = load i64, ptr %21, align 8, !tbaa !5
  %211 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %210) #7
  %212 = load i64, ptr %22, align 8, !tbaa !5
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %211, i64 noundef %212) #7
  store i64 %209, ptr %213, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %207, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %24, align 8, !tbaa !5
  %217 = add nsw i64 %216, -1
  store i64 %217, ptr %24, align 8, !tbaa !5
  br label %162, !llvm.loop !18

218:                                              ; preds = %166
  %219 = load i64, ptr %23, align 8, !tbaa !5
  %220 = load i64, ptr %21, align 8, !tbaa !5
  %221 = mul nsw i64 %220, %109
  %222 = getelementptr inbounds i64, ptr %111, i64 %221
  %223 = load i64, ptr %22, align 8, !tbaa !5
  %224 = getelementptr inbounds i64, ptr %222, i64 %223
  store i64 %219, ptr %224, align 8, !tbaa !5
  %225 = load i64, ptr %21, align 8, !tbaa !5
  %226 = add nsw i64 %225, 1
  store i64 %226, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %227

227:                                              ; preds = %218
  %228 = load i64, ptr %22, align 8, !tbaa !5
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %22, align 8, !tbaa !5
  br label %155, !llvm.loop !19

230:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %231

231:                                              ; preds = %230
  %232 = load i64, ptr %20, align 8, !tbaa !5
  %233 = add nsw i64 %232, 1
  store i64 %233, ptr %20, align 8, !tbaa !5
  br label %148, !llvm.loop !20

234:                                              ; preds = %152
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %236 unwind label %284

236:                                              ; preds = %234
  %237 = mul nsw i64 0, %109
  %238 = getelementptr inbounds i64, ptr %111, i64 %237
  %239 = load i64, ptr %2, align 8, !tbaa !5
  %240 = sub nsw i64 %239, 1
  %241 = getelementptr inbounds i64, ptr %238, i64 %240
  %242 = load i64, ptr %241, align 8, !tbaa !5
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %235, i64 noundef %242)
          to label %244 unwind label %284

244:                                              ; preds = %236
  %245 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %243, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %246 unwind label %284

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

248:                                              ; preds = %246
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %250 unwind label %284

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

252:                                              ; preds = %250
  %253 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %251, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %254 unwind label %284

254:                                              ; preds = %252
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %255 unwind label %284

255:                                              ; preds = %254
  %256 = load i64, ptr %2, align 8, !tbaa !5
  %257 = sub nsw i64 %256, 1
  invoke void @_Z5printSt6vectorIS_IxSaIxEESaIS1_EExxPxx(ptr noundef %28, i64 noundef 0, i64 noundef %257, ptr noundef %46, i64 noundef 0)
          to label %258 unwind label %288

258:                                              ; preds = %255
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  store i64 0, ptr %29, align 8, !tbaa !5
  br label %259

259:                                              ; preds = %311, %258
  %260 = load i64, ptr %29, align 8, !tbaa !5
  %261 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @level, i64 0, i64 %260
  %262 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %261) #7
  %263 = icmp ne i64 %262, 0
  br i1 %263, label %264, label %314

264:                                              ; preds = %259
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %266 unwind label %292

266:                                              ; preds = %264
  %267 = load i64, ptr %29, align 8, !tbaa !5
  %268 = add nsw i64 %267, 1
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %265, i64 noundef %268)
          to label %270 unwind label %292

270:                                              ; preds = %266
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %269, ptr noundef @.str.4)
          to label %272 unwind label %292

272:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %273 = load i64, ptr %29, align 8, !tbaa !5
  %274 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @level, i64 0, i64 %273
  %275 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %274) #7
  %276 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %31, i32 0, i32 0
  store ptr %275, ptr %276, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEC2IPxvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %277

277:                                              ; preds = %303, %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %278 = load i64, ptr %29, align 8, !tbaa !5
  %279 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @level, i64 0, i64 %278
  %280 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %279) #7
  %281 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %32, i32 0, i32 0
  store ptr %280, ptr %281, align 8
  %282 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKxPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T1_EERKNS7_IT0_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br i1 %282, label %296, label %283

283:                                              ; preds = %277
  store i32 28, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %309

284:                                              ; preds = %254, %252, %250, %248, %246, %244, %236, %234
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %18, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %19, align 4
  br label %318

288:                                              ; preds = %255
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %18, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %19, align 4
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  br label %318

292:                                              ; preds = %309, %270, %266, %264
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %18, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %19, align 4
  br label %317

296:                                              ; preds = %277
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  %298 = load i64, ptr %297, align 8, !tbaa !5
  %299 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %298)
          to label %300 unwind label %305

300:                                              ; preds = %296
  %301 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %299, ptr noundef @.str.5)
          to label %302 unwind label %305

302:                                              ; preds = %300
  br label %303

303:                                              ; preds = %302
  %304 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  br label %277, !llvm.loop !21

305:                                              ; preds = %300, %296
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %18, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %317

309:                                              ; preds = %283
  %310 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %311 unwind label %292

311:                                              ; preds = %309
  %312 = load i64, ptr %29, align 8, !tbaa !5
  %313 = add nsw i64 %312, 1
  store i64 %313, ptr %29, align 8, !tbaa !5
  br label %259, !llvm.loop !22

314:                                              ; preds = %259
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  %315 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %315)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %316 = load i32, ptr %1, align 4
  ret i32 %316

317:                                              ; preds = %305, %292
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %318

318:                                              ; preds = %317, %288, %284, %146
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %319

319:                                              ; preds = %318
  %320 = load ptr, ptr %18, align 8
  %321 = load i32, ptr %19, align 4
  %322 = insertvalue { ptr, i32 } poison, ptr %320, 0
  %323 = insertvalue { ptr, i32 } %322, i32 %321, 1
  resume { ptr, i32 } %323
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef, ptr noundef) #5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

@level = external dso_local global [10000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printSt6vectorIS_IxSaIxEESaIS1_EExxPxx(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %9 = 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)
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = call ptr @llvm.stacksave.p0()
  %12 = alloca %"struct.std::pair", i64 %10, align 16
  %13 = icmp eq i64 %10, 0
  br i1 %13, label %.loopexit, label %14

14:                                               ; preds = %0
  %15 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %10
  br label %16

16:                                               ; preds = %16, %14
  %17 = phi ptr [ %12, %14 ], [ %18, %16 ]
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = icmp eq ptr %18, %15
  br i1 %19, label %.loopexit, label %16

.loopexit:                                        ; preds = %16, %0
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = alloca i64, i64 %20, align 16
  %22 = icmp sgt i64 %20, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.loopexit
  %.lcssa88 = phi i64 [ %20, %.loopexit ], [ %41, %.lr.ph ]
  %23 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %.lcssa88
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef nonnull %12, ptr noundef nonnull %23)
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph92.preheader, label %._crit_edge93.thread

.lr.ph92.preheader:                               ; preds = %._crit_edge
  %min.iters.check = icmp ult i64 %24, 5
  br i1 %min.iters.check, label %.lr.ph92.preheader138, label %vector.ph

.lr.ph92.preheader138:                            ; preds = %vector.body, %.lr.ph92.preheader
  %.07390.ph = phi i64 [ 0, %.lr.ph92.preheader ], [ %n.vec, %vector.body ]
  br label %.lr.ph92

vector.ph:                                        ; preds = %.lr.ph92.preheader
  %n.mod.vf = and i64 %24, 3
  %26 = icmp eq i64 %n.mod.vf, 0
  %27 = select i1 %26, i64 4, i64 %n.mod.vf
  %n.vec = sub nsw i64 %24, %27
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %28 = or disjoint i64 %index, 2
  %29 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %index
  %30 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %28
  %wide.vec = load <4 x i64>, ptr %29, align 16, !tbaa !9
  %wide.vec135 = load <4 x i64>, ptr %30, align 16, !tbaa !9
  %strided.vec = shufflevector <4 x i64> %wide.vec, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec136 = shufflevector <4 x i64> %wide.vec135, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %31 = getelementptr inbounds i64, ptr %21, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <2 x i64> %strided.vec, ptr %31, align 16, !tbaa !5
  store <2 x i64> %strided.vec136, ptr %32, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %.lr.ph92.preheader138, label %vector.body, !llvm.loop !11

._crit_edge93.thread:                             ; preds = %._crit_edge
  %34 = add nsw i64 %24, 1
  %35 = alloca i64, i64 %34, align 16
  store i64 0, ptr %35, align 16, !tbaa !5
  br label %._crit_edge98

.lr.ph:                                           ; preds = %.loopexit, %.lr.ph
  %.07289 = phi i64 [ %40, %.lr.ph ], [ 0, %.loopexit ]
  %36 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %.07289
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = getelementptr inbounds i8, ptr %36, i64 8
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = add nuw nsw i64 %.07289, 1
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge93:                                    ; preds = %.lr.ph92
  %43 = add nuw nsw i64 %24, 1
  %44 = alloca i64, i64 %43, align 16
  store i64 0, ptr %44, align 16, !tbaa !5
  br i1 %25, label %.lr.ph97.preheader, label %._crit_edge98

.lr.ph97.preheader:                               ; preds = %._crit_edge93
  %xtraiter = and i64 %24, 3
  %45 = icmp ult i64 %24, 4
  br i1 %45, label %._crit_edge98.loopexit.unr-lcssa, label %.lr.ph97.preheader.new

.lr.ph97.preheader.new:                           ; preds = %.lr.ph97.preheader
  %unroll_iter = and i64 %24, 9223372036854775804
  br label %.lr.ph97

.lr.ph92:                                         ; preds = %.lr.ph92.preheader138, %.lr.ph92
  %.07390 = phi i64 [ %49, %.lr.ph92 ], [ %.07390.ph, %.lr.ph92.preheader138 ]
  %46 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %.07390
  %47 = load i64, ptr %46, align 16, !tbaa !9
  %48 = getelementptr inbounds i64, ptr %21, i64 %.07390
  store i64 %47, ptr %48, align 8, !tbaa !5
  %49 = add nuw nsw i64 %.07390, 1
  %exitcond.not = icmp eq i64 %49, %24
  br i1 %exitcond.not, label %._crit_edge93, label %.lr.ph92, !llvm.loop !16

._crit_edge98.loopexit.unr-lcssa:                 ; preds = %.lr.ph97, %.lr.ph97.preheader
  %.unr = phi i64 [ 0, %.lr.ph97.preheader ], [ %79, %.lr.ph97 ]
  %.07495.unr = phi i64 [ 0, %.lr.ph97.preheader ], [ %80, %.lr.ph97 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge98, label %.lr.ph97.epil

.lr.ph97.epil:                                    ; preds = %._crit_edge98.loopexit.unr-lcssa, %.lr.ph97.epil
  %50 = phi i64 [ %53, %.lr.ph97.epil ], [ %.unr, %._crit_edge98.loopexit.unr-lcssa ]
  %.07495.epil = phi i64 [ %54, %.lr.ph97.epil ], [ %.07495.unr, %._crit_edge98.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph97.epil ], [ 0, %._crit_edge98.loopexit.unr-lcssa ]
  %51 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %.07495.epil, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !17
  %53 = add nsw i64 %52, %50
  %54 = add nuw nsw i64 %.07495.epil, 1
  %55 = getelementptr inbounds i64, ptr %44, i64 %54
  store i64 %53, ptr %55, align 8, !tbaa !5
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge98, label %.lr.ph97.epil, !llvm.loop !18

._crit_edge98:                                    ; preds = %._crit_edge98.loopexit.unr-lcssa, %.lr.ph97.epil, %._crit_edge93.thread, %._crit_edge93
  %56 = phi ptr [ %35, %._crit_edge93.thread ], [ %44, %._crit_edge93 ], [ %44, %.lr.ph97.epil ], [ %44, %._crit_edge98.loopexit.unr-lcssa ]
  %57 = mul nuw i64 %24, %24
  %58 = alloca i64, i64 %57, align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %59 = load i64, ptr %1, align 8, !tbaa !5
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.lr.ph105, label %._crit_edge122

.lr.ph97:                                         ; preds = %.lr.ph97, %.lr.ph97.preheader.new
  %61 = phi i64 [ 0, %.lr.ph97.preheader.new ], [ %79, %.lr.ph97 ]
  %.07495 = phi i64 [ 0, %.lr.ph97.preheader.new ], [ %80, %.lr.ph97 ]
  %niter = phi i64 [ 0, %.lr.ph97.preheader.new ], [ %niter.next.3, %.lr.ph97 ]
  %62 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %.07495, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !17
  %64 = add nsw i64 %63, %61
  %65 = or disjoint i64 %.07495, 1
  %66 = getelementptr inbounds i64, ptr %44, i64 %65
  store i64 %64, ptr %66, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %65, i32 1
  %68 = load i64, ptr %67, align 8, !tbaa !17
  %69 = add nsw i64 %68, %64
  %70 = or disjoint i64 %.07495, 2
  %71 = getelementptr inbounds i64, ptr %44, i64 %70
  store i64 %69, ptr %71, align 16, !tbaa !5
  %72 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %70, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !17
  %74 = add nsw i64 %73, %69
  %75 = or disjoint i64 %.07495, 3
  %76 = getelementptr inbounds i64, ptr %44, i64 %75
  store i64 %74, ptr %76, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.std::pair", ptr %12, i64 %75, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !17
  %79 = add nsw i64 %78, %74
  %80 = add nuw nsw i64 %.07495, 4
  %81 = getelementptr inbounds i64, ptr %44, i64 %80
  store i64 %79, ptr %81, align 16, !tbaa !5
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge98.loopexit.unr-lcssa, label %.lr.ph97, !llvm.loop !20

.preheader87:                                     ; preds = %95
  %82 = icmp sgt i64 %97, 0
  br i1 %82, label %.preheader86.lr.ph, label %._crit_edge122

.preheader86.lr.ph:                               ; preds = %.preheader87
  %invariant.gep114 = getelementptr i8, ptr %58, i64 -8
  %invariant.gep116 = getelementptr inbounds i8, ptr %56, i64 8
  br label %.preheader86

.lr.ph105:                                        ; preds = %._crit_edge98, %95
  %.071103 = phi i64 [ %96, %95 ], [ 0, %._crit_edge98 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %83 = load i64, ptr %1, align 8, !tbaa !5
  %84 = icmp sgt i64 %83, 0
  br i1 %84, label %.lr.ph101, label %._crit_edge102

.lr.ph101:                                        ; preds = %.lr.ph105
  %85 = mul nsw i64 %.071103, %24
  %86 = getelementptr inbounds i64, ptr %58, i64 %85
  br label %87

._crit_edge102:                                   ; preds = %89, %.lr.ph105
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %95 unwind label %99

87:                                               ; preds = %.lr.ph101, %89
  %.07099 = phi i64 [ 0, %.lr.ph101 ], [ %90, %89 ]
  %88 = getelementptr inbounds i64, ptr %86, i64 %.07099
  store i64 0, ptr %88, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 -1, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %89 unwind label %93

89:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %90 = add nuw nsw i64 %.07099, 1
  %91 = load i64, ptr %1, align 8, !tbaa !5
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %87, label %._crit_edge102, !llvm.loop !21

93:                                               ; preds = %87
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %101

95:                                               ; preds = %._crit_edge102
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  %96 = add nuw nsw i64 %.071103, 1
  %97 = load i64, ptr %1, align 8, !tbaa !5
  %98 = icmp slt i64 %96, %97
  br i1 %98, label %.lr.ph105, label %.preheader87, !llvm.loop !22

99:                                               ; preds = %._crit_edge102
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %101

101:                                              ; preds = %99, %93
  %.pn83 = phi { ptr, i32 } [ %94, %93 ], [ %100, %99 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  br label %193

.preheader86:                                     ; preds = %.preheader86.lr.ph, %._crit_edge120
  %102 = phi i64 [ %97, %.preheader86.lr.ph ], [ %117, %._crit_edge120 ]
  %.064121 = phi i64 [ 0, %.preheader86.lr.ph ], [ %118, %._crit_edge120 ]
  %103 = icmp slt i64 %.064121, %102
  br i1 %103, label %.lr.ph109, label %._crit_edge120

._crit_edge122:                                   ; preds = %._crit_edge120, %._crit_edge98, %.preheader87
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %139 unwind label %175

.lr.ph109:                                        ; preds = %.preheader86, %._crit_edge110
  %.062119 = phi i64 [ %123, %._crit_edge110 ], [ %.064121, %.preheader86 ]
  %.063118 = phi i64 [ %122, %._crit_edge110 ], [ 0, %.preheader86 ]
  %invariant.gep = getelementptr i64, ptr %58, i64 %.062119
  %105 = mul nsw i64 %.063118, %24
  %gep115 = getelementptr i64, ptr %invariant.gep114, i64 %105
  %gep117 = getelementptr inbounds i64, ptr %invariant.gep116, i64 %.062119
  %106 = load i64, ptr %gep117, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %56, i64 %.063118
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = sub nsw i64 %106, %108
  %110 = icmp ult i64 %.063118, %.062119
  br i1 %110, label %111, label %113

111:                                              ; preds = %.lr.ph109
  %gep113.peel = getelementptr i64, ptr %gep115, i64 %.062119
  %112 = load i64, ptr %gep113.peel, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %.lr.ph109, %111
  %.059.peel = phi i64 [ %112, %111 ], [ 0, %.lr.ph109 ]
  %114 = add nsw i64 %.059.peel, %109
  %115 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.063118) #7
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %.062119) #7
  store i64 %.062119, ptr %116, align 8, !tbaa !5
  br i1 %110, label %.peel.next, label %._crit_edge110

._crit_edge120:                                   ; preds = %._crit_edge110, %.preheader86
  %117 = phi i64 [ %102, %.preheader86 ], [ %.pre, %._crit_edge110 ]
  %118 = add nuw nsw i64 %.064121, 1
  %119 = icmp slt i64 %118, %117
  br i1 %119, label %.preheader86, label %._crit_edge122, !llvm.loop !23

._crit_edge110:                                   ; preds = %138, %113
  %.1.lcssa = phi i64 [ %114, %113 ], [ %.1, %138 ]
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  %120 = getelementptr inbounds i64, ptr %58, i64 %105
  %121 = getelementptr inbounds i64, ptr %120, i64 %.062119
  store i64 %.1.lcssa, ptr %121, align 8, !tbaa !5
  %122 = add nuw nsw i64 %.063118, 1
  %123 = add nuw nsw i64 %.062119, 1
  %124 = icmp slt i64 %123, %.pre
  br i1 %124, label %.lr.ph109, label %._crit_edge120, !llvm.loop !24

.peel.next:                                       ; preds = %113, %138
  %.060108.in = phi i64 [ %.060108, %138 ], [ %.062119, %113 ]
  %.061107 = phi i64 [ %.1, %138 ], [ %114, %113 ]
  %.060108 = add nsw i64 %.060108.in, -1
  %125 = icmp slt i64 %.063118, %.060108
  br i1 %125, label %126, label %128

126:                                              ; preds = %.peel.next
  %gep113 = getelementptr i64, ptr %gep115, i64 %.060108
  %127 = load i64, ptr %gep113, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %126, %.peel.next
  %.059 = phi i64 [ %127, %126 ], [ 0, %.peel.next ]
  %.not130 = icmp sgt i64 %.060108.in, %.062119
  br i1 %.not130, label %132, label %129

129:                                              ; preds = %128
  %130 = mul nsw i64 %.060108.in, %24
  %gep = getelementptr i64, ptr %invariant.gep, i64 %130
  %131 = load i64, ptr %gep, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %129, %128
  %.058 = phi i64 [ %131, %129 ], [ 0, %128 ]
  %133 = add nsw i64 %.058, %.059
  %134 = add nsw i64 %133, %109
  %.not82 = icmp slt i64 %.061107, %134
  br i1 %.not82, label %138, label %135

135:                                              ; preds = %132
  %136 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.063118) #7
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %.062119) #7
  store i64 %.060108, ptr %137, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %135, %132
  %.1 = phi i64 [ %134, %135 ], [ %.061107, %132 ]
  br i1 %125, label %.peel.next, label %._crit_edge110, !llvm.loop !25

139:                                              ; preds = %._crit_edge122
  %140 = load i64, ptr %1, align 8, !tbaa !5
  %141 = getelementptr i64, ptr %58, i64 %140
  %142 = getelementptr i8, ptr %141, i64 -8
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %104, i64 noundef %143)
          to label %145 unwind label %175

145:                                              ; preds = %139
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %147 unwind label %175

147:                                              ; preds = %145
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %149 unwind label %175

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %151 unwind label %175

151:                                              ; preds = %149
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %153 unwind label %175

153:                                              ; preds = %151
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %155 unwind label %175

155:                                              ; preds = %153
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %156 unwind label %175

156:                                              ; preds = %155
  %157 = load i64, ptr %1, align 8, !tbaa !5
  %158 = add nsw i64 %157, -1
  invoke void @_Z5printSt6vectorIS_IxSaIxEESaIS1_EExxPxx(ptr noundef nonnull %5, i64 noundef 0, i64 noundef %158, ptr noundef nonnull %21, i64 noundef 0)
          to label %159 unwind label %177

159:                                              ; preds = %156
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %160

160:                                              ; preds = %._crit_edge125, %159
  %.0 = phi i64 [ 0, %159 ], [ %166, %._crit_edge125 ]
  %161 = getelementptr inbounds [10000 x %"class.std::vector"], ptr @level, i64 0, i64 %.0
  %162 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %161) #7
  %.not = icmp eq i64 %162, 0
  br i1 %.not, label %192, label %163

163:                                              ; preds = %160
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %165 unwind label %179

165:                                              ; preds = %163
  %166 = add nuw nsw i64 %.0, 1
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %164, i64 noundef %166)
          to label %168 unwind label %179

168:                                              ; preds = %165
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull @.str.4)
          to label %170 unwind label %179

170:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %171 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %161) #7
  store ptr %171, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEC2IPxvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %172 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %161) #7
  store ptr %172, ptr %8, align 8
  %173 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKxPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T1_EERKNS7_IT0_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %173, label %.lr.ph124, label %._crit_edge125

._crit_edge125:                                   ; preds = %186, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %160 unwind label %179, !llvm.loop !27

175:                                              ; preds = %155, %153, %151, %149, %147, %145, %139, %._crit_edge122
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %193

177:                                              ; preds = %156
  %178 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %193

179:                                              ; preds = %._crit_edge125, %168, %165, %163
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %193

.lr.ph124:                                        ; preds = %170, %186
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %182 = load i64, ptr %181, align 8, !tbaa !5
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %182)
          to label %184 unwind label %190

184:                                              ; preds = %.lr.ph124
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef nonnull @.str.5)
          to label %186 unwind label %190

186:                                              ; preds = %184
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %188 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %161) #7
  store ptr %188, ptr %8, align 8
  %189 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKxPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T1_EERKNS7_IT0_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %189, label %.lr.ph124, label %._crit_edge125, !llvm.loop !28

190:                                              ; preds = %184, %.lr.ph124
  %191 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %193

192:                                              ; preds = %160
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.stackrestore.p0(ptr %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

193:                                              ; preds = %179, %190, %177, %175, %101
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %101 ], [ %178, %177 ], [ %176, %175 ], [ %191, %190 ], [ %180, %179 ]
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn83.pn
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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