; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Global Round 21/D. Permutation Graph.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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.5" = type { i8 }
%class.anon = type { ptr, ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5solvev() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::allocator.5", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.3", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::allocator.5", align 1
  %18 = alloca %"class.std::vector.3", align 8
  %19 = alloca %"class.std::allocator.5", align 1
  %20 = alloca %"class.std::vector.3", align 8
  %21 = alloca %"class.std::allocator.5", align 1
  %22 = alloca i64, align 8
  %23 = alloca %class.anon, align 8
  %24 = alloca %class.anon, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = call ptr @llvm.stacksave.p0()
  store ptr %27, ptr %3, align 8
  %28 = alloca i64, i64 %26, align 16
  store i64 %26, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr %28, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %29, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = mul nuw i64 8, %26
  %32 = udiv i64 %31, 8
  %33 = getelementptr inbounds i64, ptr %30, i64 %32
  store ptr %33, ptr %7, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %43, %0
  %35 = load ptr, ptr %6, align 8, !tbaa !9
  %36 = load ptr, ptr %7, align 8, !tbaa !9
  %37 = icmp ne ptr %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %46

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %40 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %40, ptr %8, align 8, !tbaa !9
  %41 = load ptr, ptr %8, align 8, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %41)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %43

43:                                               ; preds = %39
  %44 = load ptr, ptr %6, align 8, !tbaa !9
  %45 = getelementptr inbounds i64, ptr %44, i32 1
  store ptr %45, ptr %6, align 8, !tbaa !9
  br label %34

46:                                               ; preds = %38
  %47 = load i64, ptr %2, align 8, !tbaa !5
  %48 = icmp eq i64 %47, 1
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  store i64 0, ptr %1, align 8
  store i32 1, ptr %9, align 4
  br label %252

50:                                               ; preds = %46
  %51 = getelementptr inbounds i64, ptr %28, i64 0
  %52 = load i64, ptr %51, align 16, !tbaa !5
  %53 = icmp eq i64 %52, 1
  br i1 %53, label %54, label %62

54:                                               ; preds = %50
  %55 = load i64, ptr %2, align 8, !tbaa !5
  %56 = sub nsw i64 %55, 1
  %57 = getelementptr inbounds i64, ptr %28, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = load i64, ptr %2, align 8, !tbaa !5
  %60 = icmp eq i64 %58, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %54
  store i64 1, ptr %1, align 8
  store i32 1, ptr %9, align 4
  br label %252

62:                                               ; preds = %54, %50
  %63 = getelementptr inbounds i64, ptr %28, i64 0
  %64 = load i64, ptr %63, align 16, !tbaa !5
  %65 = load i64, ptr %2, align 8, !tbaa !5
  %66 = icmp eq i64 %64, %65
  br i1 %66, label %67, label %74

67:                                               ; preds = %62
  %68 = load i64, ptr %2, align 8, !tbaa !5
  %69 = sub nsw i64 %68, 1
  %70 = getelementptr inbounds i64, ptr %28, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %67
  store i64 1, ptr %1, align 8
  store i32 1, ptr %9, align 4
  br label %252

74:                                               ; preds = %67, %62
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  %75 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %75, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %76 unwind label %98

76:                                               ; preds = %74
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  %77 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %77, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %78 unwind label %102

78:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %79 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %79, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %80 unwind label %106

80:                                               ; preds = %78
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %81 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %81, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %82 unwind label %110

82:                                               ; preds = %80
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  %83 = load i64, ptr %2, align 8, !tbaa !5
  %84 = sub nsw i64 %83, 1
  %85 = load i64, ptr %2, align 8, !tbaa !5
  %86 = sub nsw i64 %85, 1
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %86) #6
  store i64 %84, ptr %87, align 8, !tbaa !5
  %88 = load i64, ptr %2, align 8, !tbaa !5
  %89 = sub nsw i64 %88, 1
  %90 = load i64, ptr %2, align 8, !tbaa !5
  %91 = sub nsw i64 %90, 1
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %91) #6
  store i64 %89, ptr %92, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store i64 1, ptr %22, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %231, %82
  %94 = load i64, ptr %22, align 8, !tbaa !5
  %95 = load i64, ptr %2, align 8, !tbaa !5
  %96 = icmp slt i64 %94, %95
  br i1 %96, label %114, label %97

97:                                               ; preds = %93
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %234

98:                                               ; preds = %74
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %13, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %251

102:                                              ; preds = %76
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %13, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %250

106:                                              ; preds = %78
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %13, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %249

110:                                              ; preds = %80
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %13, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %248

114:                                              ; preds = %93
  %115 = load i64, ptr %22, align 8, !tbaa !5
  %116 = getelementptr inbounds i64, ptr %28, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = load i64, ptr %22, align 8, !tbaa !5
  %119 = sub nsw i64 %118, 1
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %119) #6
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = getelementptr inbounds i64, ptr %28, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %124 = icmp slt i64 %117, %123
  br i1 %124, label %125, label %129

125:                                              ; preds = %114
  %126 = load i64, ptr %22, align 8, !tbaa !5
  %127 = load i64, ptr %22, align 8, !tbaa !5
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %127) #6
  store i64 %126, ptr %128, align 8, !tbaa !5
  br label %136

129:                                              ; preds = %114
  %130 = load i64, ptr %22, align 8, !tbaa !5
  %131 = sub nsw i64 %130, 1
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %131) #6
  %133 = load i64, ptr %132, align 8, !tbaa !5
  %134 = load i64, ptr %22, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %134) #6
  store i64 %133, ptr %135, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %129, %125
  %137 = load i64, ptr %22, align 8, !tbaa !5
  %138 = getelementptr inbounds i64, ptr %28, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %22, align 8, !tbaa !5
  %141 = sub nsw i64 %140, 1
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %141) #6
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds i64, ptr %28, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !5
  %146 = icmp sgt i64 %139, %145
  br i1 %146, label %147, label %151

147:                                              ; preds = %136
  %148 = load i64, ptr %22, align 8, !tbaa !5
  %149 = load i64, ptr %22, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %149) #6
  store i64 %148, ptr %150, align 8, !tbaa !5
  br label %158

151:                                              ; preds = %136
  %152 = load i64, ptr %22, align 8, !tbaa !5
  %153 = sub nsw i64 %152, 1
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %153) #6
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = load i64, ptr %22, align 8, !tbaa !5
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %156) #6
  store i64 %155, ptr %157, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %151, %147
  %159 = load i64, ptr %2, align 8, !tbaa !5
  %160 = sub nsw i64 %159, 1
  %161 = load i64, ptr %22, align 8, !tbaa !5
  %162 = sub nsw i64 %160, %161
  %163 = getelementptr inbounds i64, ptr %28, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !5
  %165 = load i64, ptr %2, align 8, !tbaa !5
  %166 = load i64, ptr %22, align 8, !tbaa !5
  %167 = sub nsw i64 %165, %166
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %167) #6
  %169 = load i64, ptr %168, align 8, !tbaa !5
  %170 = getelementptr inbounds i64, ptr %28, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !5
  %172 = icmp slt i64 %164, %171
  br i1 %172, label %173, label %183

173:                                              ; preds = %158
  %174 = load i64, ptr %2, align 8, !tbaa !5
  %175 = sub nsw i64 %174, 1
  %176 = load i64, ptr %22, align 8, !tbaa !5
  %177 = sub nsw i64 %175, %176
  %178 = load i64, ptr %2, align 8, !tbaa !5
  %179 = sub nsw i64 %178, 1
  %180 = load i64, ptr %22, align 8, !tbaa !5
  %181 = sub nsw i64 %179, %180
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %181) #6
  store i64 %177, ptr %182, align 8, !tbaa !5
  br label %194

183:                                              ; preds = %158
  %184 = load i64, ptr %2, align 8, !tbaa !5
  %185 = load i64, ptr %22, align 8, !tbaa !5
  %186 = sub nsw i64 %184, %185
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %186) #6
  %188 = load i64, ptr %187, align 8, !tbaa !5
  %189 = load i64, ptr %2, align 8, !tbaa !5
  %190 = sub nsw i64 %189, 1
  %191 = load i64, ptr %22, align 8, !tbaa !5
  %192 = sub nsw i64 %190, %191
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %192) #6
  store i64 %188, ptr %193, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %183, %173
  %195 = load i64, ptr %2, align 8, !tbaa !5
  %196 = sub nsw i64 %195, 1
  %197 = load i64, ptr %22, align 8, !tbaa !5
  %198 = sub nsw i64 %196, %197
  %199 = getelementptr inbounds i64, ptr %28, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !5
  %201 = load i64, ptr %2, align 8, !tbaa !5
  %202 = load i64, ptr %22, align 8, !tbaa !5
  %203 = sub nsw i64 %201, %202
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %203) #6
  %205 = load i64, ptr %204, align 8, !tbaa !5
  %206 = getelementptr inbounds i64, ptr %28, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !5
  %208 = icmp sgt i64 %200, %207
  br i1 %208, label %209, label %219

209:                                              ; preds = %194
  %210 = load i64, ptr %2, align 8, !tbaa !5
  %211 = sub nsw i64 %210, 1
  %212 = load i64, ptr %22, align 8, !tbaa !5
  %213 = sub nsw i64 %211, %212
  %214 = load i64, ptr %2, align 8, !tbaa !5
  %215 = sub nsw i64 %214, 1
  %216 = load i64, ptr %22, align 8, !tbaa !5
  %217 = sub nsw i64 %215, %216
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %217) #6
  store i64 %213, ptr %218, align 8, !tbaa !5
  br label %230

219:                                              ; preds = %194
  %220 = load i64, ptr %2, align 8, !tbaa !5
  %221 = load i64, ptr %22, align 8, !tbaa !5
  %222 = sub nsw i64 %220, %221
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %222) #6
  %224 = load i64, ptr %223, align 8, !tbaa !5
  %225 = load i64, ptr %2, align 8, !tbaa !5
  %226 = sub nsw i64 %225, 1
  %227 = load i64, ptr %22, align 8, !tbaa !5
  %228 = sub nsw i64 %226, %227
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %228) #6
  store i64 %224, ptr %229, align 8, !tbaa !5
  br label %230

230:                                              ; preds = %219, %209
  br label %231

231:                                              ; preds = %230
  %232 = load i64, ptr %22, align 8, !tbaa !5
  %233 = add nsw i64 %232, 1
  store i64 %233, ptr %22, align 8, !tbaa !5
  br label %93, !llvm.loop !11

234:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  %235 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 0
  store ptr %10, ptr %235, align 8, !tbaa !9
  %236 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 1
  store ptr %15, ptr %236, align 8, !tbaa !9
  %237 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 2
  store ptr %18, ptr %237, align 8, !tbaa !9
  %238 = getelementptr inbounds %class.anon, ptr %23, i32 0, i32 3
  store ptr %20, ptr %238, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %23, i64 32, i1 false), !tbaa.struct !13
  %239 = load i64, ptr %2, align 8, !tbaa !5
  %240 = sub nsw i64 %239, 1
  %241 = invoke noundef i32 @"_ZZ5solvevENK3$_0clIS_EEDaT_ll"(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef byval(%class.anon) align 8 %24, i64 noundef 0, i64 noundef %240)
          to label %242 unwind label %244

242:                                              ; preds = %234
  %243 = sext i32 %241 to i64
  store i64 %243, ptr %1, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  br label %252

244:                                              ; preds = %234
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %13, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  br label %248

248:                                              ; preds = %244, %110
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %249

249:                                              ; preds = %248, %106
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %250

250:                                              ; preds = %249, %102
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %251

251:                                              ; preds = %250, %98
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %255

252:                                              ; preds = %242, %73, %61, %49
  %253 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %253)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %254 = load i64, ptr %1, align 8
  ret i64 %254

255:                                              ; preds = %251
  %256 = load ptr, ptr %13, align 8
  %257 = load i32, ptr %14, align 4
  %258 = insertvalue { ptr, i32 } poison, ptr %256, 0
  %259 = insertvalue { ptr, i32 } %258, i32 %257, 1
  resume { ptr, i32 } %259
}

; 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)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

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

; 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) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @"_ZZ5solvevENK3$_0clIS_EEDaT_ll"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%class.anon) align 8, i64 noundef, i64 noundef) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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

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

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

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


; 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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.5" = type { i8 }
%class.anon = type { ptr, ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i64 -2147483648, 2147483648) i64 @_Z5solvev() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector.3", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::allocator.5", align 1
  %5 = alloca %"class.std::vector.3", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::allocator.5", align 1
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca %"class.std::allocator.5", align 1
  %12 = alloca %class.anon, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %13 = 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)
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = call ptr @llvm.stacksave.p0()
  %16 = alloca i64, i64 %14, align 16
  %17 = getelementptr inbounds i64, ptr %16, i64 %14
  %.not49 = icmp eq i64 %14, 0
  br i1 %.not49, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = icmp eq i64 %18, 1
  br i1 %19, label %144, label %22

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.04250 = phi ptr [ %21, %.lr.ph ], [ %16, %0 ]
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.04250)
  %21 = getelementptr inbounds i8, ptr %.04250, i64 8
  %.not = icmp eq ptr %21, %17
  br i1 %.not, label %._crit_edge, label %.lr.ph

22:                                               ; preds = %._crit_edge
  %23 = load i64, ptr %16, align 16, !tbaa !5
  %24 = icmp eq i64 %23, 1
  br i1 %24, label %25, label %30

25:                                               ; preds = %22
  %26 = getelementptr i64, ptr %16, i64 %18
  %27 = getelementptr i8, ptr %26, i64 -8
  %28 = load i64, ptr %27, align 8, !tbaa !5
  %29 = icmp eq i64 %28, %18
  br i1 %29, label %144, label %30

30:                                               ; preds = %25, %22
  %31 = icmp eq i64 %23, %18
  br i1 %31, label %32, label %37

32:                                               ; preds = %30
  %33 = getelementptr i64, ptr %16, i64 %18
  %34 = getelementptr i8, ptr %33, i64 -8
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = icmp eq i64 %35, 1
  br i1 %36, label %144, label %37

37:                                               ; preds = %32, %30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %18, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %38 unwind label %58

38:                                               ; preds = %37
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %39 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %39, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %40 unwind label %60

40:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %41 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %42 unwind label %62

42:                                               ; preds = %40
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %43 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %44 unwind label %64

44:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  %45 = load i64, ptr %1, align 8, !tbaa !5
  %46 = add nsw i64 %45, -1
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %46) #5
  store i64 %46, ptr %47, align 8, !tbaa !5
  %48 = load i64, ptr %1, align 8, !tbaa !5
  %49 = add nsw i64 %48, -1
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %49) #5
  store i64 %49, ptr %50, align 8, !tbaa !5
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = icmp sgt i64 %51, 1
  br i1 %52, label %.lr.ph53, label %._crit_edge54

._crit_edge54:                                    ; preds = %131, %44
  %.lcssa = phi i64 [ %51, %44 ], [ %134, %131 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  store ptr %2, ptr %12, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %5, ptr %53, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %12, i64 16
  store ptr %8, ptr %54, align 8, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %12, i64 24
  store ptr %10, ptr %55, align 8, !tbaa !9
  %56 = add nsw i64 %.lcssa, -1
  %57 = invoke noundef i32 @"_ZZ5solvevENK3$_0clIS_EEDaT_ll"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull byval(%class.anon) align 8 %12, i64 noundef 0, i64 noundef %56)
          to label %136 unwind label %138

58:                                               ; preds = %37
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %143

60:                                               ; preds = %38
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %142

62:                                               ; preds = %40
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %141

64:                                               ; preds = %42
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %140

.lr.ph53:                                         ; preds = %44, %131
  %.051 = phi i64 [ %133, %131 ], [ 1, %44 ]
  %66 = getelementptr inbounds i64, ptr %16, i64 %.051
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = add nsw i64 %.051, -1
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %68) #5
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds i64, ptr %16, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = icmp slt i64 %67, %72
  br i1 %73, label %77, label %74

74:                                               ; preds = %.lr.ph53
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %68) #5
  %76 = load i64, ptr %75, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %.lr.ph53, %74
  %.sink = phi i64 [ %76, %74 ], [ %.051, %.lr.ph53 ]
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.051) #5
  store i64 %.sink, ptr %78, align 8, !tbaa !5
  %79 = load i64, ptr %66, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %68) #5
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds i64, ptr %16, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !5
  %84 = icmp sgt i64 %79, %83
  br i1 %84, label %88, label %85

85:                                               ; preds = %77
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %68) #5
  %87 = load i64, ptr %86, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %77, %85
  %.sink58 = phi i64 [ %87, %85 ], [ %.051, %77 ]
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.051) #5
  store i64 %.sink58, ptr %89, align 8, !tbaa !5
  %90 = load i64, ptr %1, align 8, !tbaa !5
  %91 = xor i64 %.051, -1
  %92 = getelementptr i64, ptr %16, i64 %90
  %93 = getelementptr i64, ptr %92, i64 %91
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = sub nsw i64 %90, %.051
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %95) #5
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds i64, ptr %16, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !5
  %100 = icmp slt i64 %94, %99
  %101 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %100, label %102, label %104

102:                                              ; preds = %88
  %103 = add i64 %101, %91
  br label %110

104:                                              ; preds = %88
  %105 = sub nsw i64 %101, %.051
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %105) #5
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = load i64, ptr %1, align 8, !tbaa !5
  %109 = add i64 %108, %91
  br label %110

110:                                              ; preds = %104, %102
  %.sink62 = phi i64 [ %109, %104 ], [ %103, %102 ]
  %.sink60 = phi i64 [ %107, %104 ], [ %103, %102 ]
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.sink62) #5
  store i64 %.sink60, ptr %111, align 8, !tbaa !5
  %112 = load i64, ptr %1, align 8, !tbaa !5
  %113 = getelementptr i64, ptr %16, i64 %112
  %114 = getelementptr i64, ptr %113, i64 %91
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = sub nsw i64 %112, %.051
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %116) #5
  %118 = load i64, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds i64, ptr %16, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !5
  %121 = icmp sgt i64 %115, %120
  %122 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %121, label %123, label %125

123:                                              ; preds = %110
  %124 = add i64 %122, %91
  br label %131

125:                                              ; preds = %110
  %126 = sub nsw i64 %122, %.051
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %126) #5
  %128 = load i64, ptr %127, align 8, !tbaa !5
  %129 = load i64, ptr %1, align 8, !tbaa !5
  %130 = add i64 %129, %91
  br label %131

131:                                              ; preds = %123, %125
  %.sink65 = phi i64 [ %124, %123 ], [ %130, %125 ]
  %.sink63 = phi i64 [ %124, %123 ], [ %128, %125 ]
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.sink65) #5
  store i64 %.sink63, ptr %132, align 8, !tbaa !5
  %133 = add nuw nsw i64 %.051, 1
  %134 = load i64, ptr %1, align 8, !tbaa !5
  %135 = icmp slt i64 %133, %134
  br i1 %135, label %.lr.ph53, label %._crit_edge54, !llvm.loop !11

136:                                              ; preds = %._crit_edge54
  %137 = sext i32 %57 to i64
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  br label %144

138:                                              ; preds = %._crit_edge54
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %140

140:                                              ; preds = %138, %64
  %.pn = phi { ptr, i32 } [ %139, %138 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %141

141:                                              ; preds = %140, %62
  %.pn.pn = phi { ptr, i32 } [ %.pn, %140 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %142

142:                                              ; preds = %141, %60
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %141 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %143

143:                                              ; preds = %142, %58
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %142 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn

144:                                              ; preds = %32, %25, %._crit_edge, %136
  %.041 = phi i64 [ %137, %136 ], [ 0, %._crit_edge ], [ 1, %25 ], [ 1, %32 ]
  call void @llvm.stackrestore.p0(ptr %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i64 %.041
}

; 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 #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

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

; 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @"_ZZ5solvevENK3$_0clIS_EEDaT_ll"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%class.anon) align 8, i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass