; LLVM IR from kazunetakahashi/atcoder :: 201610_12/1002_KUPC2016 (E)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.8" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.std::tuple.5" }
%"class.std::tuple.5" = type { %"struct.std::_Tuple_impl.6" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { i32 }
%"struct.std::_Head_base.9" = type { i32 }

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1SB5cxx11 = external dso_local global [110 x %"class.std::__cxx11::basic_string"], align 16
@F = external dso_local global [110 x [110 x i8]], align 16
@need = external dso_local global [110 x [110 x i8]], align 16
@St = external dso_local global %"class.std::stack", align 8
@visited = external dso_local global [110 x [110 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden constant [4 x i32], align 16
@_ZL2dy = external hidden constant [4 x i32], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12is_minus_onev() #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

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

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

35:                                               ; preds = %45, %0
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = load i32, ptr @H, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %48

40:                                               ; preds = %35
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %42
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %43)
  br label %45

45:                                               ; preds = %40
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %2, align 4, !tbaa !5
  br label %35, !llvm.loop !9

48:                                               ; preds = %39
  %49 = call noundef zeroext i1 @_Z12is_minus_onev()
  br i1 %49, label %50, label %53

50:                                               ; preds = %48
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %318

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 0, ptr %3, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @F, ptr noundef getelementptr inbounds (i8, ptr @F, i64 12100), ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %123, %53
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = load i32, ptr @H, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %126

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

60:                                               ; preds = %119, %59
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = load i32, ptr @W, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %60
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %68, i64 noundef %70)
  %72 = load i8, ptr %71, align 1, !tbaa !13
  %73 = sext i8 %72 to i32
  %74 = icmp eq i32 %73, 46
  br i1 %74, label %75, label %76

75:                                               ; preds = %65
  br label %119

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

77:                                               ; preds = %115, %76
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = icmp slt i32 %78, 4
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %118

81:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %82, %86
  store i32 %87, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %88, %92
  store i32 %93, ptr %9, align 4, !tbaa !5
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = call noundef zeroext i1 @_Z5validii(i32 noundef %94, i32 noundef %95)
  br i1 %96, label %97, label %114

97:                                               ; preds = %81
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %99
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %100, i64 noundef %102)
  %104 = load i8, ptr %103, align 1, !tbaa !13
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 46
  br i1 %106, label %107, label %114

107:                                              ; preds = %97
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %109
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [110 x i8], ptr %110, i64 0, i64 %112
  store i8 1, ptr %113, align 1, !tbaa !11
  br label %114

114:                                              ; preds = %107, %97, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %7, align 4, !tbaa !5
  br label %77, !llvm.loop !14

118:                                              ; preds = %80
  br label %119

119:                                              ; preds = %118, %75
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !5
  br label %60, !llvm.loop !15

122:                                              ; preds = %64
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %4, align 4, !tbaa !5
  br label %54, !llvm.loop !16

126:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %155, %126
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = load i32, ptr @H, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %158

132:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %150, %132
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = load i32, ptr @W, align 4, !tbaa !5
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %153

138:                                              ; preds = %133
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %140
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [110 x i8], ptr %141, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !11, !range !17, !noundef !18
  %146 = trunc i8 %145 to i1
  %147 = zext i1 %146 to i64
  %148 = select i1 %146, i8 35, i8 46
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %148)
  br label %150

150:                                              ; preds = %138
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %11, align 4, !tbaa !5
  br label %133, !llvm.loop !19

153:                                              ; preds = %137
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %155

155:                                              ; preds = %153
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %10, align 4, !tbaa !5
  br label %127, !llvm.loop !20

158:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %190, %158
  %160 = load i32, ptr %13, align 4, !tbaa !5
  %161 = load i32, ptr @H, align 4, !tbaa !5
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 20, ptr %5, align 4
  br label %193

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %181, %164
  %166 = load i32, ptr %14, align 4, !tbaa !5
  %167 = load i32, ptr @W, align 4, !tbaa !5
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %165
  store i32 23, ptr %5, align 4
  br label %184

170:                                              ; preds = %165
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %172
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [110 x i8], ptr %173, i64 0, i64 %175
  %177 = load i8, ptr %176, align 1, !tbaa !11, !range !17, !noundef !18
  %178 = trunc i8 %177 to i1
  br i1 %178, label %179, label %180

179:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.5") align 4 %16, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %15, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  store i8 1, ptr %12, align 1, !tbaa !11
  store i32 23, ptr %5, align 4
  br label %184

180:                                              ; preds = %170
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %14, align 4, !tbaa !5
  br label %165, !llvm.loop !21

184:                                              ; preds = %179, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %185

185:                                              ; preds = %184
  %186 = load i8, ptr %12, align 1, !tbaa !11, !range !17, !noundef !18
  %187 = trunc i8 %186 to i1
  br i1 %187, label %188, label %189

188:                                              ; preds = %185
  store i32 20, ptr %5, align 4
  br label %193

189:                                              ; preds = %185
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %13, align 4, !tbaa !5
  br label %159, !llvm.loop !22

193:                                              ; preds = %188, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %194

194:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 0, ptr %17, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef getelementptr inbounds ([110 x i8], ptr getelementptr inbounds ([110 x [110 x i8]], ptr @visited, i64 0, i64 110), i64 0, i64 110), ptr noundef getelementptr inbounds ([110 x i8], ptr getelementptr inbounds ([110 x [110 x i8]], ptr @visited, i64 0, i64 110), i64 0, i64 110), ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  store i8 0, ptr %18, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef getelementptr inbounds ([110 x i8], ptr getelementptr inbounds ([110 x [110 x i8]], ptr @need, i64 0, i64 110), i64 0, i64 110), ptr noundef getelementptr inbounds ([110 x i8], ptr getelementptr inbounds ([110 x [110 x i8]], ptr @need, i64 0, i64 110), i64 0, i64 110), ptr noundef nonnull align 1 dereferenceable(1) %18)
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  br label %195

195:                                              ; preds = %281, %194
  %196 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %197 = xor i1 %196, true
  br i1 %197, label %198, label %282

198:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %199 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %199) #7
  %201 = load i32, ptr %200, align 4, !tbaa !5
  store i32 %201, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %202 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %202) #7
  %204 = load i32, ptr %203, align 4, !tbaa !5
  store i32 %204, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %205 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %206 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3getILm2EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %205) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %206, i64 8, i1 false)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %207 = load i32, ptr %19, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %208
  %210 = load i32, ptr %20, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [110 x i8], ptr %209, i64 0, i64 %211
  %213 = load i8, ptr %212, align 1, !tbaa !11, !range !17, !noundef !18
  %214 = trunc i8 %213 to i1
  br i1 %214, label %281, label %215

215:                                              ; preds = %198
  %216 = load i32, ptr %19, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %217
  %219 = load i32, ptr %20, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [110 x i8], ptr %218, i64 0, i64 %220
  store i8 1, ptr %221, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %277, %215
  %223 = load i32, ptr %22, align 4, !tbaa !5
  %224 = icmp slt i32 %223, 4
  br i1 %224, label %226, label %225

225:                                              ; preds = %222
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %280

226:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %227 = load i32, ptr %19, align 4, !tbaa !5
  %228 = load i32, ptr %22, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = add nsw i32 %227, %231
  store i32 %232, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %233 = load i32, ptr %20, align 4, !tbaa !5
  %234 = load i32, ptr %22, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = add nsw i32 %233, %237
  store i32 %238, ptr %24, align 4, !tbaa !5
  %239 = load i32, ptr %23, align 4, !tbaa !5
  %240 = load i32, ptr %24, align 4, !tbaa !5
  %241 = call noundef zeroext i1 @_Z5validii(i32 noundef %239, i32 noundef %240)
  br i1 %241, label %253, label %242

242:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %243 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %21) #7
  %244 = load i32, ptr %243, align 4, !tbaa !5
  store i32 %244, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %21) #7
  %246 = load i32, ptr %245, align 4, !tbaa !5
  store i32 %246, ptr %26, align 4, !tbaa !5
  %247 = load i32, ptr %25, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %248
  %250 = load i32, ptr %26, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [110 x i8], ptr %249, i64 0, i64 %251
  store i8 1, ptr %252, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %276

253:                                              ; preds = %226
  %254 = load i32, ptr %23, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %255
  %257 = load i32, ptr %24, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [110 x i8], ptr %256, i64 0, i64 %258
  %260 = load i8, ptr %259, align 1, !tbaa !11, !range !17, !noundef !18
  %261 = trunc i8 %260 to i1
  br i1 %261, label %262, label %263

262:                                              ; preds = %253
  br label %275

263:                                              ; preds = %253
  %264 = load i32, ptr %23, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %265
  %267 = load i32, ptr %24, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [110 x i8], ptr %266, i64 0, i64 %268
  %270 = load i8, ptr %269, align 1, !tbaa !11, !range !17, !noundef !18
  %271 = trunc i8 %270 to i1
  br i1 %271, label %272, label %273

272:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple.5") align 4 %28, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %27, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(8) %28)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br label %274

273:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  call void @_ZSt10make_tupleIJRiS0_RSt5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %29, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(8) %21)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %29)
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  br label %274

274:                                              ; preds = %273, %272
  br label %275

275:                                              ; preds = %274, %262
  br label %276

276:                                              ; preds = %275, %242
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %277

277:                                              ; preds = %276
  %278 = load i32, ptr %22, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %22, align 4, !tbaa !5
  br label %222, !llvm.loop !23

280:                                              ; preds = %225
  br label %281

281:                                              ; preds = %280, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %195, !llvm.loop !24

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

283:                                              ; preds = %311, %282
  %284 = load i32, ptr %31, align 4, !tbaa !5
  %285 = load i32, ptr @H, align 4, !tbaa !5
  %286 = icmp slt i32 %284, %285
  br i1 %286, label %288, label %287

287:                                              ; preds = %283
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %314

288:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %289

289:                                              ; preds = %307, %288
  %290 = load i32, ptr %32, align 4, !tbaa !5
  %291 = load i32, ptr @W, align 4, !tbaa !5
  %292 = icmp slt i32 %290, %291
  br i1 %292, label %294, label %293

293:                                              ; preds = %289
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %310

294:                                              ; preds = %289
  %295 = load i32, ptr %31, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %296
  %298 = load i32, ptr %32, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [110 x i8], ptr %297, i64 0, i64 %299
  %301 = load i8, ptr %300, align 1, !tbaa !11, !range !17, !noundef !18
  %302 = trunc i8 %301 to i1
  br i1 %302, label %303, label %306

303:                                              ; preds = %294
  %304 = load i32, ptr %30, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %30, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %303, %294
  br label %307

307:                                              ; preds = %306
  %308 = load i32, ptr %32, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %32, align 4, !tbaa !5
  br label %289, !llvm.loop !25

310:                                              ; preds = %293
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %31, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %31, align 4, !tbaa !5
  br label %283, !llvm.loop !26

314:                                              ; preds = %287
  %315 = load i32, ptr %30, align 4, !tbaa !5
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %315)
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %316, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %318

318:                                              ; preds = %314, %50
  %319 = load i32, ptr %1, align 4
  ret i32 %319
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16)) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16)) #0

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

; 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) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 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)) #0

; 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)) #0

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, std::tuple<int, int>>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int, std::tuple<int, int>>, std::allocator<std::tuple<int, int, 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.8" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.std::tuple.5" }
%"class.std::tuple.5" = type { %"struct.std::_Tuple_impl.6" }
%"struct.std::_Tuple_impl.6" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.9" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { i32 }
%"struct.std::_Head_base.9" = type { i32 }

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1SB5cxx11 = external dso_local global [110 x %"class.std::__cxx11::basic_string"], align 16
@F = external dso_local global [110 x [110 x i8]], align 16
@need = external dso_local global [110 x [110 x i8]], align 16
@St = external dso_local global %"class.std::stack", align 8
@visited = external dso_local global [110 x [110 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZL2dy = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12is_minus_onev() local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i8, align 1
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::tuple", align 4
  %5 = alloca %"class.std::tuple.5", align 4
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::tuple.5", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::tuple", align 4
  %12 = alloca %"class.std::tuple.5", align 4
  %13 = alloca %"class.std::tuple", align 4
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @H)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %16 = load i32, ptr @H, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %18 = tail call noundef zeroext i1 @_Z12is_minus_onev()
  br i1 %18, label %24, label %27

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %19 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %indvars.iv
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %19)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr @H, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next, %22
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !9

24:                                               ; preds = %._crit_edge
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %276

27:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #7
  store i8 0, ptr %1, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @F, ptr noundef nonnull getelementptr inbounds (i8, ptr @F, i64 12100), ptr noundef nonnull align 1 dereferenceable(1) %1)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #7
  %28 = load i32, ptr @H, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.preheader70.lr.ph, label %._crit_edge81.thread

.preheader70.lr.ph:                               ; preds = %27
  %30 = load i32, ptr @W, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.preheader70.preheader, label %.preheader66.preheader

.preheader70.preheader:                           ; preds = %.preheader70.lr.ph
  %32 = load i32, ptr @_ZL2dx, align 16
  %33 = load i32, ptr @_ZL2dy, align 16
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.preheader70

.preheader70:                                     ; preds = %.preheader70.preheader, %._crit_edge75
  %40 = phi i32 [ %28, %.preheader70.preheader ], [ %58, %._crit_edge75 ]
  %41 = phi i32 [ %30, %.preheader70.preheader ], [ %59, %._crit_edge75 ]
  %indvars.iv121 = phi i64 [ 0, %.preheader70.preheader ], [ %indvars.iv.next122, %._crit_edge75 ]
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %.preheader70
  %43 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %indvars.iv121
  %44 = trunc nuw nsw i64 %indvars.iv121 to i32
  %45 = add nsw i32 %32, %44
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %46
  %48 = add nsw i32 %34, %44
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %49
  %51 = add nsw i32 %36, %44
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %52
  %54 = add nsw i32 %38, %44
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %55
  br label %62

.preheader67:                                     ; preds = %._crit_edge75
  %57 = icmp sgt i32 %58, 0
  br i1 %57, label %.preheader66.preheader, label %._crit_edge81.thread

.preheader66.preheader:                           ; preds = %.preheader70.lr.ph, %.preheader67
  br label %.preheader66

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

._crit_edge75:                                    ; preds = %._crit_edge75.loopexit, %.preheader70
  %58 = phi i32 [ %.pre, %._crit_edge75.loopexit ], [ %40, %.preheader70 ]
  %59 = phi i32 [ %103, %._crit_edge75.loopexit ], [ %41, %.preheader70 ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %60 = sext i32 %58 to i64
  %61 = icmp slt i64 %indvars.iv.next122, %60
  br i1 %61, label %.preheader70, label %.preheader67, !llvm.loop !13

62:                                               ; preds = %.lr.ph74, %.loopexit69
  %indvars.iv118 = phi i64 [ 0, %.lr.ph74 ], [ %indvars.iv.next119, %.loopexit69 ]
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %43, i64 noundef %indvars.iv118)
  %64 = load i8, ptr %63, align 1, !tbaa !15
  %65 = icmp eq i8 %64, 46
  br i1 %65, label %.loopexit69, label %.preheader68.preheader

.preheader68.preheader:                           ; preds = %62
  %66 = trunc nuw nsw i64 %indvars.iv118 to i32
  %67 = add nsw i32 %33, %66
  %68 = call noundef zeroext i1 @_Z5validii(i32 noundef %45, i32 noundef %67)
  br i1 %68, label %69, label %.preheader68.1

69:                                               ; preds = %.preheader68.preheader
  %70 = sext i32 %67 to i64
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %47, i64 noundef %70)
  %72 = load i8, ptr %71, align 1, !tbaa !15
  %73 = icmp eq i8 %72, 46
  br i1 %73, label %74, label %.preheader68.1

74:                                               ; preds = %69
  %75 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %46, i64 %70
  store i8 1, ptr %75, align 1, !tbaa !11
  br label %.preheader68.1

.preheader68.1:                                   ; preds = %74, %69, %.preheader68.preheader
  %76 = add nsw i32 %35, %66
  %77 = call noundef zeroext i1 @_Z5validii(i32 noundef %48, i32 noundef %76)
  br i1 %77, label %78, label %.preheader68.2

78:                                               ; preds = %.preheader68.1
  %79 = sext i32 %76 to i64
  %80 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %50, i64 noundef %79)
  %81 = load i8, ptr %80, align 1, !tbaa !15
  %82 = icmp eq i8 %81, 46
  br i1 %82, label %83, label %.preheader68.2

83:                                               ; preds = %78
  %84 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %49, i64 %79
  store i8 1, ptr %84, align 1, !tbaa !11
  br label %.preheader68.2

.preheader68.2:                                   ; preds = %83, %78, %.preheader68.1
  %85 = add nsw i32 %37, %66
  %86 = call noundef zeroext i1 @_Z5validii(i32 noundef %51, i32 noundef %85)
  br i1 %86, label %87, label %.preheader68.3

87:                                               ; preds = %.preheader68.2
  %88 = sext i32 %85 to i64
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %53, i64 noundef %88)
  %90 = load i8, ptr %89, align 1, !tbaa !15
  %91 = icmp eq i8 %90, 46
  br i1 %91, label %92, label %.preheader68.3

92:                                               ; preds = %87
  %93 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %52, i64 %88
  store i8 1, ptr %93, align 1, !tbaa !11
  br label %.preheader68.3

.preheader68.3:                                   ; preds = %92, %87, %.preheader68.2
  %94 = add nsw i32 %39, %66
  %95 = call noundef zeroext i1 @_Z5validii(i32 noundef %54, i32 noundef %94)
  br i1 %95, label %96, label %.loopexit69

96:                                               ; preds = %.preheader68.3
  %97 = sext i32 %94 to i64
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %97)
  %99 = load i8, ptr %98, align 1, !tbaa !15
  %100 = icmp eq i8 %99, 46
  br i1 %100, label %101, label %.loopexit69

101:                                              ; preds = %96
  %102 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %55, i64 %97
  store i8 1, ptr %102, align 1, !tbaa !11
  br label %.loopexit69

.loopexit69:                                      ; preds = %.preheader68.3, %96, %101, %62
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %103 = load i32, ptr @W, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %indvars.iv.next119, %104
  br i1 %105, label %62, label %._crit_edge75.loopexit, !llvm.loop !16

.preheader66:                                     ; preds = %.preheader66.preheader, %._crit_edge79
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %._crit_edge79 ], [ 0, %.preheader66.preheader ]
  %106 = load i32, ptr @W, align 4, !tbaa !5
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph78, label %._crit_edge79

._crit_edge81.thread:                             ; preds = %.preheader67, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  br label %.loopexit65

._crit_edge81:                                    ; preds = %._crit_edge79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %108 = icmp sgt i32 %117, 0
  br i1 %108, label %.lr.ph90, label %.loopexit65

.lr.ph90:                                         ; preds = %._crit_edge81
  %109 = load i32, ptr @W, align 4, !tbaa !5
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %.lr.ph85.us.preheader, label %.loopexit65

.lr.ph85.us.preheader:                            ; preds = %.lr.ph90
  %wide.trip.count137 = zext nneg i32 %117 to i64
  %wide.trip.count = zext nneg i32 %109 to i64
  br label %.lr.ph85.us

.lr.ph85.us:                                      ; preds = %.lr.ph85.us.preheader, %._crit_edge86.us
  %indvars.iv134 = phi i64 [ 0, %.lr.ph85.us.preheader ], [ %indvars.iv.next135, %._crit_edge86.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  br label %111

111:                                              ; preds = %.lr.ph85.us, %115
  %indvars.iv130 = phi i64 [ 0, %.lr.ph85.us ], [ %indvars.iv.next131, %115 ]
  %112 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %indvars.iv134, i64 %indvars.iv130
  %113 = load i8, ptr %112, align 1, !tbaa !11, !range !17, !noundef !18
  %114 = trunc nuw i8 %113 to i1
  br i1 %114, label %.thread, label %115

115:                                              ; preds = %111
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count
  br i1 %exitcond133.not, label %._crit_edge86.us, label %111, !llvm.loop !19

._crit_edge86.us:                                 ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %exitcond138.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count137
  br i1 %exitcond138.not, label %.loopexit65, label %.lr.ph85.us, !llvm.loop !20

._crit_edge79:                                    ; preds = %.lr.ph78, %.preheader66
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %117 = load i32, ptr @H, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = icmp slt i64 %indvars.iv.next128, %118
  br i1 %119, label %.preheader66, label %._crit_edge81, !llvm.loop !21

.lr.ph78:                                         ; preds = %.preheader66, %.lr.ph78
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %.lr.ph78 ], [ 0, %.preheader66 ]
  %120 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %indvars.iv127, i64 %indvars.iv124
  %121 = load i8, ptr %120, align 1, !tbaa !11, !range !17, !noundef !18
  %122 = trunc nuw i8 %121 to i1
  %123 = select i1 %122, i8 35, i8 46
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %123)
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %125 = load i32, ptr @W, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = icmp slt i64 %indvars.iv.next125, %126
  br i1 %127, label %.lr.ph78, label %._crit_edge79, !llvm.loop !22

.thread:                                          ; preds = %111
  %128 = trunc nuw nsw i64 %indvars.iv134 to i32
  %129 = trunc nuw nsw i64 %indvars.iv130 to i32
  store i32 %128, ptr %2, align 4, !tbaa !5
  store i32 %129, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.5") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %4, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %.loopexit65

.loopexit65:                                      ; preds = %._crit_edge86.us, %.lr.ph90, %._crit_edge81, %._crit_edge81.thread, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @visited, i64 12210), ptr noundef nonnull getelementptr inbounds (i8, ptr @visited, i64 12210), ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  store i8 0, ptr %7, align 1, !tbaa !11
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @need, i64 12210), ptr noundef nonnull getelementptr inbounds (i8, ptr @need, i64 12210), ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  %130 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  br i1 %130, label %.preheader64, label %.lr.ph96.preheader

.lr.ph96.preheader:                               ; preds = %.loopexit65
  %131 = load i32, ptr @_ZL2dx, align 16
  %132 = load i32, ptr @_ZL2dy, align 16
  %133 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %135 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph96

.preheader64:                                     ; preds = %.loopexit, %.loopexit65
  %139 = load i32, ptr @H, align 4, !tbaa !5
  %140 = icmp sgt i32 %139, 0
  br i1 %140, label %.preheader.lr.ph, label %._crit_edge103

.preheader.lr.ph:                                 ; preds = %.preheader64
  %141 = load i32, ptr @W, align 4, !tbaa !5
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %.preheader.us.preheader, label %._crit_edge103

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count151 = zext nneg i32 %139 to i64
  %wide.trip.count146 = zext nneg i32 %141 to i64
  %min.iters.check = icmp ult i32 %141, 8
  %n.vec = and i64 %wide.trip.count146, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count146
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge100.us
  %indvars.iv148 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next149, %._crit_edge100.us ]
  %.050101.us = phi i32 [ 0, %.preheader.us.preheader ], [ %spec.select.us.lcssa, %._crit_edge100.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader.us
  %143 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.050101.us, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %143, %vector.ph ], [ %148, %vector.body ]
  %vec.phi164 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %149, %vector.body ]
  %144 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %indvars.iv148, i64 %index
  %145 = getelementptr inbounds i8, ptr %144, i64 4
  %wide.load = load <4 x i8>, ptr %144, align 2, !tbaa !11
  %wide.load165 = load <4 x i8>, ptr %145, align 2, !tbaa !11
  %146 = zext <4 x i8> %wide.load to <4 x i32>
  %147 = zext <4 x i8> %wide.load165 to <4 x i32>
  %148 = add <4 x i32> %vec.phi, %146
  %149 = add <4 x i32> %vec.phi164, %147
  %index.next = add nuw i64 %index, 8
  %150 = icmp eq i64 %index.next, %n.vec
  br i1 %150, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %149, %148
  %151 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge100.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us
  %indvars.iv143.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  %.197.us.ph = phi i32 [ %.050101.us, %.preheader.us ], [ %151, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %scalar.ph ], [ %indvars.iv143.ph, %scalar.ph.preheader ]
  %.197.us = phi i32 [ %spec.select.us, %scalar.ph ], [ %.197.us.ph, %scalar.ph.preheader ]
  %152 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %indvars.iv148, i64 %indvars.iv143
  %153 = load i8, ptr %152, align 1, !tbaa !11, !range !17, !noundef !18
  %154 = zext nneg i8 %153 to i32
  %spec.select.us = add nsw i32 %.197.us, %154
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146
  br i1 %exitcond147.not, label %._crit_edge100.us, label %scalar.ph, !llvm.loop !26

._crit_edge100.us:                                ; preds = %scalar.ph, %middle.block
  %spec.select.us.lcssa = phi i32 [ %151, %middle.block ], [ %spec.select.us, %scalar.ph ]
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %._crit_edge103, label %.preheader.us, !llvm.loop !27

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %.loopexit
  %155 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %155) #7
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %158) #7
  %160 = load i32, ptr %159, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %161 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3getILm2EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16) %161) #7
  %163 = load i64, ptr %162, align 4
  store i64 %163, ptr %8, align 8
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  %164 = sext i32 %157 to i64
  %165 = sext i32 %160 to i64
  %166 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %164, i64 %165
  %167 = load i8, ptr %166, align 1, !tbaa !11, !range !17, !noundef !18
  %168 = trunc nuw i8 %167 to i1
  br i1 %168, label %.loopexit, label %169

169:                                              ; preds = %.lr.ph96
  store i8 1, ptr %166, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %170 = add nsw i32 %131, %157
  store i32 %170, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %171 = add nsw i32 %132, %160
  store i32 %171, ptr %10, align 4, !tbaa !5
  %172 = call noundef zeroext i1 @_Z5validii(i32 noundef %170, i32 noundef %171)
  br i1 %172, label %181, label %173

173:                                              ; preds = %169
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = sext i32 %175 to i64
  %179 = sext i32 %177 to i64
  %180 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %178, i64 %179
  store i8 1, ptr %180, align 1, !tbaa !11
  br label %195

181:                                              ; preds = %169
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %183, i64 %185
  %187 = load i8, ptr %186, align 1, !tbaa !11, !range !17, !noundef !18
  %188 = trunc nuw i8 %187 to i1
  br i1 %188, label %195, label %189

189:                                              ; preds = %181
  %190 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %183, i64 %185
  %191 = load i8, ptr %190, align 1, !tbaa !11, !range !17, !noundef !18
  %192 = trunc nuw i8 %191 to i1
  br i1 %192, label %193, label %194

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.5") align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %195

194:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZSt10make_tupleIJRiS0_RSt5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %13, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %195

195:                                              ; preds = %181, %194, %193, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %196 = add nsw i32 %133, %157
  store i32 %196, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %197 = add nsw i32 %134, %160
  store i32 %197, ptr %10, align 4, !tbaa !5
  %198 = call noundef zeroext i1 @_Z5validii(i32 noundef %196, i32 noundef %197)
  br i1 %198, label %207, label %199

199:                                              ; preds = %195
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sext i32 %201 to i64
  %205 = sext i32 %203 to i64
  %206 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %204, i64 %205
  store i8 1, ptr %206, align 1, !tbaa !11
  br label %221

207:                                              ; preds = %195
  %208 = load i32, ptr %9, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = load i32, ptr %10, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %209, i64 %211
  %213 = load i8, ptr %212, align 1, !tbaa !11, !range !17, !noundef !18
  %214 = trunc nuw i8 %213 to i1
  br i1 %214, label %221, label %215

215:                                              ; preds = %207
  %216 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %209, i64 %211
  %217 = load i8, ptr %216, align 1, !tbaa !11, !range !17, !noundef !18
  %218 = trunc nuw i8 %217 to i1
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZSt10make_tupleIJRiS0_RSt5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %13, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %221

220:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.5") align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %221

221:                                              ; preds = %220, %219, %207, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %222 = add nsw i32 %135, %157
  store i32 %222, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %223 = add nsw i32 %136, %160
  store i32 %223, ptr %10, align 4, !tbaa !5
  %224 = call noundef zeroext i1 @_Z5validii(i32 noundef %222, i32 noundef %223)
  br i1 %224, label %233, label %225

225:                                              ; preds = %221
  %226 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = sext i32 %227 to i64
  %231 = sext i32 %229 to i64
  %232 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %230, i64 %231
  store i8 1, ptr %232, align 1, !tbaa !11
  br label %247

233:                                              ; preds = %221
  %234 = load i32, ptr %9, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = load i32, ptr %10, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %235, i64 %237
  %239 = load i8, ptr %238, align 1, !tbaa !11, !range !17, !noundef !18
  %240 = trunc nuw i8 %239 to i1
  br i1 %240, label %247, label %241

241:                                              ; preds = %233
  %242 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %235, i64 %237
  %243 = load i8, ptr %242, align 1, !tbaa !11, !range !17, !noundef !18
  %244 = trunc nuw i8 %243 to i1
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZSt10make_tupleIJRiS0_RSt5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %13, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %247

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.5") align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %247

247:                                              ; preds = %246, %245, %233, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %248 = add nsw i32 %137, %157
  store i32 %248, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %249 = add nsw i32 %138, %160
  store i32 %249, ptr %10, align 4, !tbaa !5
  %250 = call noundef zeroext i1 @_Z5validii(i32 noundef %248, i32 noundef %249)
  br i1 %250, label %259, label %251

251:                                              ; preds = %247
  %252 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = sext i32 %253 to i64
  %257 = sext i32 %255 to i64
  %258 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %256, i64 %257
  store i8 1, ptr %258, align 1, !tbaa !11
  br label %.loopexit.loopexit

259:                                              ; preds = %247
  %260 = load i32, ptr %9, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = load i32, ptr %10, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %261, i64 %263
  %265 = load i8, ptr %264, align 1, !tbaa !11, !range !17, !noundef !18
  %266 = trunc nuw i8 %265 to i1
  br i1 %266, label %.loopexit.loopexit, label %267

267:                                              ; preds = %259
  %268 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %261, i64 %263
  %269 = load i8, ptr %268, align 1, !tbaa !11, !range !17, !noundef !18
  %270 = trunc nuw i8 %269 to i1
  br i1 %270, label %272, label %271

271:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZSt10make_tupleIJRiS0_RSt5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %13, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %.loopexit.loopexit

272:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.5") align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @_ZSt10make_tupleIJRiS0_St5tupleIJiiEEEES1_IJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) @St, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %272, %271, %259, %251
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph96
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %273 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @St)
  br i1 %273, label %.preheader64, label %.lr.ph96, !llvm.loop !28

._crit_edge103:                                   ; preds = %._crit_edge100.us, %.preheader.lr.ph, %.preheader64
  %.050.lcssa = phi i32 [ 0, %.preheader64 ], [ 0, %.preheader.lr.ph ], [ %spec.select.us.lcssa, %._crit_edge100.us ]
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.050.lcssa)
  %275 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %274, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %276

276:                                              ; preds = %._crit_edge103, %24
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt5tupleIJiiEEEERNSt13tuple_elementIXT_ES0_IJDpT0_EEE4typeERS5_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt5tupleIJiiS0_IJiiEEEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 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 #0

; 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 #0

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !24, !25}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !10, !25, !24}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass