; LLVM IR from xirc/cp-algorithm :: spoj/water/main.ll (Z5solveRSt6vectorIS_IiSaIiEESaIS1_EE)

; 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.14" = type { i8 }
%"class.std::allocator.7" = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector.17", [8 x i8] }>
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"struct.std::pair" = type { i32, %struct.pos }
%struct.pos = type { i32, i32 }

@_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dx = external hidden global [4 x i32], align 16
@_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dy = external hidden global [4 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5solveRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector.5", align 8
  %7 = alloca %"class.std::vector.10", align 8
  %8 = alloca %"class.std::allocator.14", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::allocator.7", align 1
  %12 = alloca %"class.std::priority_queue", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.pos, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.pos, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca %"struct.std::_Bit_reference", align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.pos, align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.pos, align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"struct.std::_Bit_reference", align 8
  %37 = alloca %"struct.std::_Bit_reference", align 8
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %"struct.std::pair", align 4
  %41 = alloca i32, align 4
  %42 = alloca %struct.pos, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef 0) #5
  %48 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #5
  %49 = trunc i64 %48 to i32
  store i32 %49, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #5
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %53, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %54 unwind label %62

54:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %51, ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %55 unwind label %66

55:                                               ; preds = %54
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %56 unwind label %71

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

57:                                               ; preds = %128, %56
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %75, label %61

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

62:                                               ; preds = %1
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %9, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %10, align 4
  br label %70

66:                                               ; preds = %54
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %9, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  br label %70

70:                                               ; preds = %66, %62
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #5
  br label %393

71:                                               ; preds = %55
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  br label %392

75:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %77) #5
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %78, i64 noundef %81)
          to label %83 unwind label %131

83:                                               ; preds = %75
  %84 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %85 = extractvalue { ptr, i64 } %82, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %87 = extractvalue { ptr, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext true) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %90) #5
  %92 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %91, i64 noundef 0)
          to label %93 unwind label %135

93:                                               ; preds = %83
  %94 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %95 = extractvalue { ptr, i64 } %92, 0
  store ptr %95, ptr %94, align 8
  %96 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %97 = extractvalue { ptr, i64 } %92, 1
  store i64 %97, ptr %96, align 8
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %88) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #5
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef 0) #5
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = sub nsw i32 0, %104
  store i32 %105, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %106 = getelementptr inbounds %struct.pos, ptr %18, i32 0, i32 0
  %107 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %107, ptr %106, align 4, !tbaa !11
  %108 = getelementptr inbounds %struct.pos, ptr %18, i32 0, i32 1
  store i32 0, ptr %108, align 4, !tbaa !13
  invoke void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %109 unwind label %140

109:                                              ; preds = %93
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %110 unwind label %140

110:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = load i32, ptr %13, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #5
  %115 = load i32, ptr %4, align 4, !tbaa !9
  %116 = sub nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %117) #5
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = sub nsw i32 0, %119
  store i32 %120, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %121 = getelementptr inbounds %struct.pos, ptr %21, i32 0, i32 0
  %122 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %122, ptr %121, align 4, !tbaa !11
  %123 = getelementptr inbounds %struct.pos, ptr %21, i32 0, i32 1
  %124 = load i32, ptr %4, align 4, !tbaa !9
  %125 = sub nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !13
  invoke void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %126 unwind label %144

126:                                              ; preds = %110
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %127 unwind label %144

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %13, align 4, !tbaa !9
  br label %57, !llvm.loop !14

131:                                              ; preds = %75
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  br label %139

135:                                              ; preds = %83
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %9, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %139

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %148

140:                                              ; preds = %109, %93
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %9, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #5
  br label %148

144:                                              ; preds = %126, %110
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %9, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  br label %148

148:                                              ; preds = %144, %140, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %391

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

150:                                              ; preds = %208, %149
  %151 = load i32, ptr %22, align 4, !tbaa !9
  %152 = load i32, ptr %4, align 4, !tbaa !9
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %155, label %154

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

155:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %156 = load i32, ptr %3, align 4, !tbaa !9
  %157 = sub nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %158) #5
  %160 = load i32, ptr %22, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %159, i64 noundef %161)
          to label %163 unwind label %211

163:                                              ; preds = %155
  %164 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %165 = extractvalue { ptr, i64 } %162, 0
  store ptr %165, ptr %164, align 8
  %166 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %167 = extractvalue { ptr, i64 } %162, 1
  store i64 %167, ptr %166, align 8
  %168 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %23, i1 noundef zeroext true) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %169 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  %170 = load i32, ptr %22, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %169, i64 noundef %171)
          to label %173 unwind label %215

173:                                              ; preds = %163
  %174 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %175 = extractvalue { ptr, i64 } %172, 0
  store ptr %175, ptr %174, align 8
  %176 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %177 = extractvalue { ptr, i64 } %172, 1
  store i64 %177, ptr %176, align 8
  %178 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %168) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef 0) #5
  %181 = load i32, ptr %22, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %180, i64 noundef %182) #5
  %184 = load i32, ptr %183, align 4, !tbaa !9
  %185 = sub nsw i32 0, %184
  store i32 %185, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %186 = getelementptr inbounds %struct.pos, ptr %27, i32 0, i32 0
  store i32 0, ptr %186, align 4, !tbaa !11
  %187 = getelementptr inbounds %struct.pos, ptr %27, i32 0, i32 1
  %188 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %188, ptr %187, align 4, !tbaa !13
  invoke void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %189 unwind label %220

189:                                              ; preds = %173
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %190 unwind label %220

190:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = load i32, ptr %3, align 4, !tbaa !9
  %193 = sub nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %194) #5
  %196 = load i32, ptr %22, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %197) #5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = sub nsw i32 0, %199
  store i32 %200, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %201 = getelementptr inbounds %struct.pos, ptr %30, i32 0, i32 0
  %202 = load i32, ptr %3, align 4, !tbaa !9
  %203 = sub nsw i32 %202, 1
  store i32 %203, ptr %201, align 4, !tbaa !11
  %204 = getelementptr inbounds %struct.pos, ptr %30, i32 0, i32 1
  %205 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %205, ptr %204, align 4, !tbaa !13
  invoke void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %206 unwind label %224

206:                                              ; preds = %190
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 4 dereferenceable(12) %28)
          to label %207 unwind label %224

207:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #5
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %22, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %22, align 4, !tbaa !9
  br label %150, !llvm.loop !16

211:                                              ; preds = %155
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %9, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %10, align 4
  br label %219

215:                                              ; preds = %163
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %9, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  br label %219

219:                                              ; preds = %215, %211
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %228

220:                                              ; preds = %189, %173
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %9, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  br label %228

224:                                              ; preds = %206, %190
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #5
  br label %228

228:                                              ; preds = %224, %220, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %391

229:                                              ; preds = %154
  br label %230

230:                                              ; preds = %387, %229
  %231 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %232 unwind label %242

232:                                              ; preds = %230
  %233 = xor i1 %231, true
  br i1 %233, label %234, label %389

234:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #5
  %235 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %236 unwind label %246

236:                                              ; preds = %234
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %235, i64 12, i1 false)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %237 unwind label %246

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %379, %237
  %239 = load i32, ptr %32, align 4, !tbaa !9
  %240 = icmp slt i32 %239, 4
  br i1 %240, label %250, label %241

241:                                              ; preds = %238
  store i32 10, ptr %33, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %387

242:                                              ; preds = %230
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %9, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %10, align 4
  br label %391

246:                                              ; preds = %236, %234
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %9, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %10, align 4
  br label %388

250:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %251 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %252 = getelementptr inbounds %struct.pos, ptr %251, i32 0, i32 0
  %253 = load i32, ptr %252, align 4, !tbaa !17
  %254 = load i32, ptr %32, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [4 x i32], ptr @_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dx, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !9
  %258 = add nsw i32 %253, %257
  store i32 %258, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %259 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %260 = getelementptr inbounds %struct.pos, ptr %259, i32 0, i32 1
  %261 = load i32, ptr %260, align 4, !tbaa !19
  %262 = load i32, ptr %32, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [4 x i32], ptr @_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dy, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !9
  %266 = add nsw i32 %261, %265
  store i32 %266, ptr %35, align 4, !tbaa !9
  %267 = load i32, ptr %34, align 4, !tbaa !9
  %268 = icmp slt i32 %267, 0
  br i1 %268, label %280, label %269

269:                                              ; preds = %250
  %270 = load i32, ptr %34, align 4, !tbaa !9
  %271 = load i32, ptr %3, align 4, !tbaa !9
  %272 = icmp sge i32 %270, %271
  br i1 %272, label %280, label %273

273:                                              ; preds = %269
  %274 = load i32, ptr %35, align 4, !tbaa !9
  %275 = icmp slt i32 %274, 0
  br i1 %275, label %280, label %276

276:                                              ; preds = %273
  %277 = load i32, ptr %35, align 4, !tbaa !9
  %278 = load i32, ptr %4, align 4, !tbaa !9
  %279 = icmp sge i32 %277, %278
  br i1 %279, label %280, label %281

280:                                              ; preds = %276, %273, %269, %250
  store i32 12, ptr %33, align 4
  br label %376

281:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #5
  %282 = load i32, ptr %34, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %283) #5
  %285 = load i32, ptr %35, align 4, !tbaa !9
  %286 = sext i32 %285 to i64
  %287 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %284, i64 noundef %286)
          to label %288 unwind label %295

288:                                              ; preds = %281
  %289 = getelementptr inbounds { ptr, i64 }, ptr %36, i32 0, i32 0
  %290 = extractvalue { ptr, i64 } %287, 0
  store ptr %290, ptr %289, align 8
  %291 = getelementptr inbounds { ptr, i64 }, ptr %36, i32 0, i32 1
  %292 = extractvalue { ptr, i64 } %287, 1
  store i64 %292, ptr %291, align 8
  %293 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %36) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #5
  br i1 %293, label %294, label %299

294:                                              ; preds = %288
  store i32 12, ptr %33, align 4
  br label %376

295:                                              ; preds = %281
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %9, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #5
  br label %386

299:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #5
  %300 = load i32, ptr %34, align 4, !tbaa !9
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %301) #5
  %303 = load i32, ptr %35, align 4, !tbaa !9
  %304 = sext i32 %303 to i64
  %305 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %302, i64 noundef %304)
          to label %306 unwind label %356

306:                                              ; preds = %299
  %307 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 0
  %308 = extractvalue { ptr, i64 } %305, 0
  store ptr %308, ptr %307, align 8
  %309 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 1
  %310 = extractvalue { ptr, i64 } %305, 1
  store i64 %310, ptr %309, align 8
  %311 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %37, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  %312 = load ptr, ptr %2, align 8, !tbaa !5
  %313 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %314 = getelementptr inbounds %struct.pos, ptr %313, i32 0, i32 0
  %315 = load i32, ptr %314, align 4, !tbaa !17
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %312, i64 noundef %316) #5
  %318 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %319 = getelementptr inbounds %struct.pos, ptr %318, i32 0, i32 1
  %320 = load i32, ptr %319, align 4, !tbaa !19
  %321 = sext i32 %320 to i64
  %322 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %317, i64 noundef %321) #5
  %323 = load i32, ptr %322, align 4, !tbaa !9
  store i32 %323, ptr %38, align 4, !tbaa !9
  %324 = load ptr, ptr %2, align 8, !tbaa !5
  %325 = load i32, ptr %34, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %324, i64 noundef %326) #5
  %328 = load i32, ptr %35, align 4, !tbaa !9
  %329 = sext i32 %328 to i64
  %330 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %327, i64 noundef %329) #5
  %331 = load i32, ptr %330, align 4, !tbaa !9
  %332 = load i32, ptr %38, align 4, !tbaa !9
  %333 = icmp slt i32 %331, %332
  br i1 %333, label %334, label %360

334:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  %335 = load i32, ptr %38, align 4, !tbaa !9
  %336 = load ptr, ptr %2, align 8, !tbaa !5
  %337 = load i32, ptr %34, align 4, !tbaa !9
  %338 = sext i32 %337 to i64
  %339 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %336, i64 noundef %338) #5
  %340 = load i32, ptr %35, align 4, !tbaa !9
  %341 = sext i32 %340 to i64
  %342 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %339, i64 noundef %341) #5
  %343 = load i32, ptr %342, align 4, !tbaa !9
  %344 = sub nsw i32 %335, %343
  store i32 %344, ptr %39, align 4, !tbaa !9
  %345 = load i32, ptr %39, align 4, !tbaa !9
  %346 = load i32, ptr %5, align 4, !tbaa !9
  %347 = add nsw i32 %346, %345
  store i32 %347, ptr %5, align 4, !tbaa !9
  %348 = load i32, ptr %38, align 4, !tbaa !9
  %349 = load ptr, ptr %2, align 8, !tbaa !5
  %350 = load i32, ptr %34, align 4, !tbaa !9
  %351 = sext i32 %350 to i64
  %352 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %349, i64 noundef %351) #5
  %353 = load i32, ptr %35, align 4, !tbaa !9
  %354 = sext i32 %353 to i64
  %355 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %352, i64 noundef %354) #5
  store i32 %348, ptr %355, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  br label %360

356:                                              ; preds = %299
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %9, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  br label %386

360:                                              ; preds = %334, %306
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  %361 = load ptr, ptr %2, align 8, !tbaa !5
  %362 = load i32, ptr %34, align 4, !tbaa !9
  %363 = sext i32 %362 to i64
  %364 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %361, i64 noundef %363) #5
  %365 = load i32, ptr %35, align 4, !tbaa !9
  %366 = sext i32 %365 to i64
  %367 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %364, i64 noundef %366) #5
  %368 = load i32, ptr %367, align 4, !tbaa !9
  %369 = sub nsw i32 0, %368
  store i32 %369, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %370 = getelementptr inbounds %struct.pos, ptr %42, i32 0, i32 0
  %371 = load i32, ptr %34, align 4, !tbaa !9
  store i32 %371, ptr %370, align 4, !tbaa !11
  %372 = getelementptr inbounds %struct.pos, ptr %42, i32 0, i32 1
  %373 = load i32, ptr %35, align 4, !tbaa !9
  store i32 %373, ptr %372, align 4, !tbaa !13
  invoke void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(8) %42)
          to label %374 unwind label %382

374:                                              ; preds = %360
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 4 dereferenceable(12) %40)
          to label %375 unwind label %382

375:                                              ; preds = %374
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  store i32 0, ptr %33, align 4
  br label %376

376:                                              ; preds = %375, %294, %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  %377 = load i32, ptr %33, align 4
  switch i32 %377, label %399 [
    i32 0, label %378
    i32 12, label %379
  ]

378:                                              ; preds = %376
  br label %379

379:                                              ; preds = %378, %376
  %380 = load i32, ptr %32, align 4, !tbaa !9
  %381 = add nsw i32 %380, 1
  store i32 %381, ptr %32, align 4, !tbaa !9
  br label %238, !llvm.loop !20

382:                                              ; preds = %374, %360
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %9, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %386

386:                                              ; preds = %382, %356, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %388

387:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #5
  br label %230, !llvm.loop !21

388:                                              ; preds = %386, %246
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #5
  br label %391

389:                                              ; preds = %232
  %390 = load i32, ptr %5, align 4, !tbaa !9
  store i32 1, ptr %33, align 4
  call void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 %390

391:                                              ; preds = %388, %242, %228, %148
  call void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #5
  br label %392

392:                                              ; preds = %391, %71
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %393

393:                                              ; preds = %392, %70
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %394

394:                                              ; preds = %393
  %395 = load ptr, ptr %9, align 8
  %396 = load i32, ptr %10, align 4
  %397 = insertvalue { ptr, i32 } poison, ptr %395, 0
  %398 = insertvalue { ptr, i32 } %397, i32 %396, 1
  resume { ptr, i32 } %398

399:                                              ; preds = %376
  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 noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; 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 void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(12)) #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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 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) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

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

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

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

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


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

%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.14" = type { i8 }
%"class.std::allocator.7" = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector.17", [8 x i8] }>
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, pos>, std::allocator<std::pair<int, pos>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"struct.std::pair" = type { i32, %struct.pos }
%struct.pos = type { i32, i32 }

@_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dx = external hidden local_unnamed_addr global [4 x i32], align 16
@_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dy = external hidden local_unnamed_addr global [4 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5solveRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca %"class.std::vector.10", align 8
  %4 = alloca %"class.std::allocator.14", align 1
  %5 = alloca %"class.std::allocator.7", align 1
  %6 = alloca %"class.std::priority_queue", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.pos, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.pos, align 4
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.pos, align 4
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.pos, align 4
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca %"struct.std::_Bit_reference", align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.pos, align 4
  %28 = tail call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %29 = trunc i64 %28 to i32
  %30 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %31 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = trunc i64 %31 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #4
  %sext92 = shl i64 %31, 32
  %33 = ashr exact i64 %sext92, 32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %34 unwind label %51

34:                                               ; preds = %1
  %sext = shl i64 %28, 32
  %35 = ashr exact i64 %sext, 32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %35, ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %36 unwind label %53

36:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %37 = icmp sgt i32 %29, 0
  br i1 %37, label %.lr.ph, label %.preheader112

.lr.ph:                                           ; preds = %36
  %38 = add nsw i32 %32, -1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i8, ptr %7, i64 8
  %41 = getelementptr inbounds i8, ptr %8, i64 8
  %42 = getelementptr inbounds i8, ptr %11, i64 4
  %43 = getelementptr inbounds i8, ptr %14, i64 4
  %wide.trip.count = and i64 %28, 2147483647
  br label %56

.preheader112:                                    ; preds = %79, %36
  %44 = icmp sgt i32 %32, 0
  br i1 %44, label %.lr.ph122, label %.preheader111

.lr.ph122:                                        ; preds = %.preheader112
  %45 = add nsw i32 %29, -1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %15, i64 8
  %48 = getelementptr inbounds i8, ptr %16, i64 8
  %49 = getelementptr inbounds i8, ptr %19, i64 4
  %50 = getelementptr inbounds i8, ptr %22, i64 4
  %wide.trip.count131 = and i64 %31, 2147483647
  br label %93

51:                                               ; preds = %1
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %34
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #4
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #4
  br label %190

56:                                               ; preds = %.lr.ph, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %79 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %57 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #4
  %58 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %57, i64 noundef %39)
          to label %59 unwind label %80

59:                                               ; preds = %56
  %60 = extractvalue { ptr, i64 } %58, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i64 } %58, 1
  store i64 %61, ptr %40, align 8
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %63 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #4
  %64 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %63, i64 noundef 0)
          to label %65 unwind label %82

65:                                               ; preds = %59
  %66 = extractvalue { ptr, i64 } %64, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i64 } %64, 1
  store i64 %67, ptr %41, align 8
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %62) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #4
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef 0) #4
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sub nsw i32 0, %71
  store i32 %72, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %73 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %73, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %42, align 4, !tbaa !11
  call void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %11)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %74 unwind label %85

74:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #4
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %39) #4
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sub nsw i32 0, %77
  store i32 %78, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  store i32 %73, ptr %14, align 4, !tbaa !9
  store i32 %38, ptr %43, align 4, !tbaa !11
  call void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %79 unwind label %87

79:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader112, label %56, !llvm.loop !12

80:                                               ; preds = %56
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %59
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %84

84:                                               ; preds = %82, %80
  %.pn101 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %189

85:                                               ; preds = %65
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  br label %189

87:                                               ; preds = %74
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  br label %189

.preheader111:                                    ; preds = %116, %.preheader112
  %89 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %89, label %._crit_edge, label %.lr.ph126

.lr.ph126:                                        ; preds = %.preheader111
  %90 = getelementptr inbounds i8, ptr %23, i64 8
  %91 = getelementptr inbounds i8, ptr %24, i64 8
  %92 = getelementptr inbounds i8, ptr %27, i64 4
  br label %127

93:                                               ; preds = %.lr.ph122, %116
  %indvars.iv128 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next129, %116 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #4
  %94 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %46) #4
  %95 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %94, i64 noundef %indvars.iv128)
          to label %96 unwind label %117

96:                                               ; preds = %93
  %97 = extractvalue { ptr, i64 } %95, 0
  store ptr %97, ptr %15, align 8
  %98 = extractvalue { ptr, i64 } %95, 1
  store i64 %98, ptr %47, align 8
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #4
  %100 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %101 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %100, i64 noundef %indvars.iv128)
          to label %102 unwind label %119

102:                                              ; preds = %96
  %103 = extractvalue { ptr, i64 } %101, 0
  store ptr %103, ptr %16, align 8
  %104 = extractvalue { ptr, i64 } %101, 1
  store i64 %104, ptr %48, align 8
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %99) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %indvars.iv128) #4
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sub nsw i32 0, %108
  store i32 %109, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  %110 = trunc nuw nsw i64 %indvars.iv128 to i32
  store i32 %110, ptr %49, align 4, !tbaa !11
  call void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(8) %19)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %111 unwind label %122

111:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #4
  %112 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %46) #4
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %112, i64 noundef %indvars.iv128) #4
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sub nsw i32 0, %114
  store i32 %115, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #4
  store i32 %45, ptr %22, align 4, !tbaa !9
  store i32 %110, ptr %50, align 4, !tbaa !11
  call void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(8) %22)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %116 unwind label %124

116:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #4
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond132.not = icmp eq i64 %indvars.iv.next129, %wide.trip.count131
  br i1 %exitcond132.not, label %.preheader111, label %93, !llvm.loop !14

117:                                              ; preds = %93
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %121

119:                                              ; preds = %96
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #4
  br label %121

121:                                              ; preds = %119, %117
  %.pn97 = phi { ptr, i32 } [ %120, %119 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  br label %189

122:                                              ; preds = %102
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #4
  br label %189

124:                                              ; preds = %111
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #4
  br label %189

.loopexit:                                        ; preds = %186
  %126 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %126, label %._crit_edge, label %127, !llvm.loop !15

127:                                              ; preds = %.lr.ph126, %.loopexit
  %.0125 = phi i32 [ 0, %.lr.ph126 ], [ %.3, %.loopexit ]
  %128 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %128, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %128, i64 8
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %.preheader unwind label %131

.preheader:                                       ; preds = %127
  %129 = sext i32 %.sroa.4.0.copyload to i64
  %130 = sext i32 %.sroa.6.0.copyload to i64
  br label %133

131:                                              ; preds = %127
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %189

133:                                              ; preds = %.preheader, %186
  %indvars.iv133 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next134, %186 ]
  %.1124 = phi i32 [ %.0125, %.preheader ], [ %.3, %186 ]
  %134 = getelementptr inbounds [4 x i32], ptr @_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dx, i64 0, i64 %indvars.iv133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = add nsw i32 %135, %.sroa.4.0.copyload
  %137 = getelementptr inbounds [4 x i32], ptr @_ZZ5solveRSt6vectorIS_IiSaIiEESaIS1_EEE2dy, i64 0, i64 %indvars.iv133
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = add nsw i32 %138, %.sroa.6.0.copyload
  %140 = icmp slt i32 %136, 0
  br i1 %140, label %186, label %141

141:                                              ; preds = %133
  %142 = icmp slt i32 %136, %29
  %143 = icmp sgt i32 %139, -1
  %.not = icmp slt i32 %139, %32
  %144 = and i1 %143, %.not
  %or.cond107 = select i1 %142, i1 %144, i1 false
  br i1 %or.cond107, label %145, label %186

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #4
  %146 = zext nneg i32 %136 to i64
  %147 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %146) #4
  %148 = zext nneg i32 %139 to i64
  %149 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %147, i64 noundef %148)
          to label %150 unwind label %154

150:                                              ; preds = %145
  %151 = extractvalue { ptr, i64 } %149, 0
  store ptr %151, ptr %23, align 8
  %152 = extractvalue { ptr, i64 } %149, 1
  store i64 %152, ptr %90, align 8
  %153 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #4
  br i1 %153, label %186, label %156

154:                                              ; preds = %145
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #4
  br label %189

156:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #4
  %157 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %146) #4
  %158 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %157, i64 noundef %148)
          to label %159 unwind label %178

159:                                              ; preds = %156
  %160 = extractvalue { ptr, i64 } %158, 0
  store ptr %160, ptr %24, align 8
  %161 = extractvalue { ptr, i64 } %158, 1
  store i64 %161, ptr %91, align 8
  %162 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %24, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #4
  %163 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %129) #4
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %130) #4
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %146) #4
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %148) #4
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = icmp slt i32 %168, %165
  br i1 %169, label %170, label %180

170:                                              ; preds = %159
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %146) #4
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %148) #4
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = add i32 %165, %.1124
  %175 = sub i32 %174, %173
  %176 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %146) #4
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %148) #4
  store i32 %165, ptr %177, align 4, !tbaa !5
  br label %180

178:                                              ; preds = %156
  %179 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #4
  br label %189

180:                                              ; preds = %170, %159
  %.2 = phi i32 [ %175, %170 ], [ %.1124, %159 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #4
  %181 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %146) #4
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %148) #4
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sub nsw i32 0, %183
  store i32 %184, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #4
  store i32 %136, ptr %27, align 4, !tbaa !9
  store i32 %139, ptr %92, align 4, !tbaa !11
  call void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(8) %27)
  invoke void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %185 unwind label %187

185:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #4
  br label %186

186:                                              ; preds = %150, %133, %141, %185
  %.3 = phi i32 [ %.2, %185 ], [ %.1124, %141 ], [ %.1124, %133 ], [ %.1124, %150 ]
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %exitcond136.not = icmp eq i64 %indvars.iv.next134, 4
  br i1 %exitcond136.not, label %.loopexit, label %133, !llvm.loop !16

187:                                              ; preds = %180
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #4
  br label %189

._crit_edge:                                      ; preds = %.loopexit, %.preheader111
  %.0.lcssa = phi i32 [ 0, %.preheader111 ], [ %.3, %.loopexit ]
  call void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret i32 %.0.lcssa

189:                                              ; preds = %131, %187, %178, %154, %121, %122, %124, %84, %85, %87
  %.pn103.pn = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ], [ %.pn101, %84 ], [ %125, %124 ], [ %123, %122 ], [ %.pn97, %121 ], [ %132, %131 ], [ %188, %187 ], [ %179, %178 ], [ %155, %154 ]
  call void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %190

190:                                              ; preds = %189, %55
  %.pn103.pn.pn = phi { ptr, i32 } [ %.pn103.pn, %189 ], [ %.pn, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn103.pn.pn
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; 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 void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(12)) 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIi3posEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIi3posESt6vectorIS2_SaIS2_EESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

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

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

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

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


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