; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2020/qual (d1)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, 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::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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"struct.std::pair.0" = type { i64, i64 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@c = external dso_local global [1000005 x i64], align 16
@dist = external dso_local global [1000005 x i64], align 16
@ds = external dso_local global %"class.std::set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::pair.0", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i8, align 1
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::pair.0", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca %"struct.std::pair.0", align 8
  %22 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  %23 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %24 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %25 = getelementptr i8, ptr %24, i64 -24
  %26 = load i64, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %26
  %28 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %27, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 1000000023598798, ptr %2, align 8, !tbaa !8
  %29 = load ptr, ptr @stdin, align 8, !tbaa !11
  %30 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.3, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %32 unwind label %38

32:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 1, ptr %7, align 8, !tbaa !8
  br label %33

33:                                               ; preds = %237, %32
  %34 = load i64, ptr %7, align 8, !tbaa !8
  %35 = load i64, ptr %4, align 8, !tbaa !8
  %36 = icmp sle i64 %34, %35
  br i1 %36, label %42, label %37

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

38:                                               ; preds = %0
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %5, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %6, align 4
  br label %244

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %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) %9)
          to label %44 unwind label %59

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %46 unwind label %59

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
          to label %48 unwind label %59

48:                                               ; preds = %46
  %49 = load i64, ptr %7, align 8, !tbaa !8
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %47, i64 noundef %49)
          to label %51 unwind label %59

51:                                               ; preds = %48
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %53 unwind label %59

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

54:                                               ; preds = %80, %53
  %55 = load i64, ptr %11, align 8, !tbaa !8
  %56 = load i64, ptr %9, align 8, !tbaa !8
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %63, label %58

58:                                               ; preds = %54
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %83

59:                                               ; preds = %90, %88, %83, %51, %48, %46, %44, %42
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  br label %241

63:                                               ; preds = %54
  %64 = load i64, ptr %11, align 8, !tbaa !8
  %65 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %64
  %66 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %67 unwind label %75

67:                                               ; preds = %63
  %68 = load i64, ptr %11, align 8, !tbaa !8
  %69 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !8
  %71 = icmp eq i64 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %67
  %73 = load i64, ptr %11, align 8, !tbaa !8
  %74 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %73
  store i64 1000000023598798, ptr %74, align 8, !tbaa !8
  br label %79

75:                                               ; preds = %63
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %5, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %241

79:                                               ; preds = %72, %67
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %11, align 8, !tbaa !8
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %11, align 8, !tbaa !8
  br label %54, !llvm.loop !13

83:                                               ; preds = %58
  %84 = load i64, ptr %9, align 8, !tbaa !8
  %85 = sub nsw i64 %84, 1
  %86 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %85
  store i64 0, ptr %86, align 8, !tbaa !8
  store i64 0, ptr @c, align 16, !tbaa !8
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
          to label %88 unwind label %59

88:                                               ; preds = %83
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %90 unwind label %59

90:                                               ; preds = %88
  %91 = load i64, ptr %9, align 8, !tbaa !8
  %92 = getelementptr inbounds i64, ptr @dist, i64 %91
  invoke void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @dist, ptr noundef %92, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %93 unwind label %59

93:                                               ; preds = %90
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %94

94:                                               ; preds = %114, %93
  %95 = load i64, ptr %12, align 8, !tbaa !8
  %96 = load i64, ptr %10, align 8, !tbaa !8
  %97 = icmp sle i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %121

99:                                               ; preds = %94
  %100 = load i64, ptr %12, align 8, !tbaa !8
  %101 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = load i64, ptr %12, align 8, !tbaa !8
  %104 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %103
  store i64 %102, ptr %104, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %105 = load i64, ptr %12, align 8, !tbaa !8
  %106 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %105
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %107 unwind label %117

107:                                              ; preds = %99
  %108 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %109 unwind label %117

109:                                              ; preds = %107
  %110 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %111 = extractvalue { ptr, i8 } %108, 0
  store ptr %111, ptr %110, align 8
  %112 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %113 = extractvalue { ptr, i8 } %108, 1
  store i8 %113, ptr %112, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %114

114:                                              ; preds = %109
  %115 = load i64, ptr %12, align 8, !tbaa !8
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %12, align 8, !tbaa !8
  br label %94, !llvm.loop !15

117:                                              ; preds = %107, %99
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %5, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %241

121:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 1, ptr %15, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %122 = load i64, ptr %10, align 8, !tbaa !8
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %16, align 8, !tbaa !8
  br label %124

124:                                              ; preds = %192, %121
  %125 = load i64, ptr %16, align 8, !tbaa !8
  %126 = load i64, ptr %9, align 8, !tbaa !8
  %127 = icmp slt i64 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 11, ptr %8, align 4
  br label %195

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %130 = load i64, ptr %16, align 8, !tbaa !8
  %131 = load i64, ptr %10, align 8, !tbaa !8
  %132 = add nsw i64 %131, 1
  %133 = sub nsw i64 %130, %132
  %134 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %135 = load i64, ptr %16, align 8, !tbaa !8
  %136 = load i64, ptr %10, align 8, !tbaa !8
  %137 = add nsw i64 %136, 1
  %138 = sub nsw i64 %135, %137
  store i64 %138, ptr %18, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %139 unwind label %160

139:                                              ; preds = %129
  %140 = invoke noundef i64 @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %141 unwind label %160

141:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %142 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  %144 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %145 = getelementptr inbounds %"struct.std::pair.0", ptr %144, i32 0, i32 0
  %146 = load i64, ptr %145, align 8, !tbaa !18
  %147 = load i64, ptr %16, align 8, !tbaa !8
  %148 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %147
  %149 = load i64, ptr %148, align 8, !tbaa !8
  %150 = add nsw i64 %146, %149
  %151 = load i64, ptr %16, align 8, !tbaa !8
  %152 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %151
  store i64 %150, ptr %152, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %153 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  %154 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %156 = getelementptr inbounds %"struct.std::pair.0", ptr %155, i32 0, i32 0
  %157 = load i64, ptr %156, align 8, !tbaa !18
  %158 = icmp sge i64 %157, 1000000023598798
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br i1 %158, label %159, label %164

159:                                              ; preds = %141
  store i8 0, ptr %15, align 1, !tbaa !16
  store i32 11, ptr %8, align 4
  br label %195

160:                                              ; preds = %139, %129
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %5, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %196

164:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %165 = load i64, ptr %16, align 8, !tbaa !8
  %166 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %165
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %167 unwind label %183

167:                                              ; preds = %164
  %168 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %169 unwind label %183

169:                                              ; preds = %167
  %170 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 0
  %171 = extractvalue { ptr, i8 } %168, 0
  store ptr %171, ptr %170, align 8
  %172 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 1
  %173 = extractvalue { ptr, i8 } %168, 1
  store i8 %173, ptr %172, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  %174 = load i64, ptr %16, align 8, !tbaa !8
  %175 = srem i64 %174, 100000
  %176 = icmp eq i64 %175, 0
  br i1 %176, label %177, label %191

177:                                              ; preds = %169
  %178 = load i64, ptr %16, align 8, !tbaa !8
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %178)
          to label %180 unwind label %187

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

182:                                              ; preds = %180
  br label %191

183:                                              ; preds = %167, %164
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %5, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  br label %196

187:                                              ; preds = %180, %177
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %5, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %6, align 4
  br label %196

191:                                              ; preds = %182, %169
  br label %192

192:                                              ; preds = %191
  %193 = load i64, ptr %16, align 8, !tbaa !8
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %16, align 8, !tbaa !8
  br label %124, !llvm.loop !20

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

196:                                              ; preds = %187, %183, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %240

197:                                              ; preds = %195
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
          to label %199 unwind label %216

199:                                              ; preds = %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %201 unwind label %216

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef @.str.7)
          to label %203 unwind label %216

203:                                              ; preds = %201
  %204 = load i64, ptr %7, align 8, !tbaa !8
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %202, i64 noundef %204)
          to label %206 unwind label %216

206:                                              ; preds = %203
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef @.str.8)
          to label %208 unwind label %216

208:                                              ; preds = %206
  %209 = load i8, ptr %15, align 1, !tbaa !16, !range !21, !noundef !22
  %210 = trunc i8 %209 to i1
  br i1 %210, label %220, label %211

211:                                              ; preds = %208
  %212 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef -1)
          to label %213 unwind label %216

213:                                              ; preds = %211
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %212, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %215 unwind label %216

215:                                              ; preds = %213
  br label %229

216:                                              ; preds = %234, %231, %229, %226, %220, %213, %211, %206, %203, %201, %199, %197
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %5, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %6, align 4
  br label %240

220:                                              ; preds = %208
  %221 = load i64, ptr %9, align 8, !tbaa !8
  %222 = sub nsw i64 %221, 1
  %223 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %222
  %224 = load i64, ptr %223, align 8, !tbaa !8
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %224)
          to label %226 unwind label %216

226:                                              ; preds = %220
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %228 unwind label %216

228:                                              ; preds = %226
  br label %229

229:                                              ; preds = %228, %215
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
          to label %231 unwind label %216

231:                                              ; preds = %229
  %232 = load i64, ptr %7, align 8, !tbaa !8
  %233 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %230, i64 noundef %232)
          to label %234 unwind label %216

234:                                              ; preds = %231
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %233, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %236 unwind label %216

236:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %237

237:                                              ; preds = %236
  %238 = load i64, ptr %7, align 8, !tbaa !8
  %239 = add nsw i64 %238, 1
  store i64 %239, ptr %7, align 8, !tbaa !8
  br label %33, !llvm.loop !23

240:                                              ; preds = %216, %196
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %241

241:                                              ; preds = %240, %117, %75, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %244

242:                                              ; preds = %37
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %243 = load i32, ptr %1, align 4
  ret i32 %243

244:                                              ; preds = %241, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %245

245:                                              ; preds = %244
  %246 = load ptr, ptr %5, align 8
  %247 = load i32, ptr %6, align 4
  %248 = insertvalue { ptr, i32 } poison, ptr %246, 0
  %249 = insertvalue { ptr, i32 } %248, i32 %247, 1
  resume { ptr, i32 } %249
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #4 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 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) #4 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

attributes #0 = { 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 #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{!19, !9, i64 0}
!19 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!20 = distinct !{!20, !14}
!21 = !{i8 0, i8 2}
!22 = !{}
!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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, 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::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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"struct.std::pair.0" = type { i64, i64 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@c = external dso_local global [1000005 x i64], align 16
@dist = external dso_local global [1000005 x i64], align 16
@ds = external dso_local global %"class.std::set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::pair.0", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::pair.0", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::pair.0", align 8
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i64 1000000023598798, ptr %1, align 8, !tbaa !8
  %20 = load ptr, ptr @stdin, align 8, !tbaa !11
  %21 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.3, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %.preheader34 unwind label %24

.preheader34:                                     ; preds = %0
  %23 = load i64, ptr %3, align 8, !tbaa !8
  %.not56 = icmp slt i64 %23, 1
  br i1 %.not56, label %._crit_edge59, label %.lr.ph58

._crit_edge59:                                    ; preds = %138, %.preheader34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

24:                                               ; preds = %0
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %142

.lr.ph58:                                         ; preds = %.preheader34, %138
  %.02057 = phi i64 [ %139, %138 ], [ 1, %.preheader34 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %27 unwind label %40

27:                                               ; preds = %.lr.ph58
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %29 unwind label %40

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
          to label %31 unwind label %40

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %30, i64 noundef %.02057)
          to label %33 unwind label %40

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %40

.preheader:                                       ; preds = %33
  %35 = load i64, ptr %4, align 8, !tbaa !8
  %36 = icmp sgt i64 %35, 0
  br i1 %36, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %50, %.preheader
  %.lcssa = phi i64 [ %35, %.preheader ], [ %52, %50 ]
  %37 = add nsw i64 %.lcssa, -1
  %38 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %37
  store i64 0, ptr %38, align 8, !tbaa !8
  store i64 0, ptr @c, align 16, !tbaa !8
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
          to label %54 unwind label %40

40:                                               ; preds = %56, %54, %._crit_edge, %33, %31, %29, %27, %.lr.ph58
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %141

.lr.ph:                                           ; preds = %.preheader, %50
  %.02139 = phi i64 [ %51, %50 ], [ 0, %.preheader ]
  %42 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %.02139
  %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 %48

44:                                               ; preds = %.lr.ph
  %45 = load i64, ptr %42, align 8, !tbaa !8
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %47, label %50

47:                                               ; preds = %44
  store i64 1000000023598798, ptr %42, align 8, !tbaa !8
  br label %50

48:                                               ; preds = %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %141

50:                                               ; preds = %44, %47
  %51 = add nuw nsw i64 %.02139, 1
  %52 = load i64, ptr %4, align 8, !tbaa !8
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !13

54:                                               ; preds = %._crit_edge
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %56 unwind label %40

56:                                               ; preds = %54
  %57 = load i64, ptr %4, align 8, !tbaa !8
  %58 = getelementptr inbounds i64, ptr @dist, i64 %57
  invoke void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @dist, ptr noundef nonnull %58, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %59 unwind label %40

59:                                               ; preds = %56
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 0, ptr %6, align 8, !tbaa !8
  %60 = load i64, ptr %5, align 8, !tbaa !8
  %.not2440 = icmp slt i64 %60, 0
  br i1 %.not2440, label %._crit_edge44, label %.lr.ph43

._crit_edge44:                                    ; preds = %66, %59
  %storemerge25.in45 = phi i64 [ %60, %59 ], [ %69, %66 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %storemerge2546 = add nsw i64 %storemerge25.in45, 1
  store i64 %storemerge2546, ptr %8, align 8, !tbaa !8
  %61 = load i64, ptr %4, align 8, !tbaa !8
  %.not2847 = icmp slt i64 %storemerge2546, %61
  br i1 %.not2847, label %.lr.ph51, label %._crit_edge52

.lr.ph43:                                         ; preds = %59, %66
  %storemerge41 = phi i64 [ %68, %66 ], [ 0, %59 ]
  %62 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %storemerge41
  %63 = load i64, ptr %62, align 8, !tbaa !8
  %64 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %storemerge41
  store i64 %63, ptr %64, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %65 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %66 unwind label %70

66:                                               ; preds = %.lr.ph43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %67 = load i64, ptr %6, align 8, !tbaa !8
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %6, align 8, !tbaa !8
  %69 = load i64, ptr %5, align 8, !tbaa !8
  %.not24.not = icmp slt i64 %67, %69
  br i1 %.not24.not, label %.lr.ph43, label %._crit_edge44, !llvm.loop !15

70:                                               ; preds = %.lr.ph43
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %141

.lr.ph51:                                         ; preds = %._crit_edge44, %107
  %storemerge25.in48 = phi i64 [ %storemerge25.in, %107 ], [ %storemerge25.in45, %._crit_edge44 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %72 = load i64, ptr %5, align 8, !tbaa !8
  %73 = sub i64 %storemerge25.in48, %72
  %74 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store i64 %73, ptr %10, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %75 = invoke noundef i64 @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %76 unwind label %89

76:                                               ; preds = %.lr.ph51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %77 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  store ptr %77, ptr %11, align 8
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %79 = load i64, ptr %78, align 8, !tbaa !16
  %80 = load i64, ptr %8, align 8, !tbaa !8
  %81 = getelementptr inbounds [1000005 x i64], ptr @c, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = add nsw i64 %82, %79
  %84 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %80
  store i64 %83, ptr %84, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %85 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @ds) #6
  store ptr %85, ptr %12, align 8
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %87 = load i64, ptr %86, align 8, !tbaa !16
  %88 = icmp sgt i64 %87, 1000000023598797
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br i1 %88, label %._crit_edge52, label %91

89:                                               ; preds = %.lr.ph51
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %110

91:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %92 = load i64, ptr %8, align 8, !tbaa !8
  %93 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %92
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %94 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @ds, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %95 unwind label %103

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  %96 = load i64, ptr %8, align 8, !tbaa !8
  %97 = srem i64 %96, 100000
  %98 = icmp eq i64 %97, 0
  br i1 %98, label %99, label %107

99:                                               ; preds = %95
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %96)
          to label %101 unwind label %105

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %._crit_edge62 unwind label %105

._crit_edge62:                                    ; preds = %101
  %storemerge25.in.pre = load i64, ptr %8, align 8, !tbaa !8
  br label %107

103:                                              ; preds = %91
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %110

105:                                              ; preds = %101, %99
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %110

107:                                              ; preds = %._crit_edge62, %95
  %storemerge25.in = phi i64 [ %storemerge25.in.pre, %._crit_edge62 ], [ %96, %95 ]
  %storemerge25 = add nsw i64 %storemerge25.in, 1
  store i64 %storemerge25, ptr %8, align 8, !tbaa !8
  %108 = load i64, ptr %4, align 8, !tbaa !8
  %.not28 = icmp slt i64 %storemerge25, %108
  br i1 %.not28, label %.lr.ph51, label %._crit_edge52, !llvm.loop !18

._crit_edge52:                                    ; preds = %107, %76, %._crit_edge44
  %.not28.lcssa = phi i1 [ false, %._crit_edge44 ], [ %88, %76 ], [ %88, %107 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
          to label %111 unwind label %122

110:                                              ; preds = %105, %103, %89
  %.pn = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %141

111:                                              ; preds = %._crit_edge52
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %113 unwind label %122

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.7)
          to label %115 unwind label %122

115:                                              ; preds = %113
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %114, i64 noundef %.02057)
          to label %117 unwind label %122

117:                                              ; preds = %115
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull @.str.8)
          to label %119 unwind label %122

119:                                              ; preds = %117
  br i1 %.not28.lcssa, label %120, label %124

120:                                              ; preds = %119
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef -1)
          to label %.invoke unwind label %122

122:                                              ; preds = %.invoke, %136, %134, %132, %124, %120, %117, %115, %113, %111, %._crit_edge52
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %141

124:                                              ; preds = %119
  %125 = load i64, ptr %4, align 8, !tbaa !8
  %126 = add nsw i64 %125, -1
  %127 = getelementptr inbounds [1000005 x i64], ptr @dist, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !8
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %128)
          to label %.invoke unwind label %122

.invoke:                                          ; preds = %120, %124
  %130 = phi ptr [ %129, %124 ], [ %121, %120 ]
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %132 unwind label %122

132:                                              ; preds = %.invoke
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
          to label %134 unwind label %122

134:                                              ; preds = %132
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %133, i64 noundef %.02057)
          to label %136 unwind label %122

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

138:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %139 = add nuw nsw i64 %.02057, 1
  %140 = load i64, ptr %3, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.02057, %140
  br i1 %.not.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !19

141:                                              ; preds = %110, %122, %70, %48, %40
  %.pn31 = phi { ptr, i32 } [ %49, %48 ], [ %71, %70 ], [ %41, %40 ], [ %123, %122 ], [ %.pn, %110 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %142

142:                                              ; preds = %141, %24
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %141 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn31.pn
}

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

; 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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; 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 #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) 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 #4 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 #4 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !9, i64 0}
!17 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


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