; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/0904_AGC004 (C2)

; 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::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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_Z1AB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_Z1BB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = 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 norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [2 x [510 x [510 x i8]]], align 16
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::stack", align 8
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", 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) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %58, %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) #8
  br label %61

39:                                               ; preds = %34
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, 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)
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %45
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull align 8 dereferenceable(32) %46)
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %52
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %55
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %53)
  br label %58

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

61:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %71, %61
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = load i32, ptr @W, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %74

67:                                               ; preds = %62
  %68 = load i32, ptr %3, 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) @_Z1AB5cxx11, i64 noundef %69)
  store i8 35, ptr %70, align 1, !tbaa !11
  br label %71

71:                                               ; preds = %67
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %3, align 4, !tbaa !5
  br label %62, !llvm.loop !12

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

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

79:                                               ; preds = %75
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %123

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  store i8 46, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %81 = load i32, ptr @H, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %116, %80
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = icmp sge i32 %84, 0
  br i1 %85, label %87, label %86

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

87:                                               ; preds = %83
  %88 = load i8, ptr %6, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 46
  br i1 %90, label %91, label %102

91:                                               ; preds = %87
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %93
  %95 = load i32, ptr %4, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %94, i64 noundef %96)
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = sext i8 %98 to i32
  %100 = icmp eq i32 %99, 35
  br i1 %100, label %101, label %102

101:                                              ; preds = %91
  store i8 35, ptr %6, align 1, !tbaa !11
  br label %115

102:                                              ; preds = %91, %87
  %103 = load i8, ptr %6, align 1, !tbaa !11
  %104 = sext i8 %103 to i32
  %105 = icmp eq i32 %104, 35
  br i1 %105, label %106, label %114

106:                                              ; preds = %102
  %107 = load i8, ptr %6, align 1, !tbaa !11
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %109
  %111 = load i32, ptr %4, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %110, i64 noundef %112)
  store i8 %107, ptr %113, align 1, !tbaa !11
  br label %114

114:                                              ; preds = %106, %102
  br label %115

115:                                              ; preds = %114, %101
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = add nsw i32 %117, -1
  store i32 %118, ptr %7, align 4, !tbaa !5
  br label %83, !llvm.loop !13

119:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %120

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

123:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %224, %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = load i32, ptr @H, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %227

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %220, %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load i32, ptr @W, align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %223

135:                                              ; preds = %130
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %137
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %138, i64 noundef %140)
  %142 = load i8, ptr %141, align 1, !tbaa !11
  %143 = sext i8 %142 to i32
  %144 = icmp eq i32 %143, 46
  br i1 %144, label %145, label %162

145:                                              ; preds = %135
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %147
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %148, i64 noundef %150)
  %152 = load i8, ptr %151, align 1, !tbaa !11
  %153 = sext i8 %152 to i32
  %154 = icmp eq i32 %153, 46
  br i1 %154, label %155, label %162

155:                                              ; preds = %145
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %157
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %158, i64 noundef %160)
  store i8 35, ptr %161, align 1, !tbaa !11
  br label %219

162:                                              ; preds = %145, %135
  %163 = load i32, ptr %8, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %164
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %165, i64 noundef %167)
  %169 = load i8, ptr %168, align 1, !tbaa !11
  %170 = sext i8 %169 to i32
  %171 = icmp eq i32 %170, 46
  br i1 %171, label %172, label %189

172:                                              ; preds = %162
  %173 = load i32, ptr %8, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %174
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %175, i64 noundef %177)
  %179 = load i8, ptr %178, align 1, !tbaa !11
  %180 = sext i8 %179 to i32
  %181 = icmp eq i32 %180, 35
  br i1 %181, label %182, label %189

182:                                              ; preds = %172
  %183 = load i32, ptr %8, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %184
  %186 = load i32, ptr %9, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %185, i64 noundef %187)
  store i8 46, ptr %188, align 1, !tbaa !11
  br label %218

189:                                              ; preds = %172, %162
  %190 = load i32, ptr %8, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %191
  %193 = load i32, ptr %9, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %192, i64 noundef %194)
  %196 = load i8, ptr %195, align 1, !tbaa !11
  %197 = sext i8 %196 to i32
  %198 = icmp eq i32 %197, 35
  br i1 %198, label %199, label %210

199:                                              ; preds = %189
  %200 = load i32, ptr %8, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %201
  %203 = load i32, ptr %9, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %202, i64 noundef %204)
  %206 = load i8, ptr %205, align 1, !tbaa !11
  %207 = sext i8 %206 to i32
  %208 = icmp eq i32 %207, 46
  br i1 %208, label %209, label %210

209:                                              ; preds = %199
  br label %217

210:                                              ; preds = %199, %189
  %211 = load i32, ptr %8, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %212
  %214 = load i32, ptr %9, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %213, i64 noundef %215)
  store i8 35, ptr %216, align 1, !tbaa !11
  br label %217

217:                                              ; preds = %210, %209
  br label %218

218:                                              ; preds = %217, %182
  br label %219

219:                                              ; preds = %218, %155
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %9, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !15

223:                                              ; preds = %134
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %8, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %8, align 4, !tbaa !5
  br label %124, !llvm.loop !16

227:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 520200, ptr %10) #8
  %228 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 0
  %229 = getelementptr inbounds [510 x [510 x i8]], ptr %228, i64 0, i64 0
  %230 = getelementptr inbounds [510 x i8], ptr %229, i64 0, i64 0
  %231 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 0
  %232 = getelementptr inbounds [510 x [510 x i8]], ptr %231, i64 0, i64 0
  %233 = getelementptr inbounds [510 x i8], ptr %232, i64 0, i64 0
  %234 = getelementptr inbounds i8, ptr %233, i64 520200
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  store i8 0, ptr %11, align 1, !tbaa !17
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %230, ptr noundef %234, ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %467, %227
  %236 = load i32, ptr %12, align 4, !tbaa !5
  %237 = icmp slt i32 %236, 2
  br i1 %237, label %239, label %238

238:                                              ; preds = %235
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %471

239:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  %240 = load i32, ptr %12, align 4, !tbaa !5
  %241 = icmp eq i32 %240, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  br i1 %241, label %242, label %246

242:                                              ; preds = %239
  store i32 0, ptr %15, align 4, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !5
  %243 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %244 unwind label %292

244:                                              ; preds = %242
  store i64 %243, ptr %14, align 4
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %245 unwind label %292

245:                                              ; preds = %244
  br label %252

246:                                              ; preds = %239
  %247 = load i32, ptr @H, align 4, !tbaa !5
  %248 = sub nsw i32 %247, 1
  store i32 %248, ptr %20, align 4, !tbaa !5
  store i32 0, ptr %21, align 4, !tbaa !5
  %249 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %250 unwind label %296

250:                                              ; preds = %246
  store i64 %249, ptr %19, align 4
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %251 unwind label %296

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %253

253:                                              ; preds = %384, %252
  %254 = invoke noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %255 unwind label %301

255:                                              ; preds = %253
  %256 = xor i1 %254, true
  br i1 %256, label %257, label %387

257:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %258 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %259 unwind label %305

259:                                              ; preds = %257
  %260 = getelementptr inbounds %"struct.std::pair", ptr %258, i32 0, i32 0
  %261 = load i32, ptr %260, align 4, !tbaa !19
  store i32 %261, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %262 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %263 unwind label %309

263:                                              ; preds = %259
  %264 = getelementptr inbounds %"struct.std::pair", ptr %262, i32 0, i32 1
  %265 = load i32, ptr %264, align 4, !tbaa !21
  store i32 %265, ptr %23, align 4, !tbaa !5
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %266 unwind label %309

266:                                              ; preds = %263
  %267 = load i32, ptr %12, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 %268
  %270 = load i32, ptr %22, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [510 x [510 x i8]], ptr %269, i64 0, i64 %271
  %273 = load i32, ptr %23, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [510 x i8], ptr %272, i64 0, i64 %274
  %276 = load i8, ptr %275, align 1, !tbaa !17, !range !22, !noundef !23
  %277 = trunc i8 %276 to i1
  br i1 %277, label %384, label %278

278:                                              ; preds = %266
  %279 = load i32, ptr %12, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 %280
  %282 = load i32, ptr %22, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [510 x [510 x i8]], ptr %281, i64 0, i64 %283
  %285 = load i32, ptr %23, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [510 x i8], ptr %284, i64 0, i64 %286
  store i8 1, ptr %287, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %288

288:                                              ; preds = %379, %278
  %289 = load i32, ptr %24, align 4, !tbaa !5
  %290 = icmp slt i32 %289, 4
  br i1 %290, label %313, label %291

291:                                              ; preds = %288
  store i32 25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %383

292:                                              ; preds = %244, %242
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %17, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %18, align 4
  br label %300

296:                                              ; preds = %250, %246
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %17, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %300

300:                                              ; preds = %296, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %470

301:                                              ; preds = %253
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %17, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %18, align 4
  br label %470

305:                                              ; preds = %257
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %17, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %18, align 4
  br label %386

309:                                              ; preds = %263, %259
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %17, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %18, align 4
  br label %385

313:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %314 = load i32, ptr %22, align 4, !tbaa !5
  %315 = load i32, ptr %24, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = add nsw i32 %314, %318
  store i32 %319, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %320 = load i32, ptr %23, align 4, !tbaa !5
  %321 = load i32, ptr %24, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = add nsw i32 %320, %324
  store i32 %325, ptr %26, align 4, !tbaa !5
  %326 = load i32, ptr %25, align 4, !tbaa !5
  %327 = load i32, ptr %26, align 4, !tbaa !5
  %328 = call noundef zeroext i1 @_Z5validii(i32 noundef %326, i32 noundef %327)
  br i1 %328, label %329, label %378

329:                                              ; preds = %313
  %330 = load i32, ptr %12, align 4, !tbaa !5
  %331 = icmp eq i32 %330, 0
  br i1 %331, label %332, label %343

332:                                              ; preds = %329
  %333 = load i32, ptr %25, align 4, !tbaa !5
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %334
  %336 = load i32, ptr %26, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %335, i64 noundef %337)
          to label %339 unwind label %370

339:                                              ; preds = %332
  %340 = load i8, ptr %338, align 1, !tbaa !11
  %341 = sext i8 %340 to i32
  %342 = icmp eq i32 %341, 35
  br i1 %342, label %354, label %378

343:                                              ; preds = %329
  %344 = load i32, ptr %25, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %345
  %347 = load i32, ptr %26, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %346, i64 noundef %348)
          to label %350 unwind label %370

350:                                              ; preds = %343
  %351 = load i8, ptr %349, align 1, !tbaa !11
  %352 = sext i8 %351 to i32
  %353 = icmp eq i32 %352, 35
  br i1 %353, label %354, label %378

354:                                              ; preds = %350, %339
  %355 = load i32, ptr %12, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 %356
  %358 = load i32, ptr %25, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [510 x [510 x i8]], ptr %357, i64 0, i64 %359
  %361 = load i32, ptr %26, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [510 x i8], ptr %360, i64 0, i64 %362
  %364 = load i8, ptr %363, align 1, !tbaa !17, !range !22, !noundef !23
  %365 = trunc i8 %364 to i1
  br i1 %365, label %378, label %366

366:                                              ; preds = %354
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %367 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %368 unwind label %374

368:                                              ; preds = %366
  store i64 %367, ptr %27, align 4
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %369 unwind label %374

369:                                              ; preds = %368
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %378

370:                                              ; preds = %343, %332
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %17, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %18, align 4
  br label %382

374:                                              ; preds = %368, %366
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %17, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %382

378:                                              ; preds = %369, %354, %350, %339, %313
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %379

379:                                              ; preds = %378
  %380 = load i32, ptr %24, align 4, !tbaa !5
  %381 = add nsw i32 %380, 1
  store i32 %381, ptr %24, align 4, !tbaa !5
  br label %288, !llvm.loop !24

382:                                              ; preds = %374, %370
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %385

383:                                              ; preds = %291
  br label %384

384:                                              ; preds = %383, %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %253, !llvm.loop !25

385:                                              ; preds = %382, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %386

386:                                              ; preds = %385, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %470

387:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %388

388:                                              ; preds = %463, %387
  %389 = load i32, ptr %28, align 4, !tbaa !5
  %390 = load i32, ptr @H, align 4, !tbaa !5
  %391 = icmp slt i32 %389, %390
  br i1 %391, label %393, label %392

392:                                              ; preds = %388
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %466

393:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %394

394:                                              ; preds = %459, %393
  %395 = load i32, ptr %29, align 4, !tbaa !5
  %396 = load i32, ptr @W, align 4, !tbaa !5
  %397 = icmp slt i32 %395, %396
  br i1 %397, label %399, label %398

398:                                              ; preds = %394
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %462

399:                                              ; preds = %394
  %400 = load i32, ptr %12, align 4, !tbaa !5
  %401 = icmp eq i32 %400, 0
  br i1 %401, label %402, label %413

402:                                              ; preds = %399
  %403 = load i32, ptr %28, align 4, !tbaa !5
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %404
  %406 = load i32, ptr %29, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %405, i64 noundef %407)
          to label %409 unwind label %454

409:                                              ; preds = %402
  %410 = load i8, ptr %408, align 1, !tbaa !11
  %411 = sext i8 %410 to i32
  %412 = icmp eq i32 %411, 35
  br i1 %412, label %424, label %458

413:                                              ; preds = %399
  %414 = load i32, ptr %28, align 4, !tbaa !5
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %415
  %417 = load i32, ptr %29, align 4, !tbaa !5
  %418 = sext i32 %417 to i64
  %419 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %416, i64 noundef %418)
          to label %420 unwind label %454

420:                                              ; preds = %413
  %421 = load i8, ptr %419, align 1, !tbaa !11
  %422 = sext i8 %421 to i32
  %423 = icmp eq i32 %422, 35
  br i1 %423, label %424, label %458

424:                                              ; preds = %420, %409
  %425 = load i32, ptr %12, align 4, !tbaa !5
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %10, i64 0, i64 %426
  %428 = load i32, ptr %28, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [510 x [510 x i8]], ptr %427, i64 0, i64 %429
  %431 = load i32, ptr %29, align 4, !tbaa !5
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [510 x i8], ptr %430, i64 0, i64 %432
  %434 = load i8, ptr %433, align 1, !tbaa !17, !range !22, !noundef !23
  %435 = trunc i8 %434 to i1
  br i1 %435, label %458, label %436

436:                                              ; preds = %424
  %437 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
          to label %438 unwind label %454

438:                                              ; preds = %436
  %439 = load i32, ptr %12, align 4, !tbaa !5
  %440 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %437, i32 noundef %439)
          to label %441 unwind label %454

441:                                              ; preds = %438
  %442 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %440, ptr noundef @.str.6)
          to label %443 unwind label %454

443:                                              ; preds = %441
  %444 = load i32, ptr %28, align 4, !tbaa !5
  %445 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %442, i32 noundef %444)
          to label %446 unwind label %454

446:                                              ; preds = %443
  %447 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %445, ptr noundef @.str.7)
          to label %448 unwind label %454

448:                                              ; preds = %446
  %449 = load i32, ptr %29, align 4, !tbaa !5
  %450 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %447, i32 noundef %449)
          to label %451 unwind label %454

451:                                              ; preds = %448
  %452 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %450, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %453 unwind label %454

453:                                              ; preds = %451
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

454:                                              ; preds = %451, %448, %446, %443, %441, %438, %436, %413, %402
  %455 = landingpad { ptr, i32 }
          cleanup
  %456 = extractvalue { ptr, i32 } %455, 0
  store ptr %456, ptr %17, align 8
  %457 = extractvalue { ptr, i32 } %455, 1
  store i32 %457, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %470

458:                                              ; preds = %424, %420, %409
  br label %459

459:                                              ; preds = %458
  %460 = load i32, ptr %29, align 4, !tbaa !5
  %461 = add nsw i32 %460, 1
  store i32 %461, ptr %29, align 4, !tbaa !5
  br label %394, !llvm.loop !26

462:                                              ; preds = %398
  br label %463

463:                                              ; preds = %462
  %464 = load i32, ptr %28, align 4, !tbaa !5
  %465 = add nsw i32 %464, 1
  store i32 %465, ptr %28, align 4, !tbaa !5
  br label %388, !llvm.loop !27

466:                                              ; preds = %392
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #8
  br label %467

467:                                              ; preds = %466
  %468 = load i32, ptr %12, align 4, !tbaa !5
  %469 = add nsw i32 %468, 1
  store i32 %469, ptr %12, align 4, !tbaa !5
  br label %235, !llvm.loop !28

470:                                              ; preds = %454, %386, %301, %300
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 520200, ptr %10) #8
  br label %503

471:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %472

472:                                              ; preds = %483, %471
  %473 = load i32, ptr %30, align 4, !tbaa !5
  %474 = load i32, ptr @H, align 4, !tbaa !5
  %475 = icmp slt i32 %473, %474
  br i1 %475, label %477, label %476

476:                                              ; preds = %472
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %486

477:                                              ; preds = %472
  %478 = load i32, ptr %30, align 4, !tbaa !5
  %479 = sext i32 %478 to i64
  %480 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %479
  %481 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %480)
  %482 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %481, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %483

483:                                              ; preds = %477
  %484 = load i32, ptr %30, align 4, !tbaa !5
  %485 = add nsw i32 %484, 1
  store i32 %485, ptr %30, align 4, !tbaa !5
  br label %472, !llvm.loop !29

486:                                              ; preds = %476
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %487

487:                                              ; preds = %498, %486
  %488 = load i32, ptr %31, align 4, !tbaa !5
  %489 = load i32, ptr @H, align 4, !tbaa !5
  %490 = icmp slt i32 %488, %489
  br i1 %490, label %492, label %491

491:                                              ; preds = %487
  store i32 37, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %501

492:                                              ; preds = %487
  %493 = load i32, ptr %31, align 4, !tbaa !5
  %494 = sext i32 %493 to i64
  %495 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %494
  %496 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %495)
  %497 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %496, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %498

498:                                              ; preds = %492
  %499 = load i32, ptr %31, align 4, !tbaa !5
  %500 = add nsw i32 %499, 1
  store i32 %500, ptr %31, align 4, !tbaa !5
  br label %487, !llvm.loop !30

501:                                              ; preds = %491
  call void @llvm.lifetime.end.p0(i64 520200, ptr %10) #8
  %502 = load i32, ptr %1, align 4
  ret i32 %502

503:                                              ; preds = %470
  %504 = load ptr, ptr %17, align 8
  %505 = load i32, ptr %18, align 4
  %506 = insertvalue { ptr, i32 } poison, ptr %504, 0
  %507 = insertvalue { ptr, i32 } %506, i32 %505, 1
  resume { ptr, i32 } %507
}

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

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

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)) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!21 = !{!20, !6, i64 4}
!22 = !{i8 0, i8 2}
!23 = !{}
!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}


; 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::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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_Z1AB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_Z1BB5cxx11 = external dso_local global [510 x %"class.std::__cxx11::basic_string"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca [2 x [510 x [510 x i8]]], align 16
  %2 = alloca i8, align 1
  %3 = alloca %"class.std::stack", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = 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)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %15 = load i32, ptr @H, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %.preheader108

.preheader108:                                    ; preds = %.lr.ph, %0
  %.pre211214 = phi i32 [ %15, %0 ], [ %25, %.lr.ph ]
  %17 = load i32, ptr @W, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph117, label %.preheader106

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

.preheader107:                                    ; preds = %.lr.ph117
  %.pre211.pre = load i32, ptr @H, align 4, !tbaa !5
  %28 = icmp sgt i32 %31, 0
  br i1 %28, label %.lr.ph123, label %.preheader106

.lr.ph123:                                        ; preds = %.preheader107
  %29 = icmp sgt i32 %.pre211.pre, 0
  br i1 %29, label %.lr.ph123.split, label %._crit_edge128

.lr.ph117:                                        ; preds = %.preheader108, %.lr.ph117
  %indvars.iv172 = phi i64 [ %indvars.iv.next173, %.lr.ph117 ], [ 0, %.preheader108 ]
  %30 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1AB5cxx11, i64 noundef %indvars.iv172)
  store i8 35, ptr %30, align 1, !tbaa !11
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %31 = load i32, ptr @W, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next173, %32
  br i1 %33, label %.lr.ph117, label %.preheader107, !llvm.loop !12

.preheader106:                                    ; preds = %._crit_edge, %.preheader108, %.preheader107
  %34 = phi i32 [ %31, %.preheader107 ], [ %17, %.preheader108 ], [ %42, %._crit_edge ]
  %35 = phi i32 [ %.pre211.pre, %.preheader107 ], [ %.pre211214, %.preheader108 ], [ %.pr, %._crit_edge ]
  %36 = icmp sgt i32 %35, 0
  %37 = icmp sgt i32 %34, 0
  %or.cond = and i1 %36, %37
  br i1 %or.cond, label %.preheader105, label %._crit_edge128

.lr.ph123.split:                                  ; preds = %.lr.ph123, %._crit_edge
  %38 = phi i32 [ %.pr, %._crit_edge ], [ %.pre211.pre, %.lr.ph123 ]
  %39 = phi i32 [ %42, %._crit_edge ], [ %31, %.lr.ph123 ]
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %._crit_edge ], [ 0, %.lr.ph123 ]
  %40 = icmp sgt i32 %38, 0
  br i1 %40, label %.lr.ph121, label %._crit_edge

.lr.ph121:                                        ; preds = %.lr.ph123.split
  %41 = zext nneg i32 %38 to i64
  br label %45

._crit_edge.loopexit:                             ; preds = %54
  %.pre = load i32, ptr @W, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph123.split
  %42 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %39, %.lr.ph123.split ]
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next178, %43
  %.pr = load i32, ptr @H, align 4, !tbaa !5
  br i1 %44, label %.lr.ph123.split, label %.preheader106, !llvm.loop !13

45:                                               ; preds = %.lr.ph121, %54
  %indvars.iv175 = phi i64 [ %41, %.lr.ph121 ], [ %indvars.iv.next176, %54 ]
  %.096119 = phi i8 [ 46, %.lr.ph121 ], [ %.197, %54 ]
  %indvars.iv.next176 = add nsw i64 %indvars.iv175, -1
  switch i8 %.096119, label %54 [
    i8 46, label %46
    i8 35, label %51
  ]

46:                                               ; preds = %45
  %47 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv.next176
  %48 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %47, i64 noundef %indvars.iv177)
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = icmp eq i8 %49, 35
  %spec.select = select i1 %50, i8 35, i8 46
  br label %54

51:                                               ; preds = %45
  %52 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv.next176
  %53 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %52, i64 noundef %indvars.iv177)
  store i8 35, ptr %53, align 1, !tbaa !11
  br label %54

54:                                               ; preds = %46, %45, %51
  %.197 = phi i8 [ 35, %51 ], [ %.096119, %45 ], [ %spec.select, %46 ]
  %55 = icmp ugt i64 %indvars.iv175, 1
  br i1 %55, label %45, label %._crit_edge.loopexit, !llvm.loop !15

.preheader105:                                    ; preds = %.preheader106, %._crit_edge126
  %56 = phi i32 [ %78, %._crit_edge126 ], [ %35, %.preheader106 ]
  %57 = phi i32 [ %79, %._crit_edge126 ], [ %34, %.preheader106 ]
  %indvars.iv183 = phi i64 [ %indvars.iv.next184, %._crit_edge126 ], [ 0, %.preheader106 ]
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph125, label %._crit_edge126

.lr.ph125:                                        ; preds = %.preheader105
  %59 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv183
  %60 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv183
  br label %82

._crit_edge128:                                   ; preds = %._crit_edge126, %.lr.ph123, %.preheader106
  call void @llvm.lifetime.start.p0(i64 520200, ptr nonnull %1) #8
  %61 = getelementptr inbounds i8, ptr %1, i64 520200
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8
  store i8 0, ptr %2, align 1, !tbaa !16
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %1, ptr noundef nonnull %61, ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  %62 = load i32, ptr @_ZL2dx, align 16
  %63 = load i32, ptr @_ZL2dy, align 16
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  %70 = load i32, ptr @_ZL2dx, align 16
  %71 = load i32, ptr @_ZL2dy, align 16
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %113

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

._crit_edge126:                                   ; preds = %._crit_edge126.loopexit, %.preheader105
  %78 = phi i32 [ %.pre212, %._crit_edge126.loopexit ], [ %56, %.preheader105 ]
  %79 = phi i32 [ %108, %._crit_edge126.loopexit ], [ %57, %.preheader105 ]
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %80 = sext i32 %78 to i64
  %81 = icmp slt i64 %indvars.iv.next184, %80
  br i1 %81, label %.preheader105, label %._crit_edge128, !llvm.loop !18

82:                                               ; preds = %.lr.ph125, %107
  %indvars.iv180 = phi i64 [ 0, %.lr.ph125 ], [ %indvars.iv.next181, %107 ]
  %83 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %indvars.iv180)
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = icmp eq i8 %84, 46
  br i1 %85, label %86, label %90

86:                                               ; preds = %82
  %87 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %60, i64 noundef %indvars.iv180)
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = icmp eq i8 %88, 46
  br i1 %89, label %.sink.split, label %90

90:                                               ; preds = %86, %82
  %91 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %indvars.iv180)
  %92 = load i8, ptr %91, align 1, !tbaa !11
  %93 = icmp eq i8 %92, 46
  br i1 %93, label %94, label %98

94:                                               ; preds = %90
  %95 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %60, i64 noundef %indvars.iv180)
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = icmp eq i8 %96, 35
  br i1 %97, label %.sink.split, label %98

98:                                               ; preds = %94, %90
  %99 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %indvars.iv180)
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = icmp eq i8 %100, 35
  br i1 %101, label %102, label %.sink.split

102:                                              ; preds = %98
  %103 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %60, i64 noundef %indvars.iv180)
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = icmp eq i8 %104, 46
  br i1 %105, label %107, label %.sink.split

.sink.split:                                      ; preds = %98, %102, %94, %86
  %.sink = phi i8 [ 35, %86 ], [ 46, %94 ], [ 35, %102 ], [ 35, %98 ]
  %106 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %indvars.iv180)
  store i8 %.sink, ptr %106, align 1, !tbaa !11
  br label %107

107:                                              ; preds = %.sink.split, %102
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %108 = load i32, ptr @W, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = icmp slt i64 %indvars.iv.next181, %109
  br i1 %110, label %82, label %._crit_edge126.loopexit, !llvm.loop !19

.preheader102:                                    ; preds = %._crit_edge145
  %111 = load i32, ptr @H, align 4, !tbaa !5
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.lr.ph149, label %._crit_edge152

113:                                              ; preds = %._crit_edge128, %._crit_edge145
  %114 = phi i1 [ true, %._crit_edge128 ], [ false, %._crit_edge145 ]
  %indvars.iv201 = phi i64 [ 0, %._crit_edge128 ], [ 1, %._crit_edge145 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  br i1 %114, label %115, label %118

115:                                              ; preds = %113
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  %116 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %117 unwind label %254

117:                                              ; preds = %115
  store i64 %116, ptr %4, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %123 unwind label %254

118:                                              ; preds = %113
  %119 = load i32, ptr @H, align 4, !tbaa !5
  %120 = add nsw i32 %119, -1
  store i32 %120, ptr %8, align 4, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !5
  %121 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %122 unwind label %256

122:                                              ; preds = %118
  store i64 %121, ptr %7, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %.thread unwind label %256

123:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %124 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %124, label %.preheader104, label %.lr.ph133

.thread:                                          ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %125 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %125, label %.preheader104, label %.lr.ph133.split.preheader

.lr.ph133:                                        ; preds = %123
  br i1 %114, label %.lr.ph133.split.us, label %.lr.ph133.split.preheader

.lr.ph133.split.preheader:                        ; preds = %.thread, %.lr.ph133
  br label %.lr.ph133.split

.lr.ph133.split.us:                               ; preds = %.lr.ph133, %.loopexit.split.us.us
  %126 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %127 = load i32, ptr %126, align 4, !tbaa !20
  %128 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %129 = getelementptr inbounds i8, ptr %128, i64 4
  %130 = load i32, ptr %129, align 4, !tbaa !22
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %131 = sext i32 %127 to i64
  %132 = sext i32 %130 to i64
  %133 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %131, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !16, !range !23, !noundef !24
  %135 = trunc nuw i8 %134 to i1
  br i1 %135, label %.loopexit.split.us.us, label %.split.us.us

.split.us.us:                                     ; preds = %.lr.ph133.split.us
  store i8 1, ptr %133, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %136 = add nsw i32 %70, %127
  store i32 %136, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %137 = add nsw i32 %71, %130
  store i32 %137, ptr %11, align 4, !tbaa !5
  %138 = call noundef zeroext i1 @_Z5validii(i32 noundef %136, i32 noundef %137)
  br i1 %138, label %140, label %161

.loopexit.split.us.us:                            ; preds = %.loopexit.split.us.us.loopexit, %.lr.ph133.split.us
  %139 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %139, label %.preheader104, label %.lr.ph133.split.us, !llvm.loop !25

140:                                              ; preds = %.split.us.us
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %143, i64 noundef %145)
  %147 = load i8, ptr %146, align 1, !tbaa !11
  %148 = icmp eq i8 %147, 35
  br i1 %148, label %149, label %161

149:                                              ; preds = %140
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = load i32, ptr %11, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %151, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !16, !range !23, !noundef !24
  %156 = trunc nuw i8 %155 to i1
  br i1 %156, label %161, label %157

157:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %158 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %159 unwind label %.split131.us.split.us

159:                                              ; preds = %157
  store i64 %158, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %160 unwind label %.split131.us.split.us

160:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %161

161:                                              ; preds = %160, %149, %140, %.split.us.us
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %162 = add nsw i32 %72, %127
  store i32 %162, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %163 = add nsw i32 %73, %130
  store i32 %163, ptr %11, align 4, !tbaa !5
  %164 = call noundef zeroext i1 @_Z5validii(i32 noundef %162, i32 noundef %163)
  br i1 %164, label %165, label %186

165:                                              ; preds = %161
  %166 = load i32, ptr %10, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %167
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %168, i64 noundef %170)
  %172 = load i8, ptr %171, align 1, !tbaa !11
  %173 = icmp eq i8 %172, 35
  br i1 %173, label %174, label %186

174:                                              ; preds = %165
  %175 = load i32, ptr %10, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = load i32, ptr %11, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %176, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !16, !range !23, !noundef !24
  %181 = trunc nuw i8 %180 to i1
  br i1 %181, label %186, label %182

182:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %183 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %184 unwind label %.split131.us.split.us

184:                                              ; preds = %182
  store i64 %183, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %185 unwind label %.split131.us.split.us

185:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %186

186:                                              ; preds = %185, %174, %165, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %187 = add nsw i32 %74, %127
  store i32 %187, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %188 = add nsw i32 %75, %130
  store i32 %188, ptr %11, align 4, !tbaa !5
  %189 = call noundef zeroext i1 @_Z5validii(i32 noundef %187, i32 noundef %188)
  br i1 %189, label %190, label %211

190:                                              ; preds = %186
  %191 = load i32, ptr %10, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %192
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %193, i64 noundef %195)
  %197 = load i8, ptr %196, align 1, !tbaa !11
  %198 = icmp eq i8 %197, 35
  br i1 %198, label %199, label %211

199:                                              ; preds = %190
  %200 = load i32, ptr %10, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = load i32, ptr %11, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %201, i64 %203
  %205 = load i8, ptr %204, align 1, !tbaa !16, !range !23, !noundef !24
  %206 = trunc nuw i8 %205 to i1
  br i1 %206, label %211, label %207

207:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %208 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %209 unwind label %.split131.us.split.us

209:                                              ; preds = %207
  store i64 %208, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %210 unwind label %.split131.us.split.us

210:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %211

211:                                              ; preds = %210, %199, %190, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %212 = add nsw i32 %76, %127
  store i32 %212, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %213 = add nsw i32 %77, %130
  store i32 %213, ptr %11, align 4, !tbaa !5
  %214 = call noundef zeroext i1 @_Z5validii(i32 noundef %212, i32 noundef %213)
  br i1 %214, label %215, label %.loopexit.split.us.us.loopexit

215:                                              ; preds = %211
  %216 = load i32, ptr %10, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %217
  %219 = load i32, ptr %11, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %218, i64 noundef %220)
  %222 = load i8, ptr %221, align 1, !tbaa !11
  %223 = icmp eq i8 %222, 35
  br i1 %223, label %224, label %.loopexit.split.us.us.loopexit

224:                                              ; preds = %215
  %225 = load i32, ptr %10, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = load i32, ptr %11, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %226, i64 %228
  %230 = load i8, ptr %229, align 1, !tbaa !16, !range !23, !noundef !24
  %231 = trunc nuw i8 %230 to i1
  br i1 %231, label %.loopexit.split.us.us.loopexit, label %232

232:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %233 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %234 unwind label %.split131.us.split.us

234:                                              ; preds = %232
  store i64 %233, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %235 unwind label %.split131.us.split.us

235:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %.loopexit.split.us.us.loopexit

.loopexit.split.us.us.loopexit:                   ; preds = %235, %224, %215, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %.loopexit.split.us.us

.split131.us.split.us:                            ; preds = %234, %232, %209, %207, %184, %182, %159, %157
  %236 = landingpad { ptr, i32 }
          cleanup
  br label %281

.preheader104:                                    ; preds = %.loopexit.split, %.loopexit.split.us.us, %.thread, %123
  %237 = load i32, ptr @H, align 4, !tbaa !5
  %238 = icmp sgt i32 %237, 0
  %239 = load i32, ptr @W, align 4
  %240 = icmp sgt i32 %239, 0
  %or.cond237 = select i1 %238, i1 %240, i1 false
  br i1 %or.cond237, label %.preheader103, label %._crit_edge145

.lr.ph133.split:                                  ; preds = %.lr.ph133.split.preheader, %.loopexit.split
  %241 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %242 = load i32, ptr %241, align 4, !tbaa !20
  %243 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %244 = getelementptr inbounds i8, ptr %243, i64 4
  %245 = load i32, ptr %244, align 4, !tbaa !22
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %246 = sext i32 %242 to i64
  %247 = sext i32 %245 to i64
  %248 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %246, i64 %247
  %249 = load i8, ptr %248, align 1, !tbaa !16, !range !23, !noundef !24
  %250 = trunc nuw i8 %249 to i1
  br i1 %250, label %.loopexit.split, label %.split

.split:                                           ; preds = %.lr.ph133.split
  store i8 1, ptr %248, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %251 = add nsw i32 %62, %242
  store i32 %251, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %252 = add nsw i32 %63, %245
  store i32 %252, ptr %11, align 4, !tbaa !5
  %253 = call noundef zeroext i1 @_Z5validii(i32 noundef %251, i32 noundef %252)
  br i1 %253, label %259, label %282

254:                                              ; preds = %117, %115
  %255 = landingpad { ptr, i32 }
          cleanup
  br label %258

256:                                              ; preds = %122, %118
  %257 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %258

258:                                              ; preds = %256, %254
  %.pn = phi { ptr, i32 } [ %255, %254 ], [ %257, %256 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %405

259:                                              ; preds = %.split
  %260 = load i32, ptr %10, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %261
  %263 = load i32, ptr %11, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %262, i64 noundef %264)
  %266 = load i8, ptr %265, align 1, !tbaa !11
  %267 = icmp eq i8 %266, 35
  br i1 %267, label %268, label %282

268:                                              ; preds = %259
  %269 = load i32, ptr %10, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = load i32, ptr %11, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %270, i64 %272
  %274 = load i8, ptr %273, align 1, !tbaa !16, !range !23, !noundef !24
  %275 = trunc nuw i8 %274 to i1
  br i1 %275, label %282, label %276

276:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %277 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %278 unwind label %.split131

278:                                              ; preds = %276
  store i64 %277, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %279 unwind label %.split131

279:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %282

.split131:                                        ; preds = %355, %353, %330, %328, %305, %303, %278, %276
  %280 = landingpad { ptr, i32 }
          cleanup
  br label %281

281:                                              ; preds = %.split131.us.split.us, %.split131
  %.us-phi = phi { ptr, i32 } [ %280, %.split131 ], [ %236, %.split131.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %405

282:                                              ; preds = %279, %268, %259, %.split
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %283 = add nsw i32 %64, %242
  store i32 %283, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %284 = add nsw i32 %65, %245
  store i32 %284, ptr %11, align 4, !tbaa !5
  %285 = call noundef zeroext i1 @_Z5validii(i32 noundef %283, i32 noundef %284)
  br i1 %285, label %286, label %307

286:                                              ; preds = %282
  %287 = load i32, ptr %10, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %288
  %290 = load i32, ptr %11, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %289, i64 noundef %291)
  %293 = load i8, ptr %292, align 1, !tbaa !11
  %294 = icmp eq i8 %293, 35
  br i1 %294, label %295, label %307

295:                                              ; preds = %286
  %296 = load i32, ptr %10, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = load i32, ptr %11, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %297, i64 %299
  %301 = load i8, ptr %300, align 1, !tbaa !16, !range !23, !noundef !24
  %302 = trunc nuw i8 %301 to i1
  br i1 %302, label %307, label %303

303:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %304 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %305 unwind label %.split131

305:                                              ; preds = %303
  store i64 %304, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %306 unwind label %.split131

306:                                              ; preds = %305
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %307

307:                                              ; preds = %306, %295, %286, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %308 = add nsw i32 %66, %242
  store i32 %308, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %309 = add nsw i32 %67, %245
  store i32 %309, ptr %11, align 4, !tbaa !5
  %310 = call noundef zeroext i1 @_Z5validii(i32 noundef %308, i32 noundef %309)
  br i1 %310, label %311, label %332

311:                                              ; preds = %307
  %312 = load i32, ptr %10, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %313
  %315 = load i32, ptr %11, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %314, i64 noundef %316)
  %318 = load i8, ptr %317, align 1, !tbaa !11
  %319 = icmp eq i8 %318, 35
  br i1 %319, label %320, label %332

320:                                              ; preds = %311
  %321 = load i32, ptr %10, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = load i32, ptr %11, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %322, i64 %324
  %326 = load i8, ptr %325, align 1, !tbaa !16, !range !23, !noundef !24
  %327 = trunc nuw i8 %326 to i1
  br i1 %327, label %332, label %328

328:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %329 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %330 unwind label %.split131

330:                                              ; preds = %328
  store i64 %329, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %331 unwind label %.split131

331:                                              ; preds = %330
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %332

332:                                              ; preds = %331, %320, %311, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %333 = add nsw i32 %68, %242
  store i32 %333, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %334 = add nsw i32 %69, %245
  store i32 %334, ptr %11, align 4, !tbaa !5
  %335 = call noundef zeroext i1 @_Z5validii(i32 noundef %333, i32 noundef %334)
  br i1 %335, label %336, label %.loopexit.split.loopexit

336:                                              ; preds = %332
  %337 = load i32, ptr %10, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %338
  %340 = load i32, ptr %11, align 4, !tbaa !5
  %341 = sext i32 %340 to i64
  %342 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %339, i64 noundef %341)
  %343 = load i8, ptr %342, align 1, !tbaa !11
  %344 = icmp eq i8 %343, 35
  br i1 %344, label %345, label %.loopexit.split.loopexit

345:                                              ; preds = %336
  %346 = load i32, ptr %10, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = load i32, ptr %11, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %347, i64 %349
  %351 = load i8, ptr %350, align 1, !tbaa !16, !range !23, !noundef !24
  %352 = trunc nuw i8 %351 to i1
  br i1 %352, label %.loopexit.split.loopexit, label %353

353:                                              ; preds = %345
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %354 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %355 unwind label %.split131

355:                                              ; preds = %353
  store i64 %354, ptr %12, align 8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %356 unwind label %.split131

356:                                              ; preds = %355
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %.loopexit.split.loopexit

.loopexit.split.loopexit:                         ; preds = %356, %345, %336, %332
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %.loopexit.split

.loopexit.split:                                  ; preds = %.loopexit.split.loopexit, %.lr.ph133.split
  %357 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %357, label %.preheader104, label %.lr.ph133.split, !llvm.loop !25

.preheader103:                                    ; preds = %.preheader104, %._crit_edge137
  %358 = phi i32 [ %373, %._crit_edge137 ], [ %239, %.preheader104 ]
  %indvars.iv198 = phi i64 [ %indvars.iv.next199, %._crit_edge137 ], [ 0, %.preheader104 ]
  %359 = icmp sgt i32 %358, 0
  br i1 %359, label %.lr.ph136, label %._crit_edge137

.lr.ph136:                                        ; preds = %.preheader103
  %360 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv198
  %361 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv198
  br i1 %114, label %.lr.ph136.split.us, label %.lr.ph136.split

.lr.ph136.split.us:                               ; preds = %.lr.ph136, %369
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %369 ], [ 0, %.lr.ph136 ]
  %362 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %361, i64 noundef %indvars.iv195)
  %363 = load i8, ptr %362, align 1, !tbaa !11
  %364 = icmp eq i8 %363, 35
  br i1 %364, label %365, label %369

365:                                              ; preds = %.lr.ph136.split.us
  %366 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 0, i64 %indvars.iv198, i64 %indvars.iv195
  %367 = load i8, ptr %366, align 1, !tbaa !16, !range !23, !noundef !24
  %368 = trunc nuw i8 %367 to i1
  br i1 %368, label %369, label %.split139.us

369:                                              ; preds = %365, %.lr.ph136.split.us
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %370 = load i32, ptr @W, align 4, !tbaa !5
  %371 = sext i32 %370 to i64
  %372 = icmp slt i64 %indvars.iv.next196, %371
  br i1 %372, label %.lr.ph136.split.us, label %._crit_edge137, !llvm.loop !26

._crit_edge145:                                   ; preds = %._crit_edge137, %.preheader104
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  br i1 %114, label %113, label %.preheader102, !llvm.loop !27

._crit_edge137:                                   ; preds = %401, %369, %.preheader103
  %373 = phi i32 [ %358, %.preheader103 ], [ %370, %369 ], [ %402, %401 ]
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %374 = load i32, ptr @H, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = icmp slt i64 %indvars.iv.next199, %375
  br i1 %376, label %.preheader103, label %._crit_edge145, !llvm.loop !28

.lr.ph136.split:                                  ; preds = %.lr.ph136, %401
  %indvars.iv192 = phi i64 [ %indvars.iv.next193, %401 ], [ 0, %.lr.ph136 ]
  %377 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %360, i64 noundef %indvars.iv192)
  %378 = load i8, ptr %377, align 1, !tbaa !11
  %379 = icmp eq i8 %378, 35
  br i1 %379, label %380, label %401

380:                                              ; preds = %.lr.ph136.split
  %381 = getelementptr inbounds [2 x [510 x [510 x i8]]], ptr %1, i64 0, i64 %indvars.iv201, i64 %indvars.iv198, i64 %indvars.iv192
  %382 = load i8, ptr %381, align 1, !tbaa !16, !range !23, !noundef !24
  %383 = trunc nuw i8 %382 to i1
  br i1 %383, label %401, label %.split139.us.loopexit153

.split139.us.loopexit153:                         ; preds = %380
  %384 = trunc nuw nsw i64 %indvars.iv201 to i32
  br label %.split139.us

.split139.us:                                     ; preds = %365, %.split139.us.loopexit153
  %.092146170 = phi i32 [ %384, %.split139.us.loopexit153 ], [ 0, %365 ]
  %.us-phi142.in = phi i64 [ %indvars.iv192, %.split139.us.loopexit153 ], [ %indvars.iv195, %365 ]
  %.us-phi142 = trunc i64 %.us-phi142.in to i32
  %.085143163 = trunc i64 %indvars.iv198 to i32
  %385 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
          to label %386 unwind label %399

386:                                              ; preds = %.split139.us
  %387 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %385, i32 noundef %.092146170)
          to label %388 unwind label %399

388:                                              ; preds = %386
  %389 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %387, ptr noundef nonnull @.str.6)
          to label %390 unwind label %399

390:                                              ; preds = %388
  %391 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %389, i32 noundef %.085143163)
          to label %392 unwind label %399

392:                                              ; preds = %390
  %393 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %391, ptr noundef nonnull @.str.7)
          to label %394 unwind label %399

394:                                              ; preds = %392
  %395 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %393, i32 noundef %.us-phi142)
          to label %396 unwind label %399

396:                                              ; preds = %394
  %397 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %395, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %398 unwind label %399

398:                                              ; preds = %396
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

399:                                              ; preds = %396, %394, %392, %390, %388, %386, %.split139.us
  %400 = landingpad { ptr, i32 }
          cleanup
  br label %405

401:                                              ; preds = %.lr.ph136.split, %380
  %indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1
  %402 = load i32, ptr @W, align 4, !tbaa !5
  %403 = sext i32 %402 to i64
  %404 = icmp slt i64 %indvars.iv.next193, %403
  br i1 %404, label %.lr.ph136.split, label %._crit_edge137, !llvm.loop !26

405:                                              ; preds = %399, %281, %258
  %.pn100 = phi { ptr, i32 } [ %.us-phi, %281 ], [ %400, %399 ], [ %.pn, %258 ]
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 520200, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn100

.preheader:                                       ; preds = %.lr.ph149
  %406 = icmp sgt i32 %410, 0
  br i1 %406, label %.lr.ph151, label %._crit_edge152

.lr.ph149:                                        ; preds = %.preheader102, %.lr.ph149
  %indvars.iv204 = phi i64 [ %indvars.iv.next205, %.lr.ph149 ], [ 0, %.preheader102 ]
  %407 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv204
  %408 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %407)
  %409 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %408, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next205 = add nuw nsw i64 %indvars.iv204, 1
  %410 = load i32, ptr @H, align 4, !tbaa !5
  %411 = sext i32 %410 to i64
  %412 = icmp slt i64 %indvars.iv.next205, %411
  br i1 %412, label %.lr.ph149, label %.preheader, !llvm.loop !29

._crit_edge152:                                   ; preds = %.lr.ph151, %.preheader102, %.preheader
  call void @llvm.lifetime.end.p0(i64 520200, ptr nonnull %1) #8
  ret i32 0

.lr.ph151:                                        ; preds = %.preheader, %.lr.ph151
  %indvars.iv207 = phi i64 [ %indvars.iv.next208, %.lr.ph151 ], [ 0, %.preheader ]
  %413 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv207
  %414 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %413)
  %415 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %414, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next208 = add nuw nsw i64 %indvars.iv207, 1
  %416 = load i32, ptr @H, align 4, !tbaa !5
  %417 = sext i32 %416 to i64
  %418 = icmp slt i64 %indvars.iv.next208, %417
  br i1 %418, label %.lr.ph151, label %._crit_edge152, !llvm.loop !30
}

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 #2

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

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 #2

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

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

; 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: 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: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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

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

; 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 #4 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !10, !14}
!19 = distinct !{!19, !10}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!22 = !{!21, !6, i64 4}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10, !14}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}


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