; LLVM IR from tangjz/acm-icpc :: uvalive (7223)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.NFA = type { [26 x %"class.std::vector"] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.8" }
%"class.std::_Hashtable.8" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"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::allocator.5" = type { i8 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z5IndexB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@sz = external dso_local global [5001 x i32], align 16
@plen = external dso_local global [5001 x [5 x i32]], align 16
@szA = external dso_local global i32, align 4
@szB = external dso_local global i32, align 4
@pat = external dso_local global [5001 x [5 x [21 x i8]]], align 16
@A = external dso_local global [15981 x %struct.NFA], align 16
@B = external dso_local global [15981 x %struct.NFA], align 16
@Hash = external dso_local global %"class.std::unordered_set", align 8
@que = external dso_local global [10000001 x i32], align 16
@fro = external dso_local global [10000001 x i32], align 16
@L = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@olen = external dso_local global i32, align 4
@ch = external dso_local global [10000001 x i8], align 16
@out = external dso_local global [441 x i8], align 16
@eq = external dso_local global [10000001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE3str = external hidden global [21 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

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

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

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::unordered_map", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.5", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::unordered_set", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca %"struct.std::pair", align 8
  %35 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %350, %0
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = load i32, ptr @t, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %353

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 56, ptr %4) #9
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #9
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(56) @_Z5IndexB5cxx11) #9
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #9
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %110, %42
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %113

49:                                               ; preds = %44
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr @sz, i64 %51
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %52)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %97, %49
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [5001 x i32], ptr @sz, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = icmp slt i32 %55, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %54
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %109

62:                                               ; preds = %54
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [5001 x [5 x [21 x i8]]], ptr @pat, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [5 x [21 x i8]], ptr %65, i64 0, i64 %67
  %69 = getelementptr inbounds [21 x i8], ptr %68, i64 0, i64 0
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %69)
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [5001 x [5 x [21 x i8]]], ptr @pat, i64 0, i64 %72
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [5 x [21 x i8]], ptr %73, i64 0, i64 %75
  %77 = getelementptr inbounds [21 x i8], ptr %76, i64 0, i64 0
  %78 = call i64 @strlen(ptr noundef %77) #10
  %79 = trunc i64 %78 to i32
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [5001 x [5 x i32]], ptr @plen, i64 0, i64 %81
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [5 x i32], ptr %82, i64 0, i64 %84
  store i32 %79, ptr %85, align 4, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #9
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [5001 x [5 x [21 x i8]]], ptr @pat, i64 0, i64 %88
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [5 x [21 x i8]], ptr %89, i64 0, i64 %91
  %93 = getelementptr inbounds [21 x i8], ptr %92, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %93, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %94 unwind label %100

94:                                               ; preds = %62
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) @_Z5IndexB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %96 unwind label %104

96:                                               ; preds = %94
  store i32 %86, ptr %95, align 4, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #9
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %6, align 4, !tbaa !5
  br label %54, !llvm.loop !9

100:                                              ; preds = %62
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %108

104:                                              ; preds = %94
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %108

108:                                              ; preds = %104, %100
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %354

109:                                              ; preds = %61
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %5, align 4, !tbaa !5
  br label %44, !llvm.loop !11

113:                                              ; preds = %48
  %114 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @q)
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %115)
  br label %117

117:                                              ; preds = %348, %346, %113
  %118 = load i32, ptr @q, align 4, !tbaa !5
  %119 = add nsw i32 %118, -1
  store i32 %119, ptr @q, align 4, !tbaa !5
  %120 = icmp ne i32 %118, 0
  br i1 %120, label %121, label %349

121:                                              ; preds = %117
  %122 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef @_ZZ4mainE3str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %123 = call i64 @strlen(ptr noundef @_ZZ4mainE3str) #10
  %124 = trunc i64 %123 to i32
  store i32 %124, ptr %11, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z8buildNFARiP3NFAiPc(ptr noundef nonnull align 4 dereferenceable(4) @szA, ptr noundef @A, i32 noundef %125, ptr noundef @_ZZ4mainE3str)
  %126 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef @_ZZ4mainE3str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %127 = call i64 @strlen(ptr noundef @_ZZ4mainE3str) #10
  %128 = trunc i64 %127 to i32
  store i32 %128, ptr %12, align 4, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z8buildNFARiP3NFAiPc(ptr noundef nonnull align 4 dereferenceable(4) @szB, ptr noundef @B, i32 noundef %129, ptr noundef @_ZZ4mainE3str)
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #9
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4swapERS5_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(56) @Hash) #9
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #9
  store i32 0, ptr @R, align 4, !tbaa !5
  store i32 0, ptr @L, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %130 = call noundef i32 @_Z3idxii(i32 noundef 0, i32 noundef 0)
  store i32 %130, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = call noundef i32 @_Z3idxii(i32 noundef %131, i32 noundef %132)
  store i32 %133, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #9
  store i8 0, ptr %16, align 1, !tbaa !12
  %134 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %135 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %136 = extractvalue { ptr, i8 } %134, 0
  store ptr %136, ptr %135, align 8
  %137 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %138 = extractvalue { ptr, i8 } %134, 1
  store i8 %138, ptr %137, align 8
  %139 = load i32, ptr @R, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %140
  store i8 0, ptr %141, align 1, !tbaa !12
  %142 = load i32, ptr %14, align 4, !tbaa !5
  %143 = load i32, ptr @R, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr @R, align 4, !tbaa !5
  %145 = sext i32 %143 to i64
  %146 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %145
  store i32 %142, ptr %146, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  br label %147

147:                                              ; preds = %307, %121
  %148 = load i32, ptr @L, align 4, !tbaa !5
  %149 = load i32, ptr @R, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 13, ptr %3, align 4
  br label %309

152:                                              ; preds = %147
  %153 = load i32, ptr @L, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %18, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %168, %152
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = load i32, ptr @R, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %165

159:                                              ; preds = %155
  %160 = load i32, ptr %18, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !12, !range !14, !noundef !15
  %164 = trunc i8 %163 to i1
  br label %165

165:                                              ; preds = %159, %155
  %166 = phi i1 [ false, %155 ], [ %164, %159 ]
  br i1 %166, label %167, label %171

167:                                              ; preds = %165
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %18, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %18, align 4, !tbaa !5
  br label %155, !llvm.loop !16

171:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %301, %171
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = icmp slt i32 %173, 26
  br i1 %174, label %176, label %175

175:                                              ; preds = %172
  store i32 19, ptr %3, align 4
  br label %304

176:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  store i8 1, ptr %20, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %177 = load i32, ptr @L, align 4, !tbaa !5
  store i32 %177, ptr %21, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %292, %176
  %179 = load i32, ptr %21, align 4, !tbaa !5
  %180 = load i32, ptr %18, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 22, ptr %3, align 4
  br label %295

183:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %184 = load i32, ptr %21, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  store i32 %187, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %188 = load i32, ptr %22, align 4, !tbaa !5
  call void @_Z3rdxiRiS_(i32 noundef %188, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %189 = load i32, ptr %23, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [15981 x %struct.NFA], ptr @A, i64 0, i64 %190
  %192 = getelementptr inbounds %struct.NFA, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %19, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [26 x %"class.std::vector"], ptr %192, i64 0, i64 %194
  store ptr %195, ptr %25, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %196 = load ptr, ptr %25, align 8, !tbaa !17
  %197 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %196) #9
  %198 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %197, ptr %198, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %199 = load ptr, ptr %25, align 8, !tbaa !17
  %200 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %199) #9
  %201 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %200, ptr %201, align 8
  br label %202

202:                                              ; preds = %284, %183
  %203 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  br i1 %203, label %205, label %204

204:                                              ; preds = %202
  store i32 25, ptr %3, align 4
  br label %286

205:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  store ptr %206, ptr %28, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %207 = load i32, ptr %24, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [15981 x %struct.NFA], ptr @B, i64 0, i64 %208
  %210 = getelementptr inbounds %struct.NFA, ptr %209, i32 0, i32 0
  %211 = load i32, ptr %19, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [26 x %"class.std::vector"], ptr %210, i64 0, i64 %212
  store ptr %213, ptr %29, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %214 = load ptr, ptr %29, align 8, !tbaa !17
  %215 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %214) #9
  %216 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %215, ptr %216, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %217 = load ptr, ptr %29, align 8, !tbaa !17
  %218 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #9
  %219 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %218, ptr %219, align 8
  br label %220

220:                                              ; preds = %276, %205
  %221 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #9
  br i1 %221, label %223, label %222

222:                                              ; preds = %220
  store i32 27, ptr %3, align 4
  br label %278

223:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  store ptr %224, ptr %32, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %225 = load ptr, ptr %28, align 8, !tbaa !17
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = load ptr, ptr %32, align 8, !tbaa !17
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = call noundef i32 @_Z3idxii(i32 noundef %226, i32 noundef %228)
  store i32 %229, ptr %33, align 4, !tbaa !5
  %230 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %231 = icmp ne i64 %230, 0
  br i1 %231, label %232, label %233

232:                                              ; preds = %223
  store i32 28, ptr %3, align 4
  br label %270

233:                                              ; preds = %223
  %234 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %235 = getelementptr inbounds { ptr, i8 }, ptr %34, i32 0, i32 0
  %236 = extractvalue { ptr, i8 } %234, 0
  store ptr %236, ptr %235, align 8
  %237 = getelementptr inbounds { ptr, i8 }, ptr %34, i32 0, i32 1
  %238 = extractvalue { ptr, i8 } %234, 1
  store i8 %238, ptr %237, align 8
  %239 = load i32, ptr %21, align 4, !tbaa !5
  %240 = load i32, ptr @R, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [10000001 x i32], ptr @fro, i64 0, i64 %241
  store i32 %239, ptr %242, align 4, !tbaa !5
  %243 = load i32, ptr %19, align 4, !tbaa !5
  %244 = add nsw i32 65, %243
  %245 = trunc i32 %244 to i8
  %246 = load i32, ptr @R, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [10000001 x i8], ptr @ch, i64 0, i64 %247
  store i8 %245, ptr %248, align 1, !tbaa !19
  %249 = load i8, ptr %20, align 1, !tbaa !12, !range !14, !noundef !15
  %250 = trunc i8 %249 to i1
  br i1 %250, label %251, label %252

251:                                              ; preds = %233
  store i8 0, ptr %20, align 1, !tbaa !12
  br label %253

252:                                              ; preds = %233
  br label %253

253:                                              ; preds = %252, %251
  %254 = phi i32 [ 0, %251 ], [ 1, %252 ]
  %255 = icmp ne i32 %254, 0
  %256 = load i32, ptr @R, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %257
  %259 = zext i1 %255 to i8
  store i8 %259, ptr %258, align 1, !tbaa !12
  %260 = load i32, ptr %33, align 4, !tbaa !5
  %261 = load i32, ptr @R, align 4, !tbaa !5
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr @R, align 4, !tbaa !5
  %263 = sext i32 %261 to i64
  %264 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %263
  store i32 %260, ptr %264, align 4, !tbaa !5
  %265 = load i32, ptr %33, align 4, !tbaa !5
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = icmp eq i32 %265, %266
  br i1 %267, label %268, label %269

268:                                              ; preds = %253
  store i8 1, ptr %16, align 1, !tbaa !12
  store i32 29, ptr %3, align 4
  br label %270

269:                                              ; preds = %253
  store i32 0, ptr %3, align 4
  br label %270

270:                                              ; preds = %269, %268, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  %271 = load i32, ptr %3, align 4
  switch i32 %271, label %273 [
    i32 0, label %272
  ]

272:                                              ; preds = %270
  store i32 0, ptr %3, align 4
  br label %273

273:                                              ; preds = %272, %270
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  %274 = load i32, ptr %3, align 4
  switch i32 %274, label %278 [
    i32 0, label %275
    i32 28, label %276
  ]

275:                                              ; preds = %273
  br label %276

276:                                              ; preds = %275, %273
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br label %220

278:                                              ; preds = %273, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  %279 = load i32, ptr %3, align 4
  switch i32 %279, label %281 [
    i32 27, label %280
  ]

280:                                              ; preds = %278
  store i32 0, ptr %3, align 4
  br label %281

281:                                              ; preds = %280, %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  %282 = load i32, ptr %3, align 4
  switch i32 %282, label %286 [
    i32 0, label %283
  ]

283:                                              ; preds = %281
  br label %284

284:                                              ; preds = %283
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br label %202

286:                                              ; preds = %281, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  %287 = load i32, ptr %3, align 4
  switch i32 %287, label %289 [
    i32 25, label %288
  ]

288:                                              ; preds = %286
  store i32 0, ptr %3, align 4
  br label %289

289:                                              ; preds = %288, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  %290 = load i32, ptr %3, align 4
  switch i32 %290, label %295 [
    i32 0, label %291
  ]

291:                                              ; preds = %289
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %21, align 4, !tbaa !5
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %21, align 4, !tbaa !5
  br label %178, !llvm.loop !20

295:                                              ; preds = %289, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  %296 = load i32, ptr %3, align 4
  switch i32 %296, label %298 [
    i32 22, label %297
  ]

297:                                              ; preds = %295
  store i32 0, ptr %3, align 4
  br label %298

298:                                              ; preds = %297, %295
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  %299 = load i32, ptr %3, align 4
  switch i32 %299, label %304 [
    i32 0, label %300
  ]

300:                                              ; preds = %298
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %19, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %19, align 4, !tbaa !5
  br label %172, !llvm.loop !21

304:                                              ; preds = %298, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %305 = load i32, ptr %3, align 4
  switch i32 %305, label %309 [
    i32 19, label %306
  ]

306:                                              ; preds = %304
  br label %307

307:                                              ; preds = %306
  %308 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %308, ptr @L, align 4, !tbaa !5
  br label %147, !llvm.loop !22

309:                                              ; preds = %304, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  %310 = load i32, ptr %3, align 4
  switch i32 %310, label %346 [
    i32 13, label %311
    i32 29, label %312
  ]

311:                                              ; preds = %309
  br label %312

312:                                              ; preds = %311, %309
  %313 = load i8, ptr %16, align 1, !tbaa !12, !range !14, !noundef !15
  %314 = trunc i8 %313 to i1
  br i1 %314, label %317, label %315

315:                                              ; preds = %312
  %316 = call i32 @puts(ptr noundef @.str.7)
  store i32 11, ptr %3, align 4
  br label %346, !llvm.loop !23

317:                                              ; preds = %312
  store i32 0, ptr @olen, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  %318 = load i32, ptr @R, align 4, !tbaa !5
  %319 = sub nsw i32 %318, 1
  store i32 %319, ptr %35, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %325, %317
  %321 = load i32, ptr %35, align 4, !tbaa !5
  %322 = icmp ne i32 %321, 0
  br i1 %322, label %324, label %323

323:                                              ; preds = %320
  store i32 30, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %338

324:                                              ; preds = %320
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %35, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [10000001 x i8], ptr @ch, i64 0, i64 %327
  %329 = load i8, ptr %328, align 1, !tbaa !19
  %330 = load i32, ptr @olen, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr @olen, align 4, !tbaa !5
  %332 = sext i32 %330 to i64
  %333 = getelementptr inbounds [441 x i8], ptr @out, i64 0, i64 %332
  store i8 %329, ptr %333, align 1, !tbaa !19
  %334 = load i32, ptr %35, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [10000001 x i32], ptr @fro, i64 0, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !5
  store i32 %337, ptr %35, align 4, !tbaa !5
  br label %320, !llvm.loop !24

338:                                              ; preds = %323
  %339 = load i32, ptr @olen, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds i8, ptr @out, i64 %340
  call void @_ZSt7reverseIPcEvT_S1_(ptr noundef @out, ptr noundef %341)
  %342 = load i32, ptr @olen, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [441 x i8], ptr @out, i64 0, i64 %343
  store i8 0, ptr %344, align 1, !tbaa !19
  %345 = call i32 @puts(ptr noundef @out)
  store i32 0, ptr %3, align 4
  br label %346

346:                                              ; preds = %338, %315, %309
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  %347 = load i32, ptr %3, align 4
  switch i32 %347, label %359 [
    i32 0, label %348
    i32 11, label %117
  ]

348:                                              ; preds = %346
  br label %117, !llvm.loop !23

349:                                              ; preds = %117
  br label %350

350:                                              ; preds = %349
  %351 = load i32, ptr %2, align 4, !tbaa !5
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %2, align 4, !tbaa !5
  br label %37, !llvm.loop !25

353:                                              ; preds = %41
  ret i32 0

354:                                              ; preds = %108
  %355 = load ptr, ptr %9, align 8
  %356 = load i32, ptr %10, align 4
  %357 = insertvalue { ptr, i32 } poison, ptr %355, 0
  %358 = insertvalue { ptr, i32 } %357, i32 %356, 1
  resume { ptr, i32 } %358

359:                                              ; preds = %346
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #7

declare i32 @printf(ptr noundef, ...) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3idxii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3rdxiRiS_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

declare i32 @puts(ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPcEvT_S1_(ptr noundef, ptr noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind willreturn memory(read) "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 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.NFA = type { [26 x %"class.std::vector"] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.8" }
%"class.std::_Hashtable.8" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"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::allocator.5" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z5IndexB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@sz = external dso_local global [5001 x i32], align 16
@plen = external dso_local local_unnamed_addr global [5001 x [5 x i32]], align 16
@szA = external dso_local global i32, align 4
@szB = external dso_local global i32, align 4
@pat = external dso_local global [5001 x [5 x [21 x i8]]], align 16
@A = external dso_local global [15981 x %struct.NFA], align 16
@B = external dso_local global [15981 x %struct.NFA], align 16
@Hash = external dso_local global %"class.std::unordered_set", align 8
@que = external dso_local local_unnamed_addr global [10000001 x i32], align 16
@fro = external dso_local local_unnamed_addr global [10000001 x i32], align 16
@L = external dso_local local_unnamed_addr global i32, align 4
@R = external dso_local local_unnamed_addr global i32, align 4
@olen = external dso_local local_unnamed_addr global i32, align 4
@ch = external dso_local local_unnamed_addr global [10000001 x i8], align 16
@out = external dso_local global [441 x i8], align 16
@eq = external dso_local local_unnamed_addr global [10000001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE3str = external hidden global [21 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

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

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::unordered_map", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.5", align 1
  %4 = alloca %"class.std::unordered_set", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %.not181 = icmp slt i32 %14, 1
  br i1 %.not181, label %._crit_edge185, label %.lr.ph184

._crit_edge185:                                   ; preds = %._crit_edge180, %0
  ret i32 0

.lr.ph184:                                        ; preds = %0, %._crit_edge180
  %.073182 = phi i32 [ %141, %._crit_edge180 ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %1, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #10
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE4swapERSE_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) @_Z5IndexB5cxx11) #10
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #10
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph152, label %._crit_edge153

._crit_edge153:                                   ; preds = %._crit_edge, %.lr.ph184
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @q)
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.073182)
  %20 = load i32, ptr @q, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr @q, align 4, !tbaa !5
  %.not95177 = icmp eq i32 %20, 0
  br i1 %.not95177, label %._crit_edge180, label %.lr.ph179

.lr.ph152:                                        ; preds = %.lr.ph184, %._crit_edge
  %indvars.iv189 = phi i64 [ %indvars.iv.next190, %._crit_edge ], [ 0, %.lr.ph184 ]
  %22 = getelementptr inbounds i32, ptr @sz, i64 %indvars.iv189
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %22)
  %24 = load i32, ptr %22, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph152
  %26 = trunc nuw nsw i64 %indvars.iv189 to i32
  br label %.lr.ph

._crit_edge:                                      ; preds = %37, %.lr.ph152
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next190, %28
  br i1 %29, label %.lr.ph152, label %._crit_edge153, !llvm.loop !9

.lr.ph:                                           ; preds = %.lr.ph.preheader, %37
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %37 ]
  %30 = getelementptr inbounds [5001 x [5 x [21 x i8]]], ptr @pat, i64 0, i64 %indvars.iv189, i64 %indvars.iv
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %30)
  %32 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %30) #11
  %33 = trunc i64 %32 to i32
  %34 = getelementptr inbounds [5001 x [5 x i32]], ptr @plen, i64 0, i64 %indvars.iv189, i64 %indvars.iv
  store i32 %33, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %30, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %35 unwind label %41

35:                                               ; preds = %.lr.ph
  %36 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) @_Z5IndexB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %37 unwind label %43

37:                                               ; preds = %35
  store i32 %26, ptr %36, align 4, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = load i32, ptr %22, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next, %39
  br i1 %40, label %.lr.ph, label %._crit_edge, !llvm.loop !11

41:                                               ; preds = %.lr.ph
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %35
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #10
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn

.lr.ph179:                                        ; preds = %._crit_edge153, %137
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull @_ZZ4mainE3str)
  %47 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ4mainE3str) #11
  %48 = trunc i64 %47 to i32
  call void @_Z8buildNFARiP3NFAiPc(ptr noundef nonnull align 4 dereferenceable(4) @szA, ptr noundef nonnull @A, i32 noundef %48, ptr noundef nonnull @_ZZ4mainE3str)
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull @_ZZ4mainE3str)
  %50 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ4mainE3str) #11
  %51 = trunc i64 %50 to i32
  call void @_Z8buildNFARiP3NFAiPc(ptr noundef nonnull align 4 dereferenceable(4) @szB, ptr noundef nonnull @B, i32 noundef %51, ptr noundef nonnull @_ZZ4mainE3str)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %4, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #10
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4swapERS5_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(56) @Hash) #10
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #10
  store i32 0, ptr @R, align 4, !tbaa !5
  store i32 0, ptr @L, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  %52 = call noundef i32 @_Z3idxii(i32 noundef 0, i32 noundef 0)
  store i32 %52, ptr %5, align 4, !tbaa !5
  %53 = call noundef i32 @_Z3idxii(i32 noundef %48, i32 noundef %51)
  %54 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %55 = load i32, ptr @R, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %56
  store i8 0, ptr %57, align 1, !tbaa !12
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %55, 1
  store i32 %59, ptr @R, align 4, !tbaa !5
  %60 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %56
  store i32 %58, ptr %60, align 4, !tbaa !5
  %61 = load i32, ptr @L, align 4, !tbaa !5
  %.not186 = icmp sgt i32 %61, %55
  br i1 %.not186, label %.critedge146.loopexit, label %.preheader

.preheader:                                       ; preds = %.lr.ph179, %.split.us
  %62 = phi i32 [ %121, %.split.us ], [ %59, %.lr.ph179 ]
  %63 = phi i32 [ %.093.lcssa, %.split.us ], [ %61, %.lr.ph179 ]
  %64 = sext i32 %63 to i64
  %65 = sext i32 %62 to i64
  %66 = add nsw i32 %63, 1
  %smax = call i32 @llvm.smax.i32(i32 %62, i32 %66)
  %67 = add nsw i32 %smax, -1
  br label %68

68:                                               ; preds = %.preheader, %70
  %indvars.iv192 = phi i64 [ %64, %.preheader ], [ %indvars.iv.next193, %70 ]
  %indvars.iv.next193 = add nsw i64 %indvars.iv192, 1
  %69 = icmp slt i64 %indvars.iv.next193, %65
  br i1 %69, label %70, label %.critedge

70:                                               ; preds = %68
  %71 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %indvars.iv.next193
  %72 = load i8, ptr %71, align 1, !tbaa !12, !range !14, !noundef !15
  %73 = trunc nuw i8 %72 to i1
  br i1 %73, label %68, label %.critedge.split.loop.exit204, !llvm.loop !16

.critedge.split.loop.exit204:                     ; preds = %70
  %74 = trunc nsw i64 %indvars.iv192 to i32
  %75 = trunc nsw i64 %indvars.iv.next193 to i32
  br label %.critedge

.critedge:                                        ; preds = %68, %.critedge.split.loop.exit204
  %.093.in.lcssa = phi i32 [ %74, %.critedge.split.loop.exit204 ], [ %67, %68 ]
  %.093.lcssa = phi i32 [ %75, %.critedge.split.loop.exit204 ], [ %smax, %68 ]
  %76 = icmp sgt i32 %63, %.093.in.lcssa
  br i1 %76, label %.split.us, label %.critedge.split.preheader

.critedge.split.preheader:                        ; preds = %.critedge
  %77 = add i32 %.093.in.lcssa, 1
  br label %.critedge.split

.critedge.split:                                  ; preds = %.critedge.split.preheader, %._crit_edge168
  %indvars.iv197 = phi i64 [ 0, %.critedge.split.preheader ], [ %indvars.iv.next198, %._crit_edge168 ]
  %78 = load i32, ptr @L, align 4, !tbaa !5
  %.not96163 = icmp sgt i32 %78, %.093.in.lcssa
  br i1 %.not96163, label %._crit_edge168, label %.lr.ph167

.lr.ph167:                                        ; preds = %.critedge.split
  %invariant.gep169 = getelementptr [26 x %"class.std::vector"], ptr @A, i64 0, i64 %indvars.iv197
  %invariant.gep = getelementptr [26 x %"class.std::vector"], ptr @B, i64 0, i64 %indvars.iv197
  %79 = trunc i64 %indvars.iv197 to i8
  %80 = add nuw nsw i8 %79, 65
  %81 = sext i32 %78 to i64
  br label %82

82:                                               ; preds = %.lr.ph167, %._crit_edge161
  %indvars.iv195 = phi i64 [ %81, %.lr.ph167 ], [ %indvars.iv.next196, %._crit_edge161 ]
  %.086164 = phi i8 [ 1, %.lr.ph167 ], [ %.187.lcssa, %._crit_edge161 ]
  %83 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %indvars.iv195
  %84 = load i32, ptr %83, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  call void @_Z3rdxiRiS_(i32 noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %gep170 = getelementptr [15981 x %struct.NFA], ptr %invariant.gep169, i64 0, i64 %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %87 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %gep170) #10
  store ptr %87, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %88 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %gep170) #10
  store ptr %88, ptr %9, align 8
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br i1 %89, label %.lr.ph160.preheader, label %._crit_edge161

.lr.ph160.preheader:                              ; preds = %82
  %90 = trunc nsw i64 %indvars.iv195 to i32
  br label %.lr.ph160

.lr.ph160:                                        ; preds = %.lr.ph160.preheader, %._crit_edge157
  %.187158 = phi i8 [ %.288.lcssa, %._crit_edge157 ], [ %.086164, %.lr.ph160.preheader ]
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %gep = getelementptr [15981 x %struct.NFA], ptr %invariant.gep, i64 0, i64 %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %94 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %gep) #10
  store ptr %94, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %95 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %gep) #10
  store ptr %95, ptr %11, align 8
  %96 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  br i1 %96, label %.lr.ph156, label %._crit_edge157

.lr.ph156:                                        ; preds = %.lr.ph160, %115
  %.288154 = phi i8 [ %.389.ph, %115 ], [ %.187158, %.lr.ph160 ]
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  %98 = load i32, ptr %91, align 4, !tbaa !5
  %99 = load i32, ptr %97, align 4, !tbaa !5
  %100 = call noundef i32 @_Z3idxii(i32 noundef %98, i32 noundef %99)
  store i32 %100, ptr %12, align 4, !tbaa !5
  %101 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %.not97 = icmp eq i64 %101, 0
  br i1 %.not97, label %102, label %115

102:                                              ; preds = %.lr.ph156
  %103 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %104 = load i32, ptr @R, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [10000001 x i32], ptr @fro, i64 0, i64 %105
  store i32 %90, ptr %106, align 4, !tbaa !5
  %107 = getelementptr inbounds [10000001 x i8], ptr @ch, i64 0, i64 %105
  store i8 %80, ptr %107, align 1, !tbaa !17
  %108 = trunc nuw i8 %.288154 to i1
  %spec.store.select11 = select i1 %108, i8 0, i8 %.288154
  %109 = getelementptr inbounds [10000001 x i8], ptr @eq, i64 0, i64 %105
  %not. = and i8 %.288154, 1
  %110 = xor i8 %not., 1
  store i8 %110, ptr %109, align 1, !tbaa !12
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = add nsw i32 %104, 1
  store i32 %112, ptr @R, align 4, !tbaa !5
  %113 = getelementptr inbounds [10000001 x i32], ptr @que, i64 0, i64 %105
  store i32 %111, ptr %113, align 4, !tbaa !5
  %114 = icmp eq i32 %111, %53
  br i1 %114, label %120, label %115

115:                                              ; preds = %.lr.ph156, %102
  %.389.ph = phi i8 [ %spec.store.select11, %102 ], [ %.288154, %.lr.ph156 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  %117 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  br i1 %117, label %.lr.ph156, label %._crit_edge157

._crit_edge157:                                   ; preds = %115, %.lr.ph160
  %.288.lcssa = phi i8 [ %.187158, %.lr.ph160 ], [ %.389.ph, %115 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  %119 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br i1 %119, label %.lr.ph160, label %._crit_edge161

._crit_edge161:                                   ; preds = %._crit_edge157, %82
  %.187.lcssa = phi i8 [ %.086164, %82 ], [ %.288.lcssa, %._crit_edge157 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  %indvars.iv.next196 = add nsw i64 %indvars.iv195, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next196 to i32
  %exitcond.not = icmp eq i32 %77, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge168, label %82, !llvm.loop !18

120:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  store i32 0, ptr @olen, align 4, !tbaa !5
  %.not98172 = icmp eq i32 %104, 0
  br i1 %.not98172, label %124, label %.lr.ph175

._crit_edge168:                                   ; preds = %._crit_edge161, %.critedge.split
  %indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1
  %exitcond200.not = icmp eq i64 %indvars.iv.next198, 26
  br i1 %exitcond200.not, label %.split.us.loopexit187, label %.critedge.split, !llvm.loop !19

.split.us.loopexit187:                            ; preds = %._crit_edge168
  %.pre = load i32, ptr @R, align 4, !tbaa !5
  br label %.split.us

.split.us:                                        ; preds = %.critedge, %.split.us.loopexit187
  %121 = phi i32 [ %.pre, %.split.us.loopexit187 ], [ %62, %.critedge ]
  store i32 %.093.lcssa, ptr @L, align 4, !tbaa !5
  %122 = icmp slt i32 %.093.lcssa, %121
  br i1 %122, label %.preheader, label %.critedge146.loopexit, !llvm.loop !21

.critedge146.loopexit:                            ; preds = %.split.us, %.lr.ph179
  br label %137, !llvm.loop !22

._crit_edge176:                                   ; preds = %.lr.ph175
  %123 = trunc nuw i64 %indvars.iv.next202 to i32
  store i32 %123, ptr @olen, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %._crit_edge176, %120
  %125 = phi i64 [ %indvars.iv.next202, %._crit_edge176 ], [ 0, %120 ]
  %sext = shl i64 %125, 32
  %126 = ashr exact i64 %sext, 32
  %127 = getelementptr inbounds i8, ptr @out, i64 %126
  call void @_ZSt7reverseIPcEvT_S1_(ptr noundef nonnull @out, ptr noundef nonnull %127)
  %128 = load i32, ptr @olen, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [441 x i8], ptr @out, i64 0, i64 %129
  store i8 0, ptr %130, align 1, !tbaa !17
  br label %137

.lr.ph175:                                        ; preds = %120, %.lr.ph175
  %indvars.iv201 = phi i64 [ %indvars.iv.next202, %.lr.ph175 ], [ 0, %120 ]
  %.0173 = phi i32 [ %136, %.lr.ph175 ], [ %104, %120 ]
  %131 = sext i32 %.0173 to i64
  %132 = getelementptr inbounds [10000001 x i8], ptr @ch, i64 0, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !17
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %134 = getelementptr inbounds [441 x i8], ptr @out, i64 0, i64 %indvars.iv201
  store i8 %133, ptr %134, align 1, !tbaa !17
  %135 = getelementptr inbounds [10000001 x i32], ptr @fro, i64 0, i64 %131
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %.not98 = icmp eq i32 %136, 0
  br i1 %.not98, label %._crit_edge176, label %.lr.ph175, !llvm.loop !23

137:                                              ; preds = %124, %.critedge146.loopexit
  %out.sink = phi ptr [ @out, %124 ], [ @.str.7, %.critedge146.loopexit ]
  %138 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %out.sink)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  %139 = load i32, ptr @q, align 4, !tbaa !5
  %140 = add nsw i32 %139, -1
  store i32 %140, ptr @q, align 4, !tbaa !5
  %.not95 = icmp eq i32 %139, 0
  br i1 %.not95, label %._crit_edge180, label %.lr.ph179

._crit_edge180:                                   ; preds = %137, %._crit_edge153
  %141 = add nuw nsw i32 %.073182, 1
  %142 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.073182, %142
  br i1 %.not.not, label %.lr.ph184, label %._crit_edge185, !llvm.loop !24
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3idxii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3rdxiRiS_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPcEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #9

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 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nofree 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(read) }

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

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


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