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

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::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 }
%"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" }
%"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
@S = external dso_local global %"class.std::stack", align 8
@_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
@_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 {
  %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 [510 x [510 x i8]], align 16
  %11 = alloca i8, align 1
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = 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)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) @W)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %51, %0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @H, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %34
  %36 = 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) %35)
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %38
  %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(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %39)
  %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 @_Z1BB5cxx11, 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)
  br label %51

51:                                               ; preds = %32
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !9

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

55:                                               ; preds = %64, %54
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = load i32, ptr @W, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %67

60:                                               ; preds = %55
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1AB5cxx11, i64 noundef %62)
  store i8 35, ptr %63, align 1, !tbaa !11
  br label %64

64:                                               ; preds = %60
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %3, align 4, !tbaa !5
  br label %55, !llvm.loop !12

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

68:                                               ; preds = %113, %67
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = load i32, ptr @W, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %73, label %72

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

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

76:                                               ; preds = %109, %73
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = icmp sge i32 %77, 0
  br i1 %78, label %80, label %79

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

80:                                               ; preds = %76
  %81 = load i8, ptr %6, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = icmp eq i32 %82, 46
  br i1 %83, label %84, label %95

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

94:                                               ; preds = %84
  store i8 35, ptr %6, align 1, !tbaa !11
  br label %108

95:                                               ; preds = %84, %80
  %96 = load i8, ptr %6, align 1, !tbaa !11
  %97 = sext i8 %96 to i32
  %98 = icmp eq i32 %97, 35
  br i1 %98, label %99, label %107

99:                                               ; preds = %95
  %100 = load i8, ptr %6, align 1, !tbaa !11
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %102
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %103, i64 noundef %105)
  store i8 %100, ptr %106, align 1, !tbaa !11
  br label %107

107:                                              ; preds = %99, %95
  br label %108

108:                                              ; preds = %107, %94
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %7, align 4, !tbaa !5
  br label %76, !llvm.loop !13

112:                                              ; preds = %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %113

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

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

117:                                              ; preds = %160, %116
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = load i32, ptr @H, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

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

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

123:                                              ; preds = %156, %122
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = load i32, ptr @W, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %159

128:                                              ; preds = %123
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %130
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %131, i64 noundef %133)
  %135 = load i8, ptr %134, align 1, !tbaa !11
  %136 = sext i8 %135 to i32
  %137 = icmp eq i32 %136, 46
  br i1 %137, label %138, label %155

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

148:                                              ; preds = %138
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %150
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %151, i64 noundef %153)
  store i8 35, ptr %154, align 1, !tbaa !11
  br label %155

155:                                              ; preds = %148, %138, %128
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %9, align 4, !tbaa !5
  br label %123, !llvm.loop !15

159:                                              ; preds = %127
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %8, align 4, !tbaa !5
  br label %117, !llvm.loop !16

163:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 260100, ptr %10) #6
  %164 = getelementptr inbounds [510 x [510 x i8]], ptr %10, i64 0, i64 0
  %165 = getelementptr inbounds [510 x i8], ptr %164, i64 0, i64 0
  %166 = getelementptr inbounds [510 x [510 x i8]], ptr %10, i64 0, i64 0
  %167 = getelementptr inbounds [510 x i8], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds i8, ptr %167, i64 260100
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !17
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %165, ptr noundef %168, ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %169 = load i32, ptr @H, align 4, !tbaa !5
  %170 = sub nsw i32 %169, 1
  store i32 %170, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  %171 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %171, ptr %12, align 4
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %172

172:                                              ; preds = %243, %163
  %173 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %174 = xor i1 %173, true
  br i1 %174, label %175, label %244

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %176 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %177 = getelementptr inbounds %"struct.std::pair", ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !19
  store i32 %178, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %179 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %180 = getelementptr inbounds %"struct.std::pair", ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !21
  store i32 %181, ptr %16, align 4, !tbaa !5
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [510 x [510 x i8]], ptr %10, i64 0, i64 %183
  %185 = load i32, ptr %16, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [510 x i8], ptr %184, i64 0, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !17, !range !22, !noundef !23
  %189 = trunc i8 %188 to i1
  br i1 %189, label %243, label %190

190:                                              ; preds = %175
  %191 = load i32, ptr %15, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [510 x [510 x i8]], ptr %10, i64 0, i64 %192
  %194 = load i32, ptr %16, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [510 x i8], ptr %193, i64 0, i64 %195
  store i8 1, ptr %196, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %239, %190
  %198 = load i32, ptr %17, align 4, !tbaa !5
  %199 = icmp slt i32 %198, 4
  br i1 %199, label %201, label %200

200:                                              ; preds = %197
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %242

201:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %202 = load i32, ptr %15, align 4, !tbaa !5
  %203 = load i32, ptr %15, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = add nsw i32 %202, %206
  store i32 %207, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %208 = load i32, ptr %16, align 4, !tbaa !5
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = add nsw i32 %208, %212
  store i32 %213, ptr %19, align 4, !tbaa !5
  %214 = load i32, ptr %18, align 4, !tbaa !5
  %215 = load i32, ptr %19, align 4, !tbaa !5
  %216 = call noundef zeroext i1 @_Z5validii(i32 noundef %214, i32 noundef %215)
  br i1 %216, label %217, label %238

217:                                              ; preds = %201
  %218 = load i32, ptr %18, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %219
  %221 = load i32, ptr %19, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %220, i64 noundef %222)
  %224 = load i8, ptr %223, align 1, !tbaa !11
  %225 = sext i8 %224 to i32
  %226 = icmp eq i32 %225, 35
  br i1 %226, label %227, label %238

227:                                              ; preds = %217
  %228 = load i32, ptr %18, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [510 x [510 x i8]], ptr %10, i64 0, i64 %229
  %231 = load i32, ptr %19, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [510 x i8], ptr %230, i64 0, i64 %232
  %234 = load i8, ptr %233, align 1, !tbaa !17, !range !22, !noundef !23
  %235 = trunc i8 %234 to i1
  br i1 %235, label %238, label %236

236:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %237 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  store i64 %237, ptr %20, align 4
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %238

238:                                              ; preds = %236, %227, %217, %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %17, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %17, align 4, !tbaa !5
  br label %197, !llvm.loop !24

242:                                              ; preds = %200
  br label %243

243:                                              ; preds = %242, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %172, !llvm.loop !25

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

245:                                              ; preds = %287, %244
  %246 = load i32, ptr %21, align 4, !tbaa !5
  %247 = load i32, ptr @H, align 4, !tbaa !5
  %248 = icmp slt i32 %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  store i32 25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %290

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

251:                                              ; preds = %283, %250
  %252 = load i32, ptr %22, align 4, !tbaa !5
  %253 = load i32, ptr @W, align 4, !tbaa !5
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %286

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

266:                                              ; preds = %256
  %267 = load i32, ptr %21, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [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 i8], ptr %269, i64 0, i64 %271
  %273 = load i8, ptr %272, align 1, !tbaa !17, !range !22, !noundef !23
  %274 = trunc i8 %273 to i1
  br i1 %274, label %282, label %275

275:                                              ; preds = %266
  %276 = load i32, ptr %21, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %277
  %279 = load i32, ptr %22, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %278, i64 noundef %280)
  store i8 46, ptr %281, align 1, !tbaa !11
  br label %282

282:                                              ; preds = %275, %266, %256
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %22, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %22, align 4, !tbaa !5
  br label %251, !llvm.loop !26

286:                                              ; preds = %255
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %21, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %21, align 4, !tbaa !5
  br label %245, !llvm.loop !27

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

291:                                              ; preds = %302, %290
  %292 = load i32, ptr %23, align 4, !tbaa !5
  %293 = load i32, ptr @H, align 4, !tbaa !5
  %294 = icmp slt i32 %292, %293
  br i1 %294, label %296, label %295

295:                                              ; preds = %291
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %305

296:                                              ; preds = %291
  %297 = load i32, ptr %23, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %298
  %300 = 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) %299)
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %300, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %302

302:                                              ; preds = %296
  %303 = load i32, ptr %23, align 4, !tbaa !5
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %23, align 4, !tbaa !5
  br label %291, !llvm.loop !28

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

306:                                              ; preds = %317, %305
  %307 = load i32, ptr %24, align 4, !tbaa !5
  %308 = load i32, ptr @H, align 4, !tbaa !5
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %306
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %320

311:                                              ; preds = %306
  %312 = load i32, ptr %24, 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 = 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) %314)
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %315, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %317

317:                                              ; preds = %311
  %318 = load i32, ptr %24, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %24, align 4, !tbaa !5
  br label %306, !llvm.loop !29

320:                                              ; preds = %310
  call void @llvm.lifetime.end.p0(i64 260100, ptr %10) #6
  %321 = load i32, ptr %1, align 4
  ret i32 %321
}

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_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

; 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 @_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

; 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

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 = { 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}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::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 }
%"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" }
%"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
@S = external dso_local global %"class.std::stack", align 8
@_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
@_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 {
  %1 = alloca [510 x [510 x i8]], align 16
  %2 = alloca i8, align 1
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = 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)
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %11 = load i32, ptr @H, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader75

.preheader75:                                     ; preds = %.lr.ph, %0
  %.pre133137 = phi i32 [ %11, %0 ], [ %21, %.lr.ph ]
  %13 = load i32, ptr @W, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph78, label %.preheader73

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %15 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv
  %16 = 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) %15)
  %17 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv
  %18 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %15)
  %19 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv
  %20 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr @H, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next, %22
  br i1 %23, label %.lr.ph, label %.preheader75, !llvm.loop !9

.preheader74:                                     ; preds = %.lr.ph78
  %.pre133.pre = load i32, ptr @H, align 4, !tbaa !5
  %24 = icmp sgt i32 %27, 0
  br i1 %24, label %.lr.ph84, label %.preheader73

.lr.ph84:                                         ; preds = %.preheader74
  %25 = icmp sgt i32 %.pre133.pre, 0
  br i1 %25, label %.lr.ph84.split, label %._crit_edge89

.lr.ph78:                                         ; preds = %.preheader75, %.lr.ph78
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %.lr.ph78 ], [ 0, %.preheader75 ]
  %26 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1AB5cxx11, i64 noundef %indvars.iv106)
  store i8 35, ptr %26, align 1, !tbaa !11
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %27 = load i32, ptr @W, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next107, %28
  br i1 %29, label %.lr.ph78, label %.preheader74, !llvm.loop !12

.preheader73:                                     ; preds = %._crit_edge, %.preheader75, %.preheader74
  %30 = phi i32 [ %27, %.preheader74 ], [ %13, %.preheader75 ], [ %38, %._crit_edge ]
  %31 = phi i32 [ %.pre133.pre, %.preheader74 ], [ %.pre133137, %.preheader75 ], [ %.pr, %._crit_edge ]
  %32 = icmp sgt i32 %31, 0
  %33 = icmp sgt i32 %30, 0
  %or.cond = and i1 %32, %33
  br i1 %or.cond, label %.preheader72, label %._crit_edge89

.lr.ph84.split:                                   ; preds = %.lr.ph84, %._crit_edge
  %34 = phi i32 [ %.pr, %._crit_edge ], [ %.pre133.pre, %.lr.ph84 ]
  %35 = phi i32 [ %38, %._crit_edge ], [ %27, %.lr.ph84 ]
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %._crit_edge ], [ 0, %.lr.ph84 ]
  %36 = icmp sgt i32 %34, 0
  br i1 %36, label %.lr.ph82, label %._crit_edge

.lr.ph82:                                         ; preds = %.lr.ph84.split
  %37 = zext nneg i32 %34 to i64
  br label %41

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph84.split
  %38 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %35, %.lr.ph84.split ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next112, %39
  %.pr = load i32, ptr @H, align 4, !tbaa !5
  br i1 %40, label %.lr.ph84.split, label %.preheader73, !llvm.loop !13

41:                                               ; preds = %.lr.ph82, %50
  %indvars.iv109 = phi i64 [ %37, %.lr.ph82 ], [ %indvars.iv.next110, %50 ]
  %.06780 = phi i8 [ 46, %.lr.ph82 ], [ %.1, %50 ]
  %indvars.iv.next110 = add nsw i64 %indvars.iv109, -1
  switch i8 %.06780, label %50 [
    i8 46, label %42
    i8 35, label %47
  ]

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

47:                                               ; preds = %41
  %48 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv.next110
  %49 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %48, i64 noundef %indvars.iv111)
  store i8 35, ptr %49, align 1, !tbaa !11
  br label %50

50:                                               ; preds = %42, %41, %47
  %.1 = phi i8 [ 35, %47 ], [ %.06780, %41 ], [ %spec.select, %42 ]
  %51 = icmp ugt i64 %indvars.iv109, 1
  br i1 %51, label %41, label %._crit_edge.loopexit, !llvm.loop !15

.preheader72:                                     ; preds = %.preheader73, %._crit_edge87
  %52 = phi i32 [ %62, %._crit_edge87 ], [ %31, %.preheader73 ]
  %53 = phi i32 [ %63, %._crit_edge87 ], [ %30, %.preheader73 ]
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %._crit_edge87 ], [ 0, %.preheader73 ]
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %.preheader72
  %55 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv117
  %56 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv117
  br label %66

._crit_edge89:                                    ; preds = %._crit_edge87, %.lr.ph84, %.preheader73
  call void @llvm.lifetime.start.p0(i64 260100, ptr nonnull %1) #6
  %57 = getelementptr inbounds i8, ptr %1, i64 260100
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  store i8 0, ptr %2, align 1, !tbaa !16
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %1, ptr noundef nonnull %57, ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %58 = load i32, ptr @H, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  %60 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %60, ptr %3, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %61 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  br i1 %61, label %.preheader71, label %.lr.ph92

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

._crit_edge87:                                    ; preds = %._crit_edge87.loopexit, %.preheader72
  %62 = phi i32 [ %.pre134, %._crit_edge87.loopexit ], [ %52, %.preheader72 ]
  %63 = phi i32 [ %77, %._crit_edge87.loopexit ], [ %53, %.preheader72 ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %64 = sext i32 %62 to i64
  %65 = icmp slt i64 %indvars.iv.next118, %64
  br i1 %65, label %.preheader72, label %._crit_edge89, !llvm.loop !18

66:                                               ; preds = %.lr.ph86, %76
  %indvars.iv114 = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next115, %76 ]
  %67 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %55, i64 noundef %indvars.iv114)
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = icmp eq i8 %68, 46
  br i1 %69, label %70, label %76

70:                                               ; preds = %66
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %indvars.iv114)
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = icmp eq i8 %72, 46
  br i1 %73, label %74, label %76

74:                                               ; preds = %70
  %75 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %55, i64 noundef %indvars.iv114)
  store i8 35, ptr %75, align 1, !tbaa !11
  br label %76

76:                                               ; preds = %66, %70, %74
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %77 = load i32, ptr @W, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next115, %78
  br i1 %79, label %66, label %._crit_edge87.loopexit, !llvm.loop !19

.preheader71:                                     ; preds = %.loopexit, %._crit_edge89
  %80 = load i32, ptr @H, align 4, !tbaa !5
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %.preheader70.lr.ph, label %._crit_edge101

.preheader70.lr.ph:                               ; preds = %.preheader71
  %82 = load i32, ptr @W, align 4, !tbaa !5
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.preheader70, label %.lr.ph98.preheader

.lr.ph92:                                         ; preds = %._crit_edge89, %.loopexit
  %84 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %85 = load i32, ptr %84, align 4, !tbaa !20
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %87 = getelementptr inbounds i8, ptr %86, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !22
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  %89 = sext i32 %85 to i64
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds [510 x [510 x i8]], ptr %1, i64 0, i64 %89, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !16, !range !23, !noundef !24
  %93 = trunc nuw i8 %92 to i1
  br i1 %93, label %.loopexit, label %94

94:                                               ; preds = %.lr.ph92
  store i8 1, ptr %91, align 1, !tbaa !16
  %95 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %89
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = add nsw i32 %96, %85
  %98 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %89
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %88
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %97, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %100, ptr %7, align 4, !tbaa !5
  %101 = call noundef zeroext i1 @_Z5validii(i32 noundef %97, i32 noundef %100)
  br i1 %101, label %102, label %121

102:                                              ; preds = %94
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %104
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %105, i64 noundef %107)
  %109 = load i8, ptr %108, align 1, !tbaa !11
  %110 = icmp eq i8 %109, 35
  br i1 %110, label %111, label %121

111:                                              ; preds = %102
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [510 x [510 x i8]], ptr %1, i64 0, i64 %113, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !16, !range !23, !noundef !24
  %118 = trunc nuw i8 %117 to i1
  br i1 %118, label %121, label %119

119:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %120 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %120, ptr %8, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %121

121:                                              ; preds = %119, %111, %102, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %97, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %100, ptr %7, align 4, !tbaa !5
  %122 = call noundef zeroext i1 @_Z5validii(i32 noundef %97, i32 noundef %100)
  br i1 %122, label %123, label %142

123:                                              ; preds = %121
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %125
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %126, i64 noundef %128)
  %130 = load i8, ptr %129, align 1, !tbaa !11
  %131 = icmp eq i8 %130, 35
  br i1 %131, label %132, label %142

132:                                              ; preds = %123
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [510 x [510 x i8]], ptr %1, i64 0, i64 %134, i64 %136
  %138 = load i8, ptr %137, align 1, !tbaa !16, !range !23, !noundef !24
  %139 = trunc nuw i8 %138 to i1
  br i1 %139, label %142, label %140

140:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %141 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %141, ptr %8, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %142

142:                                              ; preds = %140, %132, %123, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %97, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %100, ptr %7, align 4, !tbaa !5
  %143 = call noundef zeroext i1 @_Z5validii(i32 noundef %97, i32 noundef %100)
  br i1 %143, label %144, label %163

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

153:                                              ; preds = %144
  %154 = load i32, ptr %6, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [510 x [510 x i8]], ptr %1, i64 0, i64 %155, i64 %157
  %159 = load i8, ptr %158, align 1, !tbaa !16, !range !23, !noundef !24
  %160 = trunc nuw i8 %159 to i1
  br i1 %160, label %163, label %161

161:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %162 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %162, ptr %8, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %163

163:                                              ; preds = %161, %153, %144, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %97, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %100, ptr %7, align 4, !tbaa !5
  %164 = call noundef zeroext i1 @_Z5validii(i32 noundef %97, i32 noundef %100)
  br i1 %164, label %165, label %.loopexit.loopexit

165:                                              ; preds = %163
  %166 = load i32, ptr %6, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %167
  %169 = load i32, ptr %7, 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 %.loopexit.loopexit

174:                                              ; preds = %165
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = load i32, ptr %7, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [510 x [510 x i8]], ptr %1, 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 %.loopexit.loopexit, label %182

182:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %183 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %183, ptr %8, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @S, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %182, %174, %165, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph92
  %184 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @S)
  br i1 %184, label %.preheader71, label %.lr.ph92, !llvm.loop !25

.preheader70:                                     ; preds = %.preheader70.lr.ph, %._crit_edge95
  %185 = phi i32 [ %190, %._crit_edge95 ], [ %80, %.preheader70.lr.ph ]
  %186 = phi i32 [ %191, %._crit_edge95 ], [ %82, %.preheader70.lr.ph ]
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %._crit_edge95 ], [ 0, %.preheader70.lr.ph ]
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %.lr.ph94, label %._crit_edge95

.lr.ph94:                                         ; preds = %.preheader70
  %188 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv123
  br label %194

.preheader69:                                     ; preds = %._crit_edge95
  %189 = icmp sgt i32 %190, 0
  br i1 %189, label %.lr.ph98.preheader, label %._crit_edge101

.lr.ph98.preheader:                               ; preds = %.preheader70.lr.ph, %.preheader69
  br label %.lr.ph98

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

._crit_edge95:                                    ; preds = %._crit_edge95.loopexit, %.preheader70
  %190 = phi i32 [ %.pre135, %._crit_edge95.loopexit ], [ %185, %.preheader70 ]
  %191 = phi i32 [ %205, %._crit_edge95.loopexit ], [ %186, %.preheader70 ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %192 = sext i32 %190 to i64
  %193 = icmp slt i64 %indvars.iv.next124, %192
  br i1 %193, label %.preheader70, label %.preheader69, !llvm.loop !26

194:                                              ; preds = %.lr.ph94, %204
  %indvars.iv120 = phi i64 [ 0, %.lr.ph94 ], [ %indvars.iv.next121, %204 ]
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %188, i64 noundef %indvars.iv120)
  %196 = load i8, ptr %195, align 1, !tbaa !11
  %197 = icmp eq i8 %196, 35
  br i1 %197, label %198, label %204

198:                                              ; preds = %194
  %199 = getelementptr inbounds [510 x [510 x i8]], ptr %1, i64 0, i64 %indvars.iv123, i64 %indvars.iv120
  %200 = load i8, ptr %199, align 1, !tbaa !16, !range !23, !noundef !24
  %201 = trunc nuw i8 %200 to i1
  br i1 %201, label %204, label %202

202:                                              ; preds = %198
  %203 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %188, i64 noundef %indvars.iv120)
  store i8 46, ptr %203, align 1, !tbaa !11
  br label %204

204:                                              ; preds = %194, %198, %202
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %205 = load i32, ptr @W, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = icmp slt i64 %indvars.iv.next121, %206
  br i1 %207, label %194, label %._crit_edge95.loopexit, !llvm.loop !27

.preheader:                                       ; preds = %.lr.ph98
  %208 = icmp sgt i32 %212, 0
  br i1 %208, label %.lr.ph100, label %._crit_edge101

.lr.ph98:                                         ; preds = %.lr.ph98.preheader, %.lr.ph98
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.lr.ph98 ], [ 0, %.lr.ph98.preheader ]
  %209 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1AB5cxx11, i64 0, i64 %indvars.iv126
  %210 = 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) %209)
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %210, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %212 = load i32, ptr @H, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = icmp slt i64 %indvars.iv.next127, %213
  br i1 %214, label %.lr.ph98, label %.preheader, !llvm.loop !28

._crit_edge101:                                   ; preds = %.lr.ph100, %.preheader71, %.preheader69, %.preheader
  call void @llvm.lifetime.end.p0(i64 260100, ptr nonnull %1) #6
  ret i32 0

.lr.ph100:                                        ; preds = %.preheader, %.lr.ph100
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.lr.ph100 ], [ 0, %.preheader ]
  %215 = getelementptr inbounds [510 x %"class.std::__cxx11::basic_string"], ptr @_Z1BB5cxx11, i64 0, i64 %indvars.iv129
  %216 = 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) %215)
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %216, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %218 = load i32, ptr @H, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = icmp slt i64 %indvars.iv.next130, %219
  br i1 %220, label %.lr.ph100, label %._crit_edge101, !llvm.loop !29
}

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_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

; 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 @_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

; 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

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 = { 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, !14}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}


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