; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2014-15/Jan 2015 Gold (15 Jan G2)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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" }
%"class.std::locale" = type { ptr }
%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 }
%"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::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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair.3" = type { i32, %"class.std::set" }

@N = external dso_local global i32, align 4
@L = external dso_local global i32, align 4
@dp = external dso_local global [1048576 x i32], align 16
@ans = external dso_local global i32, align 4
@movies = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 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 %"class.std::basic_ifstream", align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::set", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::pair.3", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #8
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.2, i32 noundef 16)
          to label %24 unwind label %34

24:                                               ; preds = %0
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @N)
          to label %26 unwind label %38

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) @L)
          to label %28 unwind label %38

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

29:                                               ; preds = %75, %28
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = load i32, ptr @N, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %42, label %33

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

34:                                               ; preds = %0
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %4, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %5, align 4
  br label %248

38:                                               ; preds = %241, %238, %26, %24
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %4, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %5, align 4
  br label %247

42:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %44 unwind label %52

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %46 unwind label %52

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %65, %46
  %48 = load i32, ptr %11, align 4, !tbaa !5
  %49 = load i32, ptr %9, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %56, label %51

51:                                               ; preds = %47
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %72

52:                                               ; preds = %44, %42
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  br label %88

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %58 unwind label %68

58:                                               ; preds = %56
  %59 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %60 unwind label %68

60:                                               ; preds = %58
  %61 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %62 = extractvalue { ptr, i8 } %59, 0
  store ptr %62, ptr %61, align 8
  %63 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %64 = extractvalue { ptr, i8 } %59, 1
  store i8 %64, ptr %63, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %65

65:                                               ; preds = %60
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %11, align 4, !tbaa !5
  br label %47, !llvm.loop !9

68:                                               ; preds = %58, %56
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %87

72:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #8
  invoke void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEEC2IRiRS4_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %73 unwind label %78

73:                                               ; preds = %72
  invoke void @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @movies, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %74 unwind label %82

74:                                               ; preds = %73
  call void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %6, align 4, !tbaa !5
  br label %29, !llvm.loop !11

78:                                               ; preds = %72
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %4, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %5, align 4
  br label %86

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %4, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %5, align 4
  call void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  br label %86

86:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #8
  br label %87

87:                                               ; preds = %86, %68
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #8
  br label %88

88:                                               ; preds = %87, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %247

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

90:                                               ; preds = %100, %89
  %91 = load i32, ptr %15, align 4, !tbaa !5
  %92 = load i32, ptr @N, align 4, !tbaa !5
  %93 = shl i32 1, %92
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %90
  %97 = load i32, ptr %15, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %98
  store i32 -1, ptr %99, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %96
  %101 = load i32, ptr %15, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %15, align 4, !tbaa !5
  br label %90, !llvm.loop !12

103:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %231, %103
  %105 = load i32, ptr %16, align 4, !tbaa !5
  %106 = load i32, ptr @N, align 4, !tbaa !5
  %107 = shl i32 1, %106
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %104
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %235

110:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %196, %110
  %112 = load i32, ptr %18, align 4, !tbaa !5
  %113 = load i32, ptr @N, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %199

116:                                              ; preds = %111
  %117 = load i32, ptr %16, align 4, !tbaa !5
  %118 = load i32, ptr %18, align 4, !tbaa !5
  %119 = shl i32 1, %118
  %120 = and i32 %117, %119
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %195

122:                                              ; preds = %116
  %123 = load i32, ptr %17, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %17, align 4, !tbaa !5
  %125 = load i32, ptr %16, align 4, !tbaa !5
  %126 = load i32, ptr %18, align 4, !tbaa !5
  %127 = shl i32 1, %126
  %128 = xor i32 %125, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = icmp eq i32 %131, -1
  br i1 %132, label %133, label %134

133:                                              ; preds = %122
  br label %196

134:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %136) #8
  %138 = getelementptr inbounds %"struct.std::pair.3", ptr %137, i32 0, i32 1
  %139 = load i32, ptr %16, align 4, !tbaa !5
  %140 = load i32, ptr %18, align 4, !tbaa !5
  %141 = shl i32 1, %140
  %142 = xor i32 %139, %141
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %143
  %145 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %138, ptr noundef nonnull align 4 dereferenceable(4) %144)
          to label %146 unwind label %156

146:                                              ; preds = %134
  %147 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %145, ptr %147, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %148 = load i32, ptr %18, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %149) #8
  %151 = getelementptr inbounds %"struct.std::pair.3", ptr %150, i32 0, i32 1
  %152 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %151) #8
  %153 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  %154 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br i1 %154, label %155, label %160

155:                                              ; preds = %146
  store i32 16, ptr %7, align 4
  br label %183

156:                                              ; preds = %134
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %4, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %5, align 4
  br label %194

160:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %19, i64 8, i1 false), !tbaa.struct !13
  %161 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = invoke ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr %162, i64 noundef 1)
          to label %164 unwind label %186

164:                                              ; preds = %160
  %165 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %21, i32 0, i32 0
  store ptr %163, ptr %165, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %21, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  %166 = load i32, ptr %16, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr %18, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %172) #8
  %174 = getelementptr inbounds %"struct.std::pair.3", ptr %173, i32 0, i32 0
  %175 = load i32, ptr %174, align 8, !tbaa !16
  %176 = add nsw i32 %170, %175
  store i32 %176, ptr %23, align 4, !tbaa !5
  %177 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %178 unwind label %190

178:                                              ; preds = %164
  %179 = load i32, ptr %177, align 4, !tbaa !5
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %181
  store i32 %179, ptr %182, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  store i32 0, ptr %7, align 4
  br label %183

183:                                              ; preds = %178, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %184 = load i32, ptr %7, align 4
  switch i32 %184, label %254 [
    i32 0, label %185
    i32 16, label %196
  ]

185:                                              ; preds = %183
  br label %195

186:                                              ; preds = %160
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %4, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %194

190:                                              ; preds = %164
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %4, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %194

194:                                              ; preds = %190, %186, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %234

195:                                              ; preds = %185, %116
  br label %196

196:                                              ; preds = %195, %183, %133
  %197 = load i32, ptr %18, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %18, align 4, !tbaa !5
  br label %111, !llvm.loop !27

199:                                              ; preds = %115
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %201
  %203 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %202, ptr noundef nonnull align 4 dereferenceable(4) @L)
          to label %204 unwind label %219

204:                                              ; preds = %199
  %205 = load i32, ptr %203, align 4, !tbaa !5
  %206 = load i32, ptr %16, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %207
  store i32 %205, ptr %208, align 4, !tbaa !5
  %209 = load i32, ptr %16, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = load i32, ptr @L, align 4, !tbaa !5
  %214 = icmp eq i32 %212, %213
  br i1 %214, label %215, label %223

215:                                              ; preds = %204
  %216 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %217 unwind label %219

217:                                              ; preds = %215
  %218 = load i32, ptr %216, align 4, !tbaa !5
  store i32 %218, ptr @ans, align 4, !tbaa !5
  br label %223

219:                                              ; preds = %215, %199
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %4, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %5, align 4
  br label %234

223:                                              ; preds = %217, %204
  %224 = load i32, ptr %16, align 4, !tbaa !5
  %225 = icmp eq i32 %224, 0
  br i1 %225, label %226, label %230

226:                                              ; preds = %223
  %227 = load i32, ptr %16, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %228
  store i32 0, ptr %229, align 4, !tbaa !5
  br label %230

230:                                              ; preds = %226, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %16, align 4, !tbaa !5
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %16, align 4, !tbaa !5
  br label %104, !llvm.loop !28

234:                                              ; preds = %219, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %247

235:                                              ; preds = %109
  %236 = load i32, ptr @ans, align 4, !tbaa !5
  %237 = icmp eq i32 %236, 1000000007
  br i1 %237, label %238, label %241

238:                                              ; preds = %235
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef -1)
          to label %240 unwind label %38

240:                                              ; preds = %238
  br label %245

241:                                              ; preds = %235
  %242 = load i32, ptr @ans, align 4, !tbaa !5
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %242)
          to label %244 unwind label %38

244:                                              ; preds = %241
  br label %245

245:                                              ; preds = %244, %240
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #8
  %246 = load i32, ptr %1, align 4
  ret i32 %246

247:                                              ; preds = %234, %88, %38
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #8
  br label %248

248:                                              ; preds = %247, %34
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #8
  br label %249

249:                                              ; preds = %248
  %250 = load ptr, ptr %4, align 8
  %251 = load i32, ptr %5, align 4
  %252 = insertvalue { ptr, i32 } poison, ptr %250, 0
  %253 = insertvalue { ptr, i32 } %252, i32 %251, 1
  resume { ptr, i32 } %253

254:                                              ; preds = %183
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr, i64 noundef) #6

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

; 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 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{i64 0, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIiSt3setIiSt4lessIiESaIiEEE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessIiE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !26, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::set<int>>, std::allocator<std::pair<int, std::set<int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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" }
%"class.std::locale" = type { ptr }
%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 }
%"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::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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair.3" = type { i32, %"class.std::set" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@L = external dso_local global i32, align 4
@dp = external dso_local global [1048576 x i32], align 16
@ans = external dso_local global i32, align 4
@movies = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 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 %"class.std::basic_ifstream", align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::set", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair.3", align 8
  %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
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #8
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.2, i32 noundef 16)
          to label %12 unwind label %18

12:                                               ; preds = %0
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @N)
          to label %14 unwind label %20

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @L)
          to label %.preheader52 unwind label %20

.preheader52:                                     ; preds = %14
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph59, label %.lr.ph67.preheader

.preheader51:                                     ; preds = %40
  %.not69 = icmp eq i32 %42, 31
  br i1 %.not69, label %._crit_edge68, label %.lr.ph67.preheader

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %122

20:                                               ; preds = %._crit_edge68, %14, %12
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %121

.lr.ph59:                                         ; preds = %.preheader52, %40
  %.04058 = phi i32 [ %41, %40 ], [ 0, %.preheader52 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %23 unwind label %28

23:                                               ; preds = %.lr.ph59
  %24 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %25 unwind label %28

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %33, %25
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #8
  invoke void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEEC2IRiRS4_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %39 unwind label %44

28:                                               ; preds = %23, %.lr.ph59
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %50

.lr.ph:                                           ; preds = %25, %33
  %.04157 = phi i32 [ %34, %33 ], [ 0, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %31 unwind label %37

31:                                               ; preds = %.lr.ph
  %32 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %33 unwind label %37

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %34 = add nuw nsw i32 %.04157, 1
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !9

37:                                               ; preds = %31, %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %49

39:                                               ; preds = %._crit_edge
  invoke void @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24) @movies, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %40 unwind label %46

40:                                               ; preds = %39
  call void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %41 = add nuw nsw i32 %.04058, 1
  %42 = load i32, ptr @N, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %.lr.ph59, label %.preheader51, !llvm.loop !11

44:                                               ; preds = %._crit_edge
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %39
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt3setIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  br label %48

48:                                               ; preds = %46, %44
  %.pn44 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  br label %49

49:                                               ; preds = %48, %37
  %.pn46 = phi { ptr, i32 } [ %38, %37 ], [ %.pn44, %48 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  br label %50

50:                                               ; preds = %49, %28
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %49 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %121

.lr.ph67.preheader:                               ; preds = %.preheader52, %.preheader51
  %51 = phi i32 [ %42, %.preheader51 ], [ %16, %.preheader52 ]
  %52 = shl nuw nsw i32 1, %51
  %53 = zext nneg i32 %52 to i64
  %54 = shl nuw nsw i64 %53, 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @dp, i8 -1, i64 %54, i1 false), !tbaa !5
  br label %.lr.ph67

._crit_edge68:                                    ; preds = %115, %.preheader51
  %55 = load i32, ptr @ans, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 1000000007
  %. = select i1 %56, i32 -1, i32 %55
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %.)
          to label %120 unwind label %20

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %115
  %58 = phi i32 [ %51, %.lr.ph67.preheader ], [ %116, %115 ]
  %indvars.iv74 = phi i64 [ 0, %.lr.ph67.preheader ], [ %indvars.iv.next75, %115 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %.lr.ph67
  %60 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv74
  %61 = trunc nuw nsw i64 %indvars.iv74 to i32
  br label %67

._crit_edge65:                                    ; preds = %105, %.lr.ph67
  %62 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv74
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(4) @L)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %62, align 4, !tbaa !5
  %65 = load i32, ptr @L, align 4, !tbaa !5
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %109, label %112

67:                                               ; preds = %.lr.ph64, %105
  %68 = phi i32 [ %58, %.lr.ph64 ], [ %106, %105 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph64 ], [ %indvars.iv.next, %105 ]
  %69 = trunc nuw nsw i64 %indvars.iv to i32
  %70 = shl nuw i32 1, %69
  %71 = and i32 %70, %61
  %.not = icmp eq i32 %71, 0
  br i1 %.not, label %105, label %72

72:                                               ; preds = %67
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %8, align 4, !tbaa !5
  %75 = xor i32 %70, %61
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %105, label %80

80:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %81 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %indvars.iv) #8
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %82, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %84 unwind label %89

84:                                               ; preds = %80
  store ptr %83, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %85 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %indvars.iv) #8
  %86 = getelementptr inbounds i8, ptr %85, i64 8
  %87 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %86) #8
  store ptr %87, ptr %10, align 8
  %88 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br i1 %88, label %101, label %91

89:                                               ; preds = %80
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %104

91:                                               ; preds = %84
  %.sroa.0.0.copyload = load ptr, ptr %9, align 8, !tbaa !12
  %92 = invoke ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr %.sroa.0.0.copyload, i64 noundef 1)
          to label %93 unwind label %102

93:                                               ; preds = %91
  store ptr %92, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @movies, i64 noundef %indvars.iv) #8
  %97 = load i32, ptr %96, align 8, !tbaa !14
  %98 = add nsw i32 %97, %95
  store i32 %98, ptr %11, align 4, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %100 = load i32, ptr %99, align 4, !tbaa !5
  store i32 %100, ptr %60, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %101

101:                                              ; preds = %84, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %105

102:                                              ; preds = %91
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %104

104:                                              ; preds = %102, %89
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %121

105:                                              ; preds = %101, %67, %72
  %106 = phi i32 [ %.pre, %101 ], [ %68, %67 ], [ %68, %72 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next, %107
  br i1 %108, label %67, label %._crit_edge65, !llvm.loop !25

109:                                              ; preds = %._crit_edge65
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr @ans, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %109, %._crit_edge65
  %113 = icmp eq i64 %indvars.iv74, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  store i32 0, ptr %62, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %114, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %116 = load i32, ptr @N, align 4, !tbaa !5
  %117 = shl nuw i32 1, %116
  %118 = sext i32 %117 to i64
  %119 = icmp slt i64 %indvars.iv.next75, %118
  br i1 %119, label %.lr.ph67, label %._crit_edge68, !llvm.loop !26

120:                                              ; preds = %._crit_edge68
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #8
  ret i32 0

121:                                              ; preds = %104, %50, %20
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %50 ], [ %.pn, %104 ], [ %21, %20 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #8
  br label %122

122:                                              ; preds = %121, %18
  %.pn46.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn, %121 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn46.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EE9push_backEOS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt4pairIiSt3setIiSt4lessIiESaIiEEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr, i64 noundef) local_unnamed_addr #6

; 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 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIiSt3setIiSt4lessIiESaIiEEE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessIiE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !24, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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