; LLVM IR from abhisheknaiidu/dsa :: AlgoExpert/Medium (spiral-traverse)

; 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.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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14abhisheknaiiduv() #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::initializer_list", align 8
  %8 = alloca [3 x %"class.std::vector.0"], align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::initializer_list.5", align 8
  %11 = alloca [3 x i32], align 4
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %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 i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @_Z14abhisheknaiiduv()
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr %8) #6
  store i1 true, ptr %21, align 1
  store ptr %8, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  %29 = getelementptr inbounds i32, ptr %11, i64 1
  store i32 2, ptr %29, align 4, !tbaa !5
  %30 = getelementptr inbounds i32, ptr %11, i64 2
  store i32 3, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds %"class.std::initializer_list.5", ptr %10, i32 0, i32 0
  store ptr %11, ptr %31, align 8, !tbaa !11
  %32 = getelementptr inbounds %"class.std::initializer_list.5", ptr %10, i32 0, i32 1
  store i64 3, ptr %32, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  %33 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %36 = load i64, ptr %35, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr %34, i64 %36, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %37 unwind label %113

37:                                               ; preds = %2
  %38 = getelementptr inbounds %"class.std::vector.0", ptr %8, i64 1
  store ptr %38, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  store i32 4, ptr %16, align 4, !tbaa !5
  %39 = getelementptr inbounds i32, ptr %16, i64 1
  store i32 5, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds i32, ptr %16, i64 2
  store i32 6, ptr %40, align 4, !tbaa !5
  %41 = getelementptr inbounds %"class.std::initializer_list.5", ptr %15, i32 0, i32 0
  store ptr %16, ptr %41, align 8, !tbaa !11
  %42 = getelementptr inbounds %"class.std::initializer_list.5", ptr %15, i32 0, i32 1
  store i64 3, ptr %42, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  %43 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %46 = load i64, ptr %45, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr %44, i64 %46, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %47 unwind label %117

47:                                               ; preds = %37
  %48 = getelementptr inbounds %"class.std::vector.0", ptr %8, i64 2
  store ptr %48, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  store i32 7, ptr %19, align 4, !tbaa !5
  %49 = getelementptr inbounds i32, ptr %19, i64 1
  store i32 8, ptr %49, align 4, !tbaa !5
  %50 = getelementptr inbounds i32, ptr %19, i64 2
  store i32 9, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds %"class.std::initializer_list.5", ptr %18, i32 0, i32 0
  store ptr %19, ptr %51, align 8, !tbaa !11
  %52 = getelementptr inbounds %"class.std::initializer_list.5", ptr %18, i32 0, i32 1
  store i64 3, ptr %52, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  %53 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %56 = load i64, ptr %55, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr %54, i64 %56, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %57 unwind label %121

57:                                               ; preds = %47
  store i1 false, ptr %21, align 1
  %58 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 0
  store ptr %8, ptr %58, align 8, !tbaa !15
  %59 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 1
  store i64 3, ptr %59, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  %60 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8
  %62 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %63 = load i64, ptr %62, align 8
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %61, i64 %63, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %64 unwind label %125

64:                                               ; preds = %57
  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
  %65 = getelementptr inbounds [3 x %"class.std::vector.0"], ptr %8, i32 0, i32 0
  %66 = getelementptr inbounds %"class.std::vector.0", ptr %65, i64 3
  br label %67

67:                                               ; preds = %67, %64
  %68 = phi ptr [ %66, %64 ], [ %69, %67 ]
  %69 = getelementptr inbounds %"class.std::vector.0", ptr %68, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %69) #6
  %70 = icmp eq ptr %69, %65
  br i1 %70, label %71, label %67

71:                                               ; preds = %67
  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) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %72 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %73 = sub i64 %72, 1
  %74 = trunc i64 %73 to i32
  store i32 %74, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %76 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #6
  %77 = sub i64 %76, 1
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  br label %79

79:                                               ; preds = %240, %71
  %80 = load i32, ptr %23, align 4, !tbaa !5
  %81 = load i32, ptr %24, align 4, !tbaa !5
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %83, label %87

83:                                               ; preds = %79
  %84 = load i32, ptr %25, align 4, !tbaa !5
  %85 = load i32, ptr %26, align 4, !tbaa !5
  %86 = icmp sle i32 %84, %85
  br label %87

87:                                               ; preds = %83, %79
  %88 = phi i1 [ false, %79 ], [ %86, %83 ]
  br i1 %88, label %89, label %244

89:                                               ; preds = %87
  %90 = load i32, ptr %27, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %156

92:                                               ; preds = %89
  %93 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %93, ptr %28, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %110, %92
  %95 = load i32, ptr %28, align 4, !tbaa !5
  %96 = load i32, ptr %26, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %98, label %153

98:                                               ; preds = %94
  %99 = load i32, ptr %23, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %100) #6
  %102 = load i32, ptr %28, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #6
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %105)
          to label %107 unwind label %149

107:                                              ; preds = %98
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %109 unwind label %149

109:                                              ; preds = %107
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %28, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %28, align 4, !tbaa !5
  br label %94, !llvm.loop !18

113:                                              ; preds = %2
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %13, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %14, align 4
  br label %138

117:                                              ; preds = %37
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %13, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %14, align 4
  br label %137

121:                                              ; preds = %47
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %13, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %14, align 4
  br label %136

125:                                              ; preds = %57
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %13, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %14, align 4
  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
  %129 = getelementptr inbounds [3 x %"class.std::vector.0"], ptr %8, i32 0, i32 0
  %130 = getelementptr inbounds %"class.std::vector.0", ptr %129, i64 3
  br label %131

131:                                              ; preds = %131, %125
  %132 = phi ptr [ %130, %125 ], [ %133, %131 ]
  %133 = getelementptr inbounds %"class.std::vector.0", ptr %132, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %133) #6
  %134 = icmp eq ptr %133, %129
  br i1 %134, label %135, label %131

135:                                              ; preds = %131
  br label %136

136:                                              ; preds = %135, %121
  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 %137

137:                                              ; preds = %136, %117
  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 %138

138:                                              ; preds = %137, %113
  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.end.p0(i64 12, ptr %11) #6
  %139 = load i1, ptr %21, align 1
  br i1 %139, label %140, label %148

140:                                              ; preds = %138
  %141 = load ptr, ptr %9, align 8
  %142 = icmp eq ptr %8, %141
  br i1 %142, label %147, label %143

143:                                              ; preds = %143, %140
  %144 = phi ptr [ %141, %140 ], [ %145, %143 ]
  %145 = getelementptr inbounds %"class.std::vector.0", ptr %144, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %145) #6
  %146 = icmp eq ptr %145, %8
  br i1 %146, label %147, label %143

147:                                              ; preds = %143, %140
  br label %148

148:                                              ; preds = %147, %138
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #6
  br label %246

149:                                              ; preds = %228, %219, %201, %192, %174, %165, %107, %98
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %13, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %246

153:                                              ; preds = %94
  %154 = load i32, ptr %23, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %23, align 4, !tbaa !5
  br label %240

156:                                              ; preds = %89
  %157 = load i32, ptr %27, align 4, !tbaa !5
  %158 = icmp eq i32 %157, 1
  br i1 %158, label %159, label %183

159:                                              ; preds = %156
  %160 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %160, ptr %28, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %177, %159
  %162 = load i32, ptr %28, align 4, !tbaa !5
  %163 = load i32, ptr %24, align 4, !tbaa !5
  %164 = icmp sle i32 %162, %163
  br i1 %164, label %165, label %180

165:                                              ; preds = %161
  %166 = load i32, ptr %28, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %167) #6
  %169 = load i32, ptr %26, 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) %168, i64 noundef %170) #6
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %172)
          to label %174 unwind label %149

174:                                              ; preds = %165
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %176 unwind label %149

176:                                              ; preds = %174
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %28, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %28, align 4, !tbaa !5
  br label %161, !llvm.loop !20

180:                                              ; preds = %161
  %181 = load i32, ptr %26, align 4, !tbaa !5
  %182 = add nsw i32 %181, -1
  store i32 %182, ptr %26, align 4, !tbaa !5
  br label %239

183:                                              ; preds = %156
  %184 = load i32, ptr %27, align 4, !tbaa !5
  %185 = icmp eq i32 %184, 2
  br i1 %185, label %186, label %210

186:                                              ; preds = %183
  %187 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %187, ptr %28, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %204, %186
  %189 = load i32, ptr %28, align 4, !tbaa !5
  %190 = load i32, ptr %25, align 4, !tbaa !5
  %191 = icmp sge i32 %189, %190
  br i1 %191, label %192, label %207

192:                                              ; preds = %188
  %193 = load i32, ptr %24, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %194) #6
  %196 = load i32, ptr %28, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %197) #6
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %199)
          to label %201 unwind label %149

201:                                              ; preds = %192
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %203 unwind label %149

203:                                              ; preds = %201
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %28, align 4, !tbaa !5
  %206 = add nsw i32 %205, -1
  store i32 %206, ptr %28, align 4, !tbaa !5
  br label %188, !llvm.loop !21

207:                                              ; preds = %188
  %208 = load i32, ptr %24, align 4, !tbaa !5
  %209 = add nsw i32 %208, -1
  store i32 %209, ptr %24, align 4, !tbaa !5
  br label %238

210:                                              ; preds = %183
  %211 = load i32, ptr %27, align 4, !tbaa !5
  %212 = icmp eq i32 %211, 3
  br i1 %212, label %213, label %237

213:                                              ; preds = %210
  %214 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %214, ptr %28, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %231, %213
  %216 = load i32, ptr %28, align 4, !tbaa !5
  %217 = load i32, ptr %23, align 4, !tbaa !5
  %218 = icmp sge i32 %216, %217
  br i1 %218, label %219, label %234

219:                                              ; preds = %215
  %220 = load i32, ptr %28, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %221) #6
  %223 = load i32, ptr %25, 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) %222, i64 noundef %224) #6
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %226)
          to label %228 unwind label %149

228:                                              ; preds = %219
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %230 unwind label %149

230:                                              ; preds = %228
  br label %231

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

234:                                              ; preds = %215
  %235 = load i32, ptr %25, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %25, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %234, %210
  br label %238

238:                                              ; preds = %237, %207
  br label %239

239:                                              ; preds = %238, %180
  br label %240

240:                                              ; preds = %239, %153
  %241 = load i32, ptr %27, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  %243 = srem i32 %242, 4
  store i32 %243, ptr %27, align 4, !tbaa !5
  br label %79, !llvm.loop !23

244:                                              ; preds = %87
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  %245 = load i32, ptr %3, align 4
  ret i32 %245

246:                                              ; preds = %149, %148
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %247

247:                                              ; preds = %246
  %248 = load ptr, ptr %13, align 8
  %249 = load i32, ptr %14, align 4
  %250 = insertvalue { ptr, i32 } poison, ptr %248, 0
  %251 = insertvalue { ptr, i32 } %250, i32 %249, 1
  resume { ptr, i32 } %251
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #3 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 #0 align 2

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

; Function Attrs: mustprogress 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

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

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

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

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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!12, !10, i64 0}
!12 = !{!"_ZTSSt16initializer_listIiE", !10, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSSt16initializer_listISt6vectorIiSaIiEEE", !10, i64 0, !13, i64 8}
!17 = !{!16, !13, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}


; 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.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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14abhisheknaiiduv() local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca [3 x %"class.std::vector.0"], align 8
  %5 = alloca [3 x i32], align 4
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca [3 x i32], align 4
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca [3 x i32], align 4
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::allocator", align 1
  tail call void @_Z14abhisheknaiiduv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 2, ptr %12, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 3, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr nonnull %5, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %14 unwind label %.thread

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

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %4, i64 48
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  store i32 7, ptr %9, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 8, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 9, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr nonnull %9, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %22 unwind label %58

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr nonnull %4, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %23 unwind label %.loopexit94.loopexit

23:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  %24 = getelementptr inbounds i8, ptr %4, i64 48
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %25 = getelementptr inbounds i8, ptr %4, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  %26 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %27 = trunc i64 %26 to i32
  %28 = add i32 %27, -1
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  %30 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = trunc i64 %30 to i32
  %32 = add i32 %31, -1
  %33 = or i32 %28, %32
  %34 = icmp sgt i32 %33, -1
  br i1 %34, label %.lr.ph115, label %._crit_edge116

.lr.ph115:                                        ; preds = %23, %96
  %.048113 = phi i32 [ %98, %96 ], [ 0, %23 ]
  %.049112 = phi i32 [ %.150, %96 ], [ %32, %23 ]
  %.051111 = phi i32 [ %.152, %96 ], [ 0, %23 ]
  %.053110 = phi i32 [ %.154, %96 ], [ %28, %23 ]
  %.055109 = phi i32 [ %.156, %96 ], [ 0, %23 ]
  switch i32 %.048113, label %96 [
    i32 0, label %.preheader
    i32 1, label %.preheader84
    i32 2, label %.preheader88
    i32 3, label %.preheader91
  ]

.preheader91:                                     ; preds = %.lr.ph115
  %.not95 = icmp slt i32 %.053110, %.055109
  br i1 %.not95, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader91
  %35 = sext i32 %.051111 to i64
  %36 = sext i32 %.053110 to i64
  %37 = sext i32 %.055109 to i64
  br label %87

.preheader88:                                     ; preds = %.lr.ph115
  %.not7497 = icmp slt i32 %.049112, %.051111
  br i1 %.not7497, label %._crit_edge100, label %.lr.ph99

.lr.ph99:                                         ; preds = %.preheader88
  %38 = sext i32 %.053110 to i64
  %39 = sext i32 %.049112 to i64
  %40 = sext i32 %.051111 to i64
  br label %78

.preheader84:                                     ; preds = %.lr.ph115
  %.not75101 = icmp sgt i32 %.055109, %.053110
  br i1 %.not75101, label %._crit_edge104, label %.lr.ph103

.lr.ph103:                                        ; preds = %.preheader84
  %41 = sext i32 %.049112 to i64
  %42 = sext i32 %.055109 to i64
  %43 = add i32 %.053110, 1
  br label %69

.preheader:                                       ; preds = %.lr.ph115
  %.not76105 = icmp sgt i32 %.051111, %.049112
  br i1 %.not76105, label %._crit_edge108, label %.lr.ph107

.lr.ph107:                                        ; preds = %.preheader
  %44 = sext i32 %.055109 to i64
  %45 = sext i32 %.051111 to i64
  %46 = add i32 %.049112, 1
  br label %47

47:                                               ; preds = %.lr.ph107, %54
  %indvars.iv124 = phi i64 [ %45, %.lr.ph107 ], [ %indvars.iv.next125, %54 ]
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %44) #6
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %indvars.iv124) #6
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %50)
          to label %52 unwind label %.loopexit

52:                                               ; preds = %47
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %54 unwind label %.loopexit

54:                                               ; preds = %52
  %indvars.iv.next125 = add nsw i64 %indvars.iv124, 1
  %lftr.wideiv127 = trunc i64 %indvars.iv.next125 to i32
  %exitcond128.not = icmp eq i32 %46, %lftr.wideiv127
  br i1 %exitcond128.not, label %._crit_edge108, label %47, !llvm.loop !9

.thread:                                          ; preds = %2
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  br label %.loopexit93

56:                                               ; preds = %14
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %64

58:                                               ; preds = %18
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit94

.loopexit94.loopexit:                             ; preds = %22
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  %61 = getelementptr inbounds i8, ptr %4, i64 48
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  %62 = getelementptr inbounds i8, ptr %4, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %.loopexit94

.loopexit94:                                      ; preds = %.loopexit94.loopexit, %58
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %60, %.loopexit94.loopexit ]
  %63 = phi i1 [ false, %58 ], [ true, %.loopexit94.loopexit ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %64

64:                                               ; preds = %56, %.loopexit94
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit94 ], [ %57, %56 ]
  %.060 = phi ptr [ %19, %.loopexit94 ], [ %15, %56 ]
  %.158 = phi i1 [ %63, %.loopexit94 ], [ false, %56 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  br i1 %.158, label %.loopexit93, label %.preheader92

.preheader92:                                     ; preds = %64, %.preheader92
  %65 = phi ptr [ %66, %.preheader92 ], [ %.060, %64 ]
  %66 = getelementptr inbounds i8, ptr %65, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %66) #6
  %67 = icmp eq ptr %66, %4
  br i1 %67, label %.loopexit93, label %.preheader92

.loopexit93:                                      ; preds = %.preheader92, %.thread, %64
  %.pn.pn.pn83 = phi { ptr, i32 } [ %55, %.thread ], [ %.pn.pn, %64 ], [ %.pn.pn, %.preheader92 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  br label %102

.loopexit:                                        ; preds = %47, %52
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %74, %69
  %lpad.loopexit85 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %78, %83
  %lpad.loopexit89 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %87, %92
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit85, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit89, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %102

._crit_edge108:                                   ; preds = %54, %.preheader
  %68 = add nsw i32 %.055109, 1
  br label %96

69:                                               ; preds = %.lr.ph103, %76
  %indvars.iv121 = phi i64 [ %42, %.lr.ph103 ], [ %indvars.iv.next122, %76 ]
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv121) #6
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %41) #6
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %72)
          to label %74 unwind label %.loopexit.split-lp.loopexit

74:                                               ; preds = %69
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %76 unwind label %.loopexit.split-lp.loopexit

76:                                               ; preds = %74
  %indvars.iv.next122 = add nsw i64 %indvars.iv121, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next122 to i32
  %exitcond.not = icmp eq i32 %43, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge104, label %69, !llvm.loop !11

._crit_edge104:                                   ; preds = %76, %.preheader84
  %77 = add nsw i32 %.049112, -1
  br label %96

78:                                               ; preds = %.lr.ph99, %85
  %indvars.iv118 = phi i64 [ %39, %.lr.ph99 ], [ %indvars.iv.next119, %85 ]
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %38) #6
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %indvars.iv118) #6
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %81)
          to label %83 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

83:                                               ; preds = %78
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %85 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

85:                                               ; preds = %83
  %indvars.iv.next119 = add nsw i64 %indvars.iv118, -1
  %.not74.not = icmp sgt i64 %indvars.iv118, %40
  br i1 %.not74.not, label %78, label %._crit_edge100, !llvm.loop !12

._crit_edge100:                                   ; preds = %85, %.preheader88
  %86 = add nsw i32 %.053110, -1
  br label %96

87:                                               ; preds = %.lr.ph, %94
  %indvars.iv = phi i64 [ %36, %.lr.ph ], [ %indvars.iv.next, %94 ]
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %35) #6
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %90)
          to label %92 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

92:                                               ; preds = %87
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %94 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

94:                                               ; preds = %92
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not.not = icmp sgt i64 %indvars.iv, %37
  br i1 %.not.not, label %87, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %94, %.preheader91
  %95 = add nsw i32 %.051111, 1
  br label %96

96:                                               ; preds = %.lr.ph115, %._crit_edge104, %._crit_edge, %._crit_edge100, %._crit_edge108
  %.156 = phi i32 [ %68, %._crit_edge108 ], [ %.055109, %._crit_edge104 ], [ %.055109, %._crit_edge100 ], [ %.055109, %._crit_edge ], [ %.055109, %.lr.ph115 ]
  %.154 = phi i32 [ %.053110, %._crit_edge108 ], [ %.053110, %._crit_edge104 ], [ %86, %._crit_edge100 ], [ %.053110, %._crit_edge ], [ %.053110, %.lr.ph115 ]
  %.152 = phi i32 [ %.051111, %._crit_edge108 ], [ %.051111, %._crit_edge104 ], [ %.051111, %._crit_edge100 ], [ %95, %._crit_edge ], [ %.051111, %.lr.ph115 ]
  %.150 = phi i32 [ %.049112, %._crit_edge108 ], [ %77, %._crit_edge104 ], [ %.049112, %._crit_edge100 ], [ %.049112, %._crit_edge ], [ %.049112, %.lr.ph115 ]
  %97 = add nsw i32 %.048113, 1
  %98 = srem i32 %97, 4
  %99 = icmp sle i32 %.156, %.154
  %100 = icmp sle i32 %.152, %.150
  %101 = select i1 %99, i1 %100, i1 false
  br i1 %101, label %.lr.ph115, label %._crit_edge116, !llvm.loop !14

._crit_edge116:                                   ; preds = %96, %23
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret i32 0

102:                                              ; preds = %.loopexit.split-lp, %.loopexit93
  %.pn77 = phi { ptr, i32 } [ %lpad.phi, %.loopexit.split-lp ], [ %.pn.pn.pn83, %.loopexit93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn77
}

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

; Function Attrs: mustprogress 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 @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #3 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 #0 align 2

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

; Function Attrs: mustprogress 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

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

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

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

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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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