; LLVM IR from eyangch/competitive-programming :: Codeforces/1516 (d)

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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = 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
@Q = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@rch = external dso_local global [100000 x i32], align 16
@depth = external dso_local global [100001 x i32], align 16
@up = external dso_local global [20 x [100001 x i32]], align 16
@sieve = external dso_local global [100001 x i8], align 16
@pf = external dso_local global [100000 x %"class.std::set"], align 16
@graph = external dso_local global [100001 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"class.std::set", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair", align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %34 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %36
  %38 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef null)
  %39 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  store i8 1, ptr %2, align 1, !tbaa !8
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef getelementptr inbounds (i8, ptr @sieve, i64 2), ptr noundef getelementptr inbounds (i8, ptr @sieve, i64 100001), ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 2, ptr %3, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %67, %0
  %41 = load i32, ptr %3, align 4, !tbaa !11
  %42 = icmp sle i32 %41, 100000
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %70

44:                                               ; preds = %40
  %45 = load i32, ptr %3, align 4, !tbaa !11
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !8, !range !13, !noundef !14
  %49 = trunc i8 %48 to i1
  br i1 %49, label %50, label %66

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %51 = load i32, ptr %3, align 4, !tbaa !11
  %52 = mul nsw i32 2, %51
  store i32 %52, ptr %5, align 4, !tbaa !11
  br label %53

53:                                               ; preds = %61, %50
  %54 = load i32, ptr %5, align 4, !tbaa !11
  %55 = icmp sle i32 %54, 100000
  br i1 %55, label %57, label %56

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

57:                                               ; preds = %53
  %58 = load i32, ptr %5, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %59
  store i8 0, ptr %60, align 1, !tbaa !8
  br label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %3, align 4, !tbaa !11
  %63 = load i32, ptr %5, align 4, !tbaa !11
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %5, align 4, !tbaa !11
  br label %53, !llvm.loop !15

65:                                               ; preds = %56
  br label %66

66:                                               ; preds = %65, %44
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %3, align 4, !tbaa !11
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %3, align 4, !tbaa !11
  br label %40, !llvm.loop !17

70:                                               ; preds = %43
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %73

73:                                               ; preds = %138, %70
  %74 = load i32, ptr %6, align 4, !tbaa !11
  %75 = load i32, ptr @N, align 4, !tbaa !11
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %141

78:                                               ; preds = %73
  %79 = load i32, ptr %6, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %80
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %81)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %83 = load i32, ptr %6, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !11
  store i32 %86, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 2, ptr %8, align 4, !tbaa !11
  br label %87

87:                                               ; preds = %122, %78
  %88 = load i32, ptr %8, align 4, !tbaa !11
  %89 = load i32, ptr %8, align 4, !tbaa !11
  %90 = mul nsw i32 %88, %89
  %91 = load i32, ptr %6, align 4, !tbaa !11
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !11
  %95 = icmp sle i32 %90, %94
  br i1 %95, label %97, label %96

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

97:                                               ; preds = %87
  %98 = load i32, ptr %7, align 4, !tbaa !11
  %99 = load i32, ptr %8, align 4, !tbaa !11
  %100 = srem i32 %98, %99
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %97
  br label %122

103:                                              ; preds = %97
  %104 = load i32, ptr %6, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %105
  %107 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %108 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %109 = extractvalue { ptr, i8 } %107, 0
  store ptr %109, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %111 = extractvalue { ptr, i8 } %107, 1
  store i8 %111, ptr %110, align 8
  br label %112

112:                                              ; preds = %117, %103
  %113 = load i32, ptr %7, align 4, !tbaa !11
  %114 = load i32, ptr %8, align 4, !tbaa !11
  %115 = srem i32 %113, %114
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %121

117:                                              ; preds = %112
  %118 = load i32, ptr %8, align 4, !tbaa !11
  %119 = load i32, ptr %7, align 4, !tbaa !11
  %120 = sdiv i32 %119, %118
  store i32 %120, ptr %7, align 4, !tbaa !11
  br label %112, !llvm.loop !18

121:                                              ; preds = %112
  br label %122

122:                                              ; preds = %121, %102
  %123 = load i32, ptr %8, align 4, !tbaa !11
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !11
  br label %87, !llvm.loop !19

125:                                              ; preds = %96
  %126 = load i32, ptr %7, align 4, !tbaa !11
  %127 = icmp sgt i32 %126, 1
  br i1 %127, label %128, label %137

128:                                              ; preds = %125
  %129 = load i32, ptr %6, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %130
  %132 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %131, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %133 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %134 = extractvalue { ptr, i8 } %132, 0
  store ptr %134, ptr %133, align 8
  %135 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %136 = extractvalue { ptr, i8 } %132, 1
  store i8 %136, ptr %135, align 8
  br label %137

137:                                              ; preds = %128, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %6, align 4, !tbaa !11
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %6, align 4, !tbaa !11
  br label %73, !llvm.loop !20

141:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %142

142:                                              ; preds = %255, %141
  %143 = load i32, ptr %12, align 4, !tbaa !11
  %144 = load i32, ptr @N, align 4, !tbaa !11
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %259

147:                                              ; preds = %142
  br label %148

148:                                              ; preds = %216, %147
  %149 = load i32, ptr %13, align 4, !tbaa !11
  %150 = load i32, ptr @N, align 4, !tbaa !11
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %152, label %218

152:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  store i8 1, ptr %14, align 1, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %153 = load i32, ptr %13, align 4, !tbaa !11
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %154
  store ptr %155, ptr %15, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %156 = load ptr, ptr %15, align 8, !tbaa !21
  %157 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %156) #6
  %158 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %159 = load ptr, ptr %15, align 8, !tbaa !21
  %160 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %159) #6
  %161 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %160, ptr %161, align 8
  br label %162

162:                                              ; preds = %177, %152
  %163 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %163, label %165, label %164

164:                                              ; preds = %162
  store i32 21, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %179

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %167 = load i32, ptr %166, align 4, !tbaa !11
  store i32 %167, ptr %18, align 4, !tbaa !11
  %168 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %169 unwind label %172

169:                                              ; preds = %165
  %170 = icmp ne i64 %168, 0
  br i1 %170, label %171, label %176

171:                                              ; preds = %169
  store i8 0, ptr %14, align 1, !tbaa !8
  br label %176

172:                                              ; preds = %165
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %19, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %217

176:                                              ; preds = %171, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %177

177:                                              ; preds = %176
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %162

179:                                              ; preds = %164
  %180 = load i8, ptr %14, align 1, !tbaa !8, !range !13, !noundef !14
  %181 = trunc i8 %180 to i1
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  store i32 20, ptr %4, align 4
  br label %214

183:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %184 = load i32, ptr %13, align 4, !tbaa !11
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %185
  store ptr %186, ptr %21, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %187 = load ptr, ptr %21, align 8, !tbaa !21
  %188 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %187) #6
  %189 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %190 = load ptr, ptr %21, align 8, !tbaa !21
  %191 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %190) #6
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  br label %193

193:                                              ; preds = %205, %183
  %194 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %194, label %196, label %195

195:                                              ; preds = %193
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %211

196:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %198 = load i32, ptr %197, align 4, !tbaa !11
  store i32 %198, ptr %24, align 4, !tbaa !11
  %199 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %200 unwind label %207

200:                                              ; preds = %196
  %201 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 0
  %202 = extractvalue { ptr, i8 } %199, 0
  store ptr %202, ptr %201, align 8
  %203 = getelementptr inbounds { ptr, i8 }, ptr %25, i32 0, i32 1
  %204 = extractvalue { ptr, i8 } %199, 1
  store i8 %204, ptr %203, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %205

205:                                              ; preds = %200
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %193

207:                                              ; preds = %196
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %19, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %217

211:                                              ; preds = %195
  %212 = load i32, ptr %13, align 4, !tbaa !11
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %13, align 4, !tbaa !11
  store i32 0, ptr %4, align 4
  br label %214

214:                                              ; preds = %211, %182
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %215 = load i32, ptr %4, align 4
  switch i32 %215, label %340 [
    i32 0, label %216
    i32 20, label %218
  ]

216:                                              ; preds = %214
  br label %148, !llvm.loop !23

217:                                              ; preds = %207, %172
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %258

218:                                              ; preds = %214, %148
  %219 = load i32, ptr %13, align 4, !tbaa !11
  %220 = load i32, ptr %12, align 4, !tbaa !11
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100000 x i32], ptr @rch, i64 0, i64 %221
  store i32 %219, ptr %222, align 4, !tbaa !11
  %223 = load i32, ptr %13, align 4, !tbaa !11
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @graph, i64 0, i64 %224
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %225, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %226 unwind label %239

226:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %227 = load i32, ptr %12, align 4, !tbaa !11
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %228
  store ptr %229, ptr %26, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %230 = load ptr, ptr %26, align 8, !tbaa !21
  %231 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %230) #6
  %232 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %231, ptr %232, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %233 = load ptr, ptr %26, align 8, !tbaa !21
  %234 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %233) #6
  %235 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %234, ptr %235, align 8
  br label %236

236:                                              ; preds = %248, %226
  %237 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br i1 %237, label %243, label %238

238:                                              ; preds = %236
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %254

239:                                              ; preds = %218
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %19, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %20, align 4
  br label %258

243:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %244 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %245 = load i32, ptr %244, align 4, !tbaa !11
  store i32 %245, ptr %29, align 4, !tbaa !11
  %246 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %247 unwind label %250

247:                                              ; preds = %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %248

248:                                              ; preds = %247
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  br label %236

250:                                              ; preds = %243
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %19, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %258

254:                                              ; preds = %238
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %12, align 4, !tbaa !11
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %12, align 4, !tbaa !11
  br label %142, !llvm.loop !24

258:                                              ; preds = %250, %239, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %334

259:                                              ; preds = %146
  %260 = load i32, ptr @N, align 4, !tbaa !11
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [100001 x i32], ptr @depth, i64 0, i64 %261
  store i32 0, ptr %262, align 4, !tbaa !11
  %263 = load i32, ptr @N, align 4, !tbaa !11
  %264 = load i32, ptr @N, align 4, !tbaa !11
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [100001 x i32], ptr @up, i64 0, i64 %265
  store i32 %263, ptr %266, align 4, !tbaa !11
  %267 = load i32, ptr @N, align 4, !tbaa !11
  invoke void @_Z3dfsi(i32 noundef %267)
          to label %268 unwind label %286

268:                                              ; preds = %259
  br label %269

269:                                              ; preds = %326, %268
  %270 = load i32, ptr @Q, align 4, !tbaa !11
  %271 = add nsw i32 %270, -1
  store i32 %271, ptr @Q, align 4, !tbaa !11
  %272 = icmp ne i32 %270, 0
  br i1 %272, label %273, label %332

273:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %274 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %275 unwind label %290

275:                                              ; preds = %273
  %276 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %274, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %277 unwind label %290

277:                                              ; preds = %275
  %278 = load i32, ptr %30, align 4, !tbaa !11
  %279 = add nsw i32 %278, -1
  store i32 %279, ptr %30, align 4, !tbaa !11
  %280 = load i32, ptr %31, align 4, !tbaa !11
  %281 = add nsw i32 %280, -1
  store i32 %281, ptr %31, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 19, ptr %33, align 4, !tbaa !11
  br label %282

282:                                              ; preds = %317, %277
  %283 = load i32, ptr %33, align 4, !tbaa !11
  %284 = icmp sge i32 %283, 0
  br i1 %284, label %294, label %285

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

286:                                              ; preds = %259
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %19, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %20, align 4
  br label %334

290:                                              ; preds = %275, %273
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %19, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %20, align 4
  br label %331

294:                                              ; preds = %282
  %295 = load i32, ptr %33, align 4, !tbaa !11
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 %296
  %298 = load i32, ptr %30, align 4, !tbaa !11
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [100001 x i32], ptr %297, i64 0, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !11
  %302 = load i32, ptr %31, align 4, !tbaa !11
  %303 = icmp sle i32 %301, %302
  br i1 %303, label %304, label %316

304:                                              ; preds = %294
  %305 = load i32, ptr %33, align 4, !tbaa !11
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 %306
  %308 = load i32, ptr %30, align 4, !tbaa !11
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [100001 x i32], ptr %307, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !11
  store i32 %311, ptr %30, align 4, !tbaa !11
  %312 = load i32, ptr %33, align 4, !tbaa !11
  %313 = shl i32 1, %312
  %314 = load i32, ptr %32, align 4, !tbaa !11
  %315 = add nsw i32 %314, %313
  store i32 %315, ptr %32, align 4, !tbaa !11
  br label %316

316:                                              ; preds = %304, %294
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %33, align 4, !tbaa !11
  %319 = add nsw i32 %318, -1
  store i32 %319, ptr %33, align 4, !tbaa !11
  br label %282, !llvm.loop !25

320:                                              ; preds = %285
  %321 = load i32, ptr %32, align 4, !tbaa !11
  %322 = add nsw i32 %321, 1
  %323 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %322)
          to label %324 unwind label %327

324:                                              ; preds = %320
  %325 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %323, ptr noundef @.str)
          to label %326 unwind label %327

326:                                              ; preds = %324
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %269, !llvm.loop !26

327:                                              ; preds = %324, %320
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %19, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %331

331:                                              ; preds = %327, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %334

332:                                              ; preds = %269
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #6
  %333 = load i32, ptr %1, align 4
  ret i32 %333

334:                                              ; preds = %331, %286, %258
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #6
  br label %335

335:                                              ; preds = %334
  %336 = load ptr, ptr %19, align 8
  %337 = load i32, ptr %20, align 4
  %338 = insertvalue { ptr, i32 } poison, ptr %336, 0
  %339 = insertvalue { ptr, i32 } %338, i32 %337, 1
  resume { ptr, i32 } %339

340:                                              ; preds = %214
  unreachable
}

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@Q = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@rch = external dso_local local_unnamed_addr global [100000 x i32], align 16
@depth = external dso_local local_unnamed_addr global [100001 x i32], align 16
@up = external dso_local local_unnamed_addr global [20 x [100001 x i32]], align 16
@sieve = external dso_local global [100001 x i8], align 16
@pf = external dso_local global [100000 x %"class.std::set"], align 16
@graph = external dso_local global [100001 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i8, align 1
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::set", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", 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
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #6
  store i8 1, ptr %1, align 1, !tbaa !8
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @sieve, i64 2), ptr noundef nonnull getelementptr inbounds (i8, ptr @sieve, i64 100001), ptr noundef nonnull align 1 dereferenceable(1) %1)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #6
  br label %28

23:                                               ; preds = %.loopexit74
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  %26 = load i32, ptr @N, align 4, !tbaa !11
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph92, label %._crit_edge93

28:                                               ; preds = %.loopexit74.1, %0
  %indvars.iv121 = phi i64 [ 2, %0 ], [ %indvars.iv.next122.1, %.loopexit74.1 ]
  %indvars.iv = phi i64 [ 4, %0 ], [ %indvars.iv.next.1, %.loopexit74.1 ]
  %29 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %indvars.iv121
  %30 = load i8, ptr %29, align 2, !tbaa !8, !range !13, !noundef !14
  %31 = trunc nuw i8 %30 to i1
  %32 = icmp ult i64 %indvars.iv121, 50001
  %or.cond = and i1 %32, %31
  br i1 %or.cond, label %.lr.ph, label %.loopexit74

.lr.ph:                                           ; preds = %28, %.lr.ph
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.lr.ph ], [ %indvars.iv, %28 ]
  %33 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %indvars.iv123
  store i8 0, ptr %33, align 2, !tbaa !8
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, %indvars.iv121
  %34 = icmp ult i64 %indvars.iv.next124, 100001
  br i1 %34, label %.lr.ph, label %.loopexit74, !llvm.loop !15

.loopexit74:                                      ; preds = %.lr.ph, %28
  %indvars.iv.next122 = or disjoint i64 %indvars.iv121, 1
  %indvars.iv.next = or disjoint i64 %indvars.iv, 2
  %exitcond.not = icmp eq i64 %indvars.iv121, 100000
  br i1 %exitcond.not, label %23, label %35, !llvm.loop !17

35:                                               ; preds = %.loopexit74
  %36 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %indvars.iv.next122
  %37 = load i8, ptr %36, align 1, !tbaa !8, !range !13, !noundef !14
  %38 = trunc nuw i8 %37 to i1
  %39 = icmp ult i64 %indvars.iv.next122, 50001
  %or.cond.1 = and i1 %39, %38
  br i1 %or.cond.1, label %.lr.ph.1, label %.loopexit74.1

.lr.ph.1:                                         ; preds = %35, %.lr.ph.1
  %indvars.iv123.1 = phi i64 [ %indvars.iv.next124.1, %.lr.ph.1 ], [ %indvars.iv.next, %35 ]
  %40 = getelementptr inbounds [100001 x i8], ptr @sieve, i64 0, i64 %indvars.iv123.1
  store i8 0, ptr %40, align 1, !tbaa !8
  %indvars.iv.next124.1 = add nuw nsw i64 %indvars.iv123.1, %indvars.iv.next122
  %41 = icmp ult i64 %indvars.iv.next124.1, 100001
  br i1 %41, label %.lr.ph.1, label %.loopexit74.1, !llvm.loop !15

.loopexit74.1:                                    ; preds = %.lr.ph.1, %35
  %indvars.iv.next122.1 = add nuw nsw i64 %indvars.iv121, 2
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 4
  br label %28

._crit_edge93:                                    ; preds = %70, %23
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  %42 = load i32, ptr @N, align 4, !tbaa !11
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.preheader73, label %._crit_edge110

.lr.ph92:                                         ; preds = %23, %70
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %70 ], [ 0, %23 ]
  %44 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv127
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %46 = load i32, ptr %44, align 4, !tbaa !11
  store i32 %46, ptr %2, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 2, ptr %3, align 4, !tbaa !11
  %.not6887 = icmp slt i32 %46, 4
  br i1 %.not6887, label %._crit_edge, label %.lr.ph89

.lr.ph89:                                         ; preds = %.lr.ph92
  %47 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %indvars.iv127
  br label %50

._crit_edge:                                      ; preds = %.loopexit, %.lr.ph92
  %48 = phi i32 [ %46, %.lr.ph92 ], [ %63, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %49 = icmp sgt i32 %48, 1
  br i1 %49, label %67, label %70

50:                                               ; preds = %.lr.ph89, %.loopexit
  %51 = phi i32 [ %46, %.lr.ph89 ], [ %63, %.loopexit ]
  %storemerge6788 = phi i32 [ 2, %.lr.ph89 ], [ %64, %.loopexit ]
  %52 = srem i32 %51, %storemerge6788
  %.not69 = icmp eq i32 %52, 0
  br i1 %.not69, label %53, label %.loopexit

53:                                               ; preds = %50
  %54 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %47, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %55 = load i32, ptr %3, align 4, !tbaa !11
  %.promoted = load i32, ptr %2, align 4, !tbaa !11
  %56 = srem i32 %.promoted, %55
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %.lr.ph85, label %.loopexit

.lr.ph85:                                         ; preds = %53, %.lr.ph85
  %58 = phi i32 [ %59, %.lr.ph85 ], [ %.promoted, %53 ]
  %59 = sdiv i32 %58, %55
  %60 = srem i32 %59, %55
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %.lr.ph85, label %..loopexit_crit_edge, !llvm.loop !18

..loopexit_crit_edge:                             ; preds = %.lr.ph85
  store i32 %59, ptr %2, align 4, !tbaa !11
  br label %.loopexit

.loopexit:                                        ; preds = %53, %..loopexit_crit_edge, %50
  %62 = phi i32 [ %55, %53 ], [ %55, %..loopexit_crit_edge ], [ %storemerge6788, %50 ]
  %63 = phi i32 [ %.promoted, %53 ], [ %59, %..loopexit_crit_edge ], [ %51, %50 ]
  %64 = add nsw i32 %62, 1
  store i32 %64, ptr %3, align 4, !tbaa !11
  %65 = mul nsw i32 %64, %64
  %66 = load i32, ptr %44, align 4, !tbaa !11
  %.not68 = icmp sgt i32 %65, %66
  br i1 %.not68, label %._crit_edge, label %50, !llvm.loop !19

67:                                               ; preds = %._crit_edge
  %68 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %indvars.iv127
  %69 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %70

70:                                               ; preds = %67, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %71 = load i32, ptr @N, align 4, !tbaa !11
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next128, %72
  br i1 %73, label %.lr.ph92, label %._crit_edge93, !llvm.loop !20

.preheader73:                                     ; preds = %._crit_edge93, %._crit_edge108
  %74 = phi i32 [ %123, %._crit_edge108 ], [ 0, %._crit_edge93 ]
  %75 = phi i32 [ %124, %._crit_edge108 ], [ %42, %._crit_edge93 ]
  %.053109 = phi i32 [ %.154.lcssa, %._crit_edge108 ], [ 0, %._crit_edge93 ]
  %76 = icmp slt i32 %.053109, %75
  br i1 %76, label %.lr.ph102.preheader, label %.thread

.lr.ph102.preheader:                              ; preds = %.preheader73
  %77 = sext i32 %.053109 to i64
  br label %.lr.ph102

._crit_edge110:                                   ; preds = %._crit_edge108, %._crit_edge93
  %.lcssa = phi i32 [ %42, %._crit_edge93 ], [ %124, %._crit_edge108 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %78 = sext i32 %.lcssa to i64
  %79 = getelementptr inbounds [100001 x i32], ptr @depth, i64 0, i64 %78
  store i32 0, ptr %79, align 4, !tbaa !11
  %80 = getelementptr inbounds [100001 x i32], ptr @up, i64 0, i64 %78
  store i32 %.lcssa, ptr %80, align 4, !tbaa !11
  invoke void @_Z3dfsi(i32 noundef %.lcssa)
          to label %.preheader unwind label %148

.preheader:                                       ; preds = %._crit_edge110
  %81 = load i32, ptr @Q, align 4, !tbaa !11
  %82 = add nsw i32 %81, -1
  store i32 %82, ptr @Q, align 4, !tbaa !11
  %.not115 = icmp eq i32 %81, 0
  br i1 %.not115, label %._crit_edge117, label %.lr.ph116

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %._crit_edge100
  %indvars.iv130 = phi i64 [ %77, %.lr.ph102.preheader ], [ %indvars.iv.next131, %._crit_edge100 ]
  %83 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %indvars.iv130
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %84 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #6
  store ptr %84, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %85 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #6
  store ptr %85, ptr %7, align 8
  %86 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %86, label %.lr.ph96, label %.critedge

._crit_edge97:                                    ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br i1 %spec.select, label %95, label %.thread.loopexit

.lr.ph96:                                         ; preds = %.lr.ph102, %90
  %.05794 = phi i1 [ %spec.select, %90 ], [ true, %.lr.ph102 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %88 = load i32, ptr %87, align 4, !tbaa !11
  store i32 %88, ptr %8, align 4, !tbaa !11
  %89 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %90 unwind label %93

90:                                               ; preds = %.lr.ph96
  %.not66 = icmp eq i64 %89, 0
  %spec.select = select i1 %.not66, i1 %.05794, i1 false
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %92 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %92, label %.lr.ph96, label %._crit_edge97

93:                                               ; preds = %.lr.ph96
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %136

.critedge:                                        ; preds = %.lr.ph102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %95

95:                                               ; preds = %.critedge, %._crit_edge97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %96 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #6
  store ptr %96, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %97 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #6
  store ptr %97, ptr %10, align 8
  %98 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %98, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %95, %102
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %100 = load i32, ptr %99, align 4, !tbaa !11
  store i32 %100, ptr %11, align 4, !tbaa !11
  %101 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %102 unwind label %105

102:                                              ; preds = %.lr.ph99
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %104 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %104, label %.lr.ph99, label %._crit_edge100

105:                                              ; preds = %.lr.ph99
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %136

._crit_edge100:                                   ; preds = %102, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %indvars.iv.next131 = add nsw i64 %indvars.iv130, 1
  %107 = load i32, ptr @N, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = icmp slt i64 %indvars.iv.next131, %108
  br i1 %109, label %.lr.ph102, label %.thread.loopexit

.thread.loopexit:                                 ; preds = %._crit_edge97, %._crit_edge100
  %.154.lcssa.ph.in = phi i64 [ %indvars.iv.next131, %._crit_edge100 ], [ %indvars.iv130, %._crit_edge97 ]
  %.154.lcssa.ph = trunc i64 %.154.lcssa.ph.in to i32
  %.pre = load i32, ptr %5, align 4, !tbaa !11
  br label %.thread

.thread:                                          ; preds = %.thread.loopexit, %.preheader73
  %110 = phi i32 [ %74, %.preheader73 ], [ %.pre, %.thread.loopexit ]
  %.154.lcssa = phi i32 [ %.053109, %.preheader73 ], [ %.154.lcssa.ph, %.thread.loopexit ]
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100000 x i32], ptr @rch, i64 0, i64 %111
  store i32 %.154.lcssa, ptr %112, align 4, !tbaa !11
  %113 = sext i32 %.154.lcssa to i64
  %114 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @graph, i64 0, i64 %113
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %114, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %115 unwind label %126

115:                                              ; preds = %.thread
  %116 = load i32, ptr %5, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100000 x %"class.std::set"], ptr @pf, i64 0, i64 %117
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %119 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %118) #6
  store ptr %119, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %120 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %118) #6
  store ptr %120, ptr %13, align 8
  %121 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %121, label %.lr.ph107, label %._crit_edge108

._crit_edge108:                                   ; preds = %131, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  %122 = load i32, ptr %5, align 4, !tbaa !11
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %5, align 4, !tbaa !11
  %124 = load i32, ptr @N, align 4, !tbaa !11
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %.preheader73, label %._crit_edge110, !llvm.loop !21

126:                                              ; preds = %.thread
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %136

.lr.ph107:                                        ; preds = %115, %131
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %129 = load i32, ptr %128, align 4, !tbaa !11
  store i32 %129, ptr %14, align 4, !tbaa !11
  %130 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %131 unwind label %134

131:                                              ; preds = %.lr.ph107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %133 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %133, label %.lr.ph107, label %._crit_edge108

134:                                              ; preds = %.lr.ph107
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %136

136:                                              ; preds = %93, %105, %134, %126
  %.pn62.pn = phi { ptr, i32 } [ %135, %134 ], [ %127, %126 ], [ %94, %93 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %286

.lr.ph116:                                        ; preds = %.preheader, %280
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %137 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %138 unwind label %150

138:                                              ; preds = %.lr.ph116
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %137, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %140 unwind label %150

140:                                              ; preds = %138
  %141 = load i32, ptr %15, align 4, !tbaa !11
  %142 = add nsw i32 %141, -1
  store i32 %142, ptr %15, align 4, !tbaa !11
  %143 = load i32, ptr %16, align 4, !tbaa !11
  %144 = add nsw i32 %143, -1
  store i32 %144, ptr %16, align 4, !tbaa !11
  %145 = sext i32 %142 to i64
  %146 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 19, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !11
  %.not61.not = icmp slt i32 %147, %143
  br i1 %.not61.not, label %152, label %153

148:                                              ; preds = %._crit_edge110
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %286

150:                                              ; preds = %138, %.lr.ph116
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %285

152:                                              ; preds = %140
  store i32 %147, ptr %15, align 4, !tbaa !11
  %.pre137 = sext i32 %147 to i64
  br label %153

153:                                              ; preds = %140, %152
  %.pre-phi = phi i64 [ %145, %140 ], [ %.pre137, %152 ]
  %154 = phi i32 [ %142, %140 ], [ %147, %152 ]
  %.1 = phi i32 [ 0, %140 ], [ 524288, %152 ]
  %155 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 18, i64 %.pre-phi
  %156 = load i32, ptr %155, align 4, !tbaa !11
  %.not61.not.1 = icmp slt i32 %156, %143
  br i1 %.not61.not.1, label %157, label %159

157:                                              ; preds = %153
  store i32 %156, ptr %15, align 4, !tbaa !11
  %158 = or disjoint i32 %.1, 262144
  br label %159

159:                                              ; preds = %157, %153
  %160 = phi i32 [ %156, %157 ], [ %154, %153 ]
  %.1.1 = phi i32 [ %158, %157 ], [ %.1, %153 ]
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 17, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %.not61.not.2 = icmp slt i32 %163, %143
  br i1 %.not61.not.2, label %164, label %166

164:                                              ; preds = %159
  store i32 %163, ptr %15, align 4, !tbaa !11
  %165 = add nuw nsw i32 %.1.1, 131072
  %.pre138 = sext i32 %163 to i64
  br label %166

166:                                              ; preds = %164, %159
  %.pre-phi139 = phi i64 [ %.pre138, %164 ], [ %161, %159 ]
  %167 = phi i32 [ %163, %164 ], [ %160, %159 ]
  %.1.2 = phi i32 [ %165, %164 ], [ %.1.1, %159 ]
  %168 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 16, i64 %.pre-phi139
  %169 = load i32, ptr %168, align 4, !tbaa !11
  %.not61.not.3 = icmp slt i32 %169, %143
  br i1 %.not61.not.3, label %170, label %172

170:                                              ; preds = %166
  store i32 %169, ptr %15, align 4, !tbaa !11
  %171 = add nuw nsw i32 %.1.2, 65536
  br label %172

172:                                              ; preds = %170, %166
  %173 = phi i32 [ %169, %170 ], [ %167, %166 ]
  %.1.3 = phi i32 [ %171, %170 ], [ %.1.2, %166 ]
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 15, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !11
  %.not61.not.4 = icmp slt i32 %176, %143
  br i1 %.not61.not.4, label %177, label %179

177:                                              ; preds = %172
  store i32 %176, ptr %15, align 4, !tbaa !11
  %178 = add nuw nsw i32 %.1.3, 32768
  %.pre140 = sext i32 %176 to i64
  br label %179

179:                                              ; preds = %177, %172
  %.pre-phi141 = phi i64 [ %.pre140, %177 ], [ %174, %172 ]
  %180 = phi i32 [ %176, %177 ], [ %173, %172 ]
  %.1.4 = phi i32 [ %178, %177 ], [ %.1.3, %172 ]
  %181 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 14, i64 %.pre-phi141
  %182 = load i32, ptr %181, align 4, !tbaa !11
  %.not61.not.5 = icmp slt i32 %182, %143
  br i1 %.not61.not.5, label %183, label %185

183:                                              ; preds = %179
  store i32 %182, ptr %15, align 4, !tbaa !11
  %184 = add nuw nsw i32 %.1.4, 16384
  br label %185

185:                                              ; preds = %183, %179
  %186 = phi i32 [ %182, %183 ], [ %180, %179 ]
  %.1.5 = phi i32 [ %184, %183 ], [ %.1.4, %179 ]
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 13, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !11
  %.not61.not.6 = icmp slt i32 %189, %143
  br i1 %.not61.not.6, label %190, label %192

190:                                              ; preds = %185
  store i32 %189, ptr %15, align 4, !tbaa !11
  %191 = add nuw nsw i32 %.1.5, 8192
  %.pre142 = sext i32 %189 to i64
  br label %192

192:                                              ; preds = %190, %185
  %.pre-phi143 = phi i64 [ %.pre142, %190 ], [ %187, %185 ]
  %193 = phi i32 [ %189, %190 ], [ %186, %185 ]
  %.1.6 = phi i32 [ %191, %190 ], [ %.1.5, %185 ]
  %194 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 12, i64 %.pre-phi143
  %195 = load i32, ptr %194, align 4, !tbaa !11
  %.not61.not.7 = icmp slt i32 %195, %143
  br i1 %.not61.not.7, label %196, label %198

196:                                              ; preds = %192
  store i32 %195, ptr %15, align 4, !tbaa !11
  %197 = add nuw nsw i32 %.1.6, 4096
  br label %198

198:                                              ; preds = %196, %192
  %199 = phi i32 [ %195, %196 ], [ %193, %192 ]
  %.1.7 = phi i32 [ %197, %196 ], [ %.1.6, %192 ]
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 11, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !11
  %.not61.not.8 = icmp slt i32 %202, %143
  br i1 %.not61.not.8, label %203, label %205

203:                                              ; preds = %198
  store i32 %202, ptr %15, align 4, !tbaa !11
  %204 = add nuw nsw i32 %.1.7, 2048
  %.pre144 = sext i32 %202 to i64
  br label %205

205:                                              ; preds = %203, %198
  %.pre-phi145 = phi i64 [ %.pre144, %203 ], [ %200, %198 ]
  %206 = phi i32 [ %202, %203 ], [ %199, %198 ]
  %.1.8 = phi i32 [ %204, %203 ], [ %.1.7, %198 ]
  %207 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 10, i64 %.pre-phi145
  %208 = load i32, ptr %207, align 4, !tbaa !11
  %.not61.not.9 = icmp slt i32 %208, %143
  br i1 %.not61.not.9, label %209, label %211

209:                                              ; preds = %205
  store i32 %208, ptr %15, align 4, !tbaa !11
  %210 = add nuw nsw i32 %.1.8, 1024
  br label %211

211:                                              ; preds = %209, %205
  %212 = phi i32 [ %208, %209 ], [ %206, %205 ]
  %.1.9 = phi i32 [ %210, %209 ], [ %.1.8, %205 ]
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 9, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !11
  %.not61.not.10 = icmp slt i32 %215, %143
  br i1 %.not61.not.10, label %216, label %218

216:                                              ; preds = %211
  store i32 %215, ptr %15, align 4, !tbaa !11
  %217 = add nuw nsw i32 %.1.9, 512
  %.pre146 = sext i32 %215 to i64
  br label %218

218:                                              ; preds = %216, %211
  %.pre-phi147 = phi i64 [ %.pre146, %216 ], [ %213, %211 ]
  %219 = phi i32 [ %215, %216 ], [ %212, %211 ]
  %.1.10 = phi i32 [ %217, %216 ], [ %.1.9, %211 ]
  %220 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 8, i64 %.pre-phi147
  %221 = load i32, ptr %220, align 4, !tbaa !11
  %.not61.not.11 = icmp slt i32 %221, %143
  br i1 %.not61.not.11, label %222, label %224

222:                                              ; preds = %218
  store i32 %221, ptr %15, align 4, !tbaa !11
  %223 = add nuw nsw i32 %.1.10, 256
  br label %224

224:                                              ; preds = %222, %218
  %225 = phi i32 [ %221, %222 ], [ %219, %218 ]
  %.1.11 = phi i32 [ %223, %222 ], [ %.1.10, %218 ]
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 7, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !11
  %.not61.not.12 = icmp slt i32 %228, %143
  br i1 %.not61.not.12, label %229, label %231

229:                                              ; preds = %224
  store i32 %228, ptr %15, align 4, !tbaa !11
  %230 = add nuw nsw i32 %.1.11, 128
  %.pre148 = sext i32 %228 to i64
  br label %231

231:                                              ; preds = %229, %224
  %.pre-phi149 = phi i64 [ %.pre148, %229 ], [ %226, %224 ]
  %232 = phi i32 [ %228, %229 ], [ %225, %224 ]
  %.1.12 = phi i32 [ %230, %229 ], [ %.1.11, %224 ]
  %233 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 6, i64 %.pre-phi149
  %234 = load i32, ptr %233, align 4, !tbaa !11
  %.not61.not.13 = icmp slt i32 %234, %143
  br i1 %.not61.not.13, label %235, label %237

235:                                              ; preds = %231
  store i32 %234, ptr %15, align 4, !tbaa !11
  %236 = add nuw nsw i32 %.1.12, 64
  br label %237

237:                                              ; preds = %235, %231
  %238 = phi i32 [ %234, %235 ], [ %232, %231 ]
  %.1.13 = phi i32 [ %236, %235 ], [ %.1.12, %231 ]
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 5, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !11
  %.not61.not.14 = icmp slt i32 %241, %143
  br i1 %.not61.not.14, label %242, label %244

242:                                              ; preds = %237
  store i32 %241, ptr %15, align 4, !tbaa !11
  %243 = add nuw nsw i32 %.1.13, 32
  %.pre150 = sext i32 %241 to i64
  br label %244

244:                                              ; preds = %242, %237
  %.pre-phi151 = phi i64 [ %.pre150, %242 ], [ %239, %237 ]
  %245 = phi i32 [ %241, %242 ], [ %238, %237 ]
  %.1.14 = phi i32 [ %243, %242 ], [ %.1.13, %237 ]
  %246 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 4, i64 %.pre-phi151
  %247 = load i32, ptr %246, align 4, !tbaa !11
  %.not61.not.15 = icmp slt i32 %247, %143
  br i1 %.not61.not.15, label %248, label %250

248:                                              ; preds = %244
  store i32 %247, ptr %15, align 4, !tbaa !11
  %249 = add nuw nsw i32 %.1.14, 16
  br label %250

250:                                              ; preds = %248, %244
  %251 = phi i32 [ %247, %248 ], [ %245, %244 ]
  %.1.15 = phi i32 [ %249, %248 ], [ %.1.14, %244 ]
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 3, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !11
  %.not61.not.16 = icmp slt i32 %254, %143
  br i1 %.not61.not.16, label %255, label %257

255:                                              ; preds = %250
  store i32 %254, ptr %15, align 4, !tbaa !11
  %256 = add nuw nsw i32 %.1.15, 8
  %.pre152 = sext i32 %254 to i64
  br label %257

257:                                              ; preds = %255, %250
  %.pre-phi153 = phi i64 [ %.pre152, %255 ], [ %252, %250 ]
  %258 = phi i32 [ %254, %255 ], [ %251, %250 ]
  %.1.16 = phi i32 [ %256, %255 ], [ %.1.15, %250 ]
  %259 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 2, i64 %.pre-phi153
  %260 = load i32, ptr %259, align 4, !tbaa !11
  %.not61.not.17 = icmp slt i32 %260, %143
  br i1 %.not61.not.17, label %261, label %263

261:                                              ; preds = %257
  store i32 %260, ptr %15, align 4, !tbaa !11
  %262 = add nuw nsw i32 %.1.16, 4
  br label %263

263:                                              ; preds = %261, %257
  %264 = phi i32 [ %260, %261 ], [ %258, %257 ]
  %.1.17 = phi i32 [ %262, %261 ], [ %.1.16, %257 ]
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 1, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !11
  %.not61.not.18 = icmp slt i32 %267, %143
  br i1 %.not61.not.18, label %268, label %270

268:                                              ; preds = %263
  store i32 %267, ptr %15, align 4, !tbaa !11
  %269 = add nuw nsw i32 %.1.17, 2
  %.pre154 = sext i32 %267 to i64
  br label %270

270:                                              ; preds = %268, %263
  %.pre-phi155 = phi i64 [ %.pre154, %268 ], [ %265, %263 ]
  %.1.18 = phi i32 [ %269, %268 ], [ %.1.17, %263 ]
  %271 = getelementptr inbounds [20 x [100001 x i32]], ptr @up, i64 0, i64 0, i64 %.pre-phi155
  %272 = load i32, ptr %271, align 4, !tbaa !11
  %.not61.not.19 = icmp slt i32 %272, %143
  br i1 %.not61.not.19, label %273, label %275

273:                                              ; preds = %270
  store i32 %272, ptr %15, align 4, !tbaa !11
  %274 = add nuw nsw i32 %.1.18, 1
  br label %275

275:                                              ; preds = %273, %270
  %.1.19 = phi i32 [ %274, %273 ], [ %.1.18, %270 ]
  %276 = add nuw nsw i32 %.1.19, 1
  %277 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %276)
          to label %278 unwind label %283

278:                                              ; preds = %275
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef nonnull @.str)
          to label %280 unwind label %283

280:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  %281 = load i32, ptr @Q, align 4, !tbaa !11
  %282 = add nsw i32 %281, -1
  store i32 %282, ptr @Q, align 4, !tbaa !11
  %.not = icmp eq i32 %281, 0
  br i1 %.not, label %._crit_edge117, label %.lr.ph116, !llvm.loop !22

283:                                              ; preds = %278, %275
  %284 = landingpad { ptr, i32 }
          cleanup
  br label %285

285:                                              ; preds = %283, %150
  %.pn = phi { ptr, i32 } [ %284, %283 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  br label %286

._crit_edge117:                                   ; preds = %280, %.preheader
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  ret i32 0

286:                                              ; preds = %285, %148, %136
  %.pn62.pn.pn = phi { ptr, i32 } [ %.pn62.pn, %136 ], [ %.pn, %285 ], [ %149, %148 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn62.pn.pn
}

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

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

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

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 #4

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 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 #5

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

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

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

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


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