; LLVM IR from abeaumont/competitive-programming :: uva (10158)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::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::allocator" = type { i8 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%class.anon.2 = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %class.anon, align 8
  %19 = alloca %"class.std::function.0", align 8
  %20 = alloca %class.anon.2, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %30, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %31 unwind label %43

31:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %34 unwind label %47

34:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 -1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %36, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %37 unwind label %51

37:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %60, %37
  %39 = load i32, ptr %16, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %55, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %63

43:                                               ; preds = %0
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %361

47:                                               ; preds = %31
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %360

51:                                               ; preds = %34
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %359

55:                                               ; preds = %38
  %56 = load i32, ptr %16, align 4, !tbaa !5
  %57 = load i32, ptr %16, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %58) #6
  store i32 %56, ptr %59, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %55
  %61 = load i32, ptr %16, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %16, align 4, !tbaa !5
  br label %38, !llvm.loop !9

63:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %64 = getelementptr inbounds %class.anon, ptr %18, i32 0, i32 0
  store ptr %11, ptr %64, align 8, !tbaa !11
  %65 = getelementptr inbounds %class.anon, ptr %18, i32 0, i32 1
  store ptr %17, ptr %65, align 8, !tbaa !11
  call void @"_ZNSt8functionIFiiEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %66 = getelementptr inbounds %class.anon.2, ptr %20, i32 0, i32 0
  store ptr %17, ptr %66, align 8, !tbaa !11
  %67 = getelementptr inbounds %class.anon.2, ptr %20, i32 0, i32 1
  store ptr %6, ptr %67, align 8, !tbaa !11
  %68 = getelementptr inbounds %class.anon.2, ptr %20, i32 0, i32 2
  store ptr %11, ptr %68, align 8, !tbaa !11
  invoke void @"_ZNSt8functionIFviiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %69 unwind label %81

69:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %70

70:                                               ; preds = %354, %318, %239, %69
  br label %71

71:                                               ; preds = %70
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %73 unwind label %85

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %75 unwind label %85

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %77 unwind label %85

77:                                               ; preds = %75
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %89, label %80

80:                                               ; preds = %77
  br label %355

81:                                               ; preds = %63
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %358

85:                                               ; preds = %349, %346, %340, %337, %334, %331, %328, %325, %75, %73, %71
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %357

89:                                               ; preds = %77
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %245

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %93)
          to label %95 unwind label %108

95:                                               ; preds = %92
  store i32 %94, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %96)
          to label %98 unwind label %112

98:                                               ; preds = %95
  store i32 %97, ptr %22, align 4, !tbaa !5
  %99 = load i32, ptr %21, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %100) #6
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %22, align 4, !tbaa !5
  %104 = icmp eq i32 %102, %103
  br i1 %104, label %105, label %116

105:                                              ; preds = %98
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %107 unwind label %112

107:                                              ; preds = %105
  store i32 5, ptr %23, align 4
  br label %239, !llvm.loop !13

108:                                              ; preds = %92
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  br label %244

112:                                              ; preds = %121, %105, %95
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  br label %243

116:                                              ; preds = %98
  %117 = load i32, ptr %21, align 4, !tbaa !5
  %118 = load i32, ptr %22, align 4, !tbaa !5
  %119 = icmp eq i32 %117, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  store i32 5, ptr %23, align 4
  br label %239, !llvm.loop !13

121:                                              ; preds = %116
  %122 = load i32, ptr %21, align 4, !tbaa !5
  %123 = load i32, ptr %22, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef %122, i32 noundef %123)
          to label %124 unwind label %112

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %125 = load i32, ptr %21, align 4, !tbaa !5
  %126 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %125)
          to label %127 unwind label %185

127:                                              ; preds = %124
  store i32 %126, ptr %24, align 4, !tbaa !5
  %128 = load i32, ptr %21, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %129) #6
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = icmp ne i32 %131, -1
  br i1 %132, label %133, label %194

133:                                              ; preds = %127
  %134 = load i32, ptr %22, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %135) #6
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp ne i32 %137, -1
  br i1 %138, label %139, label %194

139:                                              ; preds = %133
  %140 = load i32, ptr %21, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %141) #6
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = load i32, ptr %22, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %145) #6
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = icmp ne i32 %143, %147
  br i1 %148, label %149, label %193

149:                                              ; preds = %139
  %150 = load i32, ptr %21, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %151) #6
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %22, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %155) #6
  %157 = load i32, ptr %156, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef %153, i32 noundef %157)
          to label %158 unwind label %185

158:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %159 = load i32, ptr %21, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %160) #6
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %162)
          to label %164 unwind label %189

164:                                              ; preds = %158
  store i32 %163, ptr %25, align 4, !tbaa !5
  %165 = load i32, ptr %24, align 4, !tbaa !5
  %166 = load i32, ptr %22, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %167) #6
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %170) #6
  store i32 %165, ptr %171, align 4, !tbaa !5
  %172 = load i32, ptr %21, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %173) #6
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %176) #6
  store i32 %165, ptr %177, align 4, !tbaa !5
  %178 = load i32, ptr %25, align 4, !tbaa !5
  %179 = load i32, ptr %22, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %180) #6
  store i32 %178, ptr %181, align 4, !tbaa !5
  %182 = load i32, ptr %21, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %183) #6
  store i32 %178, ptr %184, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %193

185:                                              ; preds = %149, %124
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %9, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %10, align 4
  br label %242

189:                                              ; preds = %158
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %9, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %242

193:                                              ; preds = %164, %139
  br label %238

194:                                              ; preds = %133, %127
  %195 = load i32, ptr %21, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %196) #6
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = icmp ne i32 %198, -1
  br i1 %199, label %200, label %215

200:                                              ; preds = %194
  %201 = load i32, ptr %24, align 4, !tbaa !5
  %202 = load i32, ptr %21, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %203) #6
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %206) #6
  store i32 %201, ptr %207, align 4, !tbaa !5
  %208 = load i32, ptr %21, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %209) #6
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = load i32, ptr %24, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %213) #6
  store i32 %211, ptr %214, align 4, !tbaa !5
  br label %237

215:                                              ; preds = %194
  %216 = load i32, ptr %22, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %217) #6
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = icmp ne i32 %219, -1
  br i1 %220, label %221, label %236

221:                                              ; preds = %215
  %222 = load i32, ptr %24, align 4, !tbaa !5
  %223 = load i32, ptr %22, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %224) #6
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %227) #6
  store i32 %222, ptr %228, align 4, !tbaa !5
  %229 = load i32, ptr %22, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %230) #6
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = load i32, ptr %24, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %234) #6
  store i32 %232, ptr %235, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %221, %215
  br label %237

237:                                              ; preds = %236, %200
  br label %238

238:                                              ; preds = %237, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  store i32 0, ptr %23, align 4
  br label %239

239:                                              ; preds = %238, %120, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %240 = load i32, ptr %23, align 4
  switch i32 %240, label %367 [
    i32 0, label %241
    i32 5, label %70
  ]

241:                                              ; preds = %239
  br label %354

242:                                              ; preds = %189, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %243

243:                                              ; preds = %242, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %244

244:                                              ; preds = %243, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %357

245:                                              ; preds = %89
  %246 = load i32, ptr %3, align 4, !tbaa !5
  %247 = icmp eq i32 %246, 2
  br i1 %247, label %248, label %322

248:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %249 = load i32, ptr %4, align 4, !tbaa !5
  %250 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %249)
          to label %251 unwind label %261

251:                                              ; preds = %248
  store i32 %250, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %252 = load i32, ptr %5, align 4, !tbaa !5
  %253 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %252)
          to label %254 unwind label %265

254:                                              ; preds = %251
  store i32 %253, ptr %27, align 4, !tbaa !5
  %255 = load i32, ptr %26, align 4, !tbaa !5
  %256 = load i32, ptr %27, align 4, !tbaa !5
  %257 = icmp eq i32 %255, %256
  br i1 %257, label %258, label %269

258:                                              ; preds = %254
  %259 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %260 unwind label %265

260:                                              ; preds = %258
  store i32 5, ptr %23, align 4
  br label %318, !llvm.loop !13

261:                                              ; preds = %248
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %9, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %10, align 4
  br label %321

265:                                              ; preds = %306, %303, %296, %283, %258, %251
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %9, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %321

269:                                              ; preds = %254
  %270 = load i32, ptr %26, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %271) #6
  %273 = load i32, ptr %272, align 4, !tbaa !5
  %274 = load i32, ptr %27, align 4, !tbaa !5
  %275 = icmp eq i32 %273, %274
  br i1 %275, label %276, label %277

276:                                              ; preds = %269
  store i32 5, ptr %23, align 4
  br label %318, !llvm.loop !13

277:                                              ; preds = %269
  %278 = load i32, ptr %26, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %279) #6
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = icmp ne i32 %281, -1
  br i1 %282, label %283, label %290

283:                                              ; preds = %277
  %284 = load i32, ptr %26, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %285) #6
  %287 = load i32, ptr %286, align 4, !tbaa !5
  %288 = load i32, ptr %27, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef %287, i32 noundef %288)
          to label %289 unwind label %265

289:                                              ; preds = %283
  br label %290

290:                                              ; preds = %289, %277
  %291 = load i32, ptr %27, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %292) #6
  %294 = load i32, ptr %293, align 4, !tbaa !5
  %295 = icmp ne i32 %294, -1
  br i1 %295, label %296, label %303

296:                                              ; preds = %290
  %297 = load i32, ptr %27, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %298) #6
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %301 = load i32, ptr %26, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef %300, i32 noundef %301)
          to label %302 unwind label %265

302:                                              ; preds = %296
  br label %303

303:                                              ; preds = %302, %290
  %304 = load i32, ptr %26, align 4, !tbaa !5
  %305 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %304)
          to label %306 unwind label %265

306:                                              ; preds = %303
  store i32 %305, ptr %26, align 4, !tbaa !5
  %307 = load i32, ptr %27, align 4, !tbaa !5
  %308 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %307)
          to label %309 unwind label %265

309:                                              ; preds = %306
  store i32 %308, ptr %27, align 4, !tbaa !5
  %310 = load i32, ptr %27, align 4, !tbaa !5
  %311 = load i32, ptr %26, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %312) #6
  store i32 %310, ptr %313, align 4, !tbaa !5
  %314 = load i32, ptr %26, align 4, !tbaa !5
  %315 = load i32, ptr %27, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %316) #6
  store i32 %314, ptr %317, align 4, !tbaa !5
  store i32 0, ptr %23, align 4
  br label %318

318:                                              ; preds = %309, %276, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  %319 = load i32, ptr %23, align 4
  switch i32 %319, label %367 [
    i32 0, label %320
    i32 5, label %70
  ]

320:                                              ; preds = %318
  br label %353

321:                                              ; preds = %265, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %357

322:                                              ; preds = %245
  %323 = load i32, ptr %3, align 4, !tbaa !5
  %324 = icmp eq i32 %323, 3
  br i1 %324, label %325, label %337

325:                                              ; preds = %322
  %326 = load i32, ptr %4, align 4, !tbaa !5
  %327 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %326)
          to label %328 unwind label %85

328:                                              ; preds = %325
  %329 = load i32, ptr %5, align 4, !tbaa !5
  %330 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %329)
          to label %331 unwind label %85

331:                                              ; preds = %328
  %332 = icmp eq i32 %327, %330
  %333 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %332)
          to label %334 unwind label %85

334:                                              ; preds = %331
  %335 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %333, ptr noundef @.str.1)
          to label %336 unwind label %85

336:                                              ; preds = %334
  br label %352

337:                                              ; preds = %322
  %338 = load i32, ptr %4, align 4, !tbaa !5
  %339 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %338)
          to label %340 unwind label %85

340:                                              ; preds = %337
  %341 = sext i32 %339 to i64
  %342 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %341) #6
  %343 = load i32, ptr %342, align 4, !tbaa !5
  %344 = load i32, ptr %5, align 4, !tbaa !5
  %345 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %344)
          to label %346 unwind label %85

346:                                              ; preds = %340
  %347 = icmp eq i32 %343, %345
  %348 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %347)
          to label %349 unwind label %85

349:                                              ; preds = %346
  %350 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %348, ptr noundef @.str.1)
          to label %351 unwind label %85

351:                                              ; preds = %349
  br label %352

352:                                              ; preds = %351, %336
  br label %353

353:                                              ; preds = %352, %320
  br label %354

354:                                              ; preds = %353, %241
  br label %70, !llvm.loop !13

355:                                              ; preds = %80
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %356 = load i32, ptr %1, align 4
  ret i32 %356

357:                                              ; preds = %321, %244, %85
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %358

358:                                              ; preds = %357, %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %359

359:                                              ; preds = %358, %51
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %360

360:                                              ; preds = %359, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %361

361:                                              ; preds = %360, %43
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %362

362:                                              ; preds = %361
  %363 = load ptr, ptr %9, align 8
  %364 = load i32, ptr %10, align 4
  %365 = insertvalue { ptr, i32 } poison, ptr %363, 0
  %366 = insertvalue { ptr, i32 } %365, i32 %364, 1
  resume { ptr, i32 } %366

367:                                              ; preds = %318, %239
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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 uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFiiEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !10}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::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::allocator" = type { i8 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%class.anon.2 = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon, align 8
  %15 = alloca %"class.std::function.0", align 8
  %16 = alloca %class.anon.2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %19, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %20 unwind label %32

20:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %23 unwind label %34

23:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 -1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %25, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %26 unwind label %36

26:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  store ptr %8, ptr %14, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %13, ptr %29, align 8, !tbaa !9
  call void @"_ZNSt8functionIFiiEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #6
  store ptr %13, ptr %16, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %5, ptr %30, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %16, i64 16
  store ptr %8, ptr %31, align 8, !tbaa !9
  invoke void @"_ZNSt8functionIFviiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %43 unwind label %52

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %203

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  br label %202

36:                                               ; preds = %23
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  br label %201

.lr.ph:                                           ; preds = %26, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %26 ]
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #6
  %39 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %39, ptr %38, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !11

43:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #6
  br label %44

44:                                               ; preds = %.backedge, %43
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %46 unwind label %54

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %48 unwind label %54

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %50 unwind label %54

50:                                               ; preds = %48
  %51 = load i32, ptr %2, align 4, !tbaa !5
  switch i32 %51, label %183 [
    i32 0, label %198
    i32 1, label %56
    i32 2, label %136
    i32 3, label %175
  ]

52:                                               ; preds = %._crit_edge
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #6
  br label %200

54:                                               ; preds = %.invoke100, %.invoke, %186, %183, %178, %175, %48, %46, %44
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %199

56:                                               ; preds = %50
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %57)
          to label %59 unwind label %69

59:                                               ; preds = %56
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %60)
          to label %62 unwind label %71

62:                                               ; preds = %59
  %63 = sext i32 %58 to i64
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp eq i32 %65, %61
  br i1 %66, label %67, label %73

67:                                               ; preds = %62
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %.backedge unwind label %71, !llvm.loop !13

69:                                               ; preds = %56
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %199

71:                                               ; preds = %75, %67, %59
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %199

73:                                               ; preds = %62
  %74 = icmp eq i32 %58, %61
  br i1 %74, label %.backedge, label %75, !llvm.loop !13

75:                                               ; preds = %73
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %58, i32 noundef %61)
          to label %76 unwind label %71

76:                                               ; preds = %75
  %77 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %58)
          to label %78 unwind label %109

78:                                               ; preds = %76
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %.not74 = icmp eq i32 %80, -1
  br i1 %.not74, label %113, label %81

81:                                               ; preds = %78
  %82 = sext i32 %61 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %82) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %.not75 = icmp eq i32 %84, -1
  br i1 %.not75, label %113, label %85

85:                                               ; preds = %81
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %82) #6
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %.not78 = icmp eq i32 %87, %89
  br i1 %.not78, label %.backedge, label %90

90:                                               ; preds = %85
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %82) #6
  %94 = load i32, ptr %93, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %92, i32 noundef %94)
          to label %95 unwind label %109

95:                                               ; preds = %90
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %97)
          to label %99 unwind label %111

99:                                               ; preds = %95
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %82) #6
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %102) #6
  store i32 %77, ptr %103, align 4, !tbaa !5
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %106) #6
  store i32 %77, ptr %107, align 4, !tbaa !5
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %82) #6
  store i32 %98, ptr %108, align 4, !tbaa !5
  br label %.backedge.sink.split

109:                                              ; preds = %90, %76
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %199

111:                                              ; preds = %95
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %199

113:                                              ; preds = %81, %78
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %.not76 = icmp eq i32 %115, -1
  br i1 %.not76, label %124, label %116

116:                                              ; preds = %113
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %119) #6
  store i32 %77, ptr %120, align 4, !tbaa !5
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %63) #6
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %77 to i64
  br label %.backedge.sink.split

124:                                              ; preds = %113
  %125 = sext i32 %61 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %125) #6
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %.not77 = icmp eq i32 %127, -1
  br i1 %.not77, label %.backedge, label %128

128:                                              ; preds = %124
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %125) #6
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %131) #6
  store i32 %77, ptr %132, align 4, !tbaa !5
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %125) #6
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %77 to i64
  br label %.backedge.sink.split

136:                                              ; preds = %50
  %137 = load i32, ptr %3, align 4, !tbaa !5
  %138 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %137)
          to label %139 unwind label %146

139:                                              ; preds = %136
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %140)
          to label %142 unwind label %148

142:                                              ; preds = %139
  %143 = icmp eq i32 %138, %141
  br i1 %143, label %144, label %150

144:                                              ; preds = %142
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %.backedge unwind label %148, !llvm.loop !13

146:                                              ; preds = %136
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %199

148:                                              ; preds = %170, %168, %165, %158, %144, %139
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %199

150:                                              ; preds = %142
  %151 = sext i32 %138 to i64
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %151) #6
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = icmp eq i32 %153, %141
  br i1 %154, label %.backedge, label %155, !llvm.loop !13

155:                                              ; preds = %150
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %151) #6
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %.not71 = icmp eq i32 %157, -1
  br i1 %.not71, label %161, label %158

158:                                              ; preds = %155
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %151) #6
  %160 = load i32, ptr %159, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %160, i32 noundef %141)
          to label %161 unwind label %148

161:                                              ; preds = %158, %155
  %162 = sext i32 %141 to i64
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %162) #6
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %.not72 = icmp eq i32 %164, -1
  br i1 %.not72, label %168, label %165

165:                                              ; preds = %161
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %162) #6
  %167 = load i32, ptr %166, align 4, !tbaa !5
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %167, i32 noundef %138)
          to label %168 unwind label %148

168:                                              ; preds = %165, %161
  %169 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %138)
          to label %170 unwind label %148

170:                                              ; preds = %168
  %171 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %141)
          to label %.thread93 unwind label %148

.thread93:                                        ; preds = %170
  %172 = sext i32 %169 to i64
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %172) #6
  store i32 %171, ptr %173, align 4, !tbaa !5
  %174 = sext i32 %171 to i64
  br label %.backedge.sink.split

175:                                              ; preds = %50
  %176 = load i32, ptr %3, align 4, !tbaa !5
  %177 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %176)
          to label %178 unwind label %54

178:                                              ; preds = %175
  %179 = load i32, ptr %4, align 4, !tbaa !5
  %180 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %179)
          to label %181 unwind label %54

181:                                              ; preds = %178
  %182 = icmp eq i32 %177, %180
  br label %.invoke100

183:                                              ; preds = %50
  %184 = load i32, ptr %3, align 4, !tbaa !5
  %185 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %184)
          to label %186 unwind label %54

186:                                              ; preds = %183
  %187 = sext i32 %185 to i64
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %187) #6
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = load i32, ptr %4, align 4, !tbaa !5
  %191 = invoke noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %190)
          to label %192 unwind label %54

192:                                              ; preds = %186
  %193 = icmp eq i32 %189, %191
  br label %.invoke100

.invoke100:                                       ; preds = %181, %192
  %194 = phi i1 [ %193, %192 ], [ %182, %181 ]
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %194)
          to label %.invoke unwind label %54

.invoke:                                          ; preds = %.invoke100
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %195, ptr noundef nonnull @.str.1)
          to label %.backedge unwind label %54

.backedge.sink.split:                             ; preds = %99, %128, %116, %.thread93
  %.sink99 = phi i64 [ %174, %.thread93 ], [ %123, %116 ], [ %135, %128 ], [ %63, %99 ]
  %.sink = phi i32 [ %169, %.thread93 ], [ %122, %116 ], [ %134, %128 ], [ %98, %99 ]
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.sink99) #6
  store i32 %.sink, ptr %197, align 4, !tbaa !5
  br label %.backedge

.backedge:                                        ; preds = %.backedge.sink.split, %.invoke, %124, %85, %144, %150, %67, %73
  br label %44, !llvm.loop !13

198:                                              ; preds = %50
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

199:                                              ; preds = %146, %148, %69, %109, %111, %71, %54
  %.pn81.pn.pn = phi { ptr, i32 } [ %55, %54 ], [ %70, %69 ], [ %72, %71 ], [ %112, %111 ], [ %110, %109 ], [ %149, %148 ], [ %147, %146 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %200

200:                                              ; preds = %199, %52
  %.pn81.pn.pn.pn = phi { ptr, i32 } [ %.pn81.pn.pn, %199 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %201

201:                                              ; preds = %200, %36
  %.pn81.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn81.pn.pn.pn, %200 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %202

202:                                              ; preds = %201, %34
  %.pn81.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn81.pn.pn.pn.pn, %201 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %203

203:                                              ; preds = %202, %32
  %.pn81.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn81.pn.pn.pn.pn.pn, %202 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn81.pn.pn.pn.pn.pn.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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 uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFiiEEC2IZ4mainE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviiEEC2IZ4mainE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNKSt8functionIFiiEEclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(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 = { mustprogress 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass