; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #604 (Div. 2)/C. Beautiful Regional Contest.ll (Z5solvev)

; 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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = sdiv i64 %16, 2
  store i64 %17, ptr %2, align 8, !tbaa !5
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = add nsw i64 %18, 1
  store i64 %19, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  %20 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %21 unwind label %27

21:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %36, %21
  %23 = load i64, ptr %7, align 8, !tbaa !5
  %24 = load i64, ptr %2, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %43

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  br label %220

31:                                               ; preds = %22
  %32 = load i64, ptr %7, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %32) #4
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %35 unwind label %39

35:                                               ; preds = %31
  br label %36

36:                                               ; preds = %35
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %7, align 8, !tbaa !5
  br label %22, !llvm.loop !9

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %219

43:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %44 = load i64, ptr %2, align 8, !tbaa !5
  store i64 %44, ptr %8, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %53, %43
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %60

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %52 unwind label %56

52:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %8, align 8, !tbaa !5
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %8, align 8, !tbaa !5
  br label %45, !llvm.loop !11

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %219

60:                                               ; preds = %49
  %61 = load i64, ptr %2, align 8, !tbaa !5
  store i64 %61, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %62 = load i64, ptr %1, align 8, !tbaa !5
  %63 = sub nsw i64 %62, 1
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %63) #4
  %65 = load i64, ptr %64, align 8, !tbaa !5
  store i64 %65, ptr %10, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %76, %60
  %67 = load i64, ptr %1, align 8, !tbaa !5
  %68 = icmp sgt i64 %67, 1
  br i1 %68, label %69, label %74

69:                                               ; preds = %66
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = load i64, ptr %10, align 8, !tbaa !5
  %73 = icmp eq i64 %71, %72
  br label %74

74:                                               ; preds = %69, %66
  %75 = phi i1 [ false, %66 ], [ %73, %69 ]
  br i1 %75, label %76, label %79

76:                                               ; preds = %74
  call void @_ZNSt6vectorIlSaIlEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %77 = load i64, ptr %1, align 8, !tbaa !5
  %78 = add nsw i64 %77, -1
  store i64 %78, ptr %1, align 8, !tbaa !5
  br label %66, !llvm.loop !12

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #4
  %81 = load i64, ptr %80, align 8, !tbaa !5
  store i64 %81, ptr %10, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %94, %79
  %83 = load i64, ptr %14, align 8, !tbaa !5
  %84 = load i64, ptr %1, align 8, !tbaa !5
  %85 = icmp slt i64 %83, %84
  br i1 %85, label %86, label %92

86:                                               ; preds = %82
  %87 = load i64, ptr %14, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %87) #4
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = load i64, ptr %10, align 8, !tbaa !5
  %91 = icmp eq i64 %89, %90
  br label %92

92:                                               ; preds = %86, %82
  %93 = phi i1 [ false, %82 ], [ %91, %86 ]
  br i1 %93, label %94, label %99

94:                                               ; preds = %92
  %95 = load i64, ptr %11, align 8, !tbaa !5
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %11, align 8, !tbaa !5
  %97 = load i64, ptr %14, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %14, align 8, !tbaa !5
  br label %82, !llvm.loop !13

99:                                               ; preds = %92
  %100 = load i64, ptr %14, align 8, !tbaa !5
  %101 = load i64, ptr %1, align 8, !tbaa !5
  %102 = icmp slt i64 %100, %101
  br i1 %102, label %103, label %107

103:                                              ; preds = %99
  %104 = load i64, ptr %14, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %104) #4
  %106 = load i64, ptr %105, align 8, !tbaa !5
  store i64 %106, ptr %10, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %103, %99
  br label %108

108:                                              ; preds = %118, %107
  %109 = load i64, ptr %14, align 8, !tbaa !5
  %110 = load i64, ptr %1, align 8, !tbaa !5
  %111 = icmp slt i64 %109, %110
  br i1 %111, label %112, label %116

112:                                              ; preds = %108
  %113 = load i64, ptr %11, align 8, !tbaa !5
  %114 = load i64, ptr %12, align 8, !tbaa !5
  %115 = icmp sge i64 %113, %114
  br label %116

116:                                              ; preds = %112, %108
  %117 = phi i1 [ false, %108 ], [ %115, %112 ]
  br i1 %117, label %118, label %126

118:                                              ; preds = %116
  %119 = load i64, ptr %12, align 8, !tbaa !5
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %12, align 8, !tbaa !5
  %121 = load i64, ptr %14, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %121) #4
  %123 = load i64, ptr %122, align 8, !tbaa !5
  store i64 %123, ptr %10, align 8, !tbaa !5
  %124 = load i64, ptr %14, align 8, !tbaa !5
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %14, align 8, !tbaa !5
  br label %108, !llvm.loop !14

126:                                              ; preds = %116
  br label %127

127:                                              ; preds = %139, %126
  %128 = load i64, ptr %14, align 8, !tbaa !5
  %129 = load i64, ptr %1, align 8, !tbaa !5
  %130 = icmp slt i64 %128, %129
  br i1 %130, label %131, label %137

131:                                              ; preds = %127
  %132 = load i64, ptr %14, align 8, !tbaa !5
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %132) #4
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = load i64, ptr %10, align 8, !tbaa !5
  %136 = icmp eq i64 %134, %135
  br label %137

137:                                              ; preds = %131, %127
  %138 = phi i1 [ false, %127 ], [ %136, %131 ]
  br i1 %138, label %139, label %144

139:                                              ; preds = %137
  %140 = load i64, ptr %12, align 8, !tbaa !5
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %12, align 8, !tbaa !5
  %142 = load i64, ptr %14, align 8, !tbaa !5
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %14, align 8, !tbaa !5
  br label %127, !llvm.loop !15

144:                                              ; preds = %137
  %145 = load i64, ptr %14, align 8, !tbaa !5
  %146 = load i64, ptr %1, align 8, !tbaa !5
  %147 = icmp slt i64 %145, %146
  br i1 %147, label %148, label %152

148:                                              ; preds = %144
  %149 = load i64, ptr %14, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %149) #4
  %151 = load i64, ptr %150, align 8, !tbaa !5
  store i64 %151, ptr %10, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %148, %144
  br label %153

153:                                              ; preds = %163, %152
  %154 = load i64, ptr %14, align 8, !tbaa !5
  %155 = load i64, ptr %1, align 8, !tbaa !5
  %156 = icmp slt i64 %154, %155
  br i1 %156, label %157, label %161

157:                                              ; preds = %153
  %158 = load i64, ptr %11, align 8, !tbaa !5
  %159 = load i64, ptr %13, align 8, !tbaa !5
  %160 = icmp sge i64 %158, %159
  br label %161

161:                                              ; preds = %157, %153
  %162 = phi i1 [ false, %153 ], [ %160, %157 ]
  br i1 %162, label %163, label %171

163:                                              ; preds = %161
  %164 = load i64, ptr %13, align 8, !tbaa !5
  %165 = add nsw i64 %164, 1
  store i64 %165, ptr %13, align 8, !tbaa !5
  %166 = load i64, ptr %14, align 8, !tbaa !5
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %166) #4
  %168 = load i64, ptr %167, align 8, !tbaa !5
  store i64 %168, ptr %10, align 8, !tbaa !5
  %169 = load i64, ptr %14, align 8, !tbaa !5
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %14, align 8, !tbaa !5
  br label %153, !llvm.loop !16

171:                                              ; preds = %161
  br label %172

172:                                              ; preds = %176, %171
  %173 = load i64, ptr %14, align 8, !tbaa !5
  %174 = load i64, ptr %1, align 8, !tbaa !5
  %175 = icmp slt i64 %173, %174
  br i1 %175, label %176, label %181

176:                                              ; preds = %172
  %177 = load i64, ptr %13, align 8, !tbaa !5
  %178 = add nsw i64 %177, 1
  store i64 %178, ptr %13, align 8, !tbaa !5
  %179 = load i64, ptr %14, align 8, !tbaa !5
  %180 = add nsw i64 %179, 1
  store i64 %180, ptr %14, align 8, !tbaa !5
  br label %172, !llvm.loop !17

181:                                              ; preds = %172
  %182 = load i64, ptr %11, align 8, !tbaa !5
  %183 = icmp eq i64 %182, 0
  br i1 %183, label %198, label %184

184:                                              ; preds = %181
  %185 = load i64, ptr %12, align 8, !tbaa !5
  %186 = icmp eq i64 %185, 0
  br i1 %186, label %198, label %187

187:                                              ; preds = %184
  %188 = load i64, ptr %13, align 8, !tbaa !5
  %189 = icmp eq i64 %188, 0
  br i1 %189, label %198, label %190

190:                                              ; preds = %187
  %191 = load i64, ptr %11, align 8, !tbaa !5
  %192 = load i64, ptr %13, align 8, !tbaa !5
  %193 = icmp sge i64 %191, %192
  br i1 %193, label %198, label %194

194:                                              ; preds = %190
  %195 = load i64, ptr %11, align 8, !tbaa !5
  %196 = load i64, ptr %12, align 8, !tbaa !5
  %197 = icmp sge i64 %195, %196
  br i1 %197, label %198, label %199

198:                                              ; preds = %194, %190, %187, %184, %181
  store i64 0, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %199

199:                                              ; preds = %198, %194
  %200 = load i64, ptr %11, align 8, !tbaa !5
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %200)
          to label %202 unwind label %215

202:                                              ; preds = %199
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %201, ptr noundef @.str)
          to label %204 unwind label %215

204:                                              ; preds = %202
  %205 = load i64, ptr %12, align 8, !tbaa !5
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %203, i64 noundef %205)
          to label %207 unwind label %215

207:                                              ; preds = %204
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef @.str)
          to label %209 unwind label %215

209:                                              ; preds = %207
  %210 = load i64, ptr %13, align 8, !tbaa !5
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %208, i64 noundef %210)
          to label %212 unwind label %215

212:                                              ; preds = %209
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %211, ptr noundef @.str.1)
          to label %214 unwind label %215

214:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void

215:                                              ; preds = %212, %209, %207, %204, %202, %199
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %5, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %219

219:                                              ; preds = %215, %56, %39
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %220

220:                                              ; preds = %219, %27
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  br label %221

221:                                              ; preds = %220
  %222 = load ptr, ptr %5, align 8
  %223 = load i32, ptr %6, align 4
  %224 = insertvalue { ptr, i32 } poison, ptr %222, 0
  %225 = insertvalue { ptr, i32 } %224, i32 %223, 1
  resume { ptr, i32 } %225
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = sdiv i64 %6, 2
  %8 = add nsw i64 %7, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %8, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %9 unwind label %12

9:                                                ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  %.not88 = icmp slt i64 %6, -1
  br i1 %.not88, label %.preheader87, label %.lr.ph

.preheader87:                                     ; preds = %16, %9
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp slt i64 %8, %10
  br i1 %11, label %.lr.ph91, label %._crit_edge

12:                                               ; preds = %0
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  br label %106

.lr.ph:                                           ; preds = %9, %16
  %.06989 = phi i64 [ %17, %16 ], [ 0, %9 ]
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.06989) #4
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %16 unwind label %18

16:                                               ; preds = %.lr.ph
  %17 = add nuw nsw i64 %.06989, 1
  %exitcond.not = icmp eq i64 %.06989, %7
  br i1 %exitcond.not, label %.preheader87, label %.lr.ph, !llvm.loop !9

18:                                               ; preds = %.lr.ph
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %105

._crit_edge:                                      ; preds = %24, %.preheader87
  store i64 %8, ptr %1, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %7) #4
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %.pr = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp sgt i64 %.pr, 1
  br i1 %22, label %.lr.ph93, label %.critedge

.lr.ph91:                                         ; preds = %.preheader87, %24
  %.06890 = phi i64 [ %25, %24 ], [ %8, %.preheader87 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %23 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %24 unwind label %28

24:                                               ; preds = %.lr.ph91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %25 = add nsw i64 %.06890, 1
  %26 = load i64, ptr %1, align 8, !tbaa !5
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %.lr.ph91, label %._crit_edge, !llvm.loop !11

28:                                               ; preds = %.lr.ph91
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %105

.lr.ph93:                                         ; preds = %._crit_edge, %33
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %31 = load i64, ptr %30, align 8, !tbaa !5
  %32 = icmp eq i64 %31, %21
  br i1 %32, label %33, label %.critedge

33:                                               ; preds = %.lr.ph93
  call void @_ZNSt6vectorIlSaIlEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr %1, align 8, !tbaa !5
  %36 = icmp sgt i64 %34, 2
  br i1 %36, label %.lr.ph93, label %.critedge, !llvm.loop !12

.critedge:                                        ; preds = %.lr.ph93, %33, %._crit_edge
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = load i64, ptr %1, align 8, !tbaa !5
  %40 = icmp sgt i64 %39, 0
  br i1 %40, label %.lr.ph97, label %.critedge2

.lr.ph97:                                         ; preds = %.critedge, %44
  %.096 = phi i64 [ %45, %44 ], [ 0, %.critedge ]
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.096) #4
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = icmp eq i64 %42, %38
  %.pre.pre = load i64, ptr %1, align 8, !tbaa !5
  br i1 %43, label %44, label %.critedge2

44:                                               ; preds = %.lr.ph97
  %45 = add nuw nsw i64 %.096, 1
  %46 = icmp slt i64 %45, %.pre.pre
  br i1 %46, label %.lr.ph97, label %.critedge2, !llvm.loop !13

.critedge2:                                       ; preds = %.lr.ph97, %44, %.critedge
  %47 = phi i64 [ %39, %.critedge ], [ %.pre.pre, %44 ], [ %.pre.pre, %.lr.ph97 ]
  %.064.lcssa = phi i64 [ 0, %.critedge ], [ %.096, %.lr.ph97 ], [ %45, %44 ]
  %48 = icmp slt i64 %.064.lcssa, %47
  br i1 %48, label %49, label %52

49:                                               ; preds = %.critedge2
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.064.lcssa) #4
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %.pre137 = load i64, ptr %1, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %49, %.critedge2
  %53 = phi i64 [ %.pre137, %49 ], [ %47, %.critedge2 ]
  %.066 = phi i64 [ %51, %49 ], [ %38, %.critedge2 ]
  %54 = icmp slt i64 %.064.lcssa, %53
  br i1 %54, label %.lr.ph105, label %.preheader86

..preheader86_crit_edge:                          ; preds = %.lr.ph105
  %55 = load i64, ptr %59, align 8, !tbaa !5
  br label %.preheader86

.preheader86:                                     ; preds = %..preheader86_crit_edge, %52
  %56 = phi i64 [ %61, %..preheader86_crit_edge ], [ %53, %52 ]
  %.167.lcssa = phi i64 [ %55, %..preheader86_crit_edge ], [ %.066, %52 ]
  %.061.lcssa = phi i64 [ %58, %..preheader86_crit_edge ], [ 0, %52 ]
  %.1.lcssa = phi i64 [ %60, %..preheader86_crit_edge ], [ %.064.lcssa, %52 ]
  %57 = icmp slt i64 %.1.lcssa, %56
  br i1 %57, label %.lr.ph112, label %.critedge4

.lr.ph105:                                        ; preds = %52, %.lr.ph105
  %.1103 = phi i64 [ %60, %.lr.ph105 ], [ %.064.lcssa, %52 ]
  %.061102 = phi i64 [ %58, %.lr.ph105 ], [ 0, %52 ]
  %58 = add nuw nsw i64 %.061102, 1
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.1103) #4
  %60 = add nuw nsw i64 %.1103, 1
  %61 = load i64, ptr %1, align 8, !tbaa !5
  %62 = icmp slt i64 %60, %61
  %63 = icmp ugt i64 %.064.lcssa, %.061102
  %64 = select i1 %62, i1 %63, i1 false
  br i1 %64, label %.lr.ph105, label %..preheader86_crit_edge, !llvm.loop !14

.lr.ph112:                                        ; preds = %.preheader86, %68
  %.2111 = phi i64 [ %70, %68 ], [ %.1.lcssa, %.preheader86 ]
  %.162110 = phi i64 [ %69, %68 ], [ %.061.lcssa, %.preheader86 ]
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.2111) #4
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = icmp eq i64 %66, %.167.lcssa
  %.pre138.pre = load i64, ptr %1, align 8, !tbaa !5
  br i1 %67, label %68, label %.critedge4

68:                                               ; preds = %.lr.ph112
  %69 = add nuw nsw i64 %.162110, 1
  %70 = add nuw nsw i64 %.2111, 1
  %71 = icmp slt i64 %70, %.pre138.pre
  br i1 %71, label %.lr.ph112, label %.critedge4, !llvm.loop !15

.critedge4:                                       ; preds = %.lr.ph112, %68, %.preheader86
  %72 = phi i64 [ %56, %.preheader86 ], [ %.pre138.pre, %68 ], [ %.pre138.pre, %.lr.ph112 ]
  %.162.lcssa = phi i64 [ %.061.lcssa, %.preheader86 ], [ %.162110, %.lr.ph112 ], [ %69, %68 ]
  %.2.lcssa = phi i64 [ %.1.lcssa, %.preheader86 ], [ %.2111, %.lr.ph112 ], [ %70, %68 ]
  %73 = icmp slt i64 %.2.lcssa, %72
  br i1 %73, label %74, label %76

74:                                               ; preds = %.critedge4
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.2.lcssa) #4
  %.pre139 = load i64, ptr %1, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %74, %.critedge4
  %77 = phi i64 [ %.pre139, %74 ], [ %72, %.critedge4 ]
  %78 = icmp slt i64 %.2.lcssa, %77
  br i1 %78, label %.lr.ph121, label %.preheader

.preheader:                                       ; preds = %.lr.ph121, %76
  %.058.lcssa = phi i64 [ 0, %76 ], [ %85, %.lr.ph121 ]
  %.3.lcssa = phi i64 [ %.2.lcssa, %76 ], [ %87, %.lr.ph121 ]
  %.lcssa = phi i64 [ %77, %76 ], [ %88, %.lr.ph121 ]
  %79 = icmp slt i64 %.3.lcssa, %.lcssa
  %80 = add i64 %.lcssa, %.058.lcssa
  %81 = sub i64 %80, %.3.lcssa
  %.159.lcssa = select i1 %79, i64 %81, i64 %.058.lcssa
  %82 = icmp ne i64 %.064.lcssa, 0
  %83 = icmp ne i64 %.162.lcssa, 0
  %or.cond.not85 = select i1 %82, i1 %83, i1 false
  %.not75 = icmp ult i64 %.064.lcssa, %.159.lcssa
  %or.cond79 = select i1 %or.cond.not85, i1 %.not75, i1 false
  %.not76 = icmp ult i64 %.064.lcssa, %.162.lcssa
  %or.cond80 = select i1 %or.cond79, i1 %.not76, i1 false
  %.165 = select i1 %or.cond80, i64 %.064.lcssa, i64 0
  %.263 = select i1 %or.cond80, i64 %.162.lcssa, i64 0
  %.260 = select i1 %or.cond80, i64 %.159.lcssa, i64 0
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.165)
          to label %92 unwind label %103

.lr.ph121:                                        ; preds = %76, %.lr.ph121
  %.3119 = phi i64 [ %87, %.lr.ph121 ], [ %.2.lcssa, %76 ]
  %.058118 = phi i64 [ %85, %.lr.ph121 ], [ 0, %76 ]
  %85 = add nuw nsw i64 %.058118, 1
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.3119) #4
  %87 = add nuw nsw i64 %.3119, 1
  %88 = load i64, ptr %1, align 8, !tbaa !5
  %89 = icmp slt i64 %87, %88
  %90 = icmp ugt i64 %.064.lcssa, %.058118
  %91 = select i1 %89, i1 %90, i1 false
  br i1 %91, label %.lr.ph121, label %.preheader, !llvm.loop !16

92:                                               ; preds = %.preheader
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @.str)
          to label %94 unwind label %103

94:                                               ; preds = %92
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %93, i64 noundef %.263)
          to label %96 unwind label %103

96:                                               ; preds = %94
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str)
          to label %98 unwind label %103

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %97, i64 noundef %.260)
          to label %100 unwind label %103

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @.str.1)
          to label %102 unwind label %103

102:                                              ; preds = %100
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void

103:                                              ; preds = %100, %98, %96, %94, %92, %.preheader
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %105

105:                                              ; preds = %103, %28, %18
  %.pn = phi { ptr, i32 } [ %19, %18 ], [ %29, %28 ], [ %104, %103 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %106

106:                                              ; preds = %105, %12
  %.pn.pn = phi { ptr, i32 } [ %.pn, %105 ], [ %13, %12 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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