; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2018-19/Open 2019/Gold (balance)

; 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::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::__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::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@v0 = external dso_local global %"class.std::vector", align 8
@v1 = external dso_local global %"class.std::vector", align 8
@dif = external dso_local global i64, align 8
@ans = external dso_local global i64, align 8
@change = external dso_local global i64, align 8
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %26 unwind label %53

26:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %27 unwind label %57

27:                                               ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %29)
  %30 = load i32, ptr @N, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %31)
  call void @_ZN5input2reISt6vectorIiSaIiEEJS3_EEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(24) @v0, ptr noundef nonnull align 8 dereferenceable(24) @v1)
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = load i64, ptr @change, align 8, !tbaa !9
  %35 = sub nsw i64 %34, %33
  store i64 %35, ptr @change, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) @v0)
  %36 = call noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef %6)
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) @v1)
          to label %37 unwind label %62

37:                                               ; preds = %27
  %38 = call noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef %7)
  %39 = add nsw i32 %36, %38
  %40 = sext i32 %39 to i64
  %41 = load i64, ptr @change, align 8, !tbaa !9
  %42 = add nsw i64 %41, %40
  store i64 %42, ptr @change, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) @v0)
  %43 = call noundef i64 @_Z8countInvSt6vectorIiSaIiEE(ptr noundef %8)
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) @v1)
          to label %44 unwind label %66

44:                                               ; preds = %37
  %45 = call noundef i64 @_Z8countInvSt6vectorIiSaIiEE(ptr noundef %9)
  %46 = sub nsw i64 %43, %45
  store i64 %46, ptr @dif, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %47 = load i32, ptr @N, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  store i32 %48, ptr %12, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %83, %44
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = icmp sge i32 %50, 0
  br i1 %51, label %70, label %52

52:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %86

53:                                               ; preds = %0
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %4, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %5, align 4
  br label %61

57:                                               ; preds = %26
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %4, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %61

61:                                               ; preds = %57, %53
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %310

62:                                               ; preds = %27
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %4, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %5, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %310

66:                                               ; preds = %37
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %4, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %5, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %310

70:                                               ; preds = %49
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %72) #5
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %82

76:                                               ; preds = %70
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %77 unwind label %78

77:                                               ; preds = %76
  br label %82

78:                                               ; preds = %76
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %4, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %309

82:                                               ; preds = %77, %70
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr %12, align 4, !tbaa !5
  br label %49, !llvm.loop !11

86:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %105, %86
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = load i32, ptr @N, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %108

92:                                               ; preds = %87
  %93 = load i32, ptr %13, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %94) #5
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %104

98:                                               ; preds = %92
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %99 unwind label %100

99:                                               ; preds = %98
  br label %104

100:                                              ; preds = %98
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %4, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %309

104:                                              ; preds = %99, %92
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %13, align 4, !tbaa !5
  br label %87, !llvm.loop !13

108:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %109 = load i64, ptr @dif, align 8, !tbaa !9
  store i64 %109, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %110 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %111 = trunc i64 %110 to i32
  store i32 %111, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %112 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %113 = trunc i64 %112 to i32
  store i32 %113, ptr %19, align 4, !tbaa !5
  %114 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %115 unwind label %123

115:                                              ; preds = %108
  %116 = load i32, ptr %114, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  store i32 %116, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %179, %115
  %118 = load i32, ptr %20, align 4, !tbaa !5
  %119 = load i32, ptr %17, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = icmp slt i32 %118, %120
  br i1 %121, label %127, label %122

122:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %182

123:                                              ; preds = %108
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %4, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %308

127:                                              ; preds = %117
  %128 = load i64, ptr %14, align 8, !tbaa !9
  %129 = load i64, ptr %15, align 8, !tbaa !9
  %130 = add nsw i64 %128, %129
  %131 = load i64, ptr %16, align 8, !tbaa !9
  %132 = load i64, ptr %14, align 8, !tbaa !9
  %133 = sub nsw i64 %131, %132
  %134 = load i64, ptr %15, align 8, !tbaa !9
  %135 = add nsw i64 %133, %134
  %136 = invoke noundef i64 @_ZSt3absx(i64 noundef %135)
          to label %137 unwind label %174

137:                                              ; preds = %127
  %138 = add nsw i64 %130, %136
  %139 = load i32, ptr %20, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = load i32, ptr %20, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = mul nsw i64 %140, %142
  %144 = add nsw i64 %138, %143
  invoke void @_Z5ckminIxEvRT_S0_(ptr noundef nonnull align 8 dereferenceable(8) @ans, i64 noundef %144)
          to label %145 unwind label %174

145:                                              ; preds = %137
  %146 = load i32, ptr %20, align 4, !tbaa !5
  %147 = load i32, ptr %17, align 4, !tbaa !5
  %148 = icmp ne i32 %146, %147
  br i1 %148, label %149, label %178

149:                                              ; preds = %145
  %150 = load i32, ptr @N, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  %152 = load i32, ptr %20, align 4, !tbaa !5
  %153 = sub nsw i32 %151, %152
  %154 = load i32, ptr %20, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %155) #5
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sub nsw i32 %153, %157
  %159 = sext i32 %158 to i64
  %160 = load i64, ptr %14, align 8, !tbaa !9
  %161 = add nsw i64 %160, %159
  store i64 %161, ptr %14, align 8, !tbaa !9
  %162 = load i32, ptr %20, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %163) #5
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = load i32, ptr %20, align 4, !tbaa !5
  %167 = sub nsw i32 %165, %166
  %168 = sext i32 %167 to i64
  %169 = load i64, ptr %15, align 8, !tbaa !9
  %170 = add nsw i64 %169, %168
  store i64 %170, ptr %15, align 8, !tbaa !9
  %171 = load i64, ptr @change, align 8, !tbaa !9
  %172 = load i64, ptr %16, align 8, !tbaa !9
  %173 = add nsw i64 %172, %171
  store i64 %173, ptr %16, align 8, !tbaa !9
  br label %178

174:                                              ; preds = %137, %127
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %4, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %308

178:                                              ; preds = %149, %145
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %20, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %20, align 4, !tbaa !5
  br label %117, !llvm.loop !14

182:                                              ; preds = %122
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %183 = load i32, ptr @N, align 4, !tbaa !5
  %184 = sub nsw i32 %183, 1
  store i32 %184, ptr %21, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %202, %182
  %186 = load i32, ptr %21, align 4, !tbaa !5
  %187 = icmp sge i32 %186, 0
  br i1 %187, label %189, label %188

188:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %205

189:                                              ; preds = %185
  %190 = load i32, ptr %21, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %191) #5
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %195, label %201

195:                                              ; preds = %189
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %196 unwind label %197

196:                                              ; preds = %195
  br label %201

197:                                              ; preds = %195
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %4, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %308

201:                                              ; preds = %196, %189
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %21, align 4, !tbaa !5
  %204 = add nsw i32 %203, -1
  store i32 %204, ptr %21, align 4, !tbaa !5
  br label %185, !llvm.loop !15

205:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %224, %205
  %207 = load i32, ptr %22, align 4, !tbaa !5
  %208 = load i32, ptr @N, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %227

211:                                              ; preds = %206
  %212 = load i32, ptr %22, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %213) #5
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = icmp eq i32 %215, 1
  br i1 %216, label %217, label %223

217:                                              ; preds = %211
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %218 unwind label %219

218:                                              ; preds = %217
  br label %223

219:                                              ; preds = %217
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %4, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %308

223:                                              ; preds = %218, %211
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %22, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %22, align 4, !tbaa !5
  br label %206, !llvm.loop !16

227:                                              ; preds = %210
  store i64 0, ptr %15, align 8, !tbaa !9
  store i64 0, ptr %14, align 8, !tbaa !9
  %228 = load i64, ptr @dif, align 8, !tbaa !9
  store i64 %228, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %229 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %230 = trunc i64 %229 to i32
  store i32 %230, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %231 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %232 = trunc i64 %231 to i32
  store i32 %232, ptr %24, align 4, !tbaa !5
  %233 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %234 unwind label %242

234:                                              ; preds = %227
  %235 = load i32, ptr %233, align 4, !tbaa !5
  store i32 %235, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %298, %234
  %237 = load i32, ptr %25, align 4, !tbaa !5
  %238 = load i32, ptr %17, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  %240 = icmp slt i32 %237, %239
  br i1 %240, label %246, label %241

241:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %301

242:                                              ; preds = %227
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %4, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %308

246:                                              ; preds = %236
  %247 = load i64, ptr %14, align 8, !tbaa !9
  %248 = load i64, ptr %15, align 8, !tbaa !9
  %249 = add nsw i64 %247, %248
  %250 = load i64, ptr %16, align 8, !tbaa !9
  %251 = load i64, ptr %14, align 8, !tbaa !9
  %252 = add nsw i64 %250, %251
  %253 = load i64, ptr %15, align 8, !tbaa !9
  %254 = sub nsw i64 %252, %253
  %255 = invoke noundef i64 @_ZSt3absx(i64 noundef %254)
          to label %256 unwind label %293

256:                                              ; preds = %246
  %257 = add nsw i64 %249, %255
  %258 = load i32, ptr %25, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = load i32, ptr %25, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = mul nsw i64 %259, %261
  %263 = add nsw i64 %257, %262
  invoke void @_Z5ckminIxEvRT_S0_(ptr noundef nonnull align 8 dereferenceable(8) @ans, i64 noundef %263)
          to label %264 unwind label %293

264:                                              ; preds = %256
  %265 = load i32, ptr %25, align 4, !tbaa !5
  %266 = load i32, ptr %17, align 4, !tbaa !5
  %267 = icmp ne i32 %265, %266
  br i1 %267, label %268, label %297

268:                                              ; preds = %264
  %269 = load i32, ptr @N, align 4, !tbaa !5
  %270 = sub nsw i32 %269, 1
  %271 = load i32, ptr %25, align 4, !tbaa !5
  %272 = sub nsw i32 %270, %271
  %273 = load i32, ptr %25, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %274) #5
  %276 = load i32, ptr %275, align 4, !tbaa !5
  %277 = sub nsw i32 %272, %276
  %278 = sext i32 %277 to i64
  %279 = load i64, ptr %14, align 8, !tbaa !9
  %280 = add nsw i64 %279, %278
  store i64 %280, ptr %14, align 8, !tbaa !9
  %281 = load i32, ptr %25, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %282) #5
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = load i32, ptr %25, align 4, !tbaa !5
  %286 = sub nsw i32 %284, %285
  %287 = sext i32 %286 to i64
  %288 = load i64, ptr %15, align 8, !tbaa !9
  %289 = add nsw i64 %288, %287
  store i64 %289, ptr %15, align 8, !tbaa !9
  %290 = load i64, ptr @change, align 8, !tbaa !9
  %291 = load i64, ptr %16, align 8, !tbaa !9
  %292 = sub nsw i64 %291, %290
  store i64 %292, ptr %16, align 8, !tbaa !9
  br label %297

293:                                              ; preds = %256, %246
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %4, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %308

297:                                              ; preds = %268, %264
  br label %298

298:                                              ; preds = %297
  %299 = load i32, ptr %25, align 4, !tbaa !5
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %25, align 4, !tbaa !5
  br label %236, !llvm.loop !17

301:                                              ; preds = %241
  invoke void @_ZN6output2psIxEEvRKT_(ptr noundef nonnull align 8 dereferenceable(8) @ans)
          to label %302 unwind label %304

302:                                              ; preds = %301
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %303 = load i32, ptr %1, align 4
  ret i32 %303

304:                                              ; preds = %301
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %4, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %5, align 4
  br label %308

308:                                              ; preds = %304, %293, %242, %219, %197, %174, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %309

309:                                              ; preds = %308, %100, %78
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %310

310:                                              ; preds = %309, %66, %62, %61
  %311 = load ptr, ptr %4, align 8
  %312 = load i32, ptr %5, align 4
  %313 = insertvalue { ptr, i32 } poison, ptr %311, 0
  %314 = insertvalue { ptr, i32 } %313, i32 %312, 1
  resume { ptr, i32 } %314
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint 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 #5 = { nounwind }

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

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


; 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::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::__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::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@v0 = external dso_local global %"class.std::vector", align 8
@v1 = external dso_local global %"class.std::vector", align 8
@dif = external dso_local local_unnamed_addr global i64, align 8
@ans = external dso_local global i64, align 8
@change = external dso_local local_unnamed_addr global i64, align 8
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %17 unwind label %40

17:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %18 unwind label %42

18:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  %19 = load i32, ptr @N, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %20)
  %21 = load i32, ptr @N, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %22)
  call void @_ZN5input2reISt6vectorIiSaIiEEJS3_EEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(24) @v0, ptr noundef nonnull align 8 dereferenceable(24) @v1)
  %23 = load i32, ptr @N, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = load i64, ptr @change, align 8, !tbaa !9
  %26 = sub nsw i64 %25, %24
  store i64 %26, ptr @change, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) @v0)
  %27 = call noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef nonnull %3)
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) @v1)
          to label %28 unwind label %45

28:                                               ; preds = %18
  %29 = call noundef i32 @_Z7numOnesSt6vectorIiSaIiEE(ptr noundef nonnull %4)
  %30 = add nsw i32 %29, %27
  %31 = sext i32 %30 to i64
  %32 = load i64, ptr @change, align 8, !tbaa !9
  %33 = add nsw i64 %32, %31
  store i64 %33, ptr @change, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) @v0)
  %34 = call noundef i64 @_Z8countInvSt6vectorIiSaIiEE(ptr noundef nonnull %5)
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) @v1)
          to label %35 unwind label %47

35:                                               ; preds = %28
  %36 = call noundef i64 @_Z8countInvSt6vectorIiSaIiEE(ptr noundef nonnull %6)
  %37 = sub nsw i64 %34, %36
  store i64 %37, ptr @dif, align 8, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %storemerge.in75 = load i32, ptr @N, align 4, !tbaa !5
  %storemerge76 = add nsw i32 %storemerge.in75, -1
  store i32 %storemerge76, ptr %9, align 4, !tbaa !5
  %38 = icmp sgt i32 %storemerge.in75, 0
  br i1 %38, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  br label %._crit_edge81

._crit_edge:                                      ; preds = %56
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  %39 = icmp sgt i32 %.pre, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br i1 %39, label %.lr.ph80, label %._crit_edge81

40:                                               ; preds = %0
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %17
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  br label %171

45:                                               ; preds = %18
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %171

47:                                               ; preds = %28
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %171

.lr.ph:                                           ; preds = %35, %56
  %storemerge77 = phi i32 [ %storemerge, %56 ], [ %storemerge76, %35 ]
  %49 = zext nneg i32 %storemerge77 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %49) #5
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp eq i32 %51, 1
  br i1 %52, label %53, label %56

53:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %56 unwind label %54

54:                                               ; preds = %53
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %170

56:                                               ; preds = %.lr.ph, %53
  %storemerge.in = load i32, ptr %9, align 4, !tbaa !5
  %storemerge = add nsw i32 %storemerge.in, -1
  store i32 %storemerge, ptr %9, align 4, !tbaa !5
  %57 = icmp sgt i32 %storemerge.in, 0
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge81:                                    ; preds = %74, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  %58 = load i64, ptr @dif, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %59 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %61 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %12, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  %.not82 = icmp slt i32 %64, 0
  br i1 %.not82, label %._crit_edge89, label %.lr.ph88.preheader

.lr.ph88.preheader:                               ; preds = %._crit_edge81
  %65 = zext nneg i32 %64 to i64
  %66 = add nuw i32 %64, 1
  %wide.trip.count = zext i32 %66 to i64
  br label %.lr.ph88

.lr.ph80:                                         ; preds = %._crit_edge, %74
  %storemerge6378 = phi i32 [ %76, %74 ], [ 0, %._crit_edge ]
  %67 = sext i32 %storemerge6378 to i64
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %67) #5
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %.lr.ph80
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %74 unwind label %72

72:                                               ; preds = %71
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %170

74:                                               ; preds = %.lr.ph80, %71
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !5
  %77 = load i32, ptr @N, align 4, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %.lr.ph80, label %._crit_edge81, !llvm.loop !13

._crit_edge89:                                    ; preds = %107, %._crit_edge81
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  %storemerge64.in90 = load i32, ptr @N, align 4, !tbaa !5
  %storemerge6491 = add nsw i32 %storemerge64.in90, -1
  store i32 %storemerge6491, ptr %13, align 4, !tbaa !5
  %79 = icmp sgt i32 %storemerge64.in90, 0
  br i1 %79, label %.lr.ph94, label %._crit_edge95.thread

._crit_edge95.thread:                             ; preds = %._crit_edge89
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  br label %._crit_edge99

.lr.ph88:                                         ; preds = %.lr.ph88.preheader, %107
  %indvars.iv = phi i64 [ 0, %.lr.ph88.preheader ], [ %indvars.iv.next, %107 ]
  %.04185 = phi i64 [ %58, %.lr.ph88.preheader ], [ %.1, %107 ]
  %.04284 = phi i64 [ 0, %.lr.ph88.preheader ], [ %.143, %107 ]
  %.04683 = phi i64 [ 0, %.lr.ph88.preheader ], [ %.147, %107 ]
  %80 = add nsw i64 %.04284, %.04683
  %81 = sub i64 %.04284, %.04683
  %82 = add i64 %81, %.04185
  %83 = call noundef i64 @_ZSt3absx(i64 noundef %82)
  %84 = mul nuw nsw i64 %indvars.iv, %indvars.iv
  %85 = add i64 %80, %84
  %86 = add i64 %85, %83
  invoke void @_Z5ckminIxEvRT_S0_(ptr noundef nonnull align 8 dereferenceable(8) @ans, i64 noundef %86)
          to label %87 unwind label %105

87:                                               ; preds = %.lr.ph88
  %.not70 = icmp eq i64 %indvars.iv, %65
  br i1 %.not70, label %107, label %88

88:                                               ; preds = %87
  %89 = load i32, ptr @N, align 4, !tbaa !5
  %90 = trunc nuw nsw i64 %indvars.iv to i32
  %91 = xor i32 %90, -1
  %92 = add i32 %89, %91
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #5
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub i32 %92, %94
  %96 = sext i32 %95 to i64
  %97 = add nsw i64 %.04683, %96
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #5
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = sub nsw i32 %99, %90
  %101 = sext i32 %100 to i64
  %102 = add nsw i64 %.04284, %101
  %103 = load i64, ptr @change, align 8, !tbaa !9
  %104 = add nsw i64 %103, %.04185
  br label %107

105:                                              ; preds = %.lr.ph88
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %170

107:                                              ; preds = %87, %88
  %.147 = phi i64 [ %97, %88 ], [ %.04683, %87 ]
  %.143 = phi i64 [ %102, %88 ], [ %.04284, %87 ]
  %.1 = phi i64 [ %104, %88 ], [ %.04185, %87 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge89, label %.lr.ph88, !llvm.loop !14

._crit_edge95:                                    ; preds = %116
  %.pre114 = load i32, ptr @N, align 4, !tbaa !5
  %108 = icmp sgt i32 %.pre114, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br i1 %108, label %.lr.ph98, label %._crit_edge99

.lr.ph94:                                         ; preds = %._crit_edge89, %116
  %storemerge6492 = phi i32 [ %storemerge64, %116 ], [ %storemerge6491, %._crit_edge89 ]
  %109 = zext nneg i32 %storemerge6492 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v0, i64 noundef %109) #5
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %116

113:                                              ; preds = %.lr.ph94
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %116 unwind label %114

114:                                              ; preds = %113
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %170

116:                                              ; preds = %.lr.ph94, %113
  %storemerge64.in = load i32, ptr %13, align 4, !tbaa !5
  %storemerge64 = add nsw i32 %storemerge64.in, -1
  store i32 %storemerge64, ptr %13, align 4, !tbaa !5
  %117 = icmp sgt i32 %storemerge64.in, 0
  br i1 %117, label %.lr.ph94, label %._crit_edge95, !llvm.loop !15

._crit_edge99:                                    ; preds = %134, %._crit_edge95.thread, %._crit_edge95
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  %118 = load i64, ptr @dif, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %119 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  %121 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %122 = trunc i64 %121 to i32
  store i32 %122, ptr %16, align 4, !tbaa !5
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %124 = load i32, ptr %123, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  %.not66100 = icmp slt i32 %124, 0
  br i1 %.not66100, label %._crit_edge107, label %.lr.ph106.preheader

.lr.ph106.preheader:                              ; preds = %._crit_edge99
  %125 = zext nneg i32 %124 to i64
  %126 = add nuw i32 %124, 1
  %wide.trip.count112 = zext i32 %126 to i64
  br label %.lr.ph106

.lr.ph98:                                         ; preds = %._crit_edge95, %134
  %storemerge6596 = phi i32 [ %136, %134 ], [ 0, %._crit_edge95 ]
  %127 = sext i32 %storemerge6596 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v1, i64 noundef %127) #5
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %134

131:                                              ; preds = %.lr.ph98
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %134 unwind label %132

132:                                              ; preds = %131
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %170

134:                                              ; preds = %.lr.ph98, %131
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %14, align 4, !tbaa !5
  %137 = load i32, ptr @N, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %.lr.ph98, label %._crit_edge99, !llvm.loop !16

._crit_edge107:                                   ; preds = %166, %._crit_edge99
  invoke void @_ZN6output2psIxEEvRKT_(ptr noundef nonnull align 8 dereferenceable(8) @ans)
          to label %167 unwind label %168

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %166
  %indvars.iv109 = phi i64 [ 0, %.lr.ph106.preheader ], [ %indvars.iv.next110, %166 ]
  %.2103 = phi i64 [ %118, %.lr.ph106.preheader ], [ %.3, %166 ]
  %.244102 = phi i64 [ 0, %.lr.ph106.preheader ], [ %.345, %166 ]
  %.248101 = phi i64 [ 0, %.lr.ph106.preheader ], [ %.349, %166 ]
  %139 = add nsw i64 %.244102, %.248101
  %140 = sub i64 %.248101, %.244102
  %141 = add i64 %140, %.2103
  %142 = call noundef i64 @_ZSt3absx(i64 noundef %141)
  %143 = mul nuw nsw i64 %indvars.iv109, %indvars.iv109
  %144 = add i64 %139, %143
  %145 = add i64 %144, %142
  invoke void @_Z5ckminIxEvRT_S0_(ptr noundef nonnull align 8 dereferenceable(8) @ans, i64 noundef %145)
          to label %146 unwind label %164

146:                                              ; preds = %.lr.ph106
  %.not67 = icmp eq i64 %indvars.iv109, %125
  br i1 %.not67, label %166, label %147

147:                                              ; preds = %146
  %148 = load i32, ptr @N, align 4, !tbaa !5
  %149 = trunc nuw nsw i64 %indvars.iv109 to i32
  %150 = xor i32 %149, -1
  %151 = add i32 %148, %150
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv109) #5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = sub i32 %151, %153
  %155 = sext i32 %154 to i64
  %156 = add nsw i64 %.248101, %155
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv109) #5
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sub nsw i32 %158, %149
  %160 = sext i32 %159 to i64
  %161 = add nsw i64 %.244102, %160
  %162 = load i64, ptr @change, align 8, !tbaa !9
  %163 = sub nsw i64 %.2103, %162
  br label %166

164:                                              ; preds = %.lr.ph106
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %170

166:                                              ; preds = %146, %147
  %.349 = phi i64 [ %156, %147 ], [ %.248101, %146 ]
  %.345 = phi i64 [ %161, %147 ], [ %.244102, %146 ]
  %.3 = phi i64 [ %163, %147 ], [ %.2103, %146 ]
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count112
  br i1 %exitcond113.not, label %._crit_edge107, label %.lr.ph106, !llvm.loop !17

167:                                              ; preds = %._crit_edge107
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  ret i32 0

168:                                              ; preds = %._crit_edge107
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %170

170:                                              ; preds = %105, %114, %132, %164, %168, %72, %54
  %.pn71 = phi { ptr, i32 } [ %55, %54 ], [ %73, %72 ], [ %106, %105 ], [ %115, %114 ], [ %133, %132 ], [ %165, %164 ], [ %169, %168 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %171

171:                                              ; preds = %170, %47, %45, %44
  %.pn71.pn = phi { ptr, i32 } [ %.pn71, %170 ], [ %48, %47 ], [ %46, %45 ], [ %.pn, %44 ]
  resume { ptr, i32 } %.pn71.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reISt6vectorIiSaIiEEJS3_EEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIxEEvRKT_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint 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 #5 = { nounwind }

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

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


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