; LLVM IR from Tudor67/Competitive-Programming :: AtCoder/ABC335 (D_sol1_spiral_matrix)

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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %59

32:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %29, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %33 unwind label %63

33:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #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) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = sub nsw i32 %34, 1
  store i32 %35, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = sub nsw i32 %36, 1
  store i32 %37, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %38

38:                                               ; preds = %167, %33
  %39 = load i32, ptr %13, align 4, !tbaa !8
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = mul nsw i32 %40, %41
  %43 = icmp slt i32 %39, %42
  br i1 %43, label %44, label %170

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %45 = load i32, ptr %11, align 4, !tbaa !8
  store i32 %45, ptr %14, align 4, !tbaa !8
  br label %46

46:                                               ; preds = %77, %44
  %47 = load i32, ptr %13, align 4, !tbaa !8
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = mul nsw i32 %48, %49
  %51 = icmp slt i32 %47, %50
  br i1 %51, label %52, label %56

52:                                               ; preds = %46
  %53 = load i32, ptr %14, align 4, !tbaa !8
  %54 = load i32, ptr %12, align 4, !tbaa !8
  %55 = icmp sle i32 %53, %54
  br label %56

56:                                               ; preds = %52, %46
  %57 = phi i1 [ false, %46 ], [ %55, %52 ]
  br i1 %57, label %68, label %58

58:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %80

59:                                               ; preds = %0
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  br label %67

63:                                               ; preds = %32
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %67

67:                                               ; preds = %63, %59
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  br label %228

68:                                               ; preds = %56
  %69 = load i32, ptr %13, align 4, !tbaa !8
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %13, align 4, !tbaa !8
  %71 = load i32, ptr %9, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %72) #6
  %74 = load i32, ptr %14, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #6
  store i32 %70, ptr %76, align 4, !tbaa !8
  br label %77

77:                                               ; preds = %68
  %78 = load i32, ptr %14, align 4, !tbaa !8
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %14, align 4, !tbaa !8
  br label %46, !llvm.loop !11

80:                                               ; preds = %58
  %81 = load i32, ptr %9, align 4, !tbaa !8
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %83 = load i32, ptr %9, align 4, !tbaa !8
  store i32 %83, ptr %15, align 4, !tbaa !8
  br label %84

84:                                               ; preds = %106, %80
  %85 = load i32, ptr %13, align 4, !tbaa !8
  %86 = load i32, ptr %2, align 4, !tbaa !8
  %87 = load i32, ptr %2, align 4, !tbaa !8
  %88 = mul nsw i32 %86, %87
  %89 = icmp slt i32 %85, %88
  br i1 %89, label %90, label %94

90:                                               ; preds = %84
  %91 = load i32, ptr %15, align 4, !tbaa !8
  %92 = load i32, ptr %10, align 4, !tbaa !8
  %93 = icmp sle i32 %91, %92
  br label %94

94:                                               ; preds = %90, %84
  %95 = phi i1 [ false, %84 ], [ %93, %90 ]
  br i1 %95, label %97, label %96

96:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %109

97:                                               ; preds = %94
  %98 = load i32, ptr %13, align 4, !tbaa !8
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %13, align 4, !tbaa !8
  %100 = load i32, ptr %15, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %101) #6
  %103 = load i32, ptr %12, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #6
  store i32 %99, ptr %105, align 4, !tbaa !8
  br label %106

106:                                              ; preds = %97
  %107 = load i32, ptr %15, align 4, !tbaa !8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %15, align 4, !tbaa !8
  br label %84, !llvm.loop !13

109:                                              ; preds = %96
  %110 = load i32, ptr %12, align 4, !tbaa !8
  %111 = sub nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %112 = load i32, ptr %12, align 4, !tbaa !8
  store i32 %112, ptr %16, align 4, !tbaa !8
  br label %113

113:                                              ; preds = %135, %109
  %114 = load i32, ptr %13, align 4, !tbaa !8
  %115 = load i32, ptr %2, align 4, !tbaa !8
  %116 = load i32, ptr %2, align 4, !tbaa !8
  %117 = mul nsw i32 %115, %116
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %119, label %123

119:                                              ; preds = %113
  %120 = load i32, ptr %16, align 4, !tbaa !8
  %121 = load i32, ptr %11, align 4, !tbaa !8
  %122 = icmp sge i32 %120, %121
  br label %123

123:                                              ; preds = %119, %113
  %124 = phi i1 [ false, %113 ], [ %122, %119 ]
  br i1 %124, label %126, label %125

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

126:                                              ; preds = %123
  %127 = load i32, ptr %13, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %13, align 4, !tbaa !8
  %129 = load i32, ptr %10, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %130) #6
  %132 = load i32, ptr %16, align 4, !tbaa !8
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %133) #6
  store i32 %128, ptr %134, align 4, !tbaa !8
  br label %135

135:                                              ; preds = %126
  %136 = load i32, ptr %16, align 4, !tbaa !8
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %16, align 4, !tbaa !8
  br label %113, !llvm.loop !14

138:                                              ; preds = %125
  %139 = load i32, ptr %10, align 4, !tbaa !8
  %140 = sub nsw i32 %139, 1
  store i32 %140, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %141 = load i32, ptr %10, align 4, !tbaa !8
  store i32 %141, ptr %17, align 4, !tbaa !8
  br label %142

142:                                              ; preds = %164, %138
  %143 = load i32, ptr %13, align 4, !tbaa !8
  %144 = load i32, ptr %2, align 4, !tbaa !8
  %145 = load i32, ptr %2, align 4, !tbaa !8
  %146 = mul nsw i32 %144, %145
  %147 = icmp slt i32 %143, %146
  br i1 %147, label %148, label %152

148:                                              ; preds = %142
  %149 = load i32, ptr %17, align 4, !tbaa !8
  %150 = load i32, ptr %9, align 4, !tbaa !8
  %151 = icmp sge i32 %149, %150
  br label %152

152:                                              ; preds = %148, %142
  %153 = phi i1 [ false, %142 ], [ %151, %148 ]
  br i1 %153, label %155, label %154

154:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %167

155:                                              ; preds = %152
  %156 = load i32, ptr %13, align 4, !tbaa !8
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %13, align 4, !tbaa !8
  %158 = load i32, ptr %17, align 4, !tbaa !8
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %159) #6
  %161 = load i32, ptr %11, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %162) #6
  store i32 %157, ptr %163, align 4, !tbaa !8
  br label %164

164:                                              ; preds = %155
  %165 = load i32, ptr %17, align 4, !tbaa !8
  %166 = add nsw i32 %165, -1
  store i32 %166, ptr %17, align 4, !tbaa !8
  br label %142, !llvm.loop !15

167:                                              ; preds = %154
  %168 = load i32, ptr %11, align 4, !tbaa !8
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %11, align 4, !tbaa !8
  br label %38, !llvm.loop !16

170:                                              ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %171

171:                                              ; preds = %218, %170
  %172 = load i32, ptr %18, align 4, !tbaa !8
  %173 = load i32, ptr %2, align 4, !tbaa !8
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  store i32 16, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %226

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !8
  br label %177

177:                                              ; preds = %212, %176
  %178 = load i32, ptr %20, align 4, !tbaa !8
  %179 = load i32, ptr %2, align 4, !tbaa !8
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %177
  store i32 19, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %215

182:                                              ; preds = %177
  %183 = load i32, ptr %18, align 4, !tbaa !8
  %184 = load i32, ptr %2, align 4, !tbaa !8
  %185 = sdiv i32 %184, 2
  %186 = icmp eq i32 %183, %185
  br i1 %186, label %187, label %199

187:                                              ; preds = %182
  %188 = load i32, ptr %20, align 4, !tbaa !8
  %189 = load i32, ptr %2, align 4, !tbaa !8
  %190 = sdiv i32 %189, 2
  %191 = icmp eq i32 %188, %190
  br i1 %191, label %192, label %199

192:                                              ; preds = %187
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %194 unwind label %195

194:                                              ; preds = %192
  br label %211

195:                                              ; preds = %208, %199, %192
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %6, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %225

199:                                              ; preds = %187, %182
  %200 = load i32, ptr %18, align 4, !tbaa !8
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %201) #6
  %203 = load i32, ptr %20, align 4, !tbaa !8
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %204) #6
  %206 = load i32, ptr %205, align 4, !tbaa !8
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %206)
          to label %208 unwind label %195

208:                                              ; preds = %199
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef @.str.1)
          to label %210 unwind label %195

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210, %194
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %20, align 4, !tbaa !8
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %20, align 4, !tbaa !8
  br label %177, !llvm.loop !17

215:                                              ; preds = %181
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %217 unwind label %221

217:                                              ; preds = %215
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %18, align 4, !tbaa !8
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %18, align 4, !tbaa !8
  br label %171, !llvm.loop !18

221:                                              ; preds = %215
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %6, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %7, align 4
  br label %225

225:                                              ; preds = %221, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %228

226:                                              ; preds = %175
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %227 = load i32, ptr %1, align 4
  ret i32 %227

228:                                              ; preds = %225, %67
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr %6, align 8
  %231 = load i32, ptr %7, align 4
  %232 = insertvalue { ptr, i32 } poison, ptr %230, 0
  %233 = insertvalue { ptr, i32 } %232, i32 %231, 1
  resume { ptr, i32 } %233
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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) #2 align 2

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

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

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

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

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

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

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

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


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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca %"class.std::allocator", align 1
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  %13 = load i32, ptr %1, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %14 = sext i32 %13 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %14, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %15 unwind label %32

15:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %16 unwind label %34

16:                                               ; preds = %15
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #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) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  %17 = load i32, ptr %1, align 4, !tbaa !8
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %._crit_edge100, label %.preheader70.preheader

.preheader70.preheader:                           ; preds = %16
  %18 = add i32 %17, -1
  %19 = add i32 %17, -2
  %20 = sext i32 %18 to i64
  br label %.preheader70

.preheader70:                                     ; preds = %.preheader70.preheader, %._crit_edge89
  %21 = phi i32 [ %17, %.preheader70.preheader ], [ %69, %._crit_edge89 ]
  %indvars.iv120 = phi i64 [ %20, %.preheader70.preheader ], [ %indvars.iv.next121, %._crit_edge89 ]
  %indvars.iv112 = phi i32 [ %19, %.preheader70.preheader ], [ %indvars.iv.next113, %._crit_edge89 ]
  %indvars.iv107 = phi i64 [ 1, %.preheader70.preheader ], [ %indvars.iv.next108, %._crit_edge89 ]
  %indvars.iv = phi i64 [ 0, %.preheader70.preheader ], [ %indvars.iv.next, %._crit_edge89 ]
  %.05295 = phi i32 [ 0, %.preheader70.preheader ], [ %.4.lcssa, %._crit_edge89 ]
  %22 = sext i32 %indvars.iv112 to i64
  %23 = mul nsw i32 %21, %21
  %24 = icmp slt i32 %.05295, %23
  %25 = icmp sle i64 %indvars.iv, %indvars.iv120
  %26 = select i1 %24, i1 %25, i1 false
  br i1 %26, label %.lr.ph, label %._crit_edge

.preheader69:                                     ; preds = %._crit_edge89
  %27 = icmp sgt i32 %69, 0
  br i1 %27, label %.preheader, label %._crit_edge100

._crit_edge:                                      ; preds = %.lr.ph, %.preheader70
  %.pre-phi = phi i32 [ %23, %.preheader70 ], [ %41, %.lr.ph ]
  %28 = phi i32 [ %21, %.preheader70 ], [ %40, %.lr.ph ]
  %.1.lcssa = phi i32 [ %.05295, %.preheader70 ], [ %37, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = icmp slt i32 %.1.lcssa, %.pre-phi
  %30 = icmp slt i64 %indvars.iv, %indvars.iv120
  %31 = select i1 %29, i1 %30, i1 false
  br i1 %31, label %.lr.ph76, label %._crit_edge77

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %15
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %108

.lr.ph:                                           ; preds = %.preheader70, %.lr.ph
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.lr.ph ], [ %indvars.iv, %.preheader70 ]
  %.171 = phi i32 [ %37, %.lr.ph ], [ %.05295, %.preheader70 ]
  %37 = add nsw i32 %.171, 1
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #6
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %indvars.iv104) #6
  store i32 %37, ptr %39, align 4, !tbaa !8
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %40 = load i32, ptr %1, align 4, !tbaa !8
  %41 = mul nsw i32 %40, %40
  %42 = icmp slt i32 %37, %41
  %43 = icmp slt i64 %indvars.iv104, %indvars.iv120
  %44 = select i1 %42, i1 %43, i1 false
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge77:                                    ; preds = %.lr.ph76, %._crit_edge
  %.pre-phi135 = phi i32 [ %.pre-phi, %._crit_edge ], [ %52, %.lr.ph76 ]
  %45 = phi i32 [ %28, %._crit_edge ], [ %51, %.lr.ph76 ]
  %.2.lcssa = phi i32 [ %.1.lcssa, %._crit_edge ], [ %48, %.lr.ph76 ]
  %indvars.iv.next121 = add nsw i64 %indvars.iv120, -1
  %46 = icmp slt i32 %.2.lcssa, %.pre-phi135
  %47 = select i1 %46, i1 %30, i1 false
  br i1 %47, label %.lr.ph82, label %._crit_edge83

.lr.ph76:                                         ; preds = %._crit_edge, %.lr.ph76
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.lr.ph76 ], [ %indvars.iv107, %._crit_edge ]
  %.273 = phi i32 [ %48, %.lr.ph76 ], [ %.1.lcssa, %._crit_edge ]
  %48 = add nsw i32 %.273, 1
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv109) #6
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv120) #6
  store i32 %48, ptr %50, align 4, !tbaa !8
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %51 = load i32, ptr %1, align 4, !tbaa !8
  %52 = mul nsw i32 %51, %51
  %53 = icmp slt i32 %48, %52
  %sext = shl i64 %indvars.iv109, 32
  %54 = ashr exact i64 %sext, 32
  %55 = icmp slt i64 %54, %indvars.iv120
  %56 = select i1 %53, i1 %55, i1 false
  br i1 %56, label %.lr.ph76, label %._crit_edge77, !llvm.loop !13

._crit_edge83:                                    ; preds = %.lr.ph82, %._crit_edge77
  %.pre-phi136 = phi i32 [ %.pre-phi135, %._crit_edge77 ], [ %65, %.lr.ph82 ]
  %57 = phi i32 [ %45, %._crit_edge77 ], [ %64, %.lr.ph82 ]
  %.3.lcssa = phi i32 [ %.2.lcssa, %._crit_edge77 ], [ %61, %.lr.ph82 ]
  %58 = icmp slt i32 %.3.lcssa, %.pre-phi136
  %59 = icmp sgt i64 %indvars.iv.next121, %indvars.iv
  %60 = select i1 %58, i1 %59, i1 false
  br i1 %60, label %.lr.ph88, label %._crit_edge89

.lr.ph82:                                         ; preds = %._crit_edge77, %.lr.ph82
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph82 ], [ %22, %._crit_edge77 ]
  %.379 = phi i32 [ %61, %.lr.ph82 ], [ %.2.lcssa, %._crit_edge77 ]
  %61 = add nsw i32 %.379, 1
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv120) #6
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %indvars.iv114) #6
  store i32 %61, ptr %63, align 4, !tbaa !8
  %indvars.iv.next115 = add nsw i64 %indvars.iv114, -1
  %64 = load i32, ptr %1, align 4, !tbaa !8
  %65 = mul nsw i32 %64, %64
  %66 = icmp slt i32 %61, %65
  %67 = icmp sgt i64 %indvars.iv114, %indvars.iv
  %68 = select i1 %66, i1 %67, i1 false
  br i1 %68, label %.lr.ph82, label %._crit_edge83, !llvm.loop !14

._crit_edge89:                                    ; preds = %.lr.ph88, %._crit_edge83
  %.pre-phi137 = phi i32 [ %.pre-phi136, %._crit_edge83 ], [ %75, %.lr.ph88 ]
  %69 = phi i32 [ %57, %._crit_edge83 ], [ %74, %.lr.ph88 ]
  %.4.lcssa = phi i32 [ %.3.lcssa, %._crit_edge83 ], [ %71, %.lr.ph88 ]
  %70 = icmp slt i32 %.4.lcssa, %.pre-phi137
  %indvars.iv.next108 = add nuw i64 %indvars.iv107, 1
  %indvars.iv.next113 = add i32 %indvars.iv112, -1
  br i1 %70, label %.preheader70, label %.preheader69, !llvm.loop !15

.lr.ph88:                                         ; preds = %._crit_edge83, %.lr.ph88
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.lr.ph88 ], [ %22, %._crit_edge83 ]
  %.485 = phi i32 [ %71, %.lr.ph88 ], [ %.3.lcssa, %._crit_edge83 ]
  %71 = add nsw i32 %.485, 1
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv117) #6
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %indvars.iv) #6
  store i32 %71, ptr %73, align 4, !tbaa !8
  %indvars.iv.next118 = add nsw i64 %indvars.iv117, -1
  %74 = load i32, ptr %1, align 4, !tbaa !8
  %75 = mul nsw i32 %74, %74
  %76 = icmp slt i32 %71, %75
  %77 = icmp sgt i64 %indvars.iv.next118, %indvars.iv
  %78 = select i1 %76, i1 %77, i1 false
  br i1 %78, label %.lr.ph88, label %._crit_edge89, !llvm.loop !16

.preheader:                                       ; preds = %.preheader69, %101
  %79 = phi i32 [ %102, %101 ], [ %69, %.preheader69 ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %101 ], [ 0, %.preheader69 ]
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph97, label %._crit_edge98

._crit_edge100:                                   ; preds = %101, %16, %.preheader69
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

._crit_edge98:                                    ; preds = %97, %.preheader
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %101 unwind label %105

.lr.ph97:                                         ; preds = %.preheader, %97
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %97 ], [ 0, %.preheader ]
  %82 = phi i32 [ %98, %97 ], [ %79, %.preheader ]
  %83 = sdiv i32 %82, 2
  %84 = zext i32 %83 to i64
  %85 = icmp eq i64 %indvars.iv132, %84
  %86 = icmp eq i64 %indvars.iv129, %84
  %or.cond = and i1 %85, %86
  br i1 %or.cond, label %.invoke, label %89

87:                                               ; preds = %.invoke, %89
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %107

89:                                               ; preds = %.lr.ph97
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv132) #6
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %indvars.iv129) #6
  %92 = load i32, ptr %91, align 4, !tbaa !8
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %92)
          to label %.invoke unwind label %87

.invoke:                                          ; preds = %.lr.ph97, %89
  %94 = phi ptr [ %93, %89 ], [ @_ZSt4cout, %.lr.ph97 ]
  %95 = phi ptr [ @.str.1, %89 ], [ @.str, %.lr.ph97 ]
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull %95)
          to label %97 unwind label %87

97:                                               ; preds = %.invoke
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %98 = load i32, ptr %1, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next130, %99
  br i1 %100, label %.lr.ph97, label %._crit_edge98, !llvm.loop !17

101:                                              ; preds = %._crit_edge98
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %102 = load i32, ptr %1, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = icmp slt i64 %indvars.iv.next133, %103
  br i1 %104, label %.preheader, label %._crit_edge100, !llvm.loop !18

105:                                              ; preds = %._crit_edge98
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %107

107:                                              ; preds = %105, %87
  %.pn66 = phi { ptr, i32 } [ %88, %87 ], [ %106, %105 ]
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %108

108:                                              ; preds = %107, %36
  %.pn66.pn = phi { ptr, i32 } [ %.pn66, %107 ], [ %.pn, %36 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn66.pn
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 #2 align 2

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

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

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

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

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

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

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

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


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