; LLVM IR from ravireddy07/cpp-book :: src/Leetcode (1583_count-unhappy-friends)

; 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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Solution = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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::initializer_list.5" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 %class.Solution, align 1
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::initializer_list", align 8
  %5 = alloca [4 x %"class.std::vector.0"], align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::initializer_list.5", align 8
  %8 = alloca [3 x i32], align 4
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::initializer_list.5", align 8
  %13 = alloca [3 x i32], align 4
  %14 = alloca %"class.std::allocator.2", align 1
  %15 = alloca %"class.std::initializer_list.5", align 8
  %16 = alloca [3 x i32], align 4
  %17 = alloca %"class.std::allocator.2", align 1
  %18 = alloca %"class.std::initializer_list.5", align 8
  %19 = alloca [3 x i32], align 4
  %20 = alloca %"class.std::allocator.2", align 1
  %21 = alloca i1, align 1
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.std::initializer_list", align 8
  %25 = alloca [2 x %"class.std::vector.0"], align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.std::initializer_list.5", align 8
  %28 = alloca [2 x i32], align 4
  %29 = alloca %"class.std::allocator.2", align 1
  %30 = alloca %"class.std::initializer_list.5", align 8
  %31 = alloca [2 x i32], align 4
  %32 = alloca %"class.std::allocator.2", align 1
  %33 = alloca i1, align 1
  %34 = alloca %"class.std::allocator", align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 96, ptr %5) #6
  store i1 true, ptr %21, align 1
  store ptr %5, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  %35 = getelementptr inbounds i32, ptr %8, i64 1
  store i32 2, ptr %35, align 4, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %8, i64 2
  store i32 3, ptr %36, align 4, !tbaa !5
  %37 = getelementptr inbounds %"class.std::initializer_list.5", ptr %7, i32 0, i32 0
  store ptr %8, ptr %37, align 8, !tbaa !9
  %38 = getelementptr inbounds %"class.std::initializer_list.5", ptr %7, i32 0, i32 1
  store i64 3, ptr %38, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  %39 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %42 = load i64, ptr %41, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %40, i64 %42, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %43 unwind label %125

43:                                               ; preds = %0
  %44 = getelementptr inbounds %"class.std::vector.0", ptr %5, i64 1
  store ptr %44, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  store i32 3, ptr %13, align 4, !tbaa !5
  %45 = getelementptr inbounds i32, ptr %13, i64 1
  store i32 2, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds i32, ptr %13, i64 2
  store i32 0, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds %"class.std::initializer_list.5", ptr %12, i32 0, i32 0
  store ptr %13, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds %"class.std::initializer_list.5", ptr %12, i32 0, i32 1
  store i64 3, ptr %48, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  %49 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %52 = load i64, ptr %51, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr %50, i64 %52, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %53 unwind label %129

53:                                               ; preds = %43
  %54 = getelementptr inbounds %"class.std::vector.0", ptr %5, i64 2
  store ptr %54, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  store i32 3, ptr %16, align 4, !tbaa !5
  %55 = getelementptr inbounds i32, ptr %16, i64 1
  store i32 1, ptr %55, align 4, !tbaa !5
  %56 = getelementptr inbounds i32, ptr %16, i64 2
  store i32 0, ptr %56, align 4, !tbaa !5
  %57 = getelementptr inbounds %"class.std::initializer_list.5", ptr %15, i32 0, i32 0
  store ptr %16, ptr %57, align 8, !tbaa !9
  %58 = getelementptr inbounds %"class.std::initializer_list.5", ptr %15, i32 0, i32 1
  store i64 3, ptr %58, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  %59 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %62 = load i64, ptr %61, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr %60, i64 %62, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %63 unwind label %133

63:                                               ; preds = %53
  %64 = getelementptr inbounds %"class.std::vector.0", ptr %5, i64 3
  store ptr %64, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !5
  %65 = getelementptr inbounds i32, ptr %19, i64 1
  store i32 2, ptr %65, align 4, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %19, i64 2
  store i32 0, ptr %66, align 4, !tbaa !5
  %67 = getelementptr inbounds %"class.std::initializer_list.5", ptr %18, i32 0, i32 0
  store ptr %19, ptr %67, align 8, !tbaa !9
  %68 = getelementptr inbounds %"class.std::initializer_list.5", ptr %18, i32 0, i32 1
  store i64 3, ptr %68, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  %69 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %72 = load i64, ptr %71, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr %70, i64 %72, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %73 unwind label %137

73:                                               ; preds = %63
  store i1 false, ptr %21, align 1
  %74 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 0
  store ptr %5, ptr %74, align 8, !tbaa !14
  %75 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 1
  store i64 4, ptr %75, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  %76 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  %78 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %79 = load i64, ptr %78, align 8
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %77, i64 %79, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %80 unwind label %141

80:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #6
  store i1 true, ptr %33, align 1
  store ptr %25, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  %81 = getelementptr inbounds i32, ptr %28, i64 1
  store i32 1, ptr %81, align 4, !tbaa !5
  %82 = getelementptr inbounds %"class.std::initializer_list.5", ptr %27, i32 0, i32 0
  store ptr %28, ptr %82, align 8, !tbaa !9
  %83 = getelementptr inbounds %"class.std::initializer_list.5", ptr %27, i32 0, i32 1
  store i64 2, ptr %83, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #6
  %84 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %87 = load i64, ptr %86, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %85, i64 %87, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %88 unwind label %145

88:                                               ; preds = %80
  %89 = getelementptr inbounds %"class.std::vector.0", ptr %25, i64 1
  store ptr %89, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  store i32 2, ptr %31, align 4, !tbaa !5
  %90 = getelementptr inbounds i32, ptr %31, i64 1
  store i32 3, ptr %90, align 4, !tbaa !5
  %91 = getelementptr inbounds %"class.std::initializer_list.5", ptr %30, i32 0, i32 0
  store ptr %31, ptr %91, align 8, !tbaa !9
  %92 = getelementptr inbounds %"class.std::initializer_list.5", ptr %30, i32 0, i32 1
  store i64 2, ptr %92, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #6
  %93 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %96 = load i64, ptr %95, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr %94, i64 %96, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %97 unwind label %149

97:                                               ; preds = %88
  store i1 false, ptr %33, align 1
  %98 = getelementptr inbounds %"class.std::initializer_list", ptr %24, i32 0, i32 0
  store ptr %25, ptr %98, align 8, !tbaa !14
  %99 = getelementptr inbounds %"class.std::initializer_list", ptr %24, i32 0, i32 1
  store i64 2, ptr %99, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  %100 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %103 = load i64, ptr %102, align 8
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr %101, i64 %103, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %104 unwind label %153

104:                                              ; preds = %97
  %105 = invoke noundef i32 @_ZN8Solution14unhappyFriendsEiSt6vectorIS0_IiSaIiEESaIS2_EES4_(ptr noundef nonnull align 1 dereferenceable(1) %2, i32 noundef 4, ptr noundef %3, ptr noundef %23)
          to label %106 unwind label %157

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %105)
          to label %108 unwind label %157

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @.str)
          to label %110 unwind label %157

110:                                              ; preds = %108
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  %111 = getelementptr inbounds [2 x %"class.std::vector.0"], ptr %25, i32 0, i32 0
  %112 = getelementptr inbounds %"class.std::vector.0", ptr %111, i64 2
  br label %113

113:                                              ; preds = %113, %110
  %114 = phi ptr [ %112, %110 ], [ %115, %113 ]
  %115 = getelementptr inbounds %"class.std::vector.0", ptr %114, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %115) #6
  %116 = icmp eq ptr %115, %111
  br i1 %116, label %117, label %113

117:                                              ; preds = %113
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  %118 = getelementptr inbounds [4 x %"class.std::vector.0"], ptr %5, i32 0, i32 0
  %119 = getelementptr inbounds %"class.std::vector.0", ptr %118, i64 4
  br label %120

120:                                              ; preds = %120, %117
  %121 = phi ptr [ %119, %117 ], [ %122, %120 ]
  %122 = getelementptr inbounds %"class.std::vector.0", ptr %121, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %122) #6
  %123 = icmp eq ptr %122, %118
  br i1 %123, label %124, label %120

124:                                              ; preds = %120
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  ret i32 0

125:                                              ; preds = %0
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %10, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %11, align 4
  br label %192

129:                                              ; preds = %43
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %10, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %11, align 4
  br label %191

133:                                              ; preds = %53
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %10, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %11, align 4
  br label %190

137:                                              ; preds = %63
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  br label %189

141:                                              ; preds = %73
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %10, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %11, align 4
  br label %181

145:                                              ; preds = %80
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %10, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %11, align 4
  br label %170

149:                                              ; preds = %88
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %10, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %11, align 4
  br label %169

153:                                              ; preds = %97
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %10, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %11, align 4
  br label %161

157:                                              ; preds = %108, %106, %104
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %10, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %11, align 4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  br label %161

161:                                              ; preds = %157, %153
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  %162 = getelementptr inbounds [2 x %"class.std::vector.0"], ptr %25, i32 0, i32 0
  %163 = getelementptr inbounds %"class.std::vector.0", ptr %162, i64 2
  br label %164

164:                                              ; preds = %164, %161
  %165 = phi ptr [ %163, %161 ], [ %166, %164 ]
  %166 = getelementptr inbounds %"class.std::vector.0", ptr %165, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %166) #6
  %167 = icmp eq ptr %166, %162
  br i1 %167, label %168, label %164

168:                                              ; preds = %164
  br label %169

169:                                              ; preds = %168, %149
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %170

170:                                              ; preds = %169, %145
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  %171 = load i1, ptr %33, align 1
  br i1 %171, label %172, label %180

172:                                              ; preds = %170
  %173 = load ptr, ptr %26, align 8
  %174 = icmp eq ptr %25, %173
  br i1 %174, label %179, label %175

175:                                              ; preds = %175, %172
  %176 = phi ptr [ %173, %172 ], [ %177, %175 ]
  %177 = getelementptr inbounds %"class.std::vector.0", ptr %176, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %177) #6
  %178 = icmp eq ptr %177, %25
  br i1 %178, label %179, label %175

179:                                              ; preds = %175, %172
  br label %180

180:                                              ; preds = %179, %170
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %181

181:                                              ; preds = %180, %141
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  %182 = getelementptr inbounds [4 x %"class.std::vector.0"], ptr %5, i32 0, i32 0
  %183 = getelementptr inbounds %"class.std::vector.0", ptr %182, i64 4
  br label %184

184:                                              ; preds = %184, %181
  %185 = phi ptr [ %183, %181 ], [ %186, %184 ]
  %186 = getelementptr inbounds %"class.std::vector.0", ptr %185, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %186) #6
  %187 = icmp eq ptr %186, %182
  br i1 %187, label %188, label %184

188:                                              ; preds = %184
  br label %189

189:                                              ; preds = %188, %137
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  br label %190

190:                                              ; preds = %189, %133
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  br label %191

191:                                              ; preds = %190, %129
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  br label %192

192:                                              ; preds = %191, %125
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  %193 = load i1, ptr %21, align 1
  br i1 %193, label %194, label %202

194:                                              ; preds = %192
  %195 = load ptr, ptr %6, align 8
  %196 = icmp eq ptr %5, %195
  br i1 %196, label %201, label %197

197:                                              ; preds = %197, %194
  %198 = phi ptr [ %195, %194 ], [ %199, %197 ]
  %199 = getelementptr inbounds %"class.std::vector.0", ptr %198, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %199) #6
  %200 = icmp eq ptr %199, %5
  br i1 %200, label %201, label %197

201:                                              ; preds = %197, %194
  br label %202

202:                                              ; preds = %201, %192
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %10, align 8
  %205 = load i32, ptr %11, align 4
  %206 = insertvalue { ptr, i32 } poison, ptr %204, 0
  %207 = insertvalue { ptr, i32 } %206, i32 %205, 1
  resume { ptr, i32 } %207
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8Solution14unhappyFriendsEiSt6vectorIS0_IiSaIiEESaIS2_EES4_(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef, ptr noundef) #4 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIiE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTSSt16initializer_listISt6vectorIiSaIiEEE", !11, i64 0, !12, i64 8}
!16 = !{!15, !12, i64 8}


; 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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Solution = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 %class.Solution, align 1
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca [4 x %"class.std::vector.0"], align 8
  %4 = alloca [3 x i32], align 4
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca [3 x i32], align 4
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca [3 x i32], align 4
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca [3 x i32], align 4
  %11 = alloca %"class.std::allocator.2", align 1
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca [2 x %"class.std::vector.0"], align 8
  %15 = alloca [2 x i32], align 4
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca [2 x i32], align 4
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 2, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 3, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr nonnull %4, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %.thread56

22:                                               ; preds = %0
  %23 = getelementptr inbounds i8, ptr %3, i64 24
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  store i32 3, ptr %6, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 2, ptr %24, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 0, ptr %25, 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 @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr nonnull %6, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %26 unwind label %53

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %3, i64 48
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  store i32 3, ptr %8, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 1, ptr %28, align 4, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %8, i64 8
  store i32 0, ptr %29, align 4, !tbaa !5
  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 @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr nonnull %8, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %30 unwind label %55

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %3, i64 72
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 2, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %10, i64 8
  store i32 0, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr nonnull %10, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %34 unwind label %57

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr nonnull %3, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %35 unwind label %59

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %15, i64 4
  store i32 1, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr nonnull %15, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %37 unwind label %.thread

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %14, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  store i32 2, ptr %17, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 3, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr nonnull %17, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %40 unwind label %62

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr nonnull %14, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %41 unwind label %64

41:                                               ; preds = %40
  %42 = invoke noundef i32 @_ZN8Solution14unhappyFriendsEiSt6vectorIS0_IiSaIiEESaIS2_EES4_(ptr noundef nonnull align 1 dereferenceable(1) %1, i32 noundef 4, ptr noundef nonnull %2, ptr noundef nonnull %13)
          to label %43 unwind label %66

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %42)
          to label %45 unwind label %66

45:                                               ; preds = %43
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str)
          to label %47 unwind label %66

47:                                               ; preds = %45
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #6
  %48 = getelementptr inbounds i8, ptr %14, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  %49 = getelementptr inbounds i8, ptr %3, i64 72
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %49) #6
  %50 = getelementptr inbounds i8, ptr %3, i64 48
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %51 = getelementptr inbounds i8, ptr %3, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %51) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  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.end.p0(i64 12, ptr nonnull %8) #6
  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 12, ptr nonnull %6) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #6
  ret i32 0

.thread56:                                        ; preds = %0
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  br label %.loopexit

53:                                               ; preds = %22
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %75

55:                                               ; preds = %26
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %74

57:                                               ; preds = %30
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit62

59:                                               ; preds = %34
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit62.loopexit

.thread:                                          ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %.loopexit64

62:                                               ; preds = %37
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit65

64:                                               ; preds = %40
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit65.loopexit

66:                                               ; preds = %45, %43, %41
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %.loopexit65.loopexit

.loopexit65.loopexit:                             ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #6
  %68 = getelementptr inbounds i8, ptr %14, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %68) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %.loopexit65

.loopexit65:                                      ; preds = %.loopexit65.loopexit, %62
  %.pn.pn = phi { ptr, i32 } [ %63, %62 ], [ %.pn, %.loopexit65.loopexit ]
  %69 = phi i1 [ false, %62 ], [ true, %.loopexit65.loopexit ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br i1 %69, label %.loopexit64, label %.preheader63.preheader

.preheader63.preheader:                           ; preds = %.loopexit65
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %.loopexit64

.loopexit64:                                      ; preds = %.preheader63.preheader, %.thread, %.loopexit65
  %.pn.pn.pn55 = phi { ptr, i32 } [ %61, %.thread ], [ %.pn.pn, %.loopexit65 ], [ %.pn.pn, %.preheader63.preheader ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %.loopexit62.loopexit

.loopexit62.loopexit:                             ; preds = %.loopexit64, %59
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn55, %.loopexit64 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  %70 = getelementptr inbounds i8, ptr %3, i64 72
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %70) #6
  %71 = getelementptr inbounds i8, ptr %3, i64 48
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %71) #6
  %72 = getelementptr inbounds i8, ptr %3, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %72) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %.loopexit62

.loopexit62:                                      ; preds = %.loopexit62.loopexit, %57
  %73 = phi i1 [ false, %57 ], [ true, %.loopexit62.loopexit ]
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %58, %57 ], [ %.pn.pn.pn.pn, %.loopexit62.loopexit ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  br label %74

74:                                               ; preds = %.loopexit62, %55
  %.137 = phi i1 [ %73, %.loopexit62 ], [ false, %55 ]
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %.loopexit62 ], [ %56, %55 ]
  %.023 = phi ptr [ %31, %.loopexit62 ], [ %27, %55 ]
  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.end.p0(i64 12, ptr nonnull %8) #6
  br label %75

75:                                               ; preds = %53, %74
  %.238 = phi i1 [ %.137, %74 ], [ false, %53 ]
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %74 ], [ %54, %53 ]
  %.124 = phi ptr [ %.023, %74 ], [ %23, %53 ]
  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 12, ptr nonnull %6) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  br i1 %.238, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %75, %.preheader
  %76 = phi ptr [ %77, %.preheader ], [ %.124, %75 ]
  %77 = getelementptr inbounds i8, ptr %76, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %77) #6
  %78 = icmp eq ptr %77, %3
  br i1 %78, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %.thread56, %75
  %.pn.pn.pn.pn.pn.pn.pn.pn61 = phi { ptr, i32 } [ %52, %.thread56 ], [ %.pn.pn.pn.pn.pn.pn.pn, %75 ], [ %.pn.pn.pn.pn.pn.pn.pn, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn61
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8Solution14unhappyFriendsEiSt6vectorIS0_IiSaIiEESaIS2_EES4_(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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"}


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