; LLVM IR from tangjz/acm-icpc :: poj (3152)

; 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.std::pair.3" = type { i32, %"class.std::map.5" }
%"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const 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::_Rb_tree_iterator" = type { ptr }
%"struct.std::greater" = type { i8 }
%"struct.std::_Rb_tree_iterator.10" = type { ptr }
%"struct.std::pair" = type { i32, %"struct.std::pair.3" }
%"struct.std::pair.11" = type { i32, i32 }

@id = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [13 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

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

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 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 dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt3mapIiiSt4lessIiESaISt4pairIKiiEEEES4_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENSA_INSB_IT0_E4typeEE6__typeEEOSC_OSH_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.3") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(48)) #4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8MaintainRSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEERS_IiS7_St7greaterIiES9_E(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::greater", align 1
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator.10", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::map.5", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair.3", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %85, %2
  %20 = load i32, ptr @q, align 4, !tbaa !9
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %22, label %86

22:                                               ; preds = %19
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noundef zeroext i1 @_ZNKSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %23) #5
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  br label %86

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %27) #5
  %29 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %5, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %30 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %31 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  store i32 %32, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  %33 = call noundef zeroext i1 @_ZNKSt7greaterIiEclERKiS2_(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 4 dereferenceable(4) @p, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %33, label %34, label %35

34:                                               ; preds = %26
  store i32 3, ptr %8, align 4
  br label %83

35:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %36 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i32 0, i32 1
  store ptr %37, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.std::pair.3", ptr %38, i32 0, i32 1
  %40 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %39) #5
  %41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.10", ptr %10, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %42 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %43 = getelementptr inbounds %"struct.std::pair.11", ptr %42, i32 0, i32 1
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @q, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %44, align 4, !tbaa !9
  store i32 %45, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %46, i32 noundef %47)
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = load i32, ptr @q, align 4, !tbaa !9
  %51 = sub nsw i32 %50, %49
  store i32 %51, ptr @q, align 4, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %54 = getelementptr inbounds %"struct.std::pair.11", ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !23
  %56 = sub nsw i32 %55, %52
  store i32 %56, ptr %54, align 4, !tbaa !23
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.std::pair.3", ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !25
  %61 = sub nsw i32 %60, %57
  store i32 %61, ptr %59, align 8, !tbaa !25
  %62 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %63 = getelementptr inbounds %"struct.std::pair.11", ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !23
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %72, label %66

66:                                               ; preds = %35
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.std::pair.3", ptr %67, i32 0, i32 1
  %69 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %70 = getelementptr inbounds %"struct.std::pair.11", ptr %69, i32 0, i32 0
  %71 = call noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr noundef nonnull align 4 dereferenceable(4) %70)
  br label %72

72:                                               ; preds = %66, %35
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.std::pair.3", ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !25
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %82, label %77

77:                                               ; preds = %72
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %80 = getelementptr inbounds %"struct.std::pair", ptr %79, i32 0, i32 0
  %81 = call noundef i64 @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %78, ptr noundef nonnull align 4 dereferenceable(4) %80)
  br label %82

82:                                               ; preds = %77, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  store i32 0, ptr %8, align 4
  br label %83

83:                                               ; preds = %82, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %84 = load i32, ptr %8, align 4
  switch i32 %84, label %139 [
    i32 0, label %85
    i32 3, label %86
  ]

85:                                               ; preds = %83
  br label %19, !llvm.loop !26

86:                                               ; preds = %83, %25, %19
  %87 = load i32, ptr @q, align 4, !tbaa !9
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %133

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) %90, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %92 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %93) #5
  %95 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br i1 %96, label %97, label %109

97:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %98, ptr noundef nonnull align 4 dereferenceable(4) @p)
  store ptr %99, ptr %14, align 8, !tbaa !5
  %100 = load i32, ptr @q, align 4, !tbaa !9
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.std::pair.3", ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !25
  %104 = add nsw i32 %103, %100
  store i32 %104, ptr %102, align 8, !tbaa !25
  %105 = load i32, ptr @q, align 4, !tbaa !9
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.std::pair.3", ptr %106, i32 0, i32 1
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(4) @id)
  store i32 %105, ptr %108, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %132

109:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  %110 = load i32, ptr @q, align 4, !tbaa !9
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(4) @id)
          to label %112 unwind label %118

112:                                              ; preds = %109
  store i32 %110, ptr %111, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #5
  invoke void @_ZSt9make_pairIRiRSt3mapIiiSt4lessIiESaISt4pairIKiiEEEES4_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENSA_INSB_IT0_E4typeEE6__typeEEOSC_OSH_(ptr dead_on_unwind writable sret(%"struct.std::pair.3") align 8 %18, ptr noundef nonnull align 4 dereferenceable(4) @q, ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %113 unwind label %122

113:                                              ; preds = %112
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %114, ptr noundef nonnull align 4 dereferenceable(4) @p)
          to label %116 unwind label %126

116:                                              ; preds = %113
  %117 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(56) %115, ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  call void @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  br label %132

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %16, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %17, align 4
  br label %131

122:                                              ; preds = %112
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %16, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %17, align 4
  br label %130

126:                                              ; preds = %113
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %16, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %17, align 4
  call void @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  br label %130

130:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #5
  br label %131

131:                                              ; preds = %130, %118
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #5
  br label %134

132:                                              ; preds = %116, %97
  br label %133

133:                                              ; preds = %132, %86
  ret void

134:                                              ; preds = %131
  %135 = load ptr, ptr %16, align 8
  %136 = load i32, ptr %17, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138

139:                                              ; preds = %83
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSSt4pairIKiS_IiSt3mapIiiSt4lessIiESaIS_IS0_iEEEEE", !10, i64 0, !13, i64 8}
!13 = !{!"_ZTSSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEE", !10, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIiE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !22, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !10, i64 4}
!24 = !{!"_ZTSSt4pairIKiiE", !10, i64 0, !10, i64 4}
!25 = !{!13, !10, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; 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.std::pair.3" = type { i32, %"class.std::map.5" }
%"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const 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::_Rb_tree_iterator" = type { ptr }
%"struct.std::greater" = type { i8 }
%"struct.std::_Rb_tree_iterator.10" = type { ptr }

@id = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [13 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 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 dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRiRSt3mapIiiSt4lessIiESaISt4pairIKiiEEEES4_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENSA_INSB_IT0_E4typeEE6__typeEEOSC_OSH_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.3") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8MaintainRSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEERS_IiS7_St7greaterIiES9_E(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::greater", align 1
  %6 = alloca %"struct.std::_Rb_tree_iterator.10", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"class.std::map.5", align 8
  %10 = alloca %"struct.std::pair.3", align 8
  %.old = load i32, ptr @q, align 4, !tbaa !5
  %.old25 = icmp sgt i32 %.old, 0
  br i1 %.old25, label %.preheader, label %.thread29

.preheader:                                       ; preds = %2, %47
  %11 = call noundef zeroext i1 @_ZNKSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  br i1 %11, label %thread-pre-split, label %12

12:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %13 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  store ptr %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %14 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %15 = load i32, ptr %14, align 8, !tbaa !9
  store i32 %15, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  %16 = call noundef zeroext i1 @_ZNKSt7greaterIiEclERKiS2_(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 4 dereferenceable(4) @p, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br i1 %16, label %.thread, label %17

.thread:                                          ; preds = %12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %thread-pre-split

17:                                               ; preds = %12
  %18 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %20 = getelementptr inbounds i8, ptr %18, i64 16
  %21 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %20) #5
  store ptr %21, ptr %6, align 8
  %22 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %23 = getelementptr inbounds i8, ptr %22, i64 4
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @q, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %25, i32 noundef %26)
  %28 = load i32, ptr @q, align 4, !tbaa !5
  %29 = sub nsw i32 %28, %25
  store i32 %29, ptr @q, align 4, !tbaa !5
  %30 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %31 = getelementptr inbounds i8, ptr %30, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !22
  %33 = sub nsw i32 %32, %25
  store i32 %33, ptr %31, align 4, !tbaa !22
  %34 = load i32, ptr %19, align 8, !tbaa !24
  %35 = sub nsw i32 %34, %25
  store i32 %35, ptr %19, align 8, !tbaa !24
  %36 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %37 = getelementptr inbounds i8, ptr %36, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !22
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %39, label %42

39:                                               ; preds = %17
  %40 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %41 = call noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %42

42:                                               ; preds = %39, %17
  %43 = load i32, ptr %19, align 8, !tbaa !24
  %.not22 = icmp eq i32 %43, 0
  br i1 %.not22, label %44, label %47

44:                                               ; preds = %42
  %45 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %46 = call noundef i64 @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEESt7greaterIiESaIS0_IS3_S7_EEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %45)
  br label %47

47:                                               ; preds = %42, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %48 = load i32, ptr @q, align 4
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.preheader, label %.thread29

thread-pre-split:                                 ; preds = %.preheader, %.thread
  %.pr = load i32, ptr @q, align 4, !tbaa !5
  %50 = icmp sgt i32 %.pr, 0
  br i1 %50, label %51, label %.thread29

51:                                               ; preds = %thread-pre-split
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %52 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) @p)
  store ptr %52, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %53 = call ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %53, ptr %8, align 8
  %54 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiS0_IiSt3mapIiiSt4lessIiESaIS0_IS1_iEEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %54, label %55, label %63

55:                                               ; preds = %51
  %56 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %57 = load i32, ptr @q, align 4, !tbaa !5
  %58 = load i32, ptr %56, align 8, !tbaa !24
  %59 = add nsw i32 %58, %57
  store i32 %59, ptr %56, align 8, !tbaa !24
  %60 = load i32, ptr @q, align 4, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %56, i64 8
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %61, ptr noundef nonnull align 4 dereferenceable(4) @id)
  store i32 %60, ptr %62, align 4, !tbaa !5
  br label %.thread29

63:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  %64 = load i32, ptr @q, align 4, !tbaa !5
  %65 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 4 dereferenceable(4) @id)
          to label %66 unwind label %71

66:                                               ; preds = %63
  store i32 %64, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #5
  invoke void @_ZSt9make_pairIRiRSt3mapIiiSt4lessIiESaISt4pairIKiiEEEES4_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENSA_INSB_IT0_E4typeEE6__typeEEOSC_OSH_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.3") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) @q, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %67 unwind label %73

67:                                               ; preds = %66
  %68 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) @p)
          to label %69 unwind label %75

69:                                               ; preds = %67
  %70 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(56) %68, ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  call void @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #5
  br label %.thread29

71:                                               ; preds = %63
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %78

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %67
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  br label %77

77:                                               ; preds = %75, %73
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  br label %78

78:                                               ; preds = %77, %71
  %.pn.pn = phi { ptr, i32 } [ %.pn, %77 ], [ %72, %71 ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #5
  resume { ptr, i32 } %.pn.pn

.thread29:                                        ; preds = %47, %2, %55, %69, %thread-pre-split
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIiSt4pairIiS_IiiSt4lessIiESaIS0_IKiiEEEES2_SaIS0_IS3_S7_EEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 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 = { 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 #3 = { nofree 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIKiS_IiSt3mapIiiSt4lessIiESaIS_IS0_iEEEEE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSSt4pairIiSt3mapIiiSt4lessIiESaIS_IKiiEEEE", !6, i64 0, !12, i64 8}
!12 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessIiE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !21, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !6, i64 4}
!23 = !{!"_ZTSSt4pairIKiiE", !6, i64 0, !6, i64 4}
!24 = !{!11, !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass