; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2018.12 (cowpatibility)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<__int128, long long>, std::pair<const std::pair<__int128, long long>, long long>, std::_Select1st<std::pair<const std::pair<__int128, long long>, long long>>, std::less<std::pair<__int128, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<__int128, long long>, std::pair<const std::pair<__int128, long long>, long long>, std::_Select1st<std::pair<const std::pair<__int128, long long>, long long>>, std::less<std::pair<__int128, long long>>>::_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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.5" = type { %"struct.std::pair", i64, [8 x i8] }
%"struct.std::pair" = type <{ i128, i64, [8 x i8] }>

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsRxRA50000_A5_xSt6vectorIxSaIxEERSt3mapISt4pairInxExSt4lessIS8_ESaIS7_IKS8_xEEES_S_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(2000000), ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca [50000 x [5 x i64]], align 16
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 2000000, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %29

29:                                               ; preds = %86, %0
  %30 = load i64, ptr %6, align 8, !tbaa !11
  %31 = load i64, ptr %2, align 8, !tbaa !11
  %32 = icmp slt i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %90

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %46, %34
  %36 = load i64, ptr %8, align 8, !tbaa !11
  %37 = icmp slt i64 %36, 5
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %53

39:                                               ; preds = %35
  %40 = load i64, ptr %6, align 8, !tbaa !11
  %41 = getelementptr inbounds [50000 x [5 x i64]], ptr %3, i64 0, i64 %40
  %42 = load i64, ptr %8, align 8, !tbaa !11
  %43 = getelementptr inbounds [5 x i64], ptr %41, i64 0, i64 %42
  %44 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %45 unwind label %49

45:                                               ; preds = %39
  br label %46

46:                                               ; preds = %45
  %47 = load i64, ptr %8, align 8, !tbaa !11
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %8, align 8, !tbaa !11
  br label %35, !llvm.loop !13

49:                                               ; preds = %39
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %89

53:                                               ; preds = %38
  %54 = load i64, ptr %6, align 8, !tbaa !11
  %55 = getelementptr inbounds [50000 x [5 x i64]], ptr %3, i64 0, i64 %54
  %56 = getelementptr inbounds [5 x i64], ptr %55, i64 0, i64 0
  %57 = load i64, ptr %6, align 8, !tbaa !11
  %58 = getelementptr inbounds [50000 x [5 x i64]], ptr %3, i64 0, i64 %57
  %59 = getelementptr inbounds [5 x i64], ptr %58, i64 0, i64 0
  %60 = getelementptr inbounds i64, ptr %59, i64 5
  invoke void @_ZSt4sortIPxEvT_S1_(ptr noundef %56, ptr noundef %60)
          to label %61 unwind label %66

61:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %62

62:                                               ; preds = %73, %61
  %63 = load i64, ptr %11, align 8, !tbaa !11
  %64 = icmp slt i64 %63, 5
  br i1 %64, label %70, label %65

65:                                               ; preds = %62
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %85

66:                                               ; preds = %53
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %9, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %10, align 4
  br label %89

70:                                               ; preds = %62
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %71 unwind label %76

71:                                               ; preds = %70
  invoke void @_Z3dfsRxRA50000_A5_xSt6vectorIxSaIxEERSt3mapISt4pairInxExSt4lessIS8_ESaIS7_IKS8_xEEES_S_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(2000000) %3, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %72 unwind label %80

72:                                               ; preds = %71
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %73

73:                                               ; preds = %72
  %74 = load i64, ptr %11, align 8, !tbaa !11
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %11, align 8, !tbaa !11
  br label %62, !llvm.loop !15

76:                                               ; preds = %70
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  br label %84

80:                                               ; preds = %71
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %84

84:                                               ; preds = %80, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %89

85:                                               ; preds = %65
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %6, align 8, !tbaa !11
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %6, align 8, !tbaa !11
  br label %29, !llvm.loop !16

89:                                               ; preds = %84, %66, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %142

90:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %91 = load i64, ptr %2, align 8, !tbaa !11
  %92 = load i64, ptr %2, align 8, !tbaa !11
  %93 = sub nsw i64 %92, 1
  %94 = mul nsw i64 %91, %93
  %95 = sdiv i64 %94, 2
  store i64 %95, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %96 = call ptr @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  %97 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  br label %98

98:                                               ; preds = %128, %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %99 = call ptr @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  %100 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %131

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %104 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %105 = getelementptr inbounds %"struct.std::pair.5", ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 16, !tbaa !17
  %107 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %108 = getelementptr inbounds %"struct.std::pair.5", ptr %107, i32 0, i32 1
  %109 = load i64, ptr %108, align 16, !tbaa !17
  %110 = sub nsw i64 %109, 1
  %111 = mul nsw i64 %106, %110
  %112 = sdiv i64 %111, 2
  store i64 %112, ptr %16, align 8, !tbaa !11
  %113 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %114 = getelementptr inbounds %"struct.std::pair.5", ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds %"struct.std::pair", ptr %114, i32 0, i32 1
  %116 = load i64, ptr %115, align 16, !tbaa !21
  %117 = srem i64 %116, 2
  %118 = icmp ne i64 %117, 0
  br i1 %118, label %119, label %123

119:                                              ; preds = %103
  %120 = load i64, ptr %16, align 8, !tbaa !11
  %121 = load i64, ptr %13, align 8, !tbaa !11
  %122 = sub nsw i64 %121, %120
  store i64 %122, ptr %13, align 8, !tbaa !11
  br label %127

123:                                              ; preds = %103
  %124 = load i64, ptr %16, align 8, !tbaa !11
  %125 = load i64, ptr %13, align 8, !tbaa !11
  %126 = add nsw i64 %125, %124
  store i64 %126, ptr %13, align 8, !tbaa !11
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %128

128:                                              ; preds = %127
  %129 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #6
  %130 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  br label %98, !llvm.loop !22

131:                                              ; preds = %102
  %132 = load i64, ptr %13, align 8, !tbaa !11
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %132)
          to label %134 unwind label %138

134:                                              ; preds = %131
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %136 unwind label %138

136:                                              ; preds = %134
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 2000000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %137 = load i32, ptr %1, align 4
  ret i32 %137

138:                                              ; preds = %134, %131
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %142

142:                                              ; preds = %138, %89
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 2000000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %9, align 8
  %145 = load i32, ptr %10, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<__int128, long long>, std::pair<const std::pair<__int128, long long>, long long>, std::_Select1st<std::pair<const std::pair<__int128, long long>, long long>>, std::less<std::pair<__int128, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<__int128, long long>, std::pair<const std::pair<__int128, long long>, long long>, std::_Select1st<std::pair<const std::pair<__int128, long long>, long long>>, std::less<std::pair<__int128, long long>>>::_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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsRxRA50000_A5_xSt6vectorIxSaIxEERSt3mapISt4pairInxExSt4lessIS8_ESaIS7_IKS8_xEEES_S_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(2000000), ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), 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 void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca [50000 x [5 x i64]], align 16
  %3 = alloca %"class.std::map", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @stdin, align 8, !tbaa !8
  %17 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %16)
  %18 = load ptr, ptr @stdout, align 8, !tbaa !8
  %19 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 2000000, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !11
  %21 = load i64, ptr %1, align 8, !tbaa !11
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %0, %55
  %23 = phi i64 [ %57, %55 ], [ 0, %0 ]
  %24 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %23, i64 0
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %32 unwind label %52

._crit_edge:                                      ; preds = %55, %0
  %.lcssa = phi i64 [ %21, %0 ], [ %58, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %26 = add nsw i64 %.lcssa, -1
  %27 = mul nsw i64 %26, %.lcssa
  %28 = sdiv i64 %27, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %29 = call ptr @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %29, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %30 = call ptr @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %30, ptr %9, align 8
  %31 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br i1 %31, label %.lr.ph, label %._crit_edge28

32:                                               ; preds = %.preheader
  %33 = load i64, ptr %5, align 8, !tbaa !11
  %34 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %33, i64 1
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %52

36:                                               ; preds = %32
  %37 = load i64, ptr %5, align 8, !tbaa !11
  %38 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %37, i64 2
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %40 unwind label %52

40:                                               ; preds = %36
  %41 = load i64, ptr %5, align 8, !tbaa !11
  %42 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %41, i64 3
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %44 unwind label %52

44:                                               ; preds = %40
  %45 = load i64, ptr %5, align 8, !tbaa !11
  %46 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %45, i64 4
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %48 unwind label %52

48:                                               ; preds = %44
  %49 = load i64, ptr %5, align 8, !tbaa !11
  %50 = getelementptr inbounds [50000 x [5 x i64]], ptr %2, i64 0, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 40
  invoke void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull %50, ptr noundef nonnull %51)
          to label %54 unwind label %60

52:                                               ; preds = %44, %40, %36, %32, %.preheader
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %73

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %62

55:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %56 = load i64, ptr %5, align 8, !tbaa !11
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %5, align 8, !tbaa !11
  %58 = load i64, ptr %1, align 8, !tbaa !11
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %.preheader, label %._crit_edge, !llvm.loop !13

60:                                               ; preds = %48
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %73

62:                                               ; preds = %54, %64
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %63 unwind label %68

63:                                               ; preds = %62
  invoke void @_Z3dfsRxRA50000_A5_xSt6vectorIxSaIxEERSt3mapISt4pairInxExSt4lessIS8_ESaIS7_IKS8_xEEES_S_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(2000000) %2, ptr noundef nonnull %7, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %64 unwind label %70

64:                                               ; preds = %63
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %65 = load i64, ptr %6, align 8, !tbaa !11
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %6, align 8, !tbaa !11
  %67 = icmp slt i64 %65, 4
  br i1 %67, label %62, label %55, !llvm.loop !15

68:                                               ; preds = %62
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %72

70:                                               ; preds = %63
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %72

72:                                               ; preds = %70, %68
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %73

73:                                               ; preds = %72, %60, %52
  %.pn18 = phi { ptr, i32 } [ %53, %52 ], [ %.pn, %72 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %97

._crit_edge28:                                    ; preds = %.lr.ph, %._crit_edge
  %.0.lcssa = phi i64 [ %28, %._crit_edge ], [ %.1, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.0.lcssa)
          to label %92 unwind label %95

.lr.ph:                                           ; preds = %._crit_edge, %.lr.ph
  %.026 = phi i64 [ %.1, %.lr.ph ], [ %28, %._crit_edge ]
  %75 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %76 = getelementptr inbounds i8, ptr %75, i64 32
  %77 = load i64, ptr %76, align 16, !tbaa !16
  %78 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %79 = getelementptr inbounds i8, ptr %78, i64 32
  %80 = load i64, ptr %79, align 16, !tbaa !16
  %81 = add nsw i64 %80, -1
  %82 = mul nsw i64 %81, %77
  %83 = sdiv i64 %82, 2
  %84 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load i64, ptr %85, align 16, !tbaa !20
  %87 = and i64 %86, 1
  %.not = icmp eq i64 %87, 0
  %88 = sub nsw i64 0, %83
  %.1.p = select i1 %.not, i64 %83, i64 %88
  %.1 = add i64 %.1.p, %.026
  %89 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_InxExEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %90 = call ptr @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %90, ptr %9, align 8
  %91 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_InxExEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br i1 %91, label %.lr.ph, label %._crit_edge28, !llvm.loop !21

92:                                               ; preds = %._crit_edge28
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %94 unwind label %95

94:                                               ; preds = %92
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 2000000, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

95:                                               ; preds = %92, %._crit_edge28
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %97

97:                                               ; preds = %95, %73
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %73 ], [ %96, %95 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt3mapISt4pairInxExSt4lessIS1_ESaIS0_IKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 2000000, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn18.pn
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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