; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2017-18/Dec 2017/Plat (standingout_hash)

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

%struct.hsh = type { i32, %"class.std::__cxx11::basic_string", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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>>, cmp>::_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>>, cmp>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::pair.6" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@S = external dso_local global [100000 x %struct.hsh], align 16
@ans = external dso_local global [100000 x i64], align 16
@cur = external dso_local global %"class.std::set", align 8
@todo = external dso_local global [100000 x %"class.std::set"], align 16
@pre = external dso_local global %"struct.std::pair", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3lcpSt4pairIxxES0_(i64, i64, i64, i64) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair.6", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::pair.6", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::pair.6", align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %78, %0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %81

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

33:                                               ; preds = %51, %32
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100000 x %struct.hsh], ptr @S, i64 0, i64 %36
  %38 = getelementptr inbounds %struct.hsh, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 16, !tbaa !9
  %40 = icmp slt i32 %34, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %33
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %54

42:                                               ; preds = %33
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %44
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @_ZNSt4pairIxxEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %46 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %45, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %47 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %48 = extractvalue { ptr, i8 } %46, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %50 = extractvalue { ptr, i8 } %46, 1
  store i8 %50, ptr %49, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %51

51:                                               ; preds = %42
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !5
  br label %33, !llvm.loop !19

54:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %56
  %58 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %57) #7
  %59 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %61 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr noundef nonnull align 8 dereferenceable(16) %60)
  %62 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 0
  %63 = extractvalue { ptr, i8 } %61, 0
  store ptr %63, ptr %62, align 8
  %64 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 1
  %65 = extractvalue { ptr, i8 } %61, 1
  store i8 %65, ptr %64, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %67
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %70
  %72 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %71) #7
  %73 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr %75)
  %77 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  br label %78

78:                                               ; preds = %54
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !21

81:                                               ; preds = %31
  br label %82

82:                                               ; preds = %171, %81
  %83 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %84 = trunc i64 %83 to i32
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %173

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %87 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %88 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %89, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %90 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %91 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8
  %94 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr %93)
  %95 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 @pre, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %11, i64 16, i1 false)
  %96 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %97 = load i64, ptr %96, align 8
  %98 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %99 = load i64, ptr %98, align 8
  %100 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %101 = load i64, ptr %100, align 8
  %102 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %103 = load i64, ptr %102, align 8
  %104 = call noundef i32 @_Z3lcpSt4pairIxxES0_(i64 %97, i64 %99, i64 %101, i64 %103)
  store i32 %104, ptr %15, align 4, !tbaa !5
  %105 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %106 = trunc i64 %105 to i32
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %123

108:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %11, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %109 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %110 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %21, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %111, i64 16, i1 false)
  %112 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %113 = load i64, ptr %112, align 8
  %114 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %115 = load i64, ptr %114, align 8
  %116 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %117 = load i64, ptr %116, align 8
  %118 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %119 = load i64, ptr %118, align 8
  %120 = call noundef i32 @_Z3lcpSt4pairIxxES0_(i64 %113, i64 %115, i64 %117, i64 %119)
  store i32 %120, ptr %18, align 4, !tbaa !5
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %122 = load i32, ptr %121, align 4, !tbaa !5
  store i32 %122, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %123

123:                                              ; preds = %108, %86
  %124 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %125 = load i64, ptr %124, align 8, !tbaa !22
  %126 = getelementptr inbounds [100000 x %struct.hsh], ptr @S, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.hsh, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 16, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !25
  %132 = sub nsw i64 %129, %131
  %133 = load i32, ptr %15, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = sub nsw i64 %132, %134
  %136 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !22
  %138 = getelementptr inbounds [100000 x i64], ptr @ans, i64 0, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !26
  %140 = add nsw i64 %139, %135
  store i64 %140, ptr %138, align 8, !tbaa !26
  %141 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %142 = load i64, ptr %141, align 8, !tbaa !22
  %143 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %142
  %144 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %143) #7
  %145 = trunc i64 %144 to i32
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %171

147:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %148 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %149 = load i64, ptr %148, align 8, !tbaa !22
  %150 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %149
  %151 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %150) #7
  %152 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %154 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr noundef nonnull align 8 dereferenceable(16) %153)
  %155 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %156 = extractvalue { ptr, i8 } %154, 0
  store ptr %156, ptr %155, align 8
  %157 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %158 = extractvalue { ptr, i8 } %154, 1
  store i8 %158, ptr %157, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  %159 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %160 = load i64, ptr %159, align 8, !tbaa !22
  %161 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %160
  %162 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %163 = load i64, ptr %162, align 8, !tbaa !22
  %164 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %163
  %165 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %164) #7
  %166 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  store ptr %165, ptr %166, align 8
  %167 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8
  %169 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %161, ptr %168)
  %170 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %169, ptr %170, align 8
  br label %171

171:                                              ; preds = %147, %123
  %172 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) @pre, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %82, !llvm.loop !27

173:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %186, %173
  %175 = load i32, ptr %26, align 4, !tbaa !5
  %176 = load i32, ptr @N, align 4, !tbaa !5
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %189

179:                                              ; preds = %174
  %180 = load i32, ptr %26, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100000 x i64], ptr @ans, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !26
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %183)
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef @.str.8)
  br label %186

186:                                              ; preds = %179
  %187 = load i32, ptr %26, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %26, align 4, !tbaa !5
  br label %174, !llvm.loop !28

189:                                              ; preds = %178
  %190 = load i32, ptr %1, align 4
  ret i32 %190
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 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)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 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) #4

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

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

; 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) #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS3hsh", !6, i64 0, !11, i64 8, !15, i64 40, !15, i64 64, !15, i64 88}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt6vectorISt4pairIxxESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt4pairIxxESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt4pairIxxESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt4pairIxxESaIS1_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTSSt4pairIxxE", !24, i64 0, !24, i64 8}
!24 = !{!"long long", !7, i64 0}
!25 = !{!23, !24, i64 8}
!26 = !{!24, !24, i64 0}
!27 = distinct !{!27, !20}
!28 = distinct !{!28, !20}


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

%struct.hsh = type { i32, %"class.std::__cxx11::basic_string", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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>>, cmp>::_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>>, cmp>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.std::basic_ostream" = type { ptr, %"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 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@S = external dso_local local_unnamed_addr global [100000 x %struct.hsh], align 16
@ans = external dso_local local_unnamed_addr global [100000 x i64], align 16
@cur = external dso_local global %"class.std::set", align 8
@todo = external dso_local global [100000 x %"class.std::set"], align 16
@pre = external dso_local global %"struct.std::pair", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3lcpSt4pairIxxES0_(i64, i64, i64, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  tail call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph27, label %._crit_edge28

._crit_edge28:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %13 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %14 = and i64 %13, 4294967295
  %.not29 = icmp eq i64 %14, 0
  br i1 %.not29, label %.preheader, label %.lr.ph31

.lr.ph31:                                         ; preds = %._crit_edge28
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  br label %45

.lr.ph27:                                         ; preds = %0, %._crit_edge
  %15 = phi i32 [ %30, %._crit_edge ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100000 x %struct.hsh], ptr @S, i64 0, i64 %16
  %18 = load i32, ptr %17, align 16, !tbaa !9
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph27
  %.lcssa = phi i64 [ %16, %.lr.ph27 ], [ %39, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %20 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %.lcssa
  %21 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %20) #7
  store ptr %21, ptr %4, align 8
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %23 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr noundef nonnull align 8 dereferenceable(16) %22)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %25
  %27 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  %28 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr %27)
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %1, align 4, !tbaa !5
  %31 = load i32, ptr @N, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %.lr.ph27, label %._crit_edge28, !llvm.loop !19

.lr.ph:                                           ; preds = %.lr.ph27, %.lr.ph
  %33 = phi i64 [ %39, %.lr.ph ], [ %16, %.lr.ph27 ]
  %34 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZNSt4pairIxxEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %35 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %34, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100000 x %struct.hsh], ptr @S, i64 0, i64 %39
  %41 = load i32, ptr %40, align 16, !tbaa !9
  %42 = icmp slt i32 %37, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !21

.preheader:                                       ; preds = %85, %._crit_edge28
  %43 = load i32, ptr @N, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph33, label %._crit_edge34

45:                                               ; preds = %.lr.ph31, %85
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %46 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  store ptr %46, ptr %6, align 8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %47, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %48 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %49 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %.sroa.010.0.copyload = load i64, ptr @pre, align 8
  %.sroa.211.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @pre, i64 8), align 8
  %.sroa.08.0.copyload = load i64, ptr %5, align 8
  %.sroa.29.0.copyload = load i64, ptr %.sroa.29.0..sroa_idx, align 8
  %50 = call noundef i32 @_Z3lcpSt4pairIxxES0_(i64 %.sroa.010.0.copyload, i64 %.sroa.211.0.copyload, i64 %.sroa.08.0.copyload, i64 %.sroa.29.0.copyload)
  store i32 %50, ptr %7, align 4, !tbaa !5
  %51 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %52 = and i64 %51, 4294967295
  %.not21 = icmp eq i64 %52, 0
  br i1 %.not21, label %._crit_edge37, label %53

._crit_edge37:                                    ; preds = %45
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %59

53:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %.sroa.06.0.copyload = load i64, ptr %5, align 8
  %.sroa.27.0.copyload = load i64, ptr %.sroa.29.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %54 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  store ptr %54, ptr %9, align 8
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %.sroa.05.0.copyload = load i64, ptr %55, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %55, i64 8
  %.sroa.2.0.copyload = load i64, ptr %.sroa.2.0..sroa_idx, align 8
  %56 = call noundef i32 @_Z3lcpSt4pairIxxES0_(i64 %.sroa.06.0.copyload, i64 %.sroa.27.0.copyload, i64 %.sroa.05.0.copyload, i64 %.sroa.2.0.copyload)
  store i32 %56, ptr %8, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %59

59:                                               ; preds = %._crit_edge37, %53
  %60 = phi i32 [ %.pre, %._crit_edge37 ], [ %58, %53 ]
  %61 = load i64, ptr %5, align 8, !tbaa !22
  %62 = getelementptr inbounds [100000 x %struct.hsh], ptr @S, i64 0, i64 %61
  %63 = load i32, ptr %62, align 16, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = load i64, ptr %.sroa.29.0..sroa_idx, align 8, !tbaa !25
  %66 = sext i32 %60 to i64
  %67 = getelementptr inbounds [100000 x i64], ptr @ans, i64 0, i64 %61
  %68 = load i64, ptr %67, align 8, !tbaa !26
  %69 = add i64 %65, %66
  %70 = sub i64 %64, %69
  %71 = add nsw i64 %70, %68
  store i64 %71, ptr %67, align 8, !tbaa !26
  %72 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %61
  %73 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %72) #7
  %74 = and i64 %73, 4294967295
  %.not22 = icmp eq i64 %74, 0
  br i1 %.not22, label %85, label %75

75:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %76 = load i64, ptr %5, align 8, !tbaa !22
  %77 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %76
  %78 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %77) #7
  store ptr %78, ptr %10, align 8
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %80 = call { ptr, i8 } @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) @cur, ptr noundef nonnull align 8 dereferenceable(16) %79)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %81 = load i64, ptr %5, align 8, !tbaa !22
  %82 = getelementptr inbounds [100000 x %"class.std::set"], ptr @todo, i64 0, i64 %81
  %83 = call ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %82) #7
  %84 = call ptr @_ZNSt3setISt4pairIxxE3cmpSaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %82, ptr %83)
  br label %85

85:                                               ; preds = %75, %59
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) @pre, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %87 = call noundef i64 @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @cur) #7
  %88 = and i64 %87, 4294967295
  %.not = icmp eq i64 %88, 0
  br i1 %.not, label %.preheader, label %45, !llvm.loop !27

._crit_edge34:                                    ; preds = %.lr.ph33, %.preheader
  ret i32 0

.lr.ph33:                                         ; preds = %.preheader, %.lr.ph33
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph33 ], [ 0, %.preheader ]
  %89 = getelementptr inbounds [100000 x i64], ptr @ans, i64 0, i64 %indvars.iv
  %90 = load i64, ptr %89, align 8, !tbaa !26
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @.str.8)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %93 = load i32, ptr @N, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next, %94
  br i1 %95, label %.lr.ph33, label %._crit_edge34, !llvm.loop !28
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIxxE3cmpSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 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 #3 align 2

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

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

; Function Attrs: mustprogress 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) #4

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

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

; 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 #6

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS3hsh", !6, i64 0, !11, i64 8, !15, i64 40, !15, i64 64, !15, i64 88}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt6vectorISt4pairIxxESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt4pairIxxESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt4pairIxxESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt4pairIxxESaIS1_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTSSt4pairIxxE", !24, i64 0, !24, i64 8}
!24 = !{!"long long", !7, i64 0}
!25 = !{!23, !24, i64 8}
!26 = !{!24, !24, i64 0}
!27 = distinct !{!27, !20}
!28 = distinct !{!28, !20}


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