; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2020-21/Dec/Plat (cowmistry)

; 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"

%struct.mint = type { i32 }
%"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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.21" = type { i32, %"class.std::vector.12" }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@P = external dso_local global i32, align 4
@ans = external dso_local global %struct.mint, align 4
@.str.14 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [108 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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 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 nounwind uwtable
declare dso_local void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c24mintILi1000000007ELi5EE(i32) #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c34mintILi1000000007ELi5EE(i32) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 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 %struct.mint, align 4
  %7 = alloca %struct.mint, align 4
  %8 = alloca %struct.mint, align 4
  %9 = alloca %struct.mint, align 4
  %10 = alloca %struct.mint, align 4
  %11 = alloca %struct.mint, align 4
  %12 = alloca %struct.mint, align 4
  %13 = alloca %struct.mint, align 4
  %14 = alloca %struct.mint, align 4
  %15 = alloca %"class.std::map", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.mint, align 4
  %22 = alloca %struct.mint, align 4
  %23 = alloca %"struct.std::pair", align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.std::pair", align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %34 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"class.std::vector.12", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %37 unwind label %48

37:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %38 unwind label %52

38:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %39 = load i32, ptr @K, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr @K, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %45, %38
  %42 = load i32, ptr @P, align 4, !tbaa !5
  %43 = load i32, ptr @K, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %45, label %57

45:                                               ; preds = %41
  %46 = load i32, ptr @P, align 4, !tbaa !5
  %47 = mul nsw i32 %46, 2
  store i32 %47, ptr @P, align 4, !tbaa !5
  br label %41, !llvm.loop !9

48:                                               ; preds = %0
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %56

52:                                               ; preds = %37
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %56

56:                                               ; preds = %52, %48
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %224

57:                                               ; preds = %41
  %58 = load i32, ptr @K, align 4, !tbaa !5
  %59 = load i32, ptr @P, align 4, !tbaa !5
  %60 = sdiv i32 %59, 2
  %61 = sub nsw i32 %58, %60
  store i32 %61, ptr @K, align 4, !tbaa !5
  %62 = load i32, ptr @K, align 4, !tbaa !5
  %63 = icmp sle i32 0, %62
  br i1 %63, label %64, label %69

64:                                               ; preds = %57
  %65 = load i32, ptr @K, align 4, !tbaa !5
  %66 = load i32, ptr @P, align 4, !tbaa !5
  %67 = sdiv i32 %66, 2
  %68 = icmp slt i32 %65, %67
  br label %69

69:                                               ; preds = %64, %57
  %70 = phi i1 [ false, %57 ], [ %68, %64 ]
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  br label %74

72:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.16, i32 noundef 339, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

73:                                               ; No predecessors!
  br label %74

74:                                               ; preds = %73, %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %75 = load i32, ptr @P, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %8, i64 noundef %76)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %77 = load i32, ptr @K, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %10, i64 noundef %78)
  %79 = getelementptr inbounds %struct.mint, ptr %10, i32 0, i32 0
  %80 = load i32, ptr %79, align 4
  %81 = call i32 @_Z2c24mintILi1000000007ELi5EE(i32 %80)
  %82 = getelementptr inbounds %struct.mint, ptr %9, i32 0, i32 0
  store i32 %81, ptr %82, align 4
  %83 = getelementptr inbounds %struct.mint, ptr %8, i32 0, i32 0
  %84 = load i32, ptr %83, align 4
  %85 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %84, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %86 = getelementptr inbounds %struct.mint, ptr %7, i32 0, i32 0
  store i32 %85, ptr %86, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %12, i64 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %87 = load i32, ptr @P, align 4, !tbaa !5
  %88 = sdiv i32 %87, 2
  %89 = sext i32 %88 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %14, i64 noundef %89)
  %90 = getelementptr inbounds %struct.mint, ptr %14, i32 0, i32 0
  %91 = load i32, ptr %90, align 4
  %92 = call i32 @_Z2c34mintILi1000000007ELi5EE(i32 %91)
  %93 = getelementptr inbounds %struct.mint, ptr %13, i32 0, i32 0
  store i32 %92, ptr %93, align 4
  %94 = getelementptr inbounds %struct.mint, ptr %12, i32 0, i32 0
  %95 = load i32, ptr %94, align 4
  %96 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %95, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %97 = getelementptr inbounds %struct.mint, ptr %11, i32 0, i32 0
  store i32 %96, ptr %97, align 4
  %98 = getelementptr inbounds %struct.mint, ptr %7, i32 0, i32 0
  %99 = load i32, ptr %98, align 4
  %100 = call i32 @_Zpl4mintILi1000000007ELi5EERKS0_(i32 %99, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %101 = getelementptr inbounds %struct.mint, ptr %6, i32 0, i32 0
  store i32 %100, ptr %101, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #5
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %184, %74
  %103 = load i32, ptr %16, align 4, !tbaa !5
  %104 = load i32, ptr @N, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %189

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  invoke void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %108 unwind label %148

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %109 = load i32, ptr %17, align 4, !tbaa !5
  %110 = load i32, ptr @P, align 4, !tbaa !5
  %111 = sdiv i32 %109, %110
  store i32 %111, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %112 = load i32, ptr %18, align 4, !tbaa !5
  %113 = load i32, ptr @P, align 4, !tbaa !5
  %114 = sdiv i32 %112, %113
  store i32 %114, ptr %20, align 4, !tbaa !5
  %115 = load i32, ptr %19, align 4, !tbaa !5
  %116 = load i32, ptr %20, align 4, !tbaa !5
  %117 = icmp ne i32 %115, %116
  br i1 %117, label %118, label %168

118:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = load i32, ptr %19, align 4, !tbaa !5
  %121 = sub nsw i32 %119, %120
  %122 = sub nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  invoke void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %22, i64 noundef %123)
          to label %124 unwind label %152

124:                                              ; preds = %118
  %125 = getelementptr inbounds %struct.mint, ptr %22, i32 0, i32 0
  %126 = load i32, ptr %125, align 4
  %127 = invoke i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %126, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %128 unwind label %152

128:                                              ; preds = %124
  %129 = getelementptr inbounds %struct.mint, ptr %21, i32 0, i32 0
  store i32 %127, ptr %129, align 4
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %131 unwind label %152

131:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  %132 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %133 unwind label %156

133:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %134 = load i32, ptr %17, align 4, !tbaa !5
  %135 = load i32, ptr @P, align 4, !tbaa !5
  %136 = srem i32 %134, %135
  store i32 %136, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %137 = load i32, ptr @P, align 4, !tbaa !5
  %138 = sub nsw i32 %137, 1
  store i32 %138, ptr %25, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %139 unwind label %160

139:                                              ; preds = %133
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %132, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %140 unwind label %160

140:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  %141 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %142 unwind label %156

142:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %143 = load i32, ptr %18, align 4, !tbaa !5
  %144 = load i32, ptr @P, align 4, !tbaa !5
  %145 = srem i32 %143, %144
  store i32 %145, ptr %28, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %146 unwind label %164

146:                                              ; preds = %142
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %147 unwind label %164

147:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %183

148:                                              ; preds = %107
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %4, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %5, align 4
  br label %188

152:                                              ; preds = %128, %124, %118
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %4, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %187

156:                                              ; preds = %168, %140, %131
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %4, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %5, align 4
  br label %187

160:                                              ; preds = %139, %133
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %4, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %187

164:                                              ; preds = %146, %142
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %4, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %187

168:                                              ; preds = %108
  %169 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %170 unwind label %156

170:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %171 = load i32, ptr %17, align 4, !tbaa !5
  %172 = load i32, ptr @P, align 4, !tbaa !5
  %173 = srem i32 %171, %172
  store i32 %173, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %174 = load i32, ptr %18, align 4, !tbaa !5
  %175 = load i32, ptr @P, align 4, !tbaa !5
  %176 = srem i32 %174, %175
  store i32 %176, ptr %31, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %177 unwind label %179

177:                                              ; preds = %170
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %169, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %178 unwind label %179

178:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %183

179:                                              ; preds = %177, %170
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %4, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %187

183:                                              ; preds = %178, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %16, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %16, align 4, !tbaa !5
  br label %102, !llvm.loop !11

187:                                              ; preds = %179, %164, %160, %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %188

188:                                              ; preds = %187, %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %223

189:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  store ptr %15, ptr %32, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %190 = load ptr, ptr %32, align 8, !tbaa !12
  %191 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %190) #5
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %33, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %193 = load ptr, ptr %32, align 8, !tbaa !12
  %194 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %193) #5
  %195 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %34, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  br label %196

196:                                              ; preds = %205, %189
  %197 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #5
  br i1 %197, label %199, label %198

198:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %216

199:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %200 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #5
  store ptr %200, ptr %35, align 8, !tbaa !12
  %201 = load ptr, ptr %35, align 8, !tbaa !12
  %202 = getelementptr inbounds %"struct.std::pair.21", ptr %201, i32 0, i32 1
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(24) %202)
          to label %203 unwind label %207

203:                                              ; preds = %199
  invoke void @_Z4dealSt6vectorISt4pairIiiESaIS1_EE(ptr noundef %36)
          to label %204 unwind label %211

204:                                              ; preds = %203
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %205

205:                                              ; preds = %204
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #5
  br label %196

207:                                              ; preds = %199
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %4, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %5, align 4
  br label %215

211:                                              ; preds = %203
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %4, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %5, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #5
  br label %215

215:                                              ; preds = %211, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %223

216:                                              ; preds = %198
  invoke void @_Z2psI4mintILi1000000007ELi5EEJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) @ans)
          to label %217 unwind label %219

217:                                              ; preds = %216
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %218 = load i32, ptr %1, align 4
  ret i32 %218

219:                                              ; preds = %216
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %4, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %5, align 4
  br label %223

223:                                              ; preds = %219, %215, %188
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %224

224:                                              ; preds = %223, %56
  %225 = load ptr, ptr %4, align 8
  %226 = load i32, ptr %5, align 4
  %227 = insertvalue { ptr, i32 } poison, ptr %225, 0
  %228 = insertvalue { ptr, i32 } %227, i32 %226, 1
  resume { ptr, i32 } %228
}

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}


; 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"

%struct.mint = type { i32 }
%"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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@P = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local global %struct.mint, align 4
@.str.14 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [108 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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 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 nounwind uwtable
declare dso_local void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c24mintILi1000000007ELi5EE(i32) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Z2c34mintILi1000000007ELi5EE(i32) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 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 %struct.mint, align 4
  %4 = alloca %struct.mint, align 4
  %5 = alloca %struct.mint, align 4
  %6 = alloca %struct.mint, align 4
  %7 = alloca %struct.mint, align 4
  %8 = alloca %struct.mint, align 4
  %9 = alloca %struct.mint, align 4
  %10 = alloca %struct.mint, align 4
  %11 = alloca %"class.std::map", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.mint, align 4
  %17 = alloca %struct.mint, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %29 = alloca %"class.std::vector.12", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %30 unwind label %36

30:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %31 unwind label %38

31:                                               ; preds = %30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %32 = load i32, ptr @K, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @K, align 4, !tbaa !5
  %P.promoted = load i32, ptr @P, align 4, !tbaa !5
  %.not28 = icmp sgt i32 %P.promoted, %33
  br i1 %.not28, label %41, label %.lr.ph

.lr.ph:                                           ; preds = %31, %.lr.ph
  %34 = phi i32 [ %35, %.lr.ph ], [ %P.promoted, %31 ]
  %35 = shl nsw i32 %34, 1
  %.not = icmp sgt i32 %35, %33
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

36:                                               ; preds = %0
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  br label %133

._crit_edge:                                      ; preds = %.lr.ph
  store i32 %35, ptr @P, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %._crit_edge, %31
  %.lcssa = phi i32 [ %35, %._crit_edge ], [ %P.promoted, %31 ]
  %.neg = sdiv i32 %.lcssa, -2
  %42 = add i32 %.neg, %33
  store i32 %42, ptr @K, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, -1
  %44 = sdiv i32 %.lcssa, 2
  %45 = icmp slt i32 %42, %44
  %or.cond = and i1 %43, %45
  br i1 %or.cond, label %46, label %.critedge

.critedge:                                        ; preds = %41
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16, i32 noundef 339, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %47 = sext i32 %.lcssa to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %4, i64 noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %48 = load i32, ptr @K, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %6, i64 noundef %49)
  %50 = load i32, ptr %6, align 4
  %51 = call i32 @_Z2c24mintILi1000000007ELi5EE(i32 %50)
  store i32 %51, ptr %5, align 4
  %52 = load i32, ptr %4, align 4
  %53 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %52, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %8, i64 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %54 = load i32, ptr @P, align 4, !tbaa !5
  %55 = sdiv i32 %54, 2
  %56 = sext i32 %55 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %10, i64 noundef %56)
  %57 = load i32, ptr %10, align 4
  %58 = call i32 @_Z2c34mintILi1000000007ELi5EE(i32 %57)
  store i32 %58, ptr %9, align 4
  %59 = load i32, ptr %8, align 4
  %60 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %59, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %60, ptr %7, align 4
  %61 = call i32 @_Zpl4mintILi1000000007ELi5EERKS0_(i32 %53, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %61, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #5
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  %62 = load i32, ptr @N, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph32, label %._crit_edge33

._crit_edge33:                                    ; preds = %112, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #5
  %64 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  store ptr %64, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #5
  %65 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  store ptr %65, ptr %28, align 8
  %66 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  br i1 %66, label %.lr.ph35, label %._crit_edge36

.lr.ph32:                                         ; preds = %46, %112
  %.01330 = phi i32 [ %113, %112 ], [ 0, %46 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  invoke void @_Z2reIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %67 unwind label %93

67:                                               ; preds = %.lr.ph32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = load i32, ptr @P, align 4, !tbaa !5
  %70 = sdiv i32 %68, %69
  store i32 %70, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = sdiv i32 %71, %69
  store i32 %72, ptr %15, align 4, !tbaa !5
  %.not21 = icmp eq i32 %70, %72
  br i1 %.not21, label %101, label %73

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  %74 = xor i32 %70, -1
  %75 = add i32 %72, %74
  %76 = sext i32 %75 to i64
  call void @_ZN4mintILi1000000007ELi5EEC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %17, i64 noundef %76)
  %77 = load i32, ptr %17, align 4
  %78 = call i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %77, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i32 %78, ptr %16, align 4
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  %80 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %81 unwind label %95

81:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #5
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = load i32, ptr @P, align 4, !tbaa !5
  %84 = srem i32 %82, %83
  store i32 %84, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #5
  %85 = add nsw i32 %83, -1
  store i32 %85, ptr %20, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %86 unwind label %97

86:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %88 unwind label %95

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #5
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = load i32, ptr @P, align 4, !tbaa !5
  %91 = srem i32 %89, %90
  store i32 %91, ptr %23, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %92 unwind label %99

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  br label %112

93:                                               ; preds = %.lr.ph32
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %117

95:                                               ; preds = %101, %86, %73
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %116

97:                                               ; preds = %81
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %116

99:                                               ; preds = %88
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  br label %116

101:                                              ; preds = %67
  %102 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %103 unwind label %95

103:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #5
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = load i32, ptr @P, align 4, !tbaa !5
  %106 = srem i32 %104, %105
  store i32 %106, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #5
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = srem i32 %107, %105
  store i32 %108, ptr %26, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %109 unwind label %110

109:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  br label %112

110:                                              ; preds = %103
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  br label %116

112:                                              ; preds = %109, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  %113 = add nuw nsw i32 %.01330, 1
  %114 = load i32, ptr @N, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %.lr.ph32, label %._crit_edge33, !llvm.loop !11

116:                                              ; preds = %110, %99, %97, %95
  %.pn22 = phi { ptr, i32 } [ %100, %99 ], [ %96, %95 ], [ %98, %97 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %117

117:                                              ; preds = %116, %93
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %116 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %132

._crit_edge36:                                    ; preds = %121, %._crit_edge33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  invoke void @_Z2psI4mintILi1000000007ELi5EEJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) @ans)
          to label %129 unwind label %130

.lr.ph35:                                         ; preds = %._crit_edge33, %121
  %118 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %119)
          to label %120 unwind label %124

120:                                              ; preds = %.lr.ph35
  invoke void @_Z4dealSt6vectorISt4pairIiiESaIS1_EE(ptr noundef nonnull %29)
          to label %121 unwind label %126

121:                                              ; preds = %120
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %123 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  br i1 %123, label %.lr.ph35, label %._crit_edge36

124:                                              ; preds = %.lr.ph35
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %128

126:                                              ; preds = %120
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  br label %128

128:                                              ; preds = %126, %124
  %.pn19 = phi { ptr, i32 } [ %127, %126 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #5
  br label %132

129:                                              ; preds = %._crit_edge36
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i32 0

130:                                              ; preds = %._crit_edge36
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %132

132:                                              ; preds = %130, %128, %117
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %117 ], [ %.pn19, %128 ], [ %131, %130 ]
  call void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %133

133:                                              ; preds = %132, %40
  %.pn22.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn, %132 ], [ %.pn, %40 ]
  resume { ptr, i32 } %.pn22.pn.pn.pn
}

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = distinct !{!11, !10}


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