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

; 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.3" = type { %"class.std::deque.4" }
%"class.std::deque.4" = type { %"class.std::_Deque_base.5" }
%"class.std::_Deque_base.5" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.9", %"struct.std::_Deque_iterator.9" }
%"struct.std::_Deque_iterator.9" = 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.10", %"struct.std::_Head_base.11" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.11" = 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
@SS = external dso_local global %"class.std::stack.3", 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 uwtable
declare dso_local void @_Z8SS_stackv() #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10hashi_needv() #0

; 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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::tuple", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %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 i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %32 = 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)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) @W)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %34

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

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %47

39:                                               ; preds = %34
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %41
  %43 = 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) %42)
  br label %44

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

47:                                               ; preds = %38
  %48 = call noundef zeroext i1 @_Z12is_minus_onev()
  br i1 %48, label %49, label %52

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

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  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) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %53

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

57:                                               ; preds = %53
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %125

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

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

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

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

74:                                               ; preds = %64
  br label %118

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

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

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

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

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

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

113:                                              ; preds = %106, %96, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %114

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

117:                                              ; preds = %79
  br label %118

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

121:                                              ; preds = %63
  br label %122

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

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

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

130:                                              ; preds = %126
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %157

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

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

136:                                              ; preds = %132
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %152

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

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

152:                                              ; preds = %136
  %153 = 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 %154

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

157:                                              ; preds = %130
  call void @_Z8SS_stackv()
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 0, ptr %12, 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) %12)
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %158

158:                                              ; preds = %231, %157
  %159 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %160 = xor i1 %159, true
  br i1 %160, label %161, label %232

161:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %162) #6
  %164 = load i32, ptr %163, align 4, !tbaa !5
  store i32 %164, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %165 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %165) #6
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %14, align 4, !tbaa !5
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %169
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [110 x i8], ptr %170, i64 0, i64 %172
  %174 = load i8, ptr %173, align 1, !tbaa !11, !range !17, !noundef !18
  %175 = trunc i8 %174 to i1
  br i1 %175, label %231, label %176

176:                                              ; preds = %161
  %177 = load i32, ptr %13, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %178
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [110 x i8], ptr %179, i64 0, i64 %181
  store i8 1, ptr %182, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %227, %176
  %184 = load i32, ptr %15, align 4, !tbaa !5
  %185 = icmp slt i32 %184, 4
  br i1 %185, label %187, label %186

186:                                              ; preds = %183
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %230

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %188 = load i32, ptr %13, align 4, !tbaa !5
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = add nsw i32 %188, %192
  store i32 %193, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %194 = load i32, ptr %14, align 4, !tbaa !5
  %195 = load i32, ptr %15, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = add nsw i32 %194, %198
  store i32 %199, ptr %17, align 4, !tbaa !5
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = load i32, ptr %17, align 4, !tbaa !5
  %202 = call noundef zeroext i1 @_Z5validii(i32 noundef %200, i32 noundef %201)
  br i1 %202, label %204, label %203

203:                                              ; preds = %187
  br label %226

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

213:                                              ; preds = %204
  br label %225

214:                                              ; preds = %204
  %215 = load i32, ptr %16, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %216
  %218 = load i32, ptr %17, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [110 x i8], ptr %217, i64 0, i64 %219
  %221 = load i8, ptr %220, align 1, !tbaa !11, !range !17, !noundef !18
  %222 = trunc i8 %221 to i1
  br i1 %222, label %224, label %223

223:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %18, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @SS, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %224

224:                                              ; preds = %223, %214
  br label %225

225:                                              ; preds = %224, %213
  br label %226

226:                                              ; preds = %225, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %15, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %15, align 4, !tbaa !5
  br label %183, !llvm.loop !21

230:                                              ; preds = %186
  br label %231

231:                                              ; preds = %230, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %158, !llvm.loop !22

232:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %261, %232
  %234 = load i32, ptr %19, align 4, !tbaa !5
  %235 = load i32, ptr @H, align 4, !tbaa !5
  %236 = icmp slt i32 %234, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  store i32 25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %264

238:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %256, %238
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = load i32, ptr @W, align 4, !tbaa !5
  %242 = icmp slt i32 %240, %241
  br i1 %242, label %244, label %243

243:                                              ; preds = %239
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %259

244:                                              ; preds = %239
  %245 = load i32, ptr %19, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %246
  %248 = load i32, ptr %20, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [110 x i8], ptr %247, i64 0, i64 %249
  %251 = load i8, ptr %250, align 1, !tbaa !11, !range !17, !noundef !18
  %252 = trunc i8 %251 to i1
  %253 = zext i1 %252 to i64
  %254 = select i1 %252, i8 86, i8 46
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %254)
  br label %256

256:                                              ; preds = %244
  %257 = load i32, ptr %20, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %20, align 4, !tbaa !5
  br label %239, !llvm.loop !23

259:                                              ; preds = %243
  %260 = 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 %261

261:                                              ; preds = %259
  %262 = load i32, ptr %19, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %19, align 4, !tbaa !5
  br label %233, !llvm.loop !24

264:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 0, ptr %21, 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) %21)
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %265

265:                                              ; preds = %332, %264
  %266 = load i32, ptr %22, align 4, !tbaa !5
  %267 = load i32, ptr @H, align 4, !tbaa !5
  %268 = icmp slt i32 %266, %267
  br i1 %268, label %270, label %269

269:                                              ; preds = %265
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %335

270:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %271

271:                                              ; preds = %328, %270
  %272 = load i32, ptr %23, align 4, !tbaa !5
  %273 = load i32, ptr @W, align 4, !tbaa !5
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %331

276:                                              ; preds = %271
  %277 = load i32, ptr %22, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %278
  %280 = load i32, ptr %23, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [110 x i8], ptr %279, i64 0, i64 %281
  %283 = load i8, ptr %282, align 1, !tbaa !11, !range !17, !noundef !18
  %284 = trunc i8 %283 to i1
  br i1 %284, label %285, label %327

285:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %323, %285
  %287 = load i32, ptr %24, align 4, !tbaa !5
  %288 = icmp slt i32 %287, 4
  br i1 %288, label %290, label %289

289:                                              ; preds = %286
  store i32 37, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %326

290:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %291 = load i32, ptr %22, align 4, !tbaa !5
  %292 = load i32, ptr %24, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = add nsw i32 %291, %295
  store i32 %296, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %297 = load i32, ptr %23, align 4, !tbaa !5
  %298 = load i32, ptr %24, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !5
  %302 = add nsw i32 %297, %301
  store i32 %302, ptr %26, align 4, !tbaa !5
  %303 = load i32, ptr %25, align 4, !tbaa !5
  %304 = load i32, ptr %26, align 4, !tbaa !5
  %305 = call noundef zeroext i1 @_Z5validii(i32 noundef %303, i32 noundef %304)
  br i1 %305, label %306, label %322

306:                                              ; preds = %290
  %307 = load i32, ptr %25, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %308
  %310 = load i32, ptr %26, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [110 x i8], ptr %309, i64 0, i64 %311
  %313 = load i8, ptr %312, align 1, !tbaa !11, !range !17, !noundef !18
  %314 = trunc i8 %313 to i1
  br i1 %314, label %315, label %322

315:                                              ; preds = %306
  %316 = load i32, ptr %25, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %317
  %319 = load i32, ptr %26, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [110 x i8], ptr %318, i64 0, i64 %320
  store i8 1, ptr %321, align 1, !tbaa !11
  br label %322

322:                                              ; preds = %315, %306, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %323

323:                                              ; preds = %322
  %324 = load i32, ptr %24, align 4, !tbaa !5
  %325 = add nsw i32 %324, 1
  store i32 %325, ptr %24, align 4, !tbaa !5
  br label %286, !llvm.loop !25

326:                                              ; preds = %289
  br label %327

327:                                              ; preds = %326, %276
  br label %328

328:                                              ; preds = %327
  %329 = load i32, ptr %23, align 4, !tbaa !5
  %330 = add nsw i32 %329, 1
  store i32 %330, ptr %23, align 4, !tbaa !5
  br label %271, !llvm.loop !26

331:                                              ; preds = %275
  br label %332

332:                                              ; preds = %331
  %333 = load i32, ptr %22, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %22, align 4, !tbaa !5
  br label %265, !llvm.loop !27

335:                                              ; preds = %269
  call void @_Z10hashi_needv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %364, %335
  %337 = load i32, ptr %27, align 4, !tbaa !5
  %338 = load i32, ptr @H, align 4, !tbaa !5
  %339 = icmp slt i32 %337, %338
  br i1 %339, label %341, label %340

340:                                              ; preds = %336
  store i32 40, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %367

341:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %342

342:                                              ; preds = %359, %341
  %343 = load i32, ptr %28, align 4, !tbaa !5
  %344 = load i32, ptr @W, align 4, !tbaa !5
  %345 = icmp slt i32 %343, %344
  br i1 %345, label %347, label %346

346:                                              ; preds = %342
  store i32 43, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %362

347:                                              ; preds = %342
  %348 = load i32, ptr %27, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %349
  %351 = load i32, ptr %28, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [110 x i8], ptr %350, i64 0, i64 %352
  %354 = load i8, ptr %353, align 1, !tbaa !11, !range !17, !noundef !18
  %355 = trunc i8 %354 to i1
  %356 = zext i1 %355 to i64
  %357 = select i1 %355, i8 78, i8 46
  %358 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %357)
  br label %359

359:                                              ; preds = %347
  %360 = load i32, ptr %28, align 4, !tbaa !5
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %28, align 4, !tbaa !5
  br label %342, !llvm.loop !28

362:                                              ; preds = %346
  %363 = 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 %364

364:                                              ; preds = %362
  %365 = load i32, ptr %27, align 4, !tbaa !5
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %27, align 4, !tbaa !5
  br label %336, !llvm.loop !29

367:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %368

368:                                              ; preds = %396, %367
  %369 = load i32, ptr %30, align 4, !tbaa !5
  %370 = load i32, ptr @H, align 4, !tbaa !5
  %371 = icmp slt i32 %369, %370
  br i1 %371, label %373, label %372

372:                                              ; preds = %368
  store i32 46, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %399

373:                                              ; preds = %368
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %374

374:                                              ; preds = %392, %373
  %375 = load i32, ptr %31, align 4, !tbaa !5
  %376 = load i32, ptr @W, align 4, !tbaa !5
  %377 = icmp slt i32 %375, %376
  br i1 %377, label %379, label %378

378:                                              ; preds = %374
  store i32 49, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %395

379:                                              ; preds = %374
  %380 = load i32, ptr %30, align 4, !tbaa !5
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %381
  %383 = load i32, ptr %31, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [110 x i8], ptr %382, i64 0, i64 %384
  %386 = load i8, ptr %385, align 1, !tbaa !11, !range !17, !noundef !18
  %387 = trunc i8 %386 to i1
  br i1 %387, label %388, label %391

388:                                              ; preds = %379
  %389 = load i32, ptr %29, align 4, !tbaa !5
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %29, align 4, !tbaa !5
  br label %391

391:                                              ; preds = %388, %379
  br label %392

392:                                              ; preds = %391
  %393 = load i32, ptr %31, align 4, !tbaa !5
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %31, align 4, !tbaa !5
  br label %374, !llvm.loop !30

395:                                              ; preds = %378
  br label %396

396:                                              ; preds = %395
  %397 = load i32, ptr %30, align 4, !tbaa !5
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %30, align 4, !tbaa !5
  br label %368, !llvm.loop !31

399:                                              ; preds = %372
  %400 = load i32, ptr %29, align 4, !tbaa !5
  %401 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %400)
  %402 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %401, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %403

403:                                              ; preds = %399, %49
  %404 = load i32, ptr %1, align 4
  ret i32 %404
}

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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_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 @_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(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_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 @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !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.3" = type { %"class.std::deque.4" }
%"class.std::deque.4" = type { %"class.std::_Deque_base.5" }
%"class.std::_Deque_base.5" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.9", %"struct.std::_Deque_iterator.9" }
%"struct.std::_Deque_iterator.9" = 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.10", %"struct.std::_Head_base.11" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.11" = 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
@SS = external dso_local global %"class.std::stack.3", 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 uwtable
declare dso_local void @_Z8SS_stackv() local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10hashi_needv() local_unnamed_addr #0

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %11 = tail call noundef zeroext i1 @_Z12is_minus_onev()
  br i1 %11, label %17, label %20

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %indvars.iv
  %13 = 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) %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @H, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !9

17:                                               ; preds = %._crit_edge
  %18 = 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)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %326

20:                                               ; 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
  %21 = load i32, ptr @H, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.preheader104.lr.ph, label %._crit_edge115

.preheader104.lr.ph:                              ; preds = %20
  %23 = load i32, ptr @W, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.preheader104.preheader, label %.preheader100.preheader

.preheader104.preheader:                          ; preds = %.preheader104.lr.ph
  %25 = load i32, ptr @_ZL2dx, align 16
  %26 = load i32, ptr @_ZL2dy, align 16
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.preheader104

.preheader104:                                    ; preds = %.preheader104.preheader, %._crit_edge109
  %33 = phi i32 [ %21, %.preheader104.preheader ], [ %51, %._crit_edge109 ]
  %34 = phi i32 [ %23, %.preheader104.preheader ], [ %52, %._crit_edge109 ]
  %indvars.iv154 = phi i64 [ 0, %.preheader104.preheader ], [ %indvars.iv.next155, %._crit_edge109 ]
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph108, label %._crit_edge109

.lr.ph108:                                        ; preds = %.preheader104
  %36 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %indvars.iv154
  %37 = trunc nuw nsw i64 %indvars.iv154 to i32
  %38 = add nsw i32 %25, %37
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %39
  %41 = add nsw i32 %27, %37
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %42
  %44 = add nsw i32 %29, %37
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %45
  %47 = add nsw i32 %31, %37
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [110 x %"class.std::__cxx11::basic_string"], ptr @_Z1SB5cxx11, i64 0, i64 %48
  br label %55

.preheader101:                                    ; preds = %._crit_edge109
  %50 = icmp sgt i32 %51, 0
  br i1 %50, label %.preheader100.preheader, label %._crit_edge115

.preheader100.preheader:                          ; preds = %.preheader104.lr.ph, %.preheader101
  br label %.preheader100

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

._crit_edge109:                                   ; preds = %._crit_edge109.loopexit, %.preheader104
  %51 = phi i32 [ %.pre, %._crit_edge109.loopexit ], [ %33, %.preheader104 ]
  %52 = phi i32 [ %96, %._crit_edge109.loopexit ], [ %34, %.preheader104 ]
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %53 = sext i32 %51 to i64
  %54 = icmp slt i64 %indvars.iv.next155, %53
  br i1 %54, label %.preheader104, label %.preheader101, !llvm.loop !13

55:                                               ; preds = %.lr.ph108, %.loopexit103
  %indvars.iv151 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next152, %.loopexit103 ]
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %indvars.iv151)
  %57 = load i8, ptr %56, align 1, !tbaa !15
  %58 = icmp eq i8 %57, 46
  br i1 %58, label %.loopexit103, label %.preheader102.preheader

.preheader102.preheader:                          ; preds = %55
  %59 = trunc nuw nsw i64 %indvars.iv151 to i32
  %60 = add nsw i32 %26, %59
  %61 = call noundef zeroext i1 @_Z5validii(i32 noundef %38, i32 noundef %60)
  br i1 %61, label %62, label %.preheader102.1

62:                                               ; preds = %.preheader102.preheader
  %63 = sext i32 %60 to i64
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %63)
  %65 = load i8, ptr %64, align 1, !tbaa !15
  %66 = icmp eq i8 %65, 46
  br i1 %66, label %67, label %.preheader102.1

67:                                               ; preds = %62
  %68 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %39, i64 %63
  store i8 1, ptr %68, align 1, !tbaa !11
  br label %.preheader102.1

.preheader102.1:                                  ; preds = %67, %62, %.preheader102.preheader
  %69 = add nsw i32 %28, %59
  %70 = call noundef zeroext i1 @_Z5validii(i32 noundef %41, i32 noundef %69)
  br i1 %70, label %71, label %.preheader102.2

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

76:                                               ; preds = %71
  %77 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %42, i64 %72
  store i8 1, ptr %77, align 1, !tbaa !11
  br label %.preheader102.2

.preheader102.2:                                  ; preds = %76, %71, %.preheader102.1
  %78 = add nsw i32 %30, %59
  %79 = call noundef zeroext i1 @_Z5validii(i32 noundef %44, i32 noundef %78)
  br i1 %79, label %80, label %.preheader102.3

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

85:                                               ; preds = %80
  %86 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %45, i64 %81
  store i8 1, ptr %86, align 1, !tbaa !11
  br label %.preheader102.3

.preheader102.3:                                  ; preds = %85, %80, %.preheader102.2
  %87 = add nsw i32 %32, %59
  %88 = call noundef zeroext i1 @_Z5validii(i32 noundef %47, i32 noundef %87)
  br i1 %88, label %89, label %.loopexit103

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

94:                                               ; preds = %89
  %95 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %48, i64 %90
  store i8 1, ptr %95, align 1, !tbaa !11
  br label %.loopexit103

.loopexit103:                                     ; preds = %.preheader102.3, %89, %94, %55
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %96 = load i32, ptr @W, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next152, %97
  br i1 %98, label %55, label %._crit_edge109.loopexit, !llvm.loop !16

.preheader100:                                    ; preds = %.preheader100.preheader, %._crit_edge113
  %indvars.iv160 = phi i64 [ %indvars.iv.next161, %._crit_edge113 ], [ 0, %.preheader100.preheader ]
  %99 = load i32, ptr @W, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %.lr.ph112, label %._crit_edge113

._crit_edge115:                                   ; preds = %._crit_edge113, %20, %.preheader101
  call void @_Z8SS_stackv()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  store i8 0, ptr %2, 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) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  %101 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  br i1 %101, label %.preheader98, label %.lr.ph118.preheader

.lr.ph118.preheader:                              ; preds = %._crit_edge115
  %102 = load i32, ptr @_ZL2dx, align 16
  %103 = load i32, ptr @_ZL2dy, align 16
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %105 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %106 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %109 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph118

._crit_edge113:                                   ; preds = %.lr.ph112, %.preheader100
  %110 = 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.next161 = add nuw nsw i64 %indvars.iv160, 1
  %111 = load i32, ptr @H, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = icmp slt i64 %indvars.iv.next161, %112
  br i1 %113, label %.preheader100, label %._crit_edge115, !llvm.loop !17

.lr.ph112:                                        ; preds = %.preheader100, %.lr.ph112
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %.lr.ph112 ], [ 0, %.preheader100 ]
  %114 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %indvars.iv160, i64 %indvars.iv157
  %115 = load i8, ptr %114, align 1, !tbaa !11, !range !18, !noundef !19
  %116 = trunc nuw i8 %115 to i1
  %117 = select i1 %116, i8 35, i8 46
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %117)
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %119 = load i32, ptr @W, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %indvars.iv.next158, %120
  br i1 %121, label %.lr.ph112, label %._crit_edge113, !llvm.loop !20

.preheader98:                                     ; preds = %.loopexit99, %._crit_edge115
  %122 = load i32, ptr @H, align 4, !tbaa !5
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %.preheader97, label %._crit_edge123

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %.loopexit99
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %124) #7
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %127) #7
  %129 = load i32, ptr %128, align 4, !tbaa !5
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  %130 = sext i32 %126 to i64
  %131 = sext i32 %129 to i64
  %132 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %130, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !11, !range !18, !noundef !19
  %134 = trunc nuw i8 %133 to i1
  br i1 %134, label %.loopexit99, label %135

135:                                              ; preds = %.lr.ph118
  store i8 1, ptr %132, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %136 = add nsw i32 %102, %126
  store i32 %136, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %137 = add nsw i32 %103, %129
  store i32 %137, ptr %4, align 4, !tbaa !5
  %138 = call noundef zeroext i1 @_Z5validii(i32 noundef %136, i32 noundef %137)
  br i1 %138, label %139, label %152

139:                                              ; preds = %135
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %141, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !11, !range !18, !noundef !19
  %146 = trunc nuw i8 %145 to i1
  br i1 %146, label %152, label %147

147:                                              ; preds = %139
  %148 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %141, i64 %143
  %149 = load i8, ptr %148, align 1, !tbaa !11, !range !18, !noundef !19
  %150 = trunc nuw i8 %149 to i1
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  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") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @SS, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %152

152:                                              ; preds = %139, %151, %147, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %153 = add nsw i32 %104, %126
  store i32 %153, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %154 = add nsw i32 %105, %129
  store i32 %154, ptr %4, align 4, !tbaa !5
  %155 = call noundef zeroext i1 @_Z5validii(i32 noundef %153, i32 noundef %154)
  br i1 %155, label %156, label %169

156:                                              ; preds = %152
  %157 = load i32, ptr %3, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = load i32, ptr %4, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %158, i64 %160
  %162 = load i8, ptr %161, align 1, !tbaa !11, !range !18, !noundef !19
  %163 = trunc nuw i8 %162 to i1
  br i1 %163, label %169, label %164

164:                                              ; preds = %156
  %165 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %158, i64 %160
  %166 = load i8, ptr %165, align 1, !tbaa !11, !range !18, !noundef !19
  %167 = trunc nuw i8 %166 to i1
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  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") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @SS, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %169

169:                                              ; preds = %168, %164, %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %170 = add nsw i32 %106, %126
  store i32 %170, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %171 = add nsw i32 %107, %129
  store i32 %171, ptr %4, align 4, !tbaa !5
  %172 = call noundef zeroext i1 @_Z5validii(i32 noundef %170, i32 noundef %171)
  br i1 %172, label %173, label %186

173:                                              ; preds = %169
  %174 = load i32, ptr %3, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = load i32, ptr %4, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %175, i64 %177
  %179 = load i8, ptr %178, align 1, !tbaa !11, !range !18, !noundef !19
  %180 = trunc nuw i8 %179 to i1
  br i1 %180, label %186, label %181

181:                                              ; preds = %173
  %182 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %175, i64 %177
  %183 = load i8, ptr %182, align 1, !tbaa !11, !range !18, !noundef !19
  %184 = trunc nuw i8 %183 to i1
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  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") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @SS, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %186

186:                                              ; preds = %185, %181, %173, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %187 = add nsw i32 %108, %126
  store i32 %187, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %188 = add nsw i32 %109, %129
  store i32 %188, ptr %4, align 4, !tbaa !5
  %189 = call noundef zeroext i1 @_Z5validii(i32 noundef %187, i32 noundef %188)
  br i1 %189, label %190, label %.loopexit99.loopexit

190:                                              ; preds = %186
  %191 = load i32, ptr %3, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = load i32, ptr %4, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %192, i64 %194
  %196 = load i8, ptr %195, align 1, !tbaa !11, !range !18, !noundef !19
  %197 = trunc nuw i8 %196 to i1
  br i1 %197, label %.loopexit99.loopexit, label %198

198:                                              ; preds = %190
  %199 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %192, i64 %194
  %200 = load i8, ptr %199, align 1, !tbaa !11, !range !18, !noundef !19
  %201 = trunc nuw i8 %200 to i1
  br i1 %201, label %.loopexit99.loopexit, label %202

202:                                              ; preds = %198
  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") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @SS, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.loopexit99.loopexit

.loopexit99.loopexit:                             ; preds = %202, %198, %190, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %.loopexit99

.loopexit99:                                      ; preds = %.loopexit99.loopexit, %.lr.ph118
  %203 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @SS)
  br i1 %203, label %.preheader98, label %.lr.ph118, !llvm.loop !21

.preheader97:                                     ; preds = %.preheader98, %._crit_edge121
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %._crit_edge121 ], [ 0, %.preheader98 ]
  %204 = load i32, ptr @W, align 4, !tbaa !5
  %205 = icmp sgt i32 %204, 0
  br i1 %205, label %.lr.ph120, label %._crit_edge121

._crit_edge123:                                   ; preds = %._crit_edge121, %.preheader98
  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 @need, i64 12210), ptr noundef nonnull getelementptr inbounds (i8, ptr @need, i64 12210), ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  %206 = load i32, ptr @H, align 4, !tbaa !5
  %207 = icmp sgt i32 %206, 0
  br i1 %207, label %.preheader96.lr.ph, label %._crit_edge129

.preheader96.lr.ph:                               ; preds = %._crit_edge123
  %208 = load i32, ptr @W, align 4, !tbaa !5
  %209 = icmp sgt i32 %208, 0
  br i1 %209, label %.preheader96.preheader, label %._crit_edge129

.preheader96.preheader:                           ; preds = %.preheader96.lr.ph
  %210 = load i32, ptr @_ZL2dx, align 16
  %211 = load i32, ptr @_ZL2dy, align 16
  %212 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %213 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %214 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %215 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %216 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %217 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.preheader96

._crit_edge121:                                   ; preds = %.lr.ph120, %.preheader97
  %218 = 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.next170 = add nuw nsw i64 %indvars.iv169, 1
  %219 = load i32, ptr @H, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = icmp slt i64 %indvars.iv.next170, %220
  br i1 %221, label %.preheader97, label %._crit_edge123, !llvm.loop !22

.lr.ph120:                                        ; preds = %.preheader97, %.lr.ph120
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %.lr.ph120 ], [ 0, %.preheader97 ]
  %222 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %indvars.iv169, i64 %indvars.iv166
  %223 = load i8, ptr %222, align 1, !tbaa !11, !range !18, !noundef !19
  %224 = trunc nuw i8 %223 to i1
  %225 = select i1 %224, i8 86, i8 46
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %225)
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %227 = load i32, ptr @W, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = icmp slt i64 %indvars.iv.next167, %228
  br i1 %229, label %.lr.ph120, label %._crit_edge121, !llvm.loop !23

.preheader96:                                     ; preds = %.preheader96.preheader, %._crit_edge127
  %230 = phi i32 [ %206, %.preheader96.preheader ], [ %245, %._crit_edge127 ]
  %231 = phi i32 [ %208, %.preheader96.preheader ], [ %246, %._crit_edge127 ]
  %232 = phi i32 [ %208, %.preheader96.preheader ], [ %247, %._crit_edge127 ]
  %indvars.iv178 = phi i64 [ 0, %.preheader96.preheader ], [ %indvars.iv.next179, %._crit_edge127 ]
  %233 = icmp sgt i32 %232, 0
  br i1 %233, label %.lr.ph126, label %._crit_edge127

.lr.ph126:                                        ; preds = %.preheader96
  %234 = trunc nuw nsw i64 %indvars.iv178 to i32
  %235 = add nsw i32 %210, %234
  %236 = sext i32 %235 to i64
  %237 = add nsw i32 %212, %234
  %238 = sext i32 %237 to i64
  %239 = add nsw i32 %214, %234
  %240 = sext i32 %239 to i64
  %241 = add nsw i32 %216, %234
  %242 = sext i32 %241 to i64
  br label %250

._crit_edge129:                                   ; preds = %._crit_edge127, %.preheader96.lr.ph, %._crit_edge123
  call void @_Z10hashi_needv()
  %243 = load i32, ptr @H, align 4, !tbaa !5
  %244 = icmp sgt i32 %243, 0
  br i1 %244, label %.preheader94, label %._crit_edge141

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

._crit_edge127:                                   ; preds = %._crit_edge127.loopexit, %.preheader96
  %245 = phi i32 [ %.pre196, %._crit_edge127.loopexit ], [ %230, %.preheader96 ]
  %246 = phi i32 [ %292, %._crit_edge127.loopexit ], [ %231, %.preheader96 ]
  %247 = phi i32 [ %292, %._crit_edge127.loopexit ], [ %232, %.preheader96 ]
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %248 = sext i32 %245 to i64
  %249 = icmp slt i64 %indvars.iv.next179, %248
  br i1 %249, label %.preheader96, label %._crit_edge129, !llvm.loop !24

250:                                              ; preds = %.lr.ph126, %.loopexit
  %251 = phi i32 [ %231, %.lr.ph126 ], [ %292, %.loopexit ]
  %indvars.iv175 = phi i64 [ 0, %.lr.ph126 ], [ %indvars.iv.next176, %.loopexit ]
  %252 = getelementptr inbounds [110 x [110 x i8]], ptr @visited, i64 0, i64 %indvars.iv178, i64 %indvars.iv175
  %253 = load i8, ptr %252, align 1, !tbaa !11, !range !18, !noundef !19
  %254 = trunc nuw i8 %253 to i1
  br i1 %254, label %.preheader95.preheader, label %.loopexit

.preheader95.preheader:                           ; preds = %250
  %255 = trunc nuw nsw i64 %indvars.iv175 to i32
  %256 = add nsw i32 %211, %255
  %257 = call noundef zeroext i1 @_Z5validii(i32 noundef %235, i32 noundef %256)
  br i1 %257, label %258, label %.preheader95.1

258:                                              ; preds = %.preheader95.preheader
  %259 = sext i32 %256 to i64
  %260 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %236, i64 %259
  %261 = load i8, ptr %260, align 1, !tbaa !11, !range !18, !noundef !19
  %262 = trunc nuw i8 %261 to i1
  br i1 %262, label %263, label %.preheader95.1

263:                                              ; preds = %258
  %264 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %236, i64 %259
  store i8 1, ptr %264, align 1, !tbaa !11
  br label %.preheader95.1

.preheader95.1:                                   ; preds = %263, %258, %.preheader95.preheader
  %265 = add nsw i32 %213, %255
  %266 = call noundef zeroext i1 @_Z5validii(i32 noundef %237, i32 noundef %265)
  br i1 %266, label %267, label %.preheader95.2

267:                                              ; preds = %.preheader95.1
  %268 = sext i32 %265 to i64
  %269 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %238, i64 %268
  %270 = load i8, ptr %269, align 1, !tbaa !11, !range !18, !noundef !19
  %271 = trunc nuw i8 %270 to i1
  br i1 %271, label %272, label %.preheader95.2

272:                                              ; preds = %267
  %273 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %238, i64 %268
  store i8 1, ptr %273, align 1, !tbaa !11
  br label %.preheader95.2

.preheader95.2:                                   ; preds = %272, %267, %.preheader95.1
  %274 = add nsw i32 %215, %255
  %275 = call noundef zeroext i1 @_Z5validii(i32 noundef %239, i32 noundef %274)
  br i1 %275, label %276, label %.preheader95.3

276:                                              ; preds = %.preheader95.2
  %277 = sext i32 %274 to i64
  %278 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %240, i64 %277
  %279 = load i8, ptr %278, align 1, !tbaa !11, !range !18, !noundef !19
  %280 = trunc nuw i8 %279 to i1
  br i1 %280, label %281, label %.preheader95.3

281:                                              ; preds = %276
  %282 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %240, i64 %277
  store i8 1, ptr %282, align 1, !tbaa !11
  br label %.preheader95.3

.preheader95.3:                                   ; preds = %281, %276, %.preheader95.2
  %283 = add nsw i32 %217, %255
  %284 = call noundef zeroext i1 @_Z5validii(i32 noundef %241, i32 noundef %283)
  br i1 %284, label %285, label %.loopexit.loopexit

285:                                              ; preds = %.preheader95.3
  %286 = sext i32 %283 to i64
  %287 = getelementptr inbounds [110 x [110 x i8]], ptr @F, i64 0, i64 %242, i64 %286
  %288 = load i8, ptr %287, align 1, !tbaa !11, !range !18, !noundef !19
  %289 = trunc nuw i8 %288 to i1
  br i1 %289, label %290, label %.loopexit.loopexit

290:                                              ; preds = %285
  %291 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %242, i64 %286
  store i8 1, ptr %291, align 1, !tbaa !11
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %290, %285, %.preheader95.3
  %.pre195 = load i32, ptr @W, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %250
  %292 = phi i32 [ %.pre195, %.loopexit.loopexit ], [ %251, %250 ]
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %293 = sext i32 %292 to i64
  %294 = icmp slt i64 %indvars.iv.next176, %293
  br i1 %294, label %250, label %._crit_edge127.loopexit, !llvm.loop !25

.preheader94:                                     ; preds = %._crit_edge129, %._crit_edge132
  %indvars.iv184 = phi i64 [ %indvars.iv.next185, %._crit_edge132 ], [ 0, %._crit_edge129 ]
  %295 = load i32, ptr @W, align 4, !tbaa !5
  %296 = icmp sgt i32 %295, 0
  br i1 %296, label %.lr.ph131, label %._crit_edge132

.preheader93:                                     ; preds = %._crit_edge132
  %297 = icmp sgt i32 %313, 0
  br i1 %297, label %.preheader.lr.ph, label %._crit_edge141

.preheader.lr.ph:                                 ; preds = %.preheader93
  %298 = load i32, ptr @W, align 4, !tbaa !5
  %299 = icmp sgt i32 %298, 0
  br i1 %299, label %.preheader.us.preheader, label %._crit_edge141

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

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge137.us
  %indvars.iv190 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next191, %._crit_edge137.us ]
  %.077139.us = phi i32 [ 0, %.preheader.us.preheader ], [ %spec.select.us.lcssa, %._crit_edge137.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader.us
  %300 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.077139.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> [ %300, %vector.ph ], [ %305, %vector.body ]
  %vec.phi205 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %306, %vector.body ]
  %301 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %indvars.iv190, i64 %index
  %302 = getelementptr inbounds i8, ptr %301, i64 4
  %wide.load = load <4 x i8>, ptr %301, align 2, !tbaa !11
  %wide.load206 = load <4 x i8>, ptr %302, align 2, !tbaa !11
  %303 = zext <4 x i8> %wide.load to <4 x i32>
  %304 = zext <4 x i8> %wide.load206 to <4 x i32>
  %305 = add <4 x i32> %vec.phi, %303
  %306 = add <4 x i32> %vec.phi205, %304
  %index.next = add nuw i64 %index, 8
  %307 = icmp eq i64 %index.next, %n.vec
  br i1 %307, label %middle.block, label %vector.body, !llvm.loop !26

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

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us
  %indvars.iv187.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  %.1134.us.ph = phi i32 [ %.077139.us, %.preheader.us ], [ %308, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv187 = phi i64 [ %indvars.iv.next188, %scalar.ph ], [ %indvars.iv187.ph, %scalar.ph.preheader ]
  %.1134.us = phi i32 [ %spec.select.us, %scalar.ph ], [ %.1134.us.ph, %scalar.ph.preheader ]
  %309 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %indvars.iv190, i64 %indvars.iv187
  %310 = load i8, ptr %309, align 1, !tbaa !11, !range !18, !noundef !19
  %311 = zext nneg i8 %310 to i32
  %spec.select.us = add nsw i32 %.1134.us, %311
  %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next188, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge137.us, label %scalar.ph, !llvm.loop !29

._crit_edge137.us:                                ; preds = %scalar.ph, %middle.block
  %spec.select.us.lcssa = phi i32 [ %308, %middle.block ], [ %spec.select.us, %scalar.ph ]
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %exitcond194.not = icmp eq i64 %indvars.iv.next191, %wide.trip.count193
  br i1 %exitcond194.not, label %._crit_edge141, label %.preheader.us, !llvm.loop !30

._crit_edge132:                                   ; preds = %.lr.ph131, %.preheader94
  %312 = 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.next185 = add nuw nsw i64 %indvars.iv184, 1
  %313 = load i32, ptr @H, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = icmp slt i64 %indvars.iv.next185, %314
  br i1 %315, label %.preheader94, label %.preheader93, !llvm.loop !31

.lr.ph131:                                        ; preds = %.preheader94, %.lr.ph131
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %.lr.ph131 ], [ 0, %.preheader94 ]
  %316 = getelementptr inbounds [110 x [110 x i8]], ptr @need, i64 0, i64 %indvars.iv184, i64 %indvars.iv181
  %317 = load i8, ptr %316, align 1, !tbaa !11, !range !18, !noundef !19
  %318 = trunc nuw i8 %317 to i1
  %319 = select i1 %318, i8 78, i8 46
  %320 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i8 noundef signext %319)
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %321 = load i32, ptr @W, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = icmp slt i64 %indvars.iv.next182, %322
  br i1 %323, label %.lr.ph131, label %._crit_edge132, !llvm.loop !32

._crit_edge141:                                   ; preds = %._crit_edge137.us, %._crit_edge129, %.preheader.lr.ph, %.preheader93
  %.077.lcssa = phi i32 [ 0, %.preheader93 ], [ 0, %.preheader.lr.ph ], [ 0, %._crit_edge129 ], [ %spec.select.us.lcssa, %._crit_edge137.us ]
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.077.lcssa)
  %325 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %324, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %326

326:                                              ; preds = %._crit_edge141, %17
  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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_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 @_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(8) ptr @_ZNSt5stackISt5tupleIJiiEESt5dequeIS1_SaIS1_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 @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJRiS0_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS4_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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 = distinct !{!17, !10}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10, !14}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10, !27, !28}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !10, !28, !27}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}


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