; LLVM IR from kazunetakahashi/atcoder :: 2018/0414_ARC095/E.ll (Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::vector.8" = 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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.12", %"struct.std::_Head_base.13" }
%"struct.std::_Tuple_impl.12" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.13" = type { i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@H = external dso_local global i32, align 4
@pairs = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"class.std::vector.8", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.3", align 8
  %14 = alloca %"class.std::tuple", align 4
  %15 = alloca %"class.std::vector.3", align 8
  %16 = alloca %"class.std::vector.8", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::_Bit_reference", align 8
  %26 = alloca %"class.std::vector.8", align 8
  %27 = alloca %"struct.std::_Bit_reference", align 8
  %28 = alloca %"class.std::vector.3", align 8
  %29 = alloca %"class.std::tuple", align 4
  %30 = alloca %"class.std::vector.3", align 8
  %31 = alloca %"class.std::vector.8", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = srem i32 %32, 2
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %101

35:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %97, %35
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = load i32, ptr @H, align 4, !tbaa !9
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %100

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %43)
  %45 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %46 = extractvalue { ptr, i64 } %44, 0
  store ptr %46, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %48 = extractvalue { ptr, i64 } %44, 1
  store i64 %48, ptr %47, align 8
  %49 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  %50 = xor i1 %49, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br i1 %50, label %51, label %96

51:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  call void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(40) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %53)
          to label %55 unwind label %68

55:                                               ; preds = %51
  %56 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %57 = extractvalue { ptr, i64 } %54, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %59 = extractvalue { ptr, i64 } %54, 1
  store i64 %59, ptr %58, align 8
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %61 unwind label %72

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %7) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %62 unwind label %76

62:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %63 unwind label %80

63:                                               ; preds = %62
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %64 unwind label %84

64:                                               ; preds = %63
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = sub nsw i32 %65, 1
  invoke void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef %15, ptr noundef %16, i32 noundef %66)
          to label %67 unwind label %88

67:                                               ; preds = %64
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  br label %96

68:                                               ; preds = %51
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br label %95

72:                                               ; preds = %55
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  br label %94

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

80:                                               ; preds = %62
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  br label %93

84:                                               ; preds = %63
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %11, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %12, align 4
  br label %92

88:                                               ; preds = %64
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  br label %92

92:                                               ; preds = %88, %84
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %93

93:                                               ; preds = %92, %80, %76
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %94

94:                                               ; preds = %93, %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %95

95:                                               ; preds = %94, %68
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %223

96:                                               ; preds = %67, %41
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %7, align 4, !tbaa !9
  br label %36, !llvm.loop !11

100:                                              ; preds = %40
  br label %222

101:                                              ; preds = %3
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %113

104:                                              ; preds = %101
  %105 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %105, ptr %106, align 8
  %107 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %107, ptr %108, align 8
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %110, ptr %112)
  call void @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) @pairs, ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %222

113:                                              ; preds = %101
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = icmp sge i32 %114, 2
  br i1 %115, label %116, label %117

116:                                              ; preds = %113
  br label %119

117:                                              ; preds = %113
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 65, ptr noundef @__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi) #6
  unreachable

118:                                              ; No predecessors!
  br label %119

119:                                              ; preds = %118, %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 -1, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %146, %119
  %121 = load i32, ptr %20, align 4, !tbaa !9
  %122 = load i32, ptr @H, align 4, !tbaa !9
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 5, ptr %21, align 4
  br label %149

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %126 = load i32, ptr %20, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %127)
  %129 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %130 = extractvalue { ptr, i64 } %128, 0
  store ptr %130, ptr %129, align 8
  %131 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %132 = extractvalue { ptr, i64 } %128, 1
  store i64 %132, ptr %131, align 8
  %133 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  %134 = xor i1 %133, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br i1 %134, label %135, label %145

135:                                              ; preds = %125
  %136 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %136, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %137 = load i32, ptr %20, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %138)
  %140 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %141 = extractvalue { ptr, i64 } %139, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %143 = extractvalue { ptr, i64 } %139, 1
  store i64 %143, ptr %142, align 8
  %144 = 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.end.p0(i64 16, ptr %23) #5
  store i32 5, ptr %21, align 4
  br label %149

145:                                              ; preds = %125
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %20, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %20, align 4, !tbaa !9
  br label %120, !llvm.loop !13

149:                                              ; preds = %135, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %19, align 4, !tbaa !9
  %152 = icmp sge i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %150
  br label %156

154:                                              ; preds = %150
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 76, ptr noundef @__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi) #6
  unreachable

155:                                              ; No predecessors!
  br label %156

156:                                              ; preds = %155, %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %218, %156
  %158 = load i32, ptr %24, align 4, !tbaa !9
  %159 = load i32, ptr @H, align 4, !tbaa !9
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %221

162:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %163 = load i32, ptr %24, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %164)
  %166 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %167 = extractvalue { ptr, i64 } %165, 0
  store ptr %167, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %169 = extractvalue { ptr, i64 } %165, 1
  store i64 %169, ptr %168, align 8
  %170 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  %171 = xor i1 %170, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br i1 %171, label %172, label %217

172:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #5
  call void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull align 8 dereferenceable(40) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %173 = load i32, ptr %24, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %26, i64 noundef %174)
          to label %176 unwind label %189

176:                                              ; preds = %172
  %177 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %178 = extractvalue { ptr, i64 } %175, 0
  store ptr %178, ptr %177, align 8
  %179 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %180 = extractvalue { ptr, i64 } %175, 1
  store i64 %180, ptr %179, align 8
  %181 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %27, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %182 unwind label %193

182:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %24) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %183 unwind label %197

183:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %184 unwind label %201

184:                                              ; preds = %183
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %31, ptr noundef nonnull align 8 dereferenceable(40) %26)
          to label %185 unwind label %205

185:                                              ; preds = %184
  %186 = load i32, ptr %6, align 4, !tbaa !9
  %187 = sub nsw i32 %186, 2
  invoke void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef %30, ptr noundef %31, i32 noundef %187)
          to label %188 unwind label %209

188:                                              ; preds = %185
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %31) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #5
  br label %217

189:                                              ; preds = %172
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %11, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  br label %216

193:                                              ; preds = %176
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %11, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %12, align 4
  br label %215

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

201:                                              ; preds = %183
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %11, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %12, align 4
  br label %214

205:                                              ; preds = %184
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %11, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %12, align 4
  br label %213

209:                                              ; preds = %185
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %11, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %12, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %31) #5
  br label %213

213:                                              ; preds = %209, %205
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  br label %214

214:                                              ; preds = %213, %201, %197
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  br label %215

215:                                              ; preds = %214, %193
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #5
  br label %216

216:                                              ; preds = %215, %189
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %223

217:                                              ; preds = %188, %162
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %24, align 4, !tbaa !9
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %24, align 4, !tbaa !9
  br label %157, !llvm.loop !14

221:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %222

222:                                              ; preds = %221, %104, %100
  ret void

223:                                              ; preds = %216, %95
  %224 = load ptr, ptr %11, align 8
  %225 = load i32, ptr %12, align 4
  %226 = insertvalue { ptr, i32 } poison, ptr %224, 0
  %227 = insertvalue { ptr, i32 } %226, i32 %225, 1
  resume { ptr, i32 } %227
}

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

; 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 zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #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 @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #3

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

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

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::tuple<int, int>>, std::allocator<std::vector<std::tuple<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::vector.8" = 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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.12", %"struct.std::_Head_base.13" }
%"struct.std::_Tuple_impl.12" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.13" = type { i32 }

@H = external dso_local local_unnamed_addr global i32, align 4
@pairs = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::_Bit_reference", align 8
  %6 = alloca %"class.std::vector.8", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::tuple", align 4
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca %"class.std::vector.8", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"class.std::vector.8", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"class.std::vector.3", align 8
  %20 = alloca %"class.std::tuple", align 4
  %21 = alloca %"class.std::vector.3", align 8
  %22 = alloca %"class.std::vector.8", align 8
  %23 = and i32 %2, -2147483647
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %71

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr @H, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph40, label %._crit_edge41

.lr.ph40:                                         ; preds = %25
  %28 = getelementptr inbounds i8, ptr %5, i64 8
  %29 = getelementptr inbounds i8, ptr %7, i64 8
  %30 = add nsw i32 %2, -1
  br label %31

._crit_edge41:                                    ; preds = %66, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %144

31:                                               ; preds = %.lr.ph40, %66
  %storemerge2738 = phi i32 [ 0, %.lr.ph40 ], [ %68, %66 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %32 = sext i32 %storemerge2738 to i64
  %33 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %32)
  %34 = extractvalue { ptr, i64 } %33, 0
  store ptr %34, ptr %5, align 8
  %35 = extractvalue { ptr, i64 } %33, 1
  store i64 %35, ptr %28, align 8
  %36 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br i1 %36, label %66, label %37

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #5
  call void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %37
  %42 = extractvalue { ptr, i64 } %40, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i64 } %40, 1
  store i64 %43, ptr %29, align 8
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %45 unwind label %52

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %4) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %46 unwind label %54

46:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %47 unwind label %56

47:                                               ; preds = %46
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %48 unwind label %58

48:                                               ; preds = %47
  invoke void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef %30)
          to label %49 unwind label %60

49:                                               ; preds = %48
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  br label %66

50:                                               ; preds = %37
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %65

52:                                               ; preds = %41
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %64

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

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %47
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %48
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  br label %62

62:                                               ; preds = %60, %58
  %.pn28 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %63

63:                                               ; preds = %62, %56, %54
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %62 ], [ %57, %56 ], [ %55, %54 ]
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %64

64:                                               ; preds = %63, %52
  %.pn28.pn.pn = phi { ptr, i32 } [ %.pn28.pn, %63 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %65

65:                                               ; preds = %64, %50
  %.pn28.pn.pn.pn = phi { ptr, i32 } [ %.pn28.pn.pn, %64 ], [ %51, %50 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %145

66:                                               ; preds = %31, %49
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %4, align 4, !tbaa !5
  %69 = load i32, ptr @H, align 4, !tbaa !5
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %31, label %._crit_edge41, !llvm.loop !9

71:                                               ; preds = %3
  %72 = icmp eq i32 %2, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %71
  %74 = tail call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %75 = tail call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  tail call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %74, ptr %75)
  tail call void @_ZNSt6vectorIS_ISt5tupleIJiiEESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) @pairs, ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %144

76:                                               ; preds = %71
  %77 = icmp sgt i32 %2, 1
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 65, ptr noundef nonnull @__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi) #6
  unreachable

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %80 = load i32, ptr @H, align 4, !tbaa !5
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %79
  %82 = getelementptr inbounds i8, ptr %13, i64 8
  br label %83

83:                                               ; preds = %.lr.ph, %88
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %88 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %84 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %indvars.iv)
  %85 = extractvalue { ptr, i64 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i64 } %84, 1
  store i64 %86, ptr %82, align 8
  %87 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br i1 %87, label %88, label %92

88:                                               ; preds = %83
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %89 = load i32, ptr @H, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %indvars.iv.next, %90
  br i1 %91, label %83, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %88, %79
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 76, ptr noundef nonnull @__PRETTY_FUNCTION__._Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi) #6
  unreachable

92:                                               ; preds = %83
  %93 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %93, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %94 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %indvars.iv)
  %95 = extractvalue { ptr, i64 } %94, 0
  store ptr %95, ptr %14, align 8
  %96 = getelementptr inbounds i8, ptr %14, i64 8
  %97 = extractvalue { ptr, i64 } %94, 1
  store i64 %97, ptr %96, align 8
  %98 = 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.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  %99 = load i32, ptr @H, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %.lr.ph37, label %._crit_edge

.lr.ph37:                                         ; preds = %92
  %101 = getelementptr inbounds i8, ptr %16, i64 8
  %102 = getelementptr inbounds i8, ptr %18, i64 8
  %103 = add nsw i32 %2, -2
  br label %104

._crit_edge:                                      ; preds = %139, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %144

104:                                              ; preds = %.lr.ph37, %139
  %storemerge36 = phi i32 [ 0, %.lr.ph37 ], [ %141, %139 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  %105 = sext i32 %storemerge36 to i64
  %106 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %105)
  %107 = extractvalue { ptr, i64 } %106, 0
  store ptr %107, ptr %16, align 8
  %108 = extractvalue { ptr, i64 } %106, 1
  store i64 %108, ptr %101, align 8
  %109 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br i1 %109, label %139, label %110

110:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #5
  call void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull align 8 dereferenceable(40) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  %111 = load i32, ptr %15, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %17, i64 noundef %112)
          to label %114 unwind label %123

114:                                              ; preds = %110
  %115 = extractvalue { ptr, i64 } %113, 0
  store ptr %115, ptr %18, align 8
  %116 = extractvalue { ptr, i64 } %113, 1
  store i64 %116, ptr %102, align 8
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %118 unwind label %125

118:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %15) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %119 unwind label %127

119:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #5
  invoke void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %120 unwind label %129

120:                                              ; preds = %119
  invoke void @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %121 unwind label %131

121:                                              ; preds = %120
  invoke void @_Z3dfsSt6vectorISt5tupleIJiiEESaIS1_EES_IbSaIbEEi(ptr noundef nonnull %21, ptr noundef nonnull %22, i32 noundef %103)
          to label %122 unwind label %133

122:                                              ; preds = %121
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #5
  br label %139

123:                                              ; preds = %110
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  br label %138

125:                                              ; preds = %114
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %137

127:                                              ; preds = %118
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #5
  br label %136

129:                                              ; preds = %119
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %136

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

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  br label %135

135:                                              ; preds = %133, %131
  %.pn = phi { ptr, i32 } [ %134, %133 ], [ %132, %131 ]
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  br label %136

136:                                              ; preds = %135, %129, %127
  %.pn.pn = phi { ptr, i32 } [ %.pn, %135 ], [ %130, %129 ], [ %128, %127 ]
  call void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  br label %137

137:                                              ; preds = %136, %125
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %136 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #5
  br label %138

138:                                              ; preds = %137, %123
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %137 ], [ %124, %123 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %145

139:                                              ; preds = %104, %122
  %140 = load i32, ptr %15, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %15, align 4, !tbaa !5
  %142 = load i32, ptr @H, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %104, label %._crit_edge, !llvm.loop !12

144:                                              ; preds = %._crit_edge, %73, %._crit_edge41
  ret void

145:                                              ; preds = %138, %65
  %.pn28.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn28.pn.pn.pn, %65 ], [ %.pn.pn.pn.pn, %138 ]
  resume { ptr, i32 } %.pn28.pn.pn.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 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 zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) 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 @_ZNSt6vectorIbSaIbEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJiiEESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #3

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

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

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

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

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 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

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


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