; LLVM IR from abeaumont/competitive-programming :: codeforces/1304 (d)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %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
  store i32 0, ptr %1, align 4
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %27 unwind label %61

27:                                               ; preds = %0
  br label %28

28:                                               ; preds = %228, %27
  %29 = load i64, ptr %2, align 8, !tbaa !8
  %30 = add nsw i64 %29, -1
  store i64 %30, ptr %2, align 8, !tbaa !8
  %31 = icmp ne i64 %29, 0
  br i1 %31, label %32, label %232

32:                                               ; preds = %28
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %34 unwind label %61

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %36 unwind label %61

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %37 = load i64, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %38 unwind label %65

38:                                               ; preds = %36
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %39 = load i64, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %39, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %40 unwind label %69

40:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %89, %40
  %42 = load i32, ptr %11, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = load i64, ptr %3, align 8, !tbaa !8
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %46, label %92

46:                                               ; preds = %41
  %47 = load i32, ptr %11, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %48)
          to label %50 unwind label %73

50:                                               ; preds = %46
  %51 = load i8, ptr %49, align 1, !tbaa !13
  %52 = sext i8 %51 to i32
  %53 = icmp eq i32 %52, 60
  br i1 %53, label %54, label %89

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %55 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %55, ptr %14, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %83, %54
  %57 = load i32, ptr %14, align 4, !tbaa !11
  %58 = load i32, ptr %12, align 4, !tbaa !11
  %59 = icmp sge i32 %57, %58
  br i1 %59, label %77, label %60

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

61:                                               ; preds = %34, %32, %0
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %6, align 4
  br label %234

65:                                               ; preds = %36
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %5, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %231

69:                                               ; preds = %38
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %5, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  br label %230

73:                                               ; preds = %119, %46
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %5, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %6, align 4
  br label %229

77:                                               ; preds = %56
  %78 = load i32, ptr %13, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %13, align 4, !tbaa !11
  %80 = load i32, ptr %14, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %81) #6
  store i32 %78, ptr %82, align 4, !tbaa !11
  br label %83

83:                                               ; preds = %77
  %84 = load i32, ptr %14, align 4, !tbaa !11
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr %14, align 4, !tbaa !11
  br label %56, !llvm.loop !14

86:                                               ; preds = %60
  %87 = load i32, ptr %11, align 4, !tbaa !11
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %12, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %86, %50
  %90 = load i32, ptr %11, align 4, !tbaa !11
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %11, align 4, !tbaa !11
  br label %41, !llvm.loop !16

92:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %93 = load i32, ptr %11, align 4, !tbaa !11
  %94 = sub nsw i32 %93, 1
  store i32 %94, ptr %15, align 4, !tbaa !11
  br label %95

95:                                               ; preds = %106, %92
  %96 = load i32, ptr %15, align 4, !tbaa !11
  %97 = load i32, ptr %12, align 4, !tbaa !11
  %98 = icmp sge i32 %96, %97
  br i1 %98, label %100, label %99

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

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

106:                                              ; preds = %100
  %107 = load i32, ptr %15, align 4, !tbaa !11
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %15, align 4, !tbaa !11
  br label %95, !llvm.loop !17

109:                                              ; preds = %99
  %110 = load i64, ptr %3, align 8, !tbaa !8
  %111 = sub nsw i64 %110, 1
  %112 = trunc i64 %111 to i32
  store i32 %112, ptr %11, align 4, !tbaa !11
  %113 = load i64, ptr %3, align 8, !tbaa !8
  %114 = sub nsw i64 %113, 1
  %115 = trunc i64 %114 to i32
  store i32 %115, ptr %12, align 4, !tbaa !11
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %116

116:                                              ; preds = %146, %109
  %117 = load i32, ptr %11, align 4, !tbaa !11
  %118 = icmp sge i32 %117, 0
  br i1 %118, label %119, label %149

119:                                              ; preds = %116
  %120 = load i32, ptr %11, align 4, !tbaa !11
  %121 = sext i32 %120 to i64
  %122 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %121)
          to label %123 unwind label %73

123:                                              ; preds = %119
  %124 = load i8, ptr %122, align 1, !tbaa !13
  %125 = sext i8 %124 to i32
  %126 = icmp eq i32 %125, 62
  br i1 %126, label %127, label %146

127:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %128 = load i32, ptr %11, align 4, !tbaa !11
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %16, align 4, !tbaa !11
  br label %130

130:                                              ; preds = %141, %127
  %131 = load i32, ptr %16, align 4, !tbaa !11
  %132 = load i32, ptr %12, align 4, !tbaa !11
  %133 = icmp sle i32 %131, %132
  br i1 %133, label %135, label %134

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

135:                                              ; preds = %130
  %136 = load i32, ptr %13, align 4, !tbaa !11
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %13, align 4, !tbaa !11
  %138 = load i32, ptr %16, align 4, !tbaa !11
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %139) #6
  store i32 %136, ptr %140, align 4, !tbaa !11
  br label %141

141:                                              ; preds = %135
  %142 = load i32, ptr %16, align 4, !tbaa !11
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %16, align 4, !tbaa !11
  br label %130, !llvm.loop !18

144:                                              ; preds = %134
  %145 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %145, ptr %12, align 4, !tbaa !11
  br label %146

146:                                              ; preds = %144, %123
  %147 = load i32, ptr %11, align 4, !tbaa !11
  %148 = add nsw i32 %147, -1
  store i32 %148, ptr %11, align 4, !tbaa !11
  br label %116, !llvm.loop !19

149:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %150 = load i32, ptr %11, align 4, !tbaa !11
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %17, align 4, !tbaa !11
  br label %152

152:                                              ; preds = %163, %149
  %153 = load i32, ptr %17, align 4, !tbaa !11
  %154 = load i32, ptr %12, align 4, !tbaa !11
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %157, label %156

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

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

163:                                              ; preds = %157
  %164 = load i32, ptr %17, align 4, !tbaa !11
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %17, align 4, !tbaa !11
  br label %152, !llvm.loop !20

166:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %167

167:                                              ; preds = %190, %166
  %168 = load i32, ptr %18, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = load i64, ptr %3, align 8, !tbaa !8
  %171 = icmp slt i64 %169, %170
  br i1 %171, label %173, label %172

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

173:                                              ; preds = %167
  %174 = load i32, ptr %18, align 4, !tbaa !11
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %175) #6
  %177 = load i32, ptr %176, align 4, !tbaa !11
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %177)
          to label %179 unwind label %193

179:                                              ; preds = %173
  %180 = load i32, ptr %18, align 4, !tbaa !11
  %181 = sext i32 %180 to i64
  %182 = load i64, ptr %3, align 8, !tbaa !8
  %183 = sub nsw i64 %182, 1
  %184 = icmp eq i64 %181, %183
  %185 = zext i1 %184 to i64
  %186 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %185
  %187 = load i8, ptr %186, align 1, !tbaa !13
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %178, i8 noundef signext %187)
          to label %189 unwind label %193

189:                                              ; preds = %179
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %18, align 4, !tbaa !11
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %18, align 4, !tbaa !11
  br label %167, !llvm.loop !21

193:                                              ; preds = %179, %173
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %5, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %229

197:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %198

198:                                              ; preds = %221, %197
  %199 = load i32, ptr %19, align 4, !tbaa !11
  %200 = sext i32 %199 to i64
  %201 = load i64, ptr %3, align 8, !tbaa !8
  %202 = icmp slt i64 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %228

204:                                              ; preds = %198
  %205 = load i32, ptr %19, align 4, !tbaa !11
  %206 = sext i32 %205 to i64
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %206) #6
  %208 = load i32, ptr %207, align 4, !tbaa !11
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %208)
          to label %210 unwind label %224

210:                                              ; preds = %204
  %211 = load i32, ptr %19, align 4, !tbaa !11
  %212 = sext i32 %211 to i64
  %213 = load i64, ptr %3, align 8, !tbaa !8
  %214 = sub nsw i64 %213, 1
  %215 = icmp eq i64 %212, %214
  %216 = zext i1 %215 to i64
  %217 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %216
  %218 = load i8, ptr %217, align 1, !tbaa !13
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %209, i8 noundef signext %218)
          to label %220 unwind label %224

220:                                              ; preds = %210
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %19, align 4, !tbaa !11
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %19, align 4, !tbaa !11
  br label %198, !llvm.loop !22

224:                                              ; preds = %210, %204
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %5, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %229

228:                                              ; preds = %203
  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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %28, !llvm.loop !23

229:                                              ; preds = %224, %193, %73
  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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %230

230:                                              ; preds = %229, %69
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %231

231:                                              ; preds = %230, %65
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %234

232:                                              ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %233 = load i32, ptr %1, align 4
  ret i32 %233

234:                                              ; preds = %231, %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %5, align 8
  %237 = load i32, ptr %6, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

; 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 noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 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) #1 align 2

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

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = 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

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

.preheader78:                                     ; preds = %0
  %15 = load i64, ptr %1, align 8, !tbaa !8
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr %1, align 8, !tbaa !8
  %.not119 = icmp eq i64 %15, 0
  br i1 %.not119, label %._crit_edge121, label %.lr.ph120

.lr.ph120:                                        ; preds = %.preheader78, %._crit_edge118
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %18 unwind label %.loopexit79

18:                                               ; preds = %.lr.ph120
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %20 unwind label %.loopexit79

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %21 = load i64, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %38

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

24:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  %25 = load i64, ptr %2, align 8, !tbaa !8
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph88, label %._crit_edge96

.preheader77:                                     ; preds = %44
  %27 = trunc nuw i64 %indvars.iv.next.pre-phi to i32
  %.not65.not92 = icmp slt i32 %.149, %27
  br i1 %.not65.not92, label %.lr.ph95.preheader, label %._crit_edge96

.lr.ph95.preheader:                               ; preds = %.preheader77
  %sext = shl i64 %indvars.iv.next.pre-phi, 32
  %28 = ashr exact i64 %sext, 32
  %29 = sext i32 %.149 to i64
  br label %.lr.ph95

.lr.ph88:                                         ; preds = %24, %44
  %indvars.iv128 = phi i32 [ %indvars.iv.next129, %44 ], [ 1, %24 ]
  %indvars.iv = phi i64 [ %indvars.iv.next.pre-phi, %44 ], [ 0, %24 ]
  %.04786 = phi i32 [ %.2, %44 ], [ 1, %24 ]
  %.04885 = phi i32 [ %.149, %44 ], [ 0, %24 ]
  %30 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = icmp eq i8 %31, 60
  br i1 %32, label %.preheader73, label %.lr.ph88._crit_edge

.lr.ph88._crit_edge:                              ; preds = %.lr.ph88
  %.pre152 = add nuw nsw i64 %indvars.iv, 1
  br label %44

.preheader73:                                     ; preds = %.lr.ph88
  %33 = sext i32 %.04885 to i64
  %.not7280 = icmp slt i64 %indvars.iv, %33
  br i1 %.not7280, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader73
  %34 = add i32 %.04786, %indvars.iv128
  %35 = sub i32 %34, %.04885
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader73
  %.1.lcssa = phi i32 [ %.04786, %.preheader73 ], [ %35, %.lr.ph ]
  %36 = add nuw nsw i64 %indvars.iv, 1
  %37 = trunc nuw i64 %36 to i32
  br label %44

.loopexit79:                                      ; preds = %.lr.ph120, %18
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %107

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

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

40:                                               ; preds = %22
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %105

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv125 = phi i64 [ %indvars.iv, %.lr.ph.preheader ], [ %indvars.iv.next126, %.lr.ph ]
  %.181 = phi i32 [ %.04786, %.lr.ph.preheader ], [ %42, %.lr.ph ]
  %42 = add i32 %.181, 1
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv125) #6
  store i32 %.181, ptr %43, align 4, !tbaa !12
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, -1
  %exitcond.not = icmp eq i32 %42, %35
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

44:                                               ; preds = %.lr.ph88._crit_edge, %._crit_edge
  %indvars.iv.next.pre-phi = phi i64 [ %.pre152, %.lr.ph88._crit_edge ], [ %36, %._crit_edge ]
  %.149 = phi i32 [ %.04885, %.lr.ph88._crit_edge ], [ %37, %._crit_edge ]
  %.2 = phi i32 [ %.04786, %.lr.ph88._crit_edge ], [ %.1.lcssa, %._crit_edge ]
  %45 = load i64, ptr %2, align 8, !tbaa !8
  %46 = icmp sgt i64 %45, %indvars.iv.next.pre-phi
  %indvars.iv.next129 = add nuw i32 %indvars.iv128, 1
  br i1 %46, label %.lr.ph88, label %.preheader77, !llvm.loop !16

._crit_edge96.loopexit:                           ; preds = %.lr.ph95
  %.pre = load i64, ptr %2, align 8, !tbaa !8
  br label %._crit_edge96

._crit_edge96:                                    ; preds = %24, %._crit_edge96.loopexit, %.preheader77
  %47 = phi i64 [ %.pre, %._crit_edge96.loopexit ], [ %45, %.preheader77 ], [ %25, %24 ]
  %48 = trunc i64 %47 to i32
  %49 = add i32 %48, -1
  %50 = icmp sgt i32 %49, -1
  br i1 %50, label %.lr.ph106.preheader, label %.preheader75

.lr.ph106.preheader:                              ; preds = %._crit_edge96
  %51 = zext nneg i32 %49 to i64
  %52 = sub i32 1, %48
  br label %.lr.ph106

.lr.ph95:                                         ; preds = %.lr.ph95.preheader, %.lr.ph95
  %indvars.iv131 = phi i64 [ %28, %.lr.ph95.preheader ], [ %indvars.iv.next132, %.lr.ph95 ]
  %.393 = phi i32 [ %.2, %.lr.ph95.preheader ], [ %53, %.lr.ph95 ]
  %indvars.iv.next132 = add nsw i64 %indvars.iv131, -1
  %53 = add nsw i32 %.393, 1
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv.next132) #6
  store i32 %.393, ptr %54, align 4, !tbaa !12
  %.not65.not = icmp sgt i64 %indvars.iv.next132, %29
  br i1 %.not65.not, label %.lr.ph95, label %._crit_edge96.loopexit, !llvm.loop !17

.preheader76:                                     ; preds = %.loopexit
  %.not66.not110 = icmp sgt i32 %.351, -1
  br i1 %.not66.not110, label %.lr.ph113, label %.preheader75

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %.loopexit
  %indvars.iv139 = phi i32 [ %52, %.lr.ph106.preheader ], [ %indvars.iv.next140, %.loopexit ]
  %indvars.iv134 = phi i64 [ %51, %.lr.ph106.preheader ], [ %indvars.iv.next135, %.loopexit ]
  %.4104 = phi i32 [ 1, %.lr.ph106.preheader ], [ %.6, %.loopexit ]
  %.250103 = phi i32 [ %49, %.lr.ph106.preheader ], [ %.351, %.loopexit ]
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv134)
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = icmp eq i8 %56, 62
  br i1 %57, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.lr.ph106
  %58 = sext i32 %.250103 to i64
  %.not71.not97 = icmp slt i64 %indvars.iv134, %58
  %59 = trunc nuw nsw i64 %indvars.iv134 to i32
  br i1 %.not71.not97, label %.lr.ph100.preheader, label %.loopexit

.lr.ph100.preheader:                              ; preds = %.preheader
  %60 = add i32 %.250103, %.4104
  %61 = add i32 %60, %indvars.iv139
  br label %.lr.ph100

.lr.ph100:                                        ; preds = %.lr.ph100.preheader, %.lr.ph100
  %indvars.iv136 = phi i64 [ %indvars.iv134, %.lr.ph100.preheader ], [ %indvars.iv.next137, %.lr.ph100 ]
  %.598 = phi i32 [ %.4104, %.lr.ph100.preheader ], [ %62, %.lr.ph100 ]
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %62 = add i32 %.598, 1
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv.next137) #6
  store i32 %.598, ptr %63, align 4, !tbaa !12
  %exitcond141.not = icmp eq i32 %62, %61
  br i1 %exitcond141.not, label %.loopexit, label %.lr.ph100, !llvm.loop !18

.loopexit:                                        ; preds = %.lr.ph100, %.preheader, %.lr.ph106
  %.351 = phi i32 [ %.250103, %.lr.ph106 ], [ %59, %.preheader ], [ %59, %.lr.ph100 ]
  %.6 = phi i32 [ %.4104, %.lr.ph106 ], [ %.4104, %.preheader ], [ %61, %.lr.ph100 ]
  %indvars.iv.next135 = add nsw i64 %indvars.iv134, -1
  %64 = icmp sgt i64 %indvars.iv134, 0
  %indvars.iv.next140 = add i32 %indvars.iv139, 1
  br i1 %64, label %.lr.ph106, label %.preheader76, !llvm.loop !19

.preheader75:                                     ; preds = %.lr.ph113, %._crit_edge96, %.preheader76
  %65 = load i64, ptr %2, align 8, !tbaa !8
  %66 = icmp sgt i64 %65, 0
  br i1 %66, label %.lr.ph115, label %._crit_edge118

.lr.ph113:                                        ; preds = %.preheader76, %.lr.ph113
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %.lr.ph113 ], [ -1, %.preheader76 ]
  %.7111 = phi i32 [ %67, %.lr.ph113 ], [ %.6, %.preheader76 ]
  %indvars.iv.next144 = add nsw i64 %indvars.iv143, 1
  %67 = add nsw i32 %.7111, 1
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv.next144) #6
  store i32 %.7111, ptr %68, align 4, !tbaa !12
  %lftr.wideiv = trunc i64 %indvars.iv.next144 to i32
  %exitcond145.not = icmp eq i32 %.351, %lftr.wideiv
  br i1 %exitcond145.not, label %.preheader75, label %.lr.ph113, !llvm.loop !20

.preheader74:                                     ; preds = %81
  %69 = icmp sgt i64 %82, 0
  br i1 %69, label %.lr.ph117, label %._crit_edge118

.lr.ph115:                                        ; preds = %.preheader75, %81
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %81 ], [ 0, %.preheader75 ]
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv146) #6
  %71 = load i32, ptr %70, align 4, !tbaa !12
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %71)
          to label %73 unwind label %84

73:                                               ; preds = %.lr.ph115
  %74 = load i64, ptr %2, align 8, !tbaa !8
  %75 = add nsw i64 %74, -1
  %76 = icmp eq i64 %75, %indvars.iv146
  %77 = zext i1 %76 to i64
  %78 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %77
  %79 = load i8, ptr %78, align 1, !tbaa !11
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext %79)
          to label %81 unwind label %84

81:                                               ; preds = %73
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %82 = load i64, ptr %2, align 8, !tbaa !8
  %83 = icmp sgt i64 %82, %indvars.iv.next147
  br i1 %83, label %.lr.ph115, label %.preheader74, !llvm.loop !21

84:                                               ; preds = %73, %.lr.ph115
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %104

._crit_edge118:                                   ; preds = %99, %.preheader75, %.preheader74
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %86 = load i64, ptr %1, align 8, !tbaa !8
  %87 = add nsw i64 %86, -1
  store i64 %87, ptr %1, align 8, !tbaa !8
  %.not = icmp eq i64 %86, 0
  br i1 %.not, label %._crit_edge121, label %.lr.ph120, !llvm.loop !22

.lr.ph117:                                        ; preds = %.preheader74, %99
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %99 ], [ 0, %.preheader74 ]
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv149) #6
  %89 = load i32, ptr %88, align 4, !tbaa !12
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %89)
          to label %91 unwind label %102

91:                                               ; preds = %.lr.ph117
  %92 = load i64, ptr %2, align 8, !tbaa !8
  %93 = add nsw i64 %92, -1
  %94 = icmp eq i64 %93, %indvars.iv149
  %95 = zext i1 %94 to i64
  %96 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !11
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %90, i8 noundef signext %97)
          to label %99 unwind label %102

99:                                               ; preds = %91
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %100 = load i64, ptr %2, align 8, !tbaa !8
  %101 = icmp sgt i64 %100, %indvars.iv.next150
  br i1 %101, label %.lr.ph117, label %._crit_edge118, !llvm.loop !23

102:                                              ; preds = %91, %.lr.ph117
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %104

104:                                              ; preds = %102, %84
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %103, %102 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %105

105:                                              ; preds = %104, %40
  %.pn.pn = phi { ptr, i32 } [ %.pn, %104 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %106

106:                                              ; preds = %105, %38
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %105 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %107

._crit_edge121:                                   ; preds = %._crit_edge118, %.preheader78
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

107:                                              ; preds = %.loopexit79, %.loopexit.split-lp, %106
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %106 ], [ %lpad.loopexit, %.loopexit79 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

; 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 noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) 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 #2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


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