; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2017.12 (hayfeast)

; 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" }
%"struct.std::pair.0" = type { i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.2" = type { i64, i64 }

@.str = external hidden unnamed_addr constant [12 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 [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #0

; 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 i64, align 8
  %4 = alloca [100000 x %"struct.std::pair.0"], align 16
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::map", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i32 0, ptr %1, align 4
  %17 = load ptr, ptr @stdin, align 8, !tbaa !5
  %18 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %17)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %21 = 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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 1600000, ptr %4) #8
  %23 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i32 0, i32 0
  %24 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i64 100000
  br label %25

25:                                               ; preds = %25, %0
  %26 = phi ptr [ %23, %0 ], [ %27, %25 ]
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %27 = getelementptr inbounds %"struct.std::pair.0", ptr %26, i64 1
  %28 = icmp eq ptr %27, %24
  br i1 %28, label %29, label %25

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %47, %29
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = load i64, ptr %2, align 8, !tbaa !11
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %50

36:                                               ; preds = %30
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %38
  %40 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %43
  %45 = getelementptr inbounds %"struct.std::pair.0", ptr %44, i32 0, i32 1
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(8) %45)
  br label %47

47:                                               ; preds = %36
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %5, align 4, !tbaa !9
  br label %30, !llvm.loop !13

50:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %80, %50
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = load i64, ptr %2, align 8, !tbaa !11
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %51
  %57 = load i64, ptr %7, align 8, !tbaa !11
  %58 = load i64, ptr %3, align 8, !tbaa !11
  %59 = icmp slt i64 %57, %58
  br label %60

60:                                               ; preds = %56, %51
  %61 = phi i1 [ false, %51 ], [ %59, %56 ]
  br i1 %61, label %63, label %62

62:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %87

63:                                               ; preds = %60
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %65
  %67 = getelementptr inbounds %"struct.std::pair.0", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 16, !tbaa !15
  %69 = load i64, ptr %7, align 8, !tbaa !11
  %70 = add nsw i64 %69, %68
  store i64 %70, ptr %7, align 8, !tbaa !11
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %72
  %74 = getelementptr inbounds %"struct.std::pair.0", ptr %73, i32 0, i32 1
  %75 = load i64, ptr %74, align 8, !tbaa !17
  %76 = trunc i64 %75 to i32
  invoke void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %76)
          to label %77 unwind label %83

77:                                               ; preds = %63
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  store i64 %79, ptr %8, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %77
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %10, align 4, !tbaa !9
  br label %51, !llvm.loop !18

83:                                               ; preds = %63
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %184

87:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %88 = call ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  %89 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %91 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %90) #8
  %92 = getelementptr inbounds %"struct.std::pair.2", ptr %91, i32 0, i32 0
  %93 = load i64, ptr %92, align 8, !tbaa !19
  store i64 %93, ptr %14, align 8, !tbaa !11
  %94 = load i64, ptr %9, align 8, !tbaa !11
  %95 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %94
  %96 = getelementptr inbounds %"struct.std::pair.0", ptr %95, i32 0, i32 0
  %97 = load i64, ptr %96, align 16, !tbaa !15
  %98 = load i64, ptr %7, align 8, !tbaa !11
  %99 = sub nsw i64 %98, %97
  store i64 %99, ptr %7, align 8, !tbaa !11
  %100 = load i64, ptr %9, align 8, !tbaa !11
  %101 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %100
  %102 = getelementptr inbounds %"struct.std::pair.0", ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !17
  %104 = trunc i64 %103 to i32
  invoke void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %104)
          to label %105 unwind label %117

105:                                              ; preds = %87
  %106 = load i64, ptr %9, align 8, !tbaa !11
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %108 = load i64, ptr %8, align 8, !tbaa !11
  %109 = add nsw i64 %108, 1
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %15, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %173, %105
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = load i64, ptr %2, align 8, !tbaa !11
  %115 = icmp slt i64 %113, %114
  br i1 %115, label %121, label %116

116:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %176

117:                                              ; preds = %179, %176, %87
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  br label %183

121:                                              ; preds = %111
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %123
  %125 = getelementptr inbounds %"struct.std::pair.0", ptr %124, i32 0, i32 0
  %126 = load i64, ptr %125, align 16, !tbaa !15
  %127 = load i64, ptr %7, align 8, !tbaa !11
  %128 = add nsw i64 %127, %126
  store i64 %128, ptr %7, align 8, !tbaa !11
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %130
  %132 = getelementptr inbounds %"struct.std::pair.0", ptr %131, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !17
  %134 = trunc i64 %133 to i32
  invoke void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %134)
          to label %135 unwind label %148

135:                                              ; preds = %121
  %136 = load i64, ptr %7, align 8, !tbaa !11
  %137 = load i64, ptr %3, align 8, !tbaa !11
  %138 = icmp sge i64 %136, %137
  br i1 %138, label %139, label %152

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %140 = call ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  %141 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %140, ptr %141, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %143 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %142) #8
  %144 = getelementptr inbounds %"struct.std::pair.2", ptr %143, i32 0, i32 0
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %144)
          to label %146 unwind label %148

146:                                              ; preds = %139
  %147 = load i64, ptr %145, align 8, !tbaa !11
  store i64 %147, ptr %14, align 8, !tbaa !11
  br label %152

148:                                              ; preds = %157, %139, %121
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %11, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %183

152:                                              ; preds = %146, %135
  br label %153

153:                                              ; preds = %169, %152
  %154 = load i64, ptr %7, align 8, !tbaa !11
  %155 = load i64, ptr %3, align 8, !tbaa !11
  %156 = icmp sge i64 %154, %155
  br i1 %156, label %157, label %172

157:                                              ; preds = %153
  %158 = load i64, ptr %9, align 8, !tbaa !11
  %159 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %158
  %160 = getelementptr inbounds %"struct.std::pair.0", ptr %159, i32 0, i32 0
  %161 = load i64, ptr %160, align 16, !tbaa !15
  %162 = load i64, ptr %7, align 8, !tbaa !11
  %163 = sub nsw i64 %162, %161
  store i64 %163, ptr %7, align 8, !tbaa !11
  %164 = load i64, ptr %9, align 8, !tbaa !11
  %165 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %4, i64 0, i64 %164
  %166 = getelementptr inbounds %"struct.std::pair.0", ptr %165, i32 0, i32 1
  %167 = load i64, ptr %166, align 8, !tbaa !17
  %168 = trunc i64 %167 to i32
  invoke void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %168)
          to label %169 unwind label %148

169:                                              ; preds = %157
  %170 = load i64, ptr %9, align 8, !tbaa !11
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %9, align 8, !tbaa !11
  br label %153, !llvm.loop !22

172:                                              ; preds = %153
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %15, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %15, align 4, !tbaa !9
  br label %111, !llvm.loop !23

176:                                              ; preds = %116
  %177 = load i64, ptr %14, align 8, !tbaa !11
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %177)
          to label %179 unwind label %117

179:                                              ; preds = %176
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %181 unwind label %117

181:                                              ; preds = %179
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1600000, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %182 = load i32, ptr %1, align 4
  ret i32 %182

183:                                              ; preds = %148, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %184

184:                                              ; preds = %183, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1600000, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %11, align 8
  %187 = load i32, ptr %12, align 4
  %188 = insertvalue { ptr, i32 } poison, ptr %186, 0
  %189 = insertvalue { ptr, i32 } %188, i32 %187, 1
  resume { ptr, i32 } %189
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = distinct !{!18, !14}
!19 = !{!20, !12, i64 0}
!20 = !{!"_ZTSSt4pairIKxxE", !12, i64 0, !12, i64 8}
!21 = !{i64 0, i64 8, !5}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !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" }
%"struct.std::pair.0" = type { i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [12 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 [13 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
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #0

; 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 i64, align 8
  %3 = alloca [100000 x %"struct.std::pair.0"], align 16
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca i64, align 8
  %7 = load ptr, ptr @stdin, align 8, !tbaa !5
  %8 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %7)
  %9 = load ptr, ptr @stdout, align 8, !tbaa !5
  %10 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %11 = 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)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 1600000, ptr nonnull %3) #7
  br label %13

13:                                               ; preds = %13, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %13 ]
  %.ptr = getelementptr inbounds i8, ptr %3, i64 %.idx
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %.ptr)
  %.add = add nuw nsw i64 %.idx, 16
  %14 = icmp eq i64 %.add, 1600000
  br i1 %14, label %.preheader, label %13

.preheader:                                       ; preds = %13
  %15 = load i64, ptr %1, align 8, !tbaa !9
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %17 = load i64, ptr %1, align 8, !tbaa !9
  %18 = icmp sgt i64 %17, 0
  %19 = load i64, ptr %2, align 8
  %20 = icmp sgt i64 %19, 0
  %21 = select i1 %18, i1 %20, i1 false
  br i1 %21, label %.lr.ph56, label %._crit_edge57

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %22 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %3, i64 0, i64 %indvars.iv
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i64, ptr %1, align 8, !tbaa !9
  %27 = icmp sgt i64 %26, %indvars.iv.next
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge57.loopexit:                           ; preds = %43
  %28 = trunc nuw nsw i64 %indvars.iv77 to i32
  %29 = add i32 %28, 1
  br label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge57.loopexit, %._crit_edge
  %.036.lcssa = phi i64 [ 0, %._crit_edge ], [ %44, %._crit_edge57.loopexit ]
  %.035.lcssa = phi i32 [ undef, %._crit_edge ], [ %29, %._crit_edge57.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %30 = call ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %30, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %32 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  %33 = load i64, ptr %32, align 8, !tbaa !13
  store i64 %33, ptr %6, align 8, !tbaa !9
  %34 = load i64, ptr %3, align 16, !tbaa !15
  %35 = getelementptr inbounds i8, ptr %3, i64 8
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = trunc i64 %36 to i32
  invoke void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %37)
          to label %52 unwind label %62

.lr.ph56:                                         ; preds = %._crit_edge, %43
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %43 ], [ 0, %._crit_edge ]
  %.03653 = phi i64 [ %44, %43 ], [ 0, %._crit_edge ]
  %38 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %3, i64 0, i64 %indvars.iv77
  %39 = load i64, ptr %38, align 16, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %38, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !17
  %42 = trunc i64 %41 to i32
  invoke void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %42)
          to label %43 unwind label %50

43:                                               ; preds = %.lr.ph56
  %44 = add nsw i64 %39, %.03653
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %45 = load i64, ptr %1, align 8, !tbaa !9
  %46 = icmp sgt i64 %45, %indvars.iv.next78
  %47 = load i64, ptr %2, align 8
  %48 = icmp slt i64 %44, %47
  %49 = select i1 %46, i1 %48, i1 false
  br i1 %49, label %.lr.ph56, label %._crit_edge57.loopexit, !llvm.loop !18

50:                                               ; preds = %.lr.ph56
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %94

52:                                               ; preds = %._crit_edge57
  %53 = sext i32 %.035.lcssa to i64
  %54 = load i64, ptr %1, align 8, !tbaa !9
  %55 = icmp sgt i64 %54, %53
  br i1 %55, label %.lr.ph71.preheader, label %._crit_edge72

.lr.ph71.preheader:                               ; preds = %52
  %56 = sub nsw i64 %.036.lcssa, %34
  br label %.lr.ph71

.loopexit:                                        ; preds = %86, %79
  %.2.lcssa = phi i64 [ %67, %79 ], [ %87, %86 ]
  %.134.lcssa = phi i64 [ %.03368, %79 ], [ %88, %86 ]
  %.0 = add i32 %.069, 1
  %57 = sext i32 %.0 to i64
  %58 = load i64, ptr %1, align 8, !tbaa !9
  %59 = icmp sgt i64 %58, %57
  br i1 %59, label %.lr.ph71, label %._crit_edge72.loopexit, !llvm.loop !19

._crit_edge72.loopexit:                           ; preds = %.loopexit
  %.pre80 = load i64, ptr %6, align 8, !tbaa !9
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %52
  %60 = phi i64 [ %.pre80, %._crit_edge72.loopexit ], [ %33, %52 ]
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %60)
          to label %90 unwind label %62

62:                                               ; preds = %90, %._crit_edge72, %._crit_edge57
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %93

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %.loopexit
  %64 = phi i64 [ %57, %.loopexit ], [ %53, %.lr.ph71.preheader ]
  %.069 = phi i32 [ %.0, %.loopexit ], [ %.035.lcssa, %.lr.ph71.preheader ]
  %.03368 = phi i64 [ %.134.lcssa, %.loopexit ], [ 1, %.lr.ph71.preheader ]
  %.13767 = phi i64 [ %.2.lcssa, %.loopexit ], [ %56, %.lr.ph71.preheader ]
  %65 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %3, i64 0, i64 %64
  %66 = load i64, ptr %65, align 16, !tbaa !15
  %67 = add nsw i64 %66, %.13767
  %68 = getelementptr inbounds i8, ptr %65, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !17
  %70 = trunc i64 %69 to i32
  invoke void @_Z6mllAddRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %70)
          to label %71 unwind label %.loopexit.split-lp

71:                                               ; preds = %.lr.ph71
  %72 = load i64, ptr %2, align 8, !tbaa !9
  %.not = icmp slt i64 %67, %72
  br i1 %.not, label %79, label %73

73:                                               ; preds = %71
  %74 = call ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %74, ptr %5, align 8, !tbaa !5
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKxxEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %76 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %75) #7
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %76)
  %78 = load i64, ptr %77, align 8, !tbaa !9
  store i64 %78, ptr %6, align 8, !tbaa !9
  %.pre = load i64, ptr %2, align 8, !tbaa !9
  br label %79

.loopexit47:                                      ; preds = %.lr.ph63
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %93

.loopexit.split-lp:                               ; preds = %.lr.ph71
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %93

79:                                               ; preds = %73, %71
  %80 = phi i64 [ %.pre, %73 ], [ %72, %71 ]
  %.not4359 = icmp slt i64 %67, %80
  br i1 %.not4359, label %.loopexit, label %.lr.ph63

.lr.ph63:                                         ; preds = %79, %86
  %.13461 = phi i64 [ %88, %86 ], [ %.03368, %79 ]
  %.260 = phi i64 [ %87, %86 ], [ %67, %79 ]
  %81 = getelementptr inbounds [100000 x %"struct.std::pair.0"], ptr %3, i64 0, i64 %.13461
  %82 = load i64, ptr %81, align 16, !tbaa !15
  %83 = getelementptr inbounds i8, ptr %81, i64 8
  %84 = load i64, ptr %83, align 8, !tbaa !17
  %85 = trunc i64 %84 to i32
  invoke void @_Z9mllRemoveRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEi(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %85)
          to label %86 unwind label %.loopexit47

86:                                               ; preds = %.lr.ph63
  %87 = sub nsw i64 %.260, %82
  %88 = add nsw i64 %.13461, 1
  %89 = load i64, ptr %2, align 8, !tbaa !9
  %.not43 = icmp slt i64 %87, %89
  br i1 %.not43, label %.loopexit, label %.lr.ph63, !llvm.loop !20

90:                                               ; preds = %._crit_edge72
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %92 unwind label %62

92:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1600000, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

93:                                               ; preds = %.loopexit47, %.loopexit.split-lp, %62
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %lpad.loopexit, %.loopexit47 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %94

94:                                               ; preds = %93, %50
  %.pn45 = phi { ptr, i32 } [ %51, %50 ], [ %.pn, %93 ]
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1600000, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn45
}

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 #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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


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