; LLVM IR from kazunetakahashi/atcoder :: 2017/1104_ddcc2017-final/C.ll (Z10subroutineSt5tupleIJiiiEE)

; 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::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.4" = type { %"struct.std::_Tuple_impl.5" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@V = external dso_local global [310 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z10subroutineSt5tupleIJiiiEE(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::tuple.4", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::tuple.4", align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::stack", align 8
  %10 = alloca %"class.std::tuple.4", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca [310 x i32], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::tuple.4", align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::tuple.4", align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.std::tuple.4", align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  %35 = load i32, ptr %34, align 4, !tbaa !9
  store i32 %35, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %37) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  %39 = load i32, ptr %38, align 4, !tbaa !9
  store i32 %39, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #6
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = sub nsw i32 0, %42
  store i32 %43, ptr %8, align 4, !tbaa !9
  call void @_ZNSt5tupleIJiiEEC2IRiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #6
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12) #6
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %44 unwind label %85

44:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1240, ptr %15) #6
  %45 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 0
  %46 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 0
  %47 = getelementptr inbounds i32, ptr %46, i64 310
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 -1, ptr %16, align 4, !tbaa !9
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %45, ptr noundef %47, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %48 unwind label %89

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %49

49:                                               ; preds = %151, %48
  %50 = invoke noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %51 unwind label %93

51:                                               ; preds = %49
  %52 = xor i1 %50, true
  br i1 %52, label %53, label %154

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %54 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %55 unwind label %97

55:                                               ; preds = %53
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %54) #6
  %57 = load i32, ptr %56, align 4, !tbaa !9
  store i32 %57, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %58 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %59 unwind label %101

59:                                               ; preds = %55
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %58) #6
  %61 = load i32, ptr %60, align 4, !tbaa !9
  store i32 %61, ptr %18, align 4, !tbaa !9
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %62 unwind label %101

62:                                               ; preds = %59
  %63 = load i32, ptr %17, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = icmp eq i32 %66, -1
  br i1 %67, label %68, label %151

68:                                               ; preds = %62
  %69 = load i32, ptr %18, align 4, !tbaa !9
  %70 = load i32, ptr %17, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 %71
  store i32 %69, ptr %72, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [310 x %"class.std::vector"], ptr @V, i64 0, i64 %74
  store ptr %75, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  %77 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #6
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %79 = load ptr, ptr %19, align 8, !tbaa !5
  %80 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %79) #6
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  br label %82

82:                                               ; preds = %147, %68
  %83 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %83, label %105, label %84

84:                                               ; preds = %82
  store i32 4, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %150

85:                                               ; preds = %1
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %13, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %231

89:                                               ; preds = %44
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %13, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %230

93:                                               ; preds = %49
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %13, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %14, align 4
  br label %230

97:                                               ; preds = %53
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %13, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %14, align 4
  br label %153

101:                                              ; preds = %59, %55
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %13, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %14, align 4
  br label %152

105:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %106, i64 8, i1 false)
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = load i32, ptr %4, align 4, !tbaa !9
  %109 = icmp eq i32 %107, %108
  br i1 %109, label %110, label %113

110:                                              ; preds = %105
  %111 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %112 unwind label %121

112:                                              ; preds = %110
  br i1 %111, label %120, label %113

113:                                              ; preds = %112, %105
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = load i32, ptr %6, align 4, !tbaa !9
  %116 = icmp eq i32 %114, %115
  br i1 %116, label %117, label %125

117:                                              ; preds = %113
  %118 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %119 unwind label %121

119:                                              ; preds = %117
  br i1 %118, label %120, label %125

120:                                              ; preds = %119, %112
  store i32 5, ptr %22, align 4
  br label %144

121:                                              ; preds = %117, %110
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %13, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %14, align 4
  br label %149

125:                                              ; preds = %119, %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %23) #6
  %127 = load i32, ptr %126, align 4, !tbaa !9
  store i32 %127, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %23) #6
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = add nsw i32 %128, %130
  store i32 %131, ptr %25, align 4, !tbaa !9
  %132 = load i32, ptr %24, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = icmp eq i32 %135, -1
  br i1 %136, label %137, label %143

137:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25) #6
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %138 unwind label %139

138:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %143

139:                                              ; preds = %137
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %149

143:                                              ; preds = %138, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  store i32 0, ptr %22, align 4
  br label %144

144:                                              ; preds = %143, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  %145 = load i32, ptr %22, align 4
  switch i32 %145, label %237 [
    i32 0, label %146
    i32 5, label %147
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146, %144
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br label %82

149:                                              ; preds = %139, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %152

150:                                              ; preds = %84
  br label %151

151:                                              ; preds = %150, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %49, !llvm.loop !11

152:                                              ; preds = %149, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %153

153:                                              ; preds = %152, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %230

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

155:                                              ; preds = %222, %154
  %156 = load i32, ptr %27, align 4, !tbaa !9
  %157 = load i32, ptr @N, align 4, !tbaa !9
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 6, ptr %22, align 4
  br label %225

160:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %161 = load i32, ptr %27, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [310 x %"class.std::vector"], ptr @V, i64 0, i64 %162
  store ptr %163, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %164 = load ptr, ptr %28, align 8, !tbaa !5
  %165 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %164) #6
  %166 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %165, ptr %166, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %167 = load ptr, ptr %28, align 8, !tbaa !5
  %168 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %167) #6
  %169 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %168, ptr %169, align 8
  br label %170

170:                                              ; preds = %217, %160
  %171 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  br i1 %171, label %173, label %172

172:                                              ; preds = %170
  store i32 9, ptr %22, align 4
  br label %219

173:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %174 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %174, i64 8, i1 false)
  %175 = load i32, ptr %27, align 4, !tbaa !9
  %176 = load i32, ptr %4, align 4, !tbaa !9
  %177 = icmp eq i32 %175, %176
  br i1 %177, label %178, label %181

178:                                              ; preds = %173
  %179 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %180 unwind label %189

180:                                              ; preds = %178
  br i1 %179, label %188, label %181

181:                                              ; preds = %180, %173
  %182 = load i32, ptr %27, align 4, !tbaa !9
  %183 = load i32, ptr %6, align 4, !tbaa !9
  %184 = icmp eq i32 %182, %183
  br i1 %184, label %185, label %193

185:                                              ; preds = %181
  %186 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %187 unwind label %189

187:                                              ; preds = %185
  br i1 %186, label %188, label %193

188:                                              ; preds = %187, %180
  store i32 10, ptr %22, align 4
  br label %214

189:                                              ; preds = %185, %178
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %13, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %230

193:                                              ; preds = %187, %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %31) #6
  %195 = load i32, ptr %194, align 4, !tbaa !9
  store i32 %195, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %31) #6
  %197 = load i32, ptr %196, align 4, !tbaa !9
  store i32 %197, ptr %33, align 4, !tbaa !9
  %198 = load i32, ptr %32, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !9
  %202 = load i32, ptr %27, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [310 x i32], ptr %15, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !9
  %206 = sub nsw i32 %201, %205
  %207 = load i32, ptr %33, align 4, !tbaa !9
  %208 = icmp ne i32 %206, %207
  br i1 %208, label %209, label %210

209:                                              ; preds = %193
  store i1 false, ptr %2, align 1
  store i32 1, ptr %22, align 4
  br label %211

210:                                              ; preds = %193
  store i32 0, ptr %22, align 4
  br label %211

211:                                              ; preds = %210, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  %212 = load i32, ptr %22, align 4
  switch i32 %212, label %214 [
    i32 0, label %213
  ]

213:                                              ; preds = %211
  store i32 0, ptr %22, align 4
  br label %214

214:                                              ; preds = %213, %211, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  %215 = load i32, ptr %22, align 4
  switch i32 %215, label %219 [
    i32 0, label %216
    i32 10, label %217
  ]

216:                                              ; preds = %214
  br label %217

217:                                              ; preds = %216, %214
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  br label %170

219:                                              ; preds = %214, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  %220 = load i32, ptr %22, align 4
  switch i32 %220, label %225 [
    i32 9, label %221
  ]

221:                                              ; preds = %219
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %27, align 4, !tbaa !9
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %27, align 4, !tbaa !9
  br label %155, !llvm.loop !13

225:                                              ; preds = %219, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  %226 = load i32, ptr %22, align 4
  switch i32 %226, label %228 [
    i32 6, label %227
  ]

227:                                              ; preds = %225
  store i1 true, ptr %2, align 1
  store i32 1, ptr %22, align 4
  br label %228

228:                                              ; preds = %227, %225
  call void @llvm.lifetime.end.p0(i64 1240, ptr %15) #6
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %229 = load i1, ptr %2, align 1
  ret i1 %229

230:                                              ; preds = %189, %153, %93, %89
  call void @llvm.lifetime.end.p0(i64 1240, ptr %15) #6
  br label %231

231:                                              ; preds = %230, %85
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %13, align 8
  %234 = load i32, ptr %14, align 4
  %235 = insertvalue { ptr, i32 } poison, ptr %233, 0
  %236 = insertvalue { ptr, i32 } %235, i32 %234, 1
  resume { ptr, i32 } %236

237:                                              ; preds = %144
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) #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 @_ZNSt5tupleIJiiEEC2IRiiTnNSt9enable_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: 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 @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

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

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

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

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


; 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::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.4" = type { %"struct.std::_Tuple_impl.5" }
%"struct.std::_Tuple_impl.5" = type { %"struct.std::_Tuple_impl.6", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@V = external dso_local global [310 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z10subroutineSt5tupleIJiiiEE(ptr noundef nonnull %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::tuple.4", align 4
  %3 = alloca %"class.std::tuple.4", align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::stack", align 8
  %6 = alloca %"class.std::tuple.4", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [310 x i32], align 16
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.std::tuple.4", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::tuple.4", align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.std::tuple.4", align 8
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  %21 = load i32, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %22 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23) #5
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  %25 = load i32, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sub nsw i32 0, %28
  store i32 %29, ptr %4, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiEEC2IRiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #5
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %30 unwind label %81

30:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1240, ptr nonnull %9) #5
  %31 = getelementptr inbounds i8, ptr %9, i64 1240
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 -1, ptr %10, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %9, ptr noundef nonnull %31, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %32 unwind label %83

32:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  %33 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %33, label %.preheader, label %.lr.ph56

.preheader:                                       ; preds = %111, %32
  %34 = load i32, ptr @N, align 4, !tbaa !5
  %.not4273 = icmp slt i32 %34, 1
  br i1 %.not4273, label %.critedge47, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %.preheader
  %35 = zext i32 %21 to i64
  %36 = zext i32 %25 to i64
  br label %.lr.ph76

.lr.ph56:                                         ; preds = %32, %111
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %37) #5
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %40) #5
  %42 = load i32, ptr %41, align 4, !tbaa !5
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %43 = sext i32 %39 to i64
  %44 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp eq i32 %45, -1
  br i1 %46, label %47, label %111

47:                                               ; preds = %.lr.ph56
  store i32 %42, ptr %44, align 4, !tbaa !5
  %48 = getelementptr inbounds [310 x %"class.std::vector"], ptr @V, i64 0, i64 %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %49 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  store ptr %49, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %50 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  store ptr %50, ptr %12, align 8
  %51 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %51, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %47
  %52 = icmp eq i32 %39, %21
  %53 = icmp eq i32 %39, %25
  %.fr = freeze i1 %52
  br i1 %.fr, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %54 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %55 = load i64, ptr %54, align 4
  store i64 %55, ptr %13, align 8
  %56 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %57 unwind label %.split.us

57:                                               ; preds = %.lr.ph.split.us
  br i1 %56, label %76, label %58

58:                                               ; preds = %57
  br i1 %53, label %59, label %62

59:                                               ; preds = %58
  %60 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %61 unwind label %.split.us

61:                                               ; preds = %59
  br i1 %60, label %76, label %62

62:                                               ; preds = %61, %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %13) #5
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %13) #5
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = add nsw i32 %66, %42
  store i32 %67, ptr %15, align 4, !tbaa !5
  %68 = load i32, ptr %14, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %73, label %75

73:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #5
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %74 unwind label %.split53.us

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %75

75:                                               ; preds = %74, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %76

76:                                               ; preds = %75, %61, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %78 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %78, label %.lr.ph.split.us, label %._crit_edge

.split.us:                                        ; preds = %59, %.lr.ph.split.us
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %110

.split53.us:                                      ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %105

._crit_edge:                                      ; preds = %107, %76, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %111

81:                                               ; preds = %1
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %175

83:                                               ; preds = %30
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %174

.lr.ph.split:                                     ; preds = %.lr.ph, %107
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %85 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %86 = load i64, ptr %85, align 4
  store i64 %86, ptr %13, align 8
  br i1 %53, label %87, label %91

87:                                               ; preds = %.lr.ph.split
  %88 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %89 unwind label %.split

89:                                               ; preds = %87
  br i1 %88, label %107, label %91

.split:                                           ; preds = %87
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %110

91:                                               ; preds = %89, %.lr.ph.split
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %13) #5
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %13) #5
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %95, %42
  store i32 %96, ptr %15, align 4, !tbaa !5
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp eq i32 %100, -1
  br i1 %101, label %102, label %106

102:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #5
  invoke void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %103 unwind label %.split53

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %106

.split53:                                         ; preds = %102
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %105

105:                                              ; preds = %.split53.us, %.split53
  %.us-phi54 = phi { ptr, i32 } [ %104, %.split53 ], [ %80, %.split53.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %110

106:                                              ; preds = %103, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %107

107:                                              ; preds = %89, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %109 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %109, label %.lr.ph.split, label %._crit_edge

110:                                              ; preds = %.split, %.split.us, %105
  %.pn = phi { ptr, i32 } [ %.us-phi54, %105 ], [ %90, %.split ], [ %79, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br label %174

111:                                              ; preds = %._crit_edge, %.lr.ph56
  %112 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %112, label %.preheader, label %.lr.ph56, !llvm.loop !9

.lr.ph76:                                         ; preds = %.lr.ph76.preheader, %._crit_edge59
  %indvars.iv = phi i64 [ 0, %.lr.ph76.preheader ], [ %indvars.iv.next, %._crit_edge59 ]
  %113 = getelementptr inbounds [310 x %"class.std::vector"], ptr @V, i64 0, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  %114 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #5
  store ptr %114, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %115 = call ptr @_ZNSt6vectorISt5tupleIJiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #5
  store ptr %115, ptr %18, align 8
  %116 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br i1 %116, label %.lr.ph58, label %._crit_edge59

.lr.ph58:                                         ; preds = %.lr.ph76
  %117 = icmp eq i64 %indvars.iv, %35
  %118 = icmp eq i64 %indvars.iv, %36
  %.fr72 = freeze i1 %118
  %119 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %indvars.iv
  %.fr66 = freeze i1 %117
  br i1 %.fr66, label %.lr.ph58.split.us, label %.lr.ph58.split

.lr.ph58.split.us:                                ; preds = %.lr.ph58, %select.unfold.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %120 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %121 = load i64, ptr %120, align 4
  store i64 %121, ptr %19, align 8
  %122 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %123 unwind label %.split61.us

123:                                              ; preds = %.lr.ph58.split.us
  br i1 %122, label %select.unfold.us, label %124

124:                                              ; preds = %123
  br i1 %.fr72, label %125, label %128

125:                                              ; preds = %124
  %126 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %127 unwind label %.split61.us

127:                                              ; preds = %125
  br i1 %126, label %select.unfold.us, label %128

128:                                              ; preds = %127, %124
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %130 to i64
  %134 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %119, align 4, !tbaa !5
  %137 = sub nsw i32 %135, %136
  %.not.us = icmp eq i32 %137, %132
  br i1 %.not.us, label %select.unfold.us, label %.split64.us

select.unfold.us:                                 ; preds = %128, %127, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %139 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br i1 %139, label %.lr.ph58.split.us, label %._crit_edge59

.split61.us:                                      ; preds = %125, %.lr.ph58.split.us
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %169

.lr.ph58.split:                                   ; preds = %.lr.ph58
  br i1 %.fr72, label %.lr.ph58.split.split.us, label %.lr.ph58.split.split

.lr.ph58.split.split.us:                          ; preds = %.lr.ph58.split, %select.unfold.us68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %141 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %142 = load i64, ptr %141, align 4
  store i64 %142, ptr %19, align 8
  %143 = invoke noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %144 unwind label %.split61.split.us

144:                                              ; preds = %.lr.ph58.split.split.us
  br i1 %143, label %select.unfold.us68, label %145

145:                                              ; preds = %144
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sext i32 %147 to i64
  %151 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr %119, align 4, !tbaa !5
  %154 = sub nsw i32 %152, %153
  %.not.us67 = icmp eq i32 %154, %149
  br i1 %.not.us67, label %select.unfold.us68, label %.split64.us

select.unfold.us68:                               ; preds = %145, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %156 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br i1 %156, label %.lr.ph58.split.split.us, label %._crit_edge59

.split61.split.us:                                ; preds = %.lr.ph58.split.split.us
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %169

.lr.ph58.split.split:                             ; preds = %.lr.ph58.split, %select.unfold
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %158 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %159 = load i64, ptr %158, align 4
  store i64 %159, ptr %19, align 8
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %19) #5
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = sext i32 %161 to i64
  %165 = getelementptr inbounds [310 x i32], ptr %9, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = load i32, ptr %119, align 4, !tbaa !5
  %168 = sub nsw i32 %166, %167
  %.not = icmp eq i32 %168, %163
  br i1 %.not, label %select.unfold, label %.split64.us

169:                                              ; preds = %.split61.us, %.split61.split.us
  %.us-phi62 = phi { ptr, i32 } [ %157, %.split61.split.us ], [ %140, %.split61.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  br label %174

select.unfold:                                    ; preds = %.lr.ph58.split.split
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %171 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br i1 %171, label %.lr.ph58.split.split, label %._crit_edge59

.split64.us:                                      ; preds = %.lr.ph58.split.split, %145, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  br label %.critedge47

._crit_edge59:                                    ; preds = %select.unfold, %select.unfold.us68, %select.unfold.us, %.lr.ph76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %172 = load i32, ptr @N, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %.not42.not = icmp slt i64 %indvars.iv.next, %173
  br i1 %.not42.not, label %.lr.ph76, label %.critedge47, !llvm.loop !11

.critedge47:                                      ; preds = %._crit_edge59, %.preheader, %.split64.us
  %.not4251 = phi i1 [ false, %.split64.us ], [ true, %.preheader ], [ true, %._crit_edge59 ]
  call void @llvm.lifetime.end.p0(i64 1240, ptr nonnull %9) #5
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret i1 %.not4251

174:                                              ; preds = %169, %110, %83
  %.pn.pn = phi { ptr, i32 } [ %.pn, %110 ], [ %.us-phi62, %169 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 1240, ptr nonnull %9) #5
  br label %175

175:                                              ; preds = %174, %81
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %174 ], [ %82, %81 ]
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #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 @_ZNSt5tupleIJiiEEC2IRiiTnNSt9enable_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 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 @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt5tupleIJiiEESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIJiiEJiiEEbRKSt5tupleIJDpT_EERKS0_IJDpT0_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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


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