; LLVM IR from abeaumont/competitive-programming :: atcoder/abc088 (d)

; 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::tuple.4" = type { %"struct.std::_Tuple_impl.5" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.10" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { ptr }
%"struct.std::_Head_base.9" = type { ptr }
%"struct.std::_Head_base.10" = type { ptr }
%"class.std::tuple.16" = type { %"struct.std::_Tuple_impl.17" }
%"struct.std::_Tuple_impl.17" = type { %"struct.std::_Tuple_impl.18", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.18" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z1sRKSt6vectorIS_IbSaIbEESaIS1_EEiiRSt13unordered_setISt5tupleIJiiEESt4hashIS8_ESt8equal_toIS8_ESaIS8_EERSt14priority_queueIS7_IJiiiEES_ISH_SaISH_EESt4lessISH_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(25) %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::tuple.4", align 8
  %17 = alloca %"class.std::tuple.16", align 4
  %18 = alloca %"class.std::tuple.16", align 4
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca %"class.std::tuple.16", align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::tuple", align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::tuple.16", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::tuple", align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::tuple.16", align 4
  %31 = alloca i32, align 4
  %32 = alloca %"class.std::tuple", align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"class.std::tuple.16", align 4
  %36 = alloca i32, align 4
  %37 = alloca %"class.std::tuple", align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  br label %40

40:                                               ; preds = %55, %5
  br label %41

41:                                               ; preds = %40
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %42)
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %198

45:                                               ; preds = %41
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %46)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #3
  call void @_ZSt3tieIJiiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.4") align 8 %16, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14) #3
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5tupleIJRiS0_S0_EEaSIJiiiEEENSt9enable_ifIXcl12__assignableIDpRKT_EEERS1_E4typeERKS_IJDpS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(12) %47) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #3
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = sub nsw i32 0, %49
  store i32 %50, ptr %12, align 4, !tbaa !9
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %51)
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %17, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %53 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %54 = icmp ne i64 %53, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br i1 %54, label %55, label %56

55:                                               ; preds = %45
  br label %40, !llvm.loop !11

56:                                               ; preds = %45
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %18, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %58 = call { ptr, i8 } @_ZNSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %57, ptr noundef nonnull align 4 dereferenceable(8) %18)
  %59 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 0
  %60 = extractvalue { ptr, i8 } %58, 0
  store ptr %60, ptr %59, align 8
  %61 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 1
  %62 = extractvalue { ptr, i8 } %58, 1
  store i8 %62, ptr %61, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %63

63:                                               ; preds = %56
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = sub nsw i32 %65, 1
  %67 = icmp eq i32 %64, %66
  br i1 %67, label %68, label %75

68:                                               ; preds = %63
  %69 = load i32, ptr %14, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = sub nsw i32 %70, 1
  %72 = icmp eq i32 %69, %71
  br i1 %72, label %73, label %75

73:                                               ; preds = %68
  %74 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %74, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %198

75:                                               ; preds = %68, %63
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = icmp sgt i32 %76, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  br i1 %77, label %78, label %94

78:                                               ; preds = %75
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = sub nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %82) #3
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %83, i64 noundef %85)
  br i1 %86, label %87, label %94

87:                                               ; preds = %78
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  store i32 %90, ptr %21, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %91 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %88, ptr noundef nonnull align 4 dereferenceable(8) %20)
  %92 = icmp ne i64 %91, 0
  %93 = xor i1 %92, true
  br label %94

94:                                               ; preds = %87, %78, %75
  %95 = phi i1 [ false, %78 ], [ false, %75 ], [ %93, %87 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br i1 %95, label %96, label %103

96:                                               ; preds = %94
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  %100 = sub nsw i32 0, %99
  store i32 %100, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = sub nsw i32 %101, 1
  store i32 %102, ptr %24, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %97, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #3
  br label %103

103:                                              ; preds = %96, %94
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %8, align 4, !tbaa !9
  %106 = sub nsw i32 %105, 1
  %107 = icmp slt i32 %104, %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  br i1 %107, label %108, label %124

108:                                              ; preds = %103
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %112) #3
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %113, i64 noundef %115)
  br i1 %116, label %117, label %124

117:                                              ; preds = %108
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %26, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %121 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %118, ptr noundef nonnull align 4 dereferenceable(8) %25)
  %122 = icmp ne i64 %121, 0
  %123 = xor i1 %122, true
  br label %124

124:                                              ; preds = %117, %108, %103
  %125 = phi i1 [ false, %108 ], [ false, %103 ], [ %123, %117 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  br i1 %125, label %126, label %133

126:                                              ; preds = %124
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  %130 = sub nsw i32 0, %129
  store i32 %130, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %29, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %127, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #3
  br label %133

133:                                              ; preds = %126, %124
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = icmp sgt i32 %134, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  br i1 %135, label %136, label %152

136:                                              ; preds = %133
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #3
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = sub nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %140, i64 noundef %143)
  br i1 %144, label %145, label %152

145:                                              ; preds = %136
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = sub nsw i32 %147, 1
  store i32 %148, ptr %31, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %30, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %149 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %146, ptr noundef nonnull align 4 dereferenceable(8) %30)
  %150 = icmp ne i64 %149, 0
  %151 = xor i1 %150, true
  br label %152

152:                                              ; preds = %145, %136, %133
  %153 = phi i1 [ false, %136 ], [ false, %133 ], [ %151, %145 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  br i1 %153, label %154, label %161

154:                                              ; preds = %152
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = add nsw i32 %156, 1
  %158 = sub nsw i32 0, %157
  store i32 %158, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  %159 = load i32, ptr %14, align 4, !tbaa !9
  %160 = sub nsw i32 %159, 1
  store i32 %160, ptr %34, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %32, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %155, ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #3
  br label %161

161:                                              ; preds = %154, %152
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !9
  %164 = sub nsw i32 %163, 1
  %165 = icmp slt i32 %162, %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #3
  br i1 %165, label %166, label %182

166:                                              ; preds = %161
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i32, ptr %13, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #3
  %171 = load i32, ptr %14, align 4, !tbaa !9
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %170, i64 noundef %173)
  br i1 %174, label %175, label %182

175:                                              ; preds = %166
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  %177 = load i32, ptr %14, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %36, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.16") align 4 %35, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %179 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %176, ptr noundef nonnull align 4 dereferenceable(8) %35)
  %180 = icmp ne i64 %179, 0
  %181 = xor i1 %180, true
  br label %182

182:                                              ; preds = %175, %166, %161
  %183 = phi i1 [ false, %166 ], [ false, %161 ], [ %181, %175 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  br i1 %183, label %184, label %191

184:                                              ; preds = %182
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #3
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  %188 = sub nsw i32 0, %187
  store i32 %188, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %189 = load i32, ptr %14, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %39, align 4, !tbaa !9
  call void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %37, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %39)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %185, ptr noundef nonnull align 4 dereferenceable(12) %37)
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #3
  br label %191

191:                                              ; preds = %184, %182
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = load i32, ptr %8, align 4, !tbaa !9
  %194 = load i32, ptr %9, align 4, !tbaa !9
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = call noundef i32 @_Z1sRKSt6vectorIS_IbSaIbEESaIS1_EEiiRSt13unordered_setISt5tupleIJiiEESt4hashIS8_ESt8equal_toIS8_ESaIS8_EERSt14priority_queueIS7_IJiiiEES_ISH_SaISH_EESt4lessISH_EE(ptr noundef nonnull align 8 dereferenceable(24) %192, i32 noundef %193, i32 noundef %194, ptr noundef nonnull align 8 dereferenceable(56) %195, ptr noundef nonnull align 8 dereferenceable(25) %196)
  store i32 %197, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %198

198:                                              ; preds = %191, %73, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %199 = load i32, ptr %6, align 4
  ret i32 %199
}

; 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 zeroext i1 @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_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_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.4") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(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 void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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::tuple.4" = type { %"struct.std::_Tuple_impl.5" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.10" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { ptr }
%"struct.std::_Head_base.9" = type { ptr }
%"struct.std::_Head_base.10" = type { ptr }
%"class.std::tuple.16" = type { %"struct.std::_Tuple_impl.17" }
%"struct.std::_Tuple_impl.17" = type { %"struct.std::_Tuple_impl.18", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.18" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z1sRKSt6vectorIS_IbSaIbEESaIS1_EEiiRSt13unordered_setISt5tupleIJiiEESt4hashIS8_ESt8equal_toIS8_ESaIS8_EERSt14priority_queueIS7_IJiiiEES_ISH_SaISH_EESt4lessISH_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(25) %4) local_unnamed_addr #0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::tuple.4", align 8
  %10 = alloca %"class.std::tuple.16", align 4
  %11 = alloca %"class.std::tuple.16", align 4
  %12 = alloca %"class.std::tuple.16", align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::tuple", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::tuple.16", align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::tuple", align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::tuple.16", align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::tuple", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::tuple.16", align 4
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::tuple", align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  br label %32

32:                                               ; preds = %34, %5
  %33 = call noundef zeroext i1 @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %33, label %.loopexit, label %34

34:                                               ; preds = %32
  %35 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #3
  call void @_ZSt3tieIJiiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.4") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #3
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5tupleIJRiS0_S0_EEaSIJiiiEEENSt9enable_ifIXcl12__assignableIDpRKT_EEERS1_E4typeERKS_IJDpS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(12) %35) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #3
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = sub nsw i32 0, %37
  store i32 %38, ptr %6, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %10, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %39 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %.not = icmp eq i64 %39, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  br i1 %.not, label %40, label %32, !llvm.loop !9

40:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %41 = call { ptr, i8 } @_ZNSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = add nsw i32 %1, -1
  %44 = icmp eq i32 %42, %43
  br i1 %44, label %45, label %51

45:                                               ; preds = %40
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = add nsw i32 %2, -1
  %48 = icmp eq i32 %46, %47
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = load i32, ptr %6, align 4, !tbaa !5
  br label %.loopexit

51:                                               ; preds = %45, %40
  %52 = icmp sgt i32 %42, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  br i1 %52, label %53, label %.critedge

53:                                               ; preds = %51
  %54 = add nsw i32 %42, -1
  %55 = zext nneg i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %55) #3
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %56, i64 noundef %58)
  br i1 %59, label %60, label %.critedge

60:                                               ; preds = %53
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %13, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %63 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %.not32 = icmp eq i64 %63, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  br i1 %.not32, label %64, label %69

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #3
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = xor i32 %65, -1
  store i32 %66, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #3
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr %16, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #3
  br label %69

.critedge:                                        ; preds = %51, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  br label %69

69:                                               ; preds = %.critedge, %64, %60
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = icmp slt i32 %70, %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #3
  br i1 %71, label %72, label %.critedge2

72:                                               ; preds = %69
  %73 = add nsw i32 %70, 1
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %74) #3
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %75, i64 noundef %77)
  br i1 %78, label %79, label %.critedge2

79:                                               ; preds = %72
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %18, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %82 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %.not33 = icmp eq i64 %82, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #3
  br i1 %.not33, label %83, label %88

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #3
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = xor i32 %84, -1
  store i32 %85, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #3
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %21, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 4 dereferenceable(12) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #3
  br label %88

.critedge2:                                       ; preds = %69, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #3
  br label %88

88:                                               ; preds = %.critedge2, %83, %79
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = icmp sgt i32 %89, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #3
  br i1 %90, label %91, label %.critedge4

91:                                               ; preds = %88
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %93) #3
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = add nsw i32 %95, -1
  %97 = sext i32 %96 to i64
  %98 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %94, i64 noundef %97)
  br i1 %98, label %99, label %.critedge4

99:                                               ; preds = %91
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %23, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %22, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %102 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %22)
  %.not34 = icmp eq i64 %102, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #3
  br i1 %.not34, label %103, label %108

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #3
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = xor i32 %104, -1
  store i32 %105, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #3
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = add nsw i32 %106, -1
  store i32 %107, ptr %26, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %26)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #3
  br label %108

.critedge4:                                       ; preds = %88, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #3
  br label %108

108:                                              ; preds = %.critedge4, %103, %99
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = add nsw i32 %2, -1
  %111 = icmp slt i32 %109, %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #3
  br i1 %111, label %112, label %.critedge6

112:                                              ; preds = %108
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %114) #3
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = call noundef zeroext i1 @_ZNKSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %115, i64 noundef %118)
  br i1 %119, label %120, label %.critedge6

120:                                              ; preds = %112
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %28, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.16") align 4 %27, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %123 = call noundef i64 @_ZNKSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(8) %27)
  %.not35 = icmp eq i64 %123, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #3
  br i1 %.not35, label %124, label %129

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #3
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = xor i32 %125, -1
  store i32 %126, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #3
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %31, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #3
  br label %129

.critedge6:                                       ; preds = %108, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #3
  br label %129

129:                                              ; preds = %.critedge6, %124, %120
  %130 = call noundef i32 @_Z1sRKSt6vectorIS_IbSaIbEESaIS1_EEiiRSt13unordered_setISt5tupleIJiiEESt4hashIS8_ESt8equal_toIS8_ESaIS8_EERSt14priority_queueIS7_IJiiiEES_ISH_SaISH_EESt4lessISH_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(25) %4)
  br label %.loopexit

.loopexit:                                        ; preds = %32, %129, %49
  %.0 = phi i32 [ %50, %49 ], [ %130, %129 ], [ -1, %32 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  ret i32 %.0
}

; 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 zeroext i1 @_ZNKSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_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_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.4") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setISt5tupleIJiiEESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt5tupleIJiiiEESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(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 void @_ZSt10make_tupleIJiiRiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.16") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiRiiEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 = { 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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass