; LLVM IR from xirc/cp-algorithm :: atcoder/abc060/D/main.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::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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@N = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@wss = external dso_local global %"class.std::vector", align 8
@vss = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %"class.std::allocator.2", align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::_Deque_iterator", align 8
  %10 = alloca %"struct.std::_Deque_iterator", align 8
  %11 = alloca %"struct.std::_Deque_iterator", align 8
  %12 = alloca %"struct.std::_Deque_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  call void @_ZNSaISt5dequeIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  invoke void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %22 unwind label %31

22:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  %23 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vss, i64 noundef 0) #6
  invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(80) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %25 unwind label %35

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %65, %25
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %39, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %72

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %3, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %4, align 4
  call void @_ZNSt15__new_allocatorISt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  br label %258

35:                                               ; preds = %22
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %3, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %4, align 4
  br label %257

39:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef %41) #6
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sub nsw i32 %43, %45
  store i32 %46, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = icmp sge i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %39
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = icmp sle i32 %50, 3
  br label %52

52:                                               ; preds = %49, %39
  %53 = phi i1 [ false, %39 ], [ %51, %49 ]
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  br label %57

55:                                               ; preds = %52
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 15, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #7
  unreachable

56:                                               ; No predecessors!
  br label %57

57:                                               ; preds = %56, %54
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %59) #6
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vss, i64 noundef %62) #6
  invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(80) %60, ptr noundef nonnull align 4 dereferenceable(4) %63)
          to label %64 unwind label %68

64:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %5, align 4, !tbaa !5
  br label %26, !llvm.loop !9

68:                                               ; preds = %57
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %3, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %257

72:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %134, %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = icmp slt i32 %74, 4
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %138

77:                                               ; preds = %73
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %79) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind writable sret(%"struct.std::_Deque_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(80) %80) #6
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %82) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind writable sret(%"struct.std::_Deque_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(80) %83) #6
  invoke void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef %9, ptr noundef %10)
          to label %84 unwind label %105

84:                                               ; preds = %77
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %86) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind writable sret(%"struct.std::_Deque_iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(80) %87) #6
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %89) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind writable sret(%"struct.std::_Deque_iterator") align 8 %12, ptr noundef nonnull align 8 dereferenceable(80) %90) #6
  invoke void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef %11, ptr noundef %12)
          to label %91 unwind label %105

91:                                               ; preds = %84
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %93) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  invoke void @_ZNSt5dequeIiSaIiEE10push_frontEOi(ptr noundef nonnull align 8 dereferenceable(80) %94, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %95 unwind label %109

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %130, %95
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %100) #6
  %102 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %101) #6
  %103 = icmp ult i64 %98, %102
  br i1 %103, label %113, label %104

104:                                              ; preds = %96
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %133

105:                                              ; preds = %84, %77
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %3, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %4, align 4
  br label %137

109:                                              ; preds = %91
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %3, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %137

113:                                              ; preds = %96
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %115) #6
  %117 = load i32, ptr %14, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %116, i64 noundef %119) #6
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %123) #6
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %124, i64 noundef %126) #6
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = add nsw i32 %128, %121
  store i32 %129, ptr %127, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %113
  %131 = load i32, ptr %14, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %14, align 4, !tbaa !5
  br label %96, !llvm.loop !11

133:                                              ; preds = %104
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %7, align 4, !tbaa !5
  br label %73, !llvm.loop !12

137:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %257

138:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %252, %138
  %140 = load i32, ptr %16, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %143 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %142) #6
  %144 = icmp ult i64 %141, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %139
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %255

146:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %248, %146
  %148 = load i32, ptr %17, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %151 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %150) #6
  %152 = icmp ult i64 %149, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %147
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %251

154:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %244, %154
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %159 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %158) #6
  %160 = icmp ult i64 %157, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %155
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %247

162:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %236, %162
  %164 = load i32, ptr %19, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %167 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %166) #6
  %168 = icmp ult i64 %165, %167
  br i1 %168, label %170, label %169

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

170:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = load i32, ptr %16, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = mul nsw i64 %173, %175
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  %180 = sext i32 %179 to i64
  %181 = load i32, ptr %17, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = mul nsw i64 %180, %182
  %184 = add nsw i64 %176, %183
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = add nsw i32 %186, 2
  %188 = sext i32 %187 to i64
  %189 = load i32, ptr %18, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = mul nsw i64 %188, %190
  %192 = add nsw i64 %184, %191
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %194, 3
  %196 = sext i32 %195 to i64
  %197 = load i32, ptr %19, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = mul nsw i64 %196, %198
  %200 = add nsw i64 %192, %199
  store i64 %200, ptr %20, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %201 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %201, i64 noundef %203) #6
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %207 = load i32, ptr %17, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %206, i64 noundef %208) #6
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = add nsw i32 %205, %210
  %212 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %212, i64 noundef %214) #6
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = add nsw i32 %211, %216
  %218 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %219 = load i32, ptr %19, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %218, i64 noundef %220) #6
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = add nsw i32 %217, %222
  store i32 %223, ptr %21, align 4, !tbaa !5
  %224 = load i64, ptr %20, align 8, !tbaa !13
  %225 = load i32, ptr @W, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = icmp sgt i64 %224, %226
  br i1 %227, label %228, label %229

228:                                              ; preds = %170
  store i32 22, ptr %8, align 4
  br label %233

229:                                              ; preds = %170
  %230 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %231 unwind label %239

231:                                              ; preds = %229
  %232 = load i32, ptr %230, align 4, !tbaa !5
  store i32 %232, ptr %15, align 4, !tbaa !5
  store i32 0, ptr %8, align 4
  br label %233

233:                                              ; preds = %231, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %234 = load i32, ptr %8, align 4
  switch i32 %234, label %264 [
    i32 0, label %235
    i32 22, label %236
  ]

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235, %233
  %237 = load i32, ptr %19, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %19, align 4, !tbaa !5
  br label %163, !llvm.loop !15

239:                                              ; preds = %229
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %3, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %257

243:                                              ; preds = %169
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %18, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %18, align 4, !tbaa !5
  br label %155, !llvm.loop !16

247:                                              ; preds = %161
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %17, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %17, align 4, !tbaa !5
  br label %147, !llvm.loop !17

251:                                              ; preds = %153
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %16, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %16, align 4, !tbaa !5
  br label %139, !llvm.loop !18

255:                                              ; preds = %145
  %256 = load i32, ptr %15, align 4, !tbaa !5
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  ret i32 %256

257:                                              ; preds = %239, %137, %68, %35
  call void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  br label %258

258:                                              ; preds = %257, %31
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  br label %259

259:                                              ; preds = %258
  %260 = load ptr, ptr %3, align 8
  %261 = load i32, ptr %4, align 4
  %262 = insertvalue { ptr, i32 } poison, ptr %260, 0
  %263 = insertvalue { ptr, i32 } %262, i32 %261, 1
  resume { ptr, i32 } %263

264:                                              ; preds = %233
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.std::_Deque_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.std::_Deque_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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


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

%"class.std::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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::deque<int>, std::allocator<std::deque<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@W = external dso_local local_unnamed_addr global i32, align 4
@wss = external dso_local global %"class.std::vector", align 8
@vss = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %"class.std::allocator.2", align 1
  %3 = alloca %"struct.std::_Deque_iterator", align 8
  %4 = alloca %"struct.std::_Deque_iterator", align 8
  %5 = alloca %"struct.std::_Deque_iterator", align 8
  %6 = alloca %"struct.std::_Deque_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  call void @_ZNSaISt5dequeIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  invoke void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 4, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %10 unwind label %17

10:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  %11 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vss, i64 noundef 0) #6
  invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %.preheader62 unwind label %19

.preheader62:                                     ; preds = %10
  %13 = load i32, ptr @N, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 1
  br i1 %14, label %.lr.ph, label %.preheader61

.preheader61:                                     ; preds = %32, %.preheader62
  %15 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  %16 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(80) %16) #6
  invoke void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %3, ptr noundef nonnull %4)
          to label %38 unwind label %115

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  br label %194

19:                                               ; preds = %10
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %193

.lr.ph:                                           ; preds = %.preheader62, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 1, %.preheader62 ]
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef %indvars.iv) #6
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = sub nsw i32 %22, %24
  %26 = icmp ult i32 %25, 4
  br i1 %26, label %28, label %27

27:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 15, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #7
  unreachable

28:                                               ; preds = %.lr.ph
  %29 = zext nneg i32 %25 to i64
  %30 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29) #6
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vss, i64 noundef %indvars.iv) #6
  invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(80) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %32 unwind label %36

32:                                               ; preds = %28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr @N, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next, %34
  br i1 %35, label %.lr.ph, label %.preheader61, !llvm.loop !9

36:                                               ; preds = %28
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %193

38:                                               ; preds = %.preheader61
  %39 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %39) #6
  %40 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(80) %40) #6
  invoke void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %41 unwind label %115

41:                                               ; preds = %38
  %42 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5dequeIiSaIiEE10push_frontEOi(ptr noundef nonnull align 8 dereferenceable(80) %42, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %43 unwind label %117

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %44 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %45 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %44) #6
  %46 = icmp ugt i64 %45, 1
  br i1 %46, label %.lr.ph65, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph65, %43
  %47 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(80) %47) #6
  %48 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(80) %48) #6
  invoke void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %3, ptr noundef nonnull %4)
          to label %49 unwind label %115

49:                                               ; preds = %._crit_edge
  %50 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %50) #6
  %51 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(80) %51) #6
  invoke void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %52 unwind label %115

52:                                               ; preds = %49
  %53 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5dequeIiSaIiEE10push_frontEOi(ptr noundef nonnull align 8 dereferenceable(80) %53, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %54 unwind label %117

54:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %55 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %56 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %55) #6
  %57 = icmp ugt i64 %56, 1
  br i1 %57, label %.lr.ph65.1, label %._crit_edge.1

.lr.ph65.1:                                       ; preds = %54, %.lr.ph65.1
  %indvars.iv80.1 = phi i64 [ %indvars.iv.next81.1, %.lr.ph65.1 ], [ 1, %54 ]
  %58 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %59 = add nsw i64 %indvars.iv80.1, -1
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %58, i64 noundef %59) #6
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %62, i64 noundef %indvars.iv80.1) #6
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %64, %61
  store i32 %65, ptr %63, align 4, !tbaa !5
  %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80.1, 1
  %66 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %67 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %66) #6
  %68 = icmp ugt i64 %67, %indvars.iv.next81.1
  br i1 %68, label %.lr.ph65.1, label %._crit_edge.1, !llvm.loop !11

._crit_edge.1:                                    ; preds = %.lr.ph65.1, %54
  %69 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(80) %69) #6
  %70 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(80) %70) #6
  invoke void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %3, ptr noundef nonnull %4)
          to label %71 unwind label %115

71:                                               ; preds = %._crit_edge.1
  %72 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %72) #6
  %73 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(80) %73) #6
  invoke void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %74 unwind label %115

74:                                               ; preds = %71
  %75 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5dequeIiSaIiEE10push_frontEOi(ptr noundef nonnull align 8 dereferenceable(80) %75, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %76 unwind label %117

76:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %77 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %78 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %77) #6
  %79 = icmp ugt i64 %78, 1
  br i1 %79, label %.lr.ph65.2, label %._crit_edge.2

.lr.ph65.2:                                       ; preds = %76, %.lr.ph65.2
  %indvars.iv80.2 = phi i64 [ %indvars.iv.next81.2, %.lr.ph65.2 ], [ 1, %76 ]
  %80 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %81 = add nsw i64 %indvars.iv80.2, -1
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %80, i64 noundef %81) #6
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %84, i64 noundef %indvars.iv80.2) #6
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, %83
  store i32 %87, ptr %85, align 4, !tbaa !5
  %indvars.iv.next81.2 = add nuw nsw i64 %indvars.iv80.2, 1
  %88 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %89 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %88) #6
  %90 = icmp ugt i64 %89, %indvars.iv.next81.2
  br i1 %90, label %.lr.ph65.2, label %._crit_edge.2, !llvm.loop !11

._crit_edge.2:                                    ; preds = %.lr.ph65.2, %76
  %91 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(80) %91) #6
  %92 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(80) %92) #6
  invoke void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %3, ptr noundef nonnull %4)
          to label %93 unwind label %115

93:                                               ; preds = %._crit_edge.2
  %94 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  call void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %94) #6
  %95 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  call void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::_Deque_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(80) %95) #6
  invoke void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %96 unwind label %115

96:                                               ; preds = %93
  %97 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5dequeIiSaIiEE10push_frontEOi(ptr noundef nonnull align 8 dereferenceable(80) %97, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %98 unwind label %117

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %99 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %100 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %99) #6
  %101 = icmp ugt i64 %100, 1
  br i1 %101, label %.lr.ph65.3, label %._crit_edge.3

.lr.ph65.3:                                       ; preds = %98, %.lr.ph65.3
  %indvars.iv80.3 = phi i64 [ %indvars.iv.next81.3, %.lr.ph65.3 ], [ 1, %98 ]
  %102 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %103 = add nsw i64 %indvars.iv80.3, -1
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %102, i64 noundef %103) #6
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %106, i64 noundef %indvars.iv80.3) #6
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add nsw i32 %108, %105
  store i32 %109, ptr %107, align 4, !tbaa !5
  %indvars.iv.next81.3 = add nuw nsw i64 %indvars.iv80.3, 1
  %110 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %111 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %110) #6
  %112 = icmp ugt i64 %111, %indvars.iv.next81.3
  br i1 %112, label %.lr.ph65.3, label %._crit_edge.3, !llvm.loop !11

._crit_edge.3:                                    ; preds = %.lr.ph65.3, %98
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %114 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %113) #6
  %.not = icmp eq i64 %114, 0
  br i1 %.not, label %._crit_edge75, label %.preheader60

115:                                              ; preds = %93, %._crit_edge.2, %71, %._crit_edge.1, %49, %._crit_edge, %38, %.preheader61
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %193

117:                                              ; preds = %96, %74, %52, %41
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %193

.lr.ph65:                                         ; preds = %43, %.lr.ph65
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph65 ], [ 1, %43 ]
  %119 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %120 = add nsw i64 %indvars.iv80, -1
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %119, i64 noundef %120) #6
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %123, i64 noundef %indvars.iv80) #6
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = add nsw i32 %125, %122
  store i32 %126, ptr %124, align 4, !tbaa !5
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %127 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %128 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %127) #6
  %129 = icmp ugt i64 %128, %indvars.iv.next81
  br i1 %129, label %.lr.ph65, label %._crit_edge, !llvm.loop !11

.preheader60:                                     ; preds = %._crit_edge.3, %._crit_edge73
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %._crit_edge73 ], [ 0, %._crit_edge.3 ]
  %130 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %131 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %130) #6
  %.not76 = icmp eq i64 %131, 0
  br i1 %.not76, label %._crit_edge73, label %.preheader59

._crit_edge75.loopexit:                           ; preds = %._crit_edge73
  %.pre = load i32, ptr %8, align 4, !tbaa !5
  br label %._crit_edge75

._crit_edge75:                                    ; preds = %._crit_edge75.loopexit, %._crit_edge.3
  %132 = phi i32 [ %.pre, %._crit_edge75.loopexit ], [ 0, %._crit_edge.3 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  ret i32 %132

.preheader59:                                     ; preds = %.preheader60, %._crit_edge71
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %._crit_edge71 ], [ 0, %.preheader60 ]
  %133 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %134 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %133) #6
  %.not77 = icmp eq i64 %134, 0
  br i1 %.not77, label %._crit_edge71, label %.preheader

._crit_edge73:                                    ; preds = %._crit_edge71, %.preheader60
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %135 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %136 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %135) #6
  %137 = icmp ugt i64 %136, %indvars.iv.next96
  br i1 %137, label %.preheader60, label %._crit_edge75.loopexit, !llvm.loop !12

.preheader:                                       ; preds = %.preheader59, %._crit_edge69
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %._crit_edge69 ], [ 0, %.preheader59 ]
  %138 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %139 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %138) #6
  %.not78 = icmp eq i64 %139, 0
  br i1 %.not78, label %._crit_edge69, label %.lr.ph68

._crit_edge71:                                    ; preds = %._crit_edge69, %.preheader59
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %140 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %141 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %140) #6
  %142 = icmp ugt i64 %141, %indvars.iv.next93
  br i1 %142, label %.preheader59, label %._crit_edge73, !llvm.loop !13

._crit_edge69:                                    ; preds = %189, %.preheader
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %143 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %144 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %143) #6
  %145 = icmp ugt i64 %144, %indvars.iv.next90
  br i1 %145, label %.preheader, label %._crit_edge71, !llvm.loop !14

.lr.ph68:                                         ; preds = %.preheader, %189
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %189 ], [ 0, %.preheader ]
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = mul nsw i64 %indvars.iv95, %148
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %indvars.iv92, %153
  %155 = add nsw i64 %154, %149
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, 2
  %159 = sext i32 %158 to i64
  %160 = mul nsw i64 %indvars.iv89, %159
  %161 = add nsw i64 %155, %160
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @wss, i64 noundef 0) #6
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %163, 3
  %165 = sext i32 %164 to i64
  %166 = mul nsw i64 %indvars.iv86, %165
  %167 = add nsw i64 %161, %166
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %168 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %168, i64 noundef %indvars.iv95) #6
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %171, i64 noundef %indvars.iv92) #6
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = add nsw i32 %173, %170
  %175 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #6
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %175, i64 noundef %indvars.iv89) #6
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = add nsw i32 %174, %177
  %179 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5dequeIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %179, i64 noundef %indvars.iv86) #6
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = add nsw i32 %178, %181
  store i32 %182, ptr %9, align 4, !tbaa !5
  %183 = load i32, ptr @W, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = icmp sgt i64 %167, %184
  br i1 %185, label %189, label %186

186:                                              ; preds = %.lr.ph68
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %188 = load i32, ptr %187, align 4, !tbaa !5
  store i32 %188, ptr %8, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %.lr.ph68, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %190 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #6
  %191 = call noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %190) #6
  %192 = icmp ugt i64 %191, %indvars.iv.next87
  br i1 %192, label %.lr.ph68, label %._crit_edge69, !llvm.loop !15

193:                                              ; preds = %115, %117, %36, %19
  %.pn56 = phi { ptr, i32 } [ %37, %36 ], [ %20, %19 ], [ %118, %117 ], [ %116, %115 ]
  call void @_ZNSt6vectorISt5dequeIiSaIiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  br label %194

194:                                              ; preds = %193, %17
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %193 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn56.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeIiSaIiEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.std::_Deque_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeIiSaIiEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.std::_Deque_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseISt15_Deque_iteratorIiRiPiEEvT_S4_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt5dequeIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

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

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

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


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