; LLVM IR from DionysiosB/CodeForces :: 2043C-SumsOnSegments (main)

; 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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"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 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::set", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 8
  %31 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %33 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %35

35:                                               ; preds = %377, %0
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr %2, align 8, !tbaa !5
  %38 = icmp ne i64 %36, 0
  br i1 %38, label %39, label %382

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %41 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %42 unwind label %49

42:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %77, %42
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = load i64, ptr %3, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %80

49:                                               ; preds = %39
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %6, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %381

53:                                               ; preds = %43
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %55) #5
  %57 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %56)
          to label %58 unwind label %72

58:                                               ; preds = %53
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %60) #5
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = icmp ne i64 %62, -1
  br i1 %63, label %64, label %76

64:                                               ; preds = %58
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %66) #5
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = icmp ne i64 %68, 1
  br i1 %69, label %70, label %76

70:                                               ; preds = %64
  %71 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %71, ptr %8, align 4, !tbaa !9
  br label %76

72:                                               ; preds = %53
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %6, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %380

76:                                               ; preds = %70, %64, %58
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !9
  br label %43, !llvm.loop !11

80:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %83, label %191

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = sub nsw i32 %84, 1
  store i32 %85, ptr %16, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %115, %83
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = icmp sge i32 %87, 0
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %118

90:                                               ; preds = %86
  %91 = load i32, ptr %16, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %92) #5
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = load i64, ptr %15, align 8, !tbaa !5
  %96 = add nsw i64 %95, %94
  store i64 %96, ptr %15, align 8, !tbaa !5
  %97 = load i64, ptr %11, align 8, !tbaa !5
  %98 = load i64, ptr %15, align 8, !tbaa !5
  %99 = icmp slt i64 %97, %98
  br i1 %99, label %100, label %102

100:                                              ; preds = %90
  %101 = load i64, ptr %11, align 8, !tbaa !5
  br label %104

102:                                              ; preds = %90
  %103 = load i64, ptr %15, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %102, %100
  %105 = phi i64 [ %101, %100 ], [ %103, %102 ]
  store i64 %105, ptr %11, align 8, !tbaa !5
  %106 = load i64, ptr %12, align 8, !tbaa !5
  %107 = load i64, ptr %15, align 8, !tbaa !5
  %108 = icmp sgt i64 %106, %107
  br i1 %108, label %109, label %111

109:                                              ; preds = %104
  %110 = load i64, ptr %12, align 8, !tbaa !5
  br label %113

111:                                              ; preds = %104
  %112 = load i64, ptr %15, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %111, %109
  %114 = phi i64 [ %110, %109 ], [ %112, %111 ]
  store i64 %114, ptr %12, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %113
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %16, align 4, !tbaa !9
  br label %86, !llvm.loop !13

118:                                              ; preds = %89
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %17, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %152, %118
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = load i64, ptr %3, align 8, !tbaa !5
  %125 = icmp slt i64 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %155

127:                                              ; preds = %121
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %129) #5
  %131 = load i64, ptr %130, align 8, !tbaa !5
  %132 = load i64, ptr %15, align 8, !tbaa !5
  %133 = add nsw i64 %132, %131
  store i64 %133, ptr %15, align 8, !tbaa !5
  %134 = load i64, ptr %13, align 8, !tbaa !5
  %135 = load i64, ptr %15, align 8, !tbaa !5
  %136 = icmp slt i64 %134, %135
  br i1 %136, label %137, label %139

137:                                              ; preds = %127
  %138 = load i64, ptr %13, align 8, !tbaa !5
  br label %141

139:                                              ; preds = %127
  %140 = load i64, ptr %15, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %139, %137
  %142 = phi i64 [ %138, %137 ], [ %140, %139 ]
  store i64 %142, ptr %13, align 8, !tbaa !5
  %143 = load i64, ptr %14, align 8, !tbaa !5
  %144 = load i64, ptr %15, align 8, !tbaa !5
  %145 = icmp sgt i64 %143, %144
  br i1 %145, label %146, label %148

146:                                              ; preds = %141
  %147 = load i64, ptr %14, align 8, !tbaa !5
  br label %150

148:                                              ; preds = %141
  %149 = load i64, ptr %15, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %148, %146
  %151 = phi i64 [ %147, %146 ], [ %149, %148 ]
  store i64 %151, ptr %14, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %150
  %153 = load i32, ptr %17, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %17, align 4, !tbaa !9
  br label %121, !llvm.loop !14

155:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %156 = load i64, ptr %11, align 8, !tbaa !5
  %157 = load i64, ptr %13, align 8, !tbaa !5
  %158 = add nsw i64 %156, %157
  %159 = trunc i64 %158 to i32
  store i32 %159, ptr %18, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %183, %155
  %161 = load i32, ptr %18, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = load i64, ptr %12, align 8, !tbaa !5
  %164 = load i64, ptr %14, align 8, !tbaa !5
  %165 = add nsw i64 %163, %164
  %166 = icmp sle i64 %162, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %190

168:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %169 = load i32, ptr %8, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %170) #5
  %172 = load i64, ptr %171, align 8, !tbaa !5
  %173 = load i32, ptr %18, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = add nsw i64 %172, %174
  %176 = trunc i64 %175 to i32
  store i32 %176, ptr %19, align 4, !tbaa !9
  %177 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %178 unwind label %186

178:                                              ; preds = %168
  %179 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %180 = extractvalue { ptr, i8 } %177, 0
  store ptr %180, ptr %179, align 8
  %181 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %182 = extractvalue { ptr, i8 } %177, 1
  store i8 %182, ptr %181, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %183

183:                                              ; preds = %178
  %184 = load i32, ptr %18, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %18, align 4, !tbaa !9
  br label %160, !llvm.loop !15

186:                                              ; preds = %168
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %6, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %379

190:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %191

191:                                              ; preds = %190, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 0, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %242, %191
  %193 = load i32, ptr %25, align 4, !tbaa !9
  %194 = load i32, ptr %8, align 4, !tbaa !9
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %245

197:                                              ; preds = %192
  %198 = load i32, ptr %25, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %199) #5
  %201 = load i64, ptr %200, align 8, !tbaa !5
  %202 = load i64, ptr %23, align 8, !tbaa !5
  %203 = add nsw i64 %202, %201
  store i64 %203, ptr %23, align 8, !tbaa !5
  %204 = load i64, ptr %23, align 8, !tbaa !5
  %205 = icmp slt i64 %204, 0
  br i1 %205, label %206, label %208

206:                                              ; preds = %197
  %207 = load i64, ptr %23, align 8, !tbaa !5
  br label %209

208:                                              ; preds = %197
  br label %209

209:                                              ; preds = %208, %206
  %210 = phi i64 [ %207, %206 ], [ 0, %208 ]
  store i64 %210, ptr %23, align 8, !tbaa !5
  %211 = load i32, ptr %25, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %212) #5
  %214 = load i64, ptr %213, align 8, !tbaa !5
  %215 = load i64, ptr %24, align 8, !tbaa !5
  %216 = add nsw i64 %215, %214
  store i64 %216, ptr %24, align 8, !tbaa !5
  %217 = load i64, ptr %24, align 8, !tbaa !5
  %218 = icmp sgt i64 %217, 0
  br i1 %218, label %219, label %221

219:                                              ; preds = %209
  %220 = load i64, ptr %24, align 8, !tbaa !5
  br label %222

221:                                              ; preds = %209
  br label %222

222:                                              ; preds = %221, %219
  %223 = phi i64 [ %220, %219 ], [ 0, %221 ]
  store i64 %223, ptr %24, align 8, !tbaa !5
  %224 = load i64, ptr %21, align 8, !tbaa !5
  %225 = load i64, ptr %23, align 8, !tbaa !5
  %226 = icmp slt i64 %224, %225
  br i1 %226, label %227, label %229

227:                                              ; preds = %222
  %228 = load i64, ptr %21, align 8, !tbaa !5
  br label %231

229:                                              ; preds = %222
  %230 = load i64, ptr %23, align 8, !tbaa !5
  br label %231

231:                                              ; preds = %229, %227
  %232 = phi i64 [ %228, %227 ], [ %230, %229 ]
  store i64 %232, ptr %21, align 8, !tbaa !5
  %233 = load i64, ptr %22, align 8, !tbaa !5
  %234 = load i64, ptr %24, align 8, !tbaa !5
  %235 = icmp sgt i64 %233, %234
  br i1 %235, label %236, label %238

236:                                              ; preds = %231
  %237 = load i64, ptr %22, align 8, !tbaa !5
  br label %240

238:                                              ; preds = %231
  %239 = load i64, ptr %24, align 8, !tbaa !5
  br label %240

240:                                              ; preds = %238, %236
  %241 = phi i64 [ %237, %236 ], [ %239, %238 ]
  store i64 %241, ptr %22, align 8, !tbaa !5
  br label %242

242:                                              ; preds = %240
  %243 = load i32, ptr %25, align 4, !tbaa !9
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %25, align 4, !tbaa !9
  br label %192, !llvm.loop !16

245:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %246 = load i64, ptr %21, align 8, !tbaa !5
  %247 = trunc i64 %246 to i32
  store i32 %247, ptr %26, align 4, !tbaa !9
  br label %248

248:                                              ; preds = %261, %245
  %249 = load i32, ptr %26, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = load i64, ptr %22, align 8, !tbaa !5
  %252 = icmp sle i64 %250, %251
  br i1 %252, label %254, label %253

253:                                              ; preds = %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %268

254:                                              ; preds = %248
  %255 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %256 unwind label %264

256:                                              ; preds = %254
  %257 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 0
  %258 = extractvalue { ptr, i8 } %255, 0
  store ptr %258, ptr %257, align 8
  %259 = getelementptr inbounds { ptr, i8 }, ptr %27, i32 0, i32 1
  %260 = extractvalue { ptr, i8 } %255, 1
  store i8 %260, ptr %259, align 8
  br label %261

261:                                              ; preds = %256
  %262 = load i32, ptr %26, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %26, align 4, !tbaa !9
  br label %248, !llvm.loop !17

264:                                              ; preds = %254
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %6, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %378

268:                                              ; preds = %253
  store i64 0, ptr %24, align 8, !tbaa !5
  store i64 0, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %22, align 8, !tbaa !5
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %269 = load i32, ptr %8, align 4, !tbaa !9
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %28, align 4, !tbaa !9
  br label %271

271:                                              ; preds = %322, %268
  %272 = load i32, ptr %28, align 4, !tbaa !9
  %273 = sext i32 %272 to i64
  %274 = load i64, ptr %3, align 8, !tbaa !5
  %275 = icmp slt i64 %273, %274
  br i1 %275, label %277, label %276

276:                                              ; preds = %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %325

277:                                              ; preds = %271
  %278 = load i32, ptr %28, align 4, !tbaa !9
  %279 = sext i32 %278 to i64
  %280 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %279) #5
  %281 = load i64, ptr %280, align 8, !tbaa !5
  %282 = load i64, ptr %23, align 8, !tbaa !5
  %283 = add nsw i64 %282, %281
  store i64 %283, ptr %23, align 8, !tbaa !5
  %284 = load i64, ptr %23, align 8, !tbaa !5
  %285 = icmp slt i64 %284, 0
  br i1 %285, label %286, label %288

286:                                              ; preds = %277
  %287 = load i64, ptr %23, align 8, !tbaa !5
  br label %289

288:                                              ; preds = %277
  br label %289

289:                                              ; preds = %288, %286
  %290 = phi i64 [ %287, %286 ], [ 0, %288 ]
  store i64 %290, ptr %23, align 8, !tbaa !5
  %291 = load i32, ptr %28, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %292) #5
  %294 = load i64, ptr %293, align 8, !tbaa !5
  %295 = load i64, ptr %24, align 8, !tbaa !5
  %296 = add nsw i64 %295, %294
  store i64 %296, ptr %24, align 8, !tbaa !5
  %297 = load i64, ptr %24, align 8, !tbaa !5
  %298 = icmp sgt i64 %297, 0
  br i1 %298, label %299, label %301

299:                                              ; preds = %289
  %300 = load i64, ptr %24, align 8, !tbaa !5
  br label %302

301:                                              ; preds = %289
  br label %302

302:                                              ; preds = %301, %299
  %303 = phi i64 [ %300, %299 ], [ 0, %301 ]
  store i64 %303, ptr %24, align 8, !tbaa !5
  %304 = load i64, ptr %21, align 8, !tbaa !5
  %305 = load i64, ptr %23, align 8, !tbaa !5
  %306 = icmp slt i64 %304, %305
  br i1 %306, label %307, label %309

307:                                              ; preds = %302
  %308 = load i64, ptr %21, align 8, !tbaa !5
  br label %311

309:                                              ; preds = %302
  %310 = load i64, ptr %23, align 8, !tbaa !5
  br label %311

311:                                              ; preds = %309, %307
  %312 = phi i64 [ %308, %307 ], [ %310, %309 ]
  store i64 %312, ptr %21, align 8, !tbaa !5
  %313 = load i64, ptr %22, align 8, !tbaa !5
  %314 = load i64, ptr %24, align 8, !tbaa !5
  %315 = icmp sgt i64 %313, %314
  br i1 %315, label %316, label %318

316:                                              ; preds = %311
  %317 = load i64, ptr %22, align 8, !tbaa !5
  br label %320

318:                                              ; preds = %311
  %319 = load i64, ptr %24, align 8, !tbaa !5
  br label %320

320:                                              ; preds = %318, %316
  %321 = phi i64 [ %317, %316 ], [ %319, %318 ]
  store i64 %321, ptr %22, align 8, !tbaa !5
  br label %322

322:                                              ; preds = %320
  %323 = load i32, ptr %28, align 4, !tbaa !9
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %28, align 4, !tbaa !9
  br label %271, !llvm.loop !18

325:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %326 = load i64, ptr %21, align 8, !tbaa !5
  %327 = trunc i64 %326 to i32
  store i32 %327, ptr %29, align 4, !tbaa !9
  br label %328

328:                                              ; preds = %341, %325
  %329 = load i32, ptr %29, align 4, !tbaa !9
  %330 = sext i32 %329 to i64
  %331 = load i64, ptr %22, align 8, !tbaa !5
  %332 = icmp sle i64 %330, %331
  br i1 %332, label %334, label %333

333:                                              ; preds = %328
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %348

334:                                              ; preds = %328
  %335 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %336 unwind label %344

336:                                              ; preds = %334
  %337 = getelementptr inbounds { ptr, i8 }, ptr %30, i32 0, i32 0
  %338 = extractvalue { ptr, i8 } %335, 0
  store ptr %338, ptr %337, align 8
  %339 = getelementptr inbounds { ptr, i8 }, ptr %30, i32 0, i32 1
  %340 = extractvalue { ptr, i8 } %335, 1
  store i8 %340, ptr %339, align 8
  br label %341

341:                                              ; preds = %336
  %342 = load i32, ptr %29, align 4, !tbaa !9
  %343 = add nsw i32 %342, 1
  store i32 %343, ptr %29, align 4, !tbaa !9
  br label %328, !llvm.loop !19

344:                                              ; preds = %334
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %6, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %378

348:                                              ; preds = %333
  %349 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  %350 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %349)
          to label %351 unwind label %359

351:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %352 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  %353 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %31, i32 0, i32 0
  store ptr %352, ptr %353, align 8
  br label %354

354:                                              ; preds = %368, %351
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %355 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  %356 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %355, ptr %356, align 8
  %357 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br i1 %357, label %363, label %358

358:                                              ; preds = %354
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %375

359:                                              ; preds = %375, %348
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %6, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %7, align 4
  br label %378

363:                                              ; preds = %354
  %364 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #5
  %365 = load i32, ptr %364, align 4, !tbaa !9
  %366 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %365)
          to label %367 unwind label %371

367:                                              ; preds = %363
  br label %368

368:                                              ; preds = %367
  %369 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %31, i32 noundef 0) #5
  %370 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  store ptr %369, ptr %370, align 8
  br label %354, !llvm.loop !20

371:                                              ; preds = %363
  %372 = landingpad { ptr, i32 }
          cleanup
  %373 = extractvalue { ptr, i32 } %372, 0
  store ptr %373, ptr %6, align 8
  %374 = extractvalue { ptr, i32 } %372, 1
  store i32 %374, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %378

375:                                              ; preds = %358
  %376 = invoke i32 @puts(ptr noundef @.str.3)
          to label %377 unwind label %359

377:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %35, !llvm.loop !21

378:                                              ; preds = %371, %359, %344, %264
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %379

379:                                              ; preds = %378, %186
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  br label %380

380:                                              ; preds = %379, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %381

381:                                              ; preds = %380, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %384

382:                                              ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %383 = load i32, ptr %1, align 4
  ret i32 %383

384:                                              ; preds = %381
  %385 = load ptr, ptr %6, align 8
  %386 = load i32, ptr %7, align 4
  %387 = insertvalue { ptr, i32 } poison, ptr %385, 0
  %388 = insertvalue { ptr, i32 } %387, i32 %386, 1
  resume { ptr, i32 } %388
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #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)) #4 align 2

declare i32 @printf(ptr noundef, ...) #2

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

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

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

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

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

declare i32 @puts(ptr noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; 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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"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::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::set", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = add nsw i64 %12, -1
  store i64 %13, ptr %1, align 8, !tbaa !5
  %.not184 = icmp eq i64 %12, 0
  br i1 %.not184, label %._crit_edge187, label %.lr.ph186

.lr.ph186:                                        ; preds = %0, %._crit_edge183
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %15 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %16 unwind label %21

16:                                               ; preds = %.lr.ph186
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  br label %._crit_edge159

._crit_edge:                                      ; preds = %31
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %19 = icmp sgt i32 %.194, -1
  br i1 %19, label %.preheader129, label %._crit_edge159

.preheader129:                                    ; preds = %._crit_edge
  %.not188 = icmp eq i32 %.194, 0
  br i1 %.not188, label %.preheader, label %.lr.ph136.preheader

.lr.ph136.preheader:                              ; preds = %.preheader129
  %20 = zext nneg i32 %.194 to i64
  br label %.lr.ph136

21:                                               ; preds = %.lr.ph186
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %122

.lr.ph:                                           ; preds = %16, %31
  %indvars.iv = phi i64 [ %indvars.iv.next, %31 ], [ 0, %16 ]
  %.093131 = phi i32 [ %.194, %31 ], [ -1, %16 ]
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %23)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %.not127 = icmp eq i64 %26, -1
  br i1 %.not127, label %31, label %27

27:                                               ; preds = %.lr.ph
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %.not128 = icmp eq i64 %29, 1
  %30 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %.not128, i32 %.093131, i32 %30
  br label %31

31:                                               ; preds = %27, %.lr.ph
  %.194 = phi i32 [ %.093131, %.lr.ph ], [ %spec.select, %27 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = icmp sgt i64 %32, %indvars.iv.next
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph136, %.preheader129
  %.0107.lcssa = phi i64 [ 0, %.preheader129 ], [ %41, %.lr.ph136 ]
  %.097.lcssa = phi i64 [ 0, %.preheader129 ], [ %40, %.lr.ph136 ]
  %.0110139 = add nuw nsw i32 %.194, 1
  %34 = zext nneg i32 %.0110139 to i64
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %36 = icmp sgt i64 %35, %34
  br i1 %36, label %.lr.ph144, label %._crit_edge145

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %.lr.ph136
  %indvars.iv199 = phi i64 [ %20, %.lr.ph136.preheader ], [ %indvars.iv.next200, %.lr.ph136 ]
  %.097135 = phi i64 [ 0, %.lr.ph136.preheader ], [ %40, %.lr.ph136 ]
  %.0107134 = phi i64 [ 0, %.lr.ph136.preheader ], [ %41, %.lr.ph136 ]
  %.0112132 = phi i64 [ 0, %.lr.ph136.preheader ], [ %39, %.lr.ph136 ]
  %indvars.iv.next200 = add nsw i64 %indvars.iv199, -1
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv.next200) #6
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = add nsw i64 %38, %.0112132
  %40 = call i64 @llvm.smin.i64(i64 %.097135, i64 %39)
  %41 = call i64 @llvm.smax.i64(i64 %.0107134, i64 %39)
  %42 = icmp ugt i64 %indvars.iv199, 1
  br i1 %42, label %.lr.ph136, label %.preheader, !llvm.loop !11

._crit_edge145:                                   ; preds = %.lr.ph144, %.preheader
  %.0114.lcssa = phi i64 [ 0, %.preheader ], [ %51, %.lr.ph144 ]
  %.0108.lcssa = phi i64 [ 0, %.preheader ], [ %50, %.lr.ph144 ]
  %43 = add nsw i64 %.0108.lcssa, %.097.lcssa
  %44 = add nuw nsw i64 %.0114.lcssa, %.0107.lcssa
  %sext = shl i64 %43, 32
  %45 = ashr exact i64 %sext, 32
  %.not119148 = icmp slt i64 %44, %45
  br i1 %.not119148, label %.loopexit, label %.lr.ph151

.lr.ph151:                                        ; preds = %._crit_edge145
  %46 = zext nneg i32 %.194 to i64
  br label %54

.lr.ph144:                                        ; preds = %.preheader, %.lr.ph144
  %indvars.iv202 = phi i64 [ %indvars.iv.next203, %.lr.ph144 ], [ %34, %.preheader ]
  %.0108142 = phi i64 [ %50, %.lr.ph144 ], [ 0, %.preheader ]
  %.1113141 = phi i64 [ %49, %.lr.ph144 ], [ 0, %.preheader ]
  %.0114140 = phi i64 [ %51, %.lr.ph144 ], [ 0, %.preheader ]
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv202) #6
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = add nsw i64 %48, %.1113141
  %50 = call i64 @llvm.smin.i64(i64 %.0108142, i64 %49)
  %51 = call i64 @llvm.smax.i64(i64 %.0114140, i64 %49)
  %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1
  %52 = load i64, ptr %2, align 8, !tbaa !5
  %53 = icmp sgt i64 %52, %indvars.iv.next203
  br i1 %53, label %.lr.ph144, label %._crit_edge145, !llvm.loop !12

54:                                               ; preds = %.lr.ph151, %61
  %indvars.iv205 = phi i64 [ %45, %.lr.ph151 ], [ %indvars.iv.next206, %61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %46) #6
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = trunc i64 %56 to i32
  %58 = trunc nsw i64 %indvars.iv205 to i32
  %59 = add i32 %58, %57
  store i32 %59, ptr %6, align 4, !tbaa !13
  %60 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %61 unwind label %62

61:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %indvars.iv.next206 = add nsw i64 %indvars.iv205, 1
  %.not119.not = icmp sgt i64 %44, %indvars.iv205
  br i1 %.not119.not, label %54, label %.loopexit, !llvm.loop !15

62:                                               ; preds = %54
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %121

.loopexit:                                        ; preds = %61, %._crit_edge145
  %.not225 = icmp eq i32 %.194, 0
  br i1 %.not225, label %._crit_edge159, label %.lr.ph158.preheader

.lr.ph158.preheader:                              ; preds = %.loopexit
  %wide.trip.count = zext nneg i32 %.194 to i64
  br label %.lr.ph158

._crit_edge159:                                   ; preds = %.lr.ph158, %._crit_edge, %._crit_edge.thread, %.loopexit
  %.093.lcssa215217 = phi i32 [ %.194, %.loopexit ], [ %.194, %._crit_edge ], [ -1, %._crit_edge.thread ], [ %.194, %.lr.ph158 ]
  %.0105.lcssa = phi i64 [ 0, %.loopexit ], [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %74, %.lr.ph158 ]
  %.0103.lcssa = phi i64 [ 0, %.loopexit ], [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %75, %.lr.ph158 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %64 = trunc i64 %.0105.lcssa to i32
  store i32 %64, ptr %7, align 4, !tbaa !13
  %sext189 = shl i64 %.0105.lcssa, 32
  %65 = ashr exact i64 %sext189, 32
  %.not120162 = icmp slt i64 %.0103.lcssa, %65
  br i1 %.not120162, label %._crit_edge165, label %.lr.ph164

.lr.ph158:                                        ; preds = %.lr.ph158.preheader, %.lr.ph158
  %indvars.iv208 = phi i64 [ 0, %.lr.ph158.preheader ], [ %indvars.iv.next209, %.lr.ph158 ]
  %.099155 = phi i64 [ 0, %.lr.ph158.preheader ], [ %73, %.lr.ph158 ]
  %.0101154 = phi i64 [ 0, %.lr.ph158.preheader ], [ %69, %.lr.ph158 ]
  %.0103153 = phi i64 [ 0, %.lr.ph158.preheader ], [ %75, %.lr.ph158 ]
  %.0105152 = phi i64 [ 0, %.lr.ph158.preheader ], [ %74, %.lr.ph158 ]
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv208) #6
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = add nsw i64 %67, %.0101154
  %69 = call i64 @llvm.smin.i64(i64 %68, i64 0)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv208) #6
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = add nsw i64 %71, %.099155
  %73 = call i64 @llvm.smax.i64(i64 %72, i64 0)
  %74 = call i64 @llvm.smin.i64(i64 %.0105152, i64 %69)
  %75 = call i64 @llvm.smax.i64(i64 %.0103153, i64 %73)
  %indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next209, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge159, label %.lr.ph158, !llvm.loop !16

._crit_edge165:                                   ; preds = %80, %._crit_edge159
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %.095166 = add nsw i32 %.093.lcssa215217, 1
  %76 = sext i32 %.095166 to i64
  %77 = load i64, ptr %2, align 8, !tbaa !5
  %78 = icmp sgt i64 %77, %76
  br i1 %78, label %.lr.ph173, label %._crit_edge174

.lr.ph164:                                        ; preds = %._crit_edge159, %80
  %79 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %80 unwind label %84

80:                                               ; preds = %.lr.ph164
  %81 = load i32, ptr %7, align 4, !tbaa !13
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !13
  %83 = sext i32 %82 to i64
  %.not120 = icmp slt i64 %.0103.lcssa, %83
  br i1 %.not120, label %._crit_edge165, label %.lr.ph164, !llvm.loop !17

84:                                               ; preds = %.lr.ph164
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %121

._crit_edge174:                                   ; preds = %.lr.ph173, %._crit_edge165
  %.1106.lcssa = phi i64 [ 0, %._crit_edge165 ], [ %96, %.lr.ph173 ]
  %.1104.lcssa = phi i64 [ 0, %._crit_edge165 ], [ %97, %.lr.ph173 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %86 = trunc i64 %.1106.lcssa to i32
  store i32 %86, ptr %8, align 4, !tbaa !13
  %sext190 = shl i64 %.1106.lcssa, 32
  %87 = ashr exact i64 %sext190, 32
  %.not122177 = icmp slt i64 %.1104.lcssa, %87
  br i1 %.not122177, label %._crit_edge180, label %.lr.ph179

.lr.ph173:                                        ; preds = %._crit_edge165, %.lr.ph173
  %indvars.iv211 = phi i64 [ %indvars.iv.next212, %.lr.ph173 ], [ %76, %._crit_edge165 ]
  %.1100170 = phi i64 [ %95, %.lr.ph173 ], [ 0, %._crit_edge165 ]
  %.1102169 = phi i64 [ %91, %.lr.ph173 ], [ 0, %._crit_edge165 ]
  %.1104168 = phi i64 [ %97, %.lr.ph173 ], [ 0, %._crit_edge165 ]
  %.1106167 = phi i64 [ %96, %.lr.ph173 ], [ 0, %._crit_edge165 ]
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv211) #6
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = add nsw i64 %89, %.1102169
  %91 = call i64 @llvm.smin.i64(i64 %90, i64 0)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv211) #6
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %94 = add nsw i64 %93, %.1100170
  %95 = call i64 @llvm.smax.i64(i64 %94, i64 0)
  %96 = call i64 @llvm.smin.i64(i64 %.1106167, i64 %91)
  %97 = call i64 @llvm.smax.i64(i64 %.1104168, i64 %95)
  %indvars.iv.next212 = add nsw i64 %indvars.iv211, 1
  %98 = load i64, ptr %2, align 8, !tbaa !5
  %99 = icmp sgt i64 %98, %indvars.iv.next212
  br i1 %99, label %.lr.ph173, label %._crit_edge174, !llvm.loop !18

._crit_edge180:                                   ; preds = %106, %._crit_edge174
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %100 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %100)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %102 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %102, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %103 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %103, ptr %10, align 8
  %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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %104, label %.lr.ph182, label %._crit_edge183

.lr.ph179:                                        ; preds = %._crit_edge174, %106
  %105 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %106 unwind label %110

106:                                              ; preds = %.lr.ph179
  %107 = load i32, ptr %8, align 4, !tbaa !13
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !13
  %109 = sext i32 %108 to i64
  %.not122 = icmp slt i64 %.1104.lcssa, %109
  br i1 %.not122, label %._crit_edge180, label %.lr.ph179, !llvm.loop !19

110:                                              ; preds = %.lr.ph179
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %121

._crit_edge183:                                   ; preds = %.lr.ph182, %._crit_edge180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %112 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %113 = load i64, ptr %1, align 8, !tbaa !5
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %113, 0
  br i1 %.not, label %._crit_edge187, label %.lr.ph186, !llvm.loop !20

.lr.ph182:                                        ; preds = %._crit_edge180, %.lr.ph182
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %116 = load i32, ptr %115, align 4, !tbaa !13
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %116)
  %118 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %119 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %119, ptr %10, align 8
  %120 = 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %120, label %.lr.ph182, label %._crit_edge183, !llvm.loop !21

121:                                              ; preds = %84, %110, %62
  %.pn124 = phi { ptr, i32 } [ %63, %62 ], [ %85, %84 ], [ %111, %110 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %122

122:                                              ; preds = %121, %21
  %.pn124.pn = phi { ptr, i32 } [ %.pn124, %121 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn124.pn

._crit_edge187:                                   ; preds = %._crit_edge183, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_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 #4 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long", !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 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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