; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2019-20/Open/Bronze (socdist2)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i32, i8, [3 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@N = external dso_local global i32, align 4
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [110 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %18 unwind label %25

18:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %19 unwind label %29

19:                                               ; preds = %18
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @_Z2reIiEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %38, %19
  %21 = load i32, ptr %7, align 4, !tbaa !5
  %22 = load i32, ptr @N, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %34, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %50

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %4, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %5, align 4
  br label %33

29:                                               ; preds = %18
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %4, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %33

33:                                               ; preds = %29, %25
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  br label %181

34:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  invoke void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %35 unwind label %41

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  invoke void @_ZNSt4pairIicEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(5) %10, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %36 unwind label %45

36:                                               ; preds = %35
  invoke void @_ZNSt6vectorISt4pairIicESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(5) %10)
          to label %37 unwind label %45

37:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %7, align 4, !tbaa !5
  br label %20, !llvm.loop !9

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %4, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %5, align 4
  br label %49

45:                                               ; preds = %36, %35
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %4, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %49

49:                                               ; preds = %45, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %180

50:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1000000007, ptr %11, align 4, !tbaa !5
  %51 = invoke ptr @_ZSt5beginISt6vectorISt4pairIicESaIS2_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %52 unwind label %68

52:                                               ; preds = %50
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %51, ptr %53, align 8
  %54 = invoke ptr @_ZSt3endISt6vectorISt4pairIicESaIS2_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %55 unwind label %68

55:                                               ; preds = %52
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %54, ptr %56, align 8
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %58, ptr %60)
          to label %61 unwind label %68

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %109, %61
  %63 = load i32, ptr %14, align 4, !tbaa !5
  %64 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %65 = trunc i64 %64 to i32
  %66 = icmp slt i32 %63, %65
  br i1 %66, label %72, label %67

67:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %112

68:                                               ; preds = %55, %52, %50
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  br label %179

72:                                               ; preds = %62
  %73 = load i32, ptr %14, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %74) #7
  %76 = getelementptr inbounds %"struct.std::pair", ptr %75, i32 0, i32 1
  %77 = load i8, ptr %76, align 4, !tbaa !11
  %78 = sext i8 %77 to i32
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %81) #7
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 1
  %84 = load i8, ptr %83, align 4, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = add nsw i32 %78, %85
  %87 = icmp eq i32 %86, 1
  br i1 %87, label %88, label %108

88:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %89 = load i32, ptr %14, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %90) #7
  %92 = getelementptr inbounds %"struct.std::pair", ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 4, !tbaa !13
  %94 = load i32, ptr %14, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %96) #7
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !13
  %100 = sub nsw i32 %93, %99
  %101 = sub nsw i32 %100, 1
  store i32 %101, ptr %15, align 4, !tbaa !5
  %102 = invoke noundef zeroext i1 @_Z5ckminIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %103 unwind label %104

103:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %108

104:                                              ; preds = %88
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %4, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %179

108:                                              ; preds = %103, %72
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %14, align 4, !tbaa !5
  br label %62, !llvm.loop !14

112:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %171, %127, %112
  %114 = load i32, ptr %17, align 4, !tbaa !5
  %115 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %116 = trunc i64 %115 to i32
  %117 = icmp slt i32 %114, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %172

119:                                              ; preds = %113
  %120 = load i32, ptr %17, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %121) #7
  %123 = getelementptr inbounds %"struct.std::pair", ptr %122, i32 0, i32 1
  %124 = load i8, ptr %123, align 4, !tbaa !11
  %125 = sext i8 %124 to i32
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %130

127:                                              ; preds = %119
  %128 = load i32, ptr %17, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %17, align 4, !tbaa !5
  br label %113, !llvm.loop !15

130:                                              ; preds = %119
  %131 = load i32, ptr %17, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %17, align 4, !tbaa !5
  %133 = load i32, ptr %16, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %16, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %168, %130
  %136 = load i32, ptr %17, align 4, !tbaa !5
  %137 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %138 = trunc i64 %137 to i32
  %139 = icmp slt i32 %136, %138
  br i1 %139, label %140, label %155

140:                                              ; preds = %135
  %141 = load i32, ptr %17, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %142) #7
  %144 = getelementptr inbounds %"struct.std::pair", ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 4, !tbaa !13
  %146 = load i32, ptr %17, align 4, !tbaa !5
  %147 = sub nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %148) #7
  %150 = getelementptr inbounds %"struct.std::pair", ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 4, !tbaa !13
  %152 = sub nsw i32 %145, %151
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = icmp sle i32 %152, %153
  br label %155

155:                                              ; preds = %140, %135
  %156 = phi i1 [ false, %135 ], [ %154, %140 ]
  br i1 %156, label %157, label %171

157:                                              ; preds = %155
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %159) #7
  %161 = getelementptr inbounds %"struct.std::pair", ptr %160, i32 0, i32 1
  %162 = load i8, ptr %161, align 4, !tbaa !11
  %163 = sext i8 %162 to i32
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %166

165:                                              ; preds = %157
  br label %168

166:                                              ; preds = %157
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.15, i32 noundef 155, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

167:                                              ; No predecessors!
  br label %168

168:                                              ; preds = %167, %165
  %169 = load i32, ptr %17, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %17, align 4, !tbaa !5
  br label %135, !llvm.loop !16

171:                                              ; preds = %155
  br label %113, !llvm.loop !15

172:                                              ; preds = %118
  invoke void @_Z2psIiJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %173 unwind label %175

173:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  %174 = load i32, ptr %1, align 4
  ret i32 %174

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

179:                                              ; preds = %175, %104, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %180

180:                                              ; preds = %179, %49
  call void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  br label %181

181:                                              ; preds = %180, %33
  %182 = load ptr, ptr %4, align 8
  %183 = load i32, ptr %5, align 4
  %184 = insertvalue { ptr, i32 } poison, ptr %182, 0
  %185 = insertvalue { ptr, i32 } %184, i32 %183, 1
  resume { ptr, i32 } %185
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIicEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(5), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckminIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !7, i64 4}
!12 = !{!"_ZTSSt4pairIicE", !6, i64 0, !7, i64 4}
!13 = !{!12, !6, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i32, i8, [3 x i8] }>

@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@N = external dso_local global i32, align 4
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [110 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %"class.std::vector.3", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %10 unwind label %19

10:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %11 unwind label %21

11:                                               ; preds = %10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @_Z2reIiEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %25, %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 1000000007, ptr %7, align 4, !tbaa !5
  %14 = call ptr @_ZSt5beginISt6vectorISt4pairIicESaIS2_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %15 = call ptr @_ZSt3endISt6vectorISt4pairIicESaIS2_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %14, ptr %15)
          to label %.preheader unwind label %37

.preheader:                                       ; preds = %._crit_edge
  %16 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %17 = trunc i64 %16 to i32
  %18 = icmp sgt i32 %17, 1
  br i1 %18, label %.lr.ph39, label %._crit_edge40

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %23

21:                                               ; preds = %10
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br label %23

23:                                               ; preds = %21, %19
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  br label %99

.lr.ph:                                           ; preds = %11, %25
  %.02837 = phi i32 [ %26, %25 ], [ 0, %11 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  invoke void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %24 unwind label %29

24:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt4pairIicEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(5) %6, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  invoke void @_ZNSt6vectorISt4pairIicESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(5) %6)
          to label %25 unwind label %31

25:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %26 = add nuw nsw i32 %.02837, 1
  %27 = load i32, ptr @N, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !9

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %33

33:                                               ; preds = %31, %29
  %.pn32 = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %98

._crit_edge40:                                    ; preds = %58, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  %34 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %35 = trunc i64 %34 to i32
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph43, label %._crit_edge44

37:                                               ; preds = %._crit_edge
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %97

.lr.ph39:                                         ; preds = %.preheader, %58
  %indvars.iv = phi i64 [ %indvars.iv.next, %58 ], [ 1, %.preheader ]
  %39 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %40 = getelementptr inbounds i8, ptr %39, i64 4
  %41 = load i8, ptr %40, align 4, !tbaa !11
  %42 = sext i8 %41 to i32
  %43 = add nsw i64 %indvars.iv, -1
  %44 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %43) #7
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  %46 = load i8, ptr %45, align 4, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = add nsw i32 %47, %42
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %50, label %58

50:                                               ; preds = %.lr.ph39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %51 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %43) #7
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = xor i32 %54, -1
  %56 = add i32 %52, %55
  store i32 %56, ptr %8, align 4, !tbaa !5
  %57 = call noundef zeroext i1 @_Z5ckminIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %58

58:                                               ; preds = %.lr.ph39, %50
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %sext = shl i64 %59, 32
  %60 = ashr exact i64 %sext, 32
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %.lr.ph39, label %._crit_edge40, !llvm.loop !14

._crit_edge44:                                    ; preds = %.backedge, %._crit_edge40
  invoke void @_Z2psIiJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %94 unwind label %95

.lr.ph43:                                         ; preds = %._crit_edge40, %.backedge
  %62 = phi i32 [ %71, %.backedge ], [ 0, %._crit_edge40 ]
  %.041 = phi i32 [ %.0.be, %.backedge ], [ 0, %._crit_edge40 ]
  %63 = sext i32 %.041 to i64
  %64 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %63) #7
  %65 = getelementptr inbounds i8, ptr %64, i64 4
  %66 = load i8, ptr %65, align 4, !tbaa !11
  %67 = icmp eq i8 %66, 0
  br i1 %67, label %68, label %75

68:                                               ; preds = %.lr.ph43
  %69 = add nsw i32 %.041, 1
  br label %.backedge

.backedge.loopexit:                               ; preds = %77, %81
  %70 = trunc nsw i64 %indvars.iv.next48 to i32
  br label %.backedge

.backedge:                                        ; preds = %.backedge.loopexit, %68
  %71 = phi i32 [ %62, %68 ], [ %76, %.backedge.loopexit ]
  %.0.be = phi i32 [ %69, %68 ], [ %70, %.backedge.loopexit ]
  %72 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %73 = trunc i64 %72 to i32
  %74 = icmp slt i32 %.0.be, %73
  br i1 %74, label %.lr.ph43, label %._crit_edge44, !llvm.loop !15

75:                                               ; preds = %.lr.ph43
  %76 = add nsw i32 %62, 1
  store i32 %76, ptr %9, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %88, %75
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %88 ], [ %63, %75 ]
  %indvars.iv.next48 = add nsw i64 %indvars.iv47, 1
  %78 = call noundef i64 @_ZNKSt6vectorISt4pairIicESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %sext50 = shl i64 %78, 32
  %79 = ashr exact i64 %sext50, 32
  %80 = icmp slt i64 %indvars.iv.next48, %79
  br i1 %80, label %81, label %.backedge.loopexit

81:                                               ; preds = %77
  %82 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv.next48) #7
  %83 = load i32, ptr %82, align 4, !tbaa !13
  %84 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv47) #7
  %85 = load i32, ptr %84, align 4, !tbaa !13
  %86 = sub nsw i32 %83, %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp sgt i32 %86, %87
  br i1 %.not, label %.backedge.loopexit, label %88

88:                                               ; preds = %81
  %89 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNSt6vectorISt4pairIicESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv.next48) #7
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  %91 = load i8, ptr %90, align 4, !tbaa !11
  %92 = icmp eq i8 %91, 1
  br i1 %92, label %77, label %93, !llvm.loop !16

93:                                               ; preds = %88
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.15, i32 noundef 155, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

94:                                               ; preds = %._crit_edge44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret i32 0

95:                                               ; preds = %._crit_edge44
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %97

97:                                               ; preds = %95, %37
  %.pn30 = phi { ptr, i32 } [ %96, %95 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %98

98:                                               ; preds = %97, %33
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %33 ], [ %.pn30, %97 ]
  call void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  br label %99

99:                                               ; preds = %98, %23
  %.pn32.pn.pn = phi { ptr, i32 } [ %.pn32.pn, %98 ], [ %.pn, %23 ]
  resume { ptr, i32 } %.pn32.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2reIiEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIicEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(5), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckminIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2psIiJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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


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