; LLVM IR from tangjz/acm-icpc :: hackerrank (basic-cryptanalysis)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mersenne_twister_engine" = type { [312 x i64], i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = 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.std::pair.13" = 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.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.16" = type { i8 }
%"struct.std::pair.6" = type <{ i32, i8, [3 x i8] }>
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::vector.0" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }
%class.anon.19 = type { i8 }

@__dso_handle = external hidden global i8
@e = external dso_local global [101 x %"class.std::vector"], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@bLen = external dso_local global [101 x i32], align 16
@pLen = external dso_local global [1701 x i32], align 16
@ord = external dso_local global [101 x i32], align 16
@buf = external dso_local global [101 x [101 x i8]], align 16
@pat = external dso_local global [1701 x [101 x i8]], align 16
@bDup = external dso_local global [101 x i8], align 16
@pDup = external dso_local global [1701 x i8], align 16
@bUpp = external dso_local global [101 x [101 x i8]], align 16
@pUpp = external dso_local global [101 x [101 x i8]], align 16
@rnd = external dso_local global %"class.std::mersenne_twister_engine", align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE3cur = external hidden global %"class.std::vector.0", align 8
@_ZGVZ4mainE3cur = external hidden global i64, align 8
@_ZZ4mainE2tr = external hidden global [27 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 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 ptr, align 8
  %3 = alloca %"class.std::unordered_set", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca %"struct.std::pair.13", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.16", align 1
  %11 = alloca { ptr, i8 }, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca %"struct.std::pair.13", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.16", align 1
  %17 = alloca { ptr, i8 }, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair.6", align 4
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %class.anon, align 1
  %31 = alloca %class.anon.19, align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #0
  %32 = call noalias ptr @fopen(ptr noundef @.str.4, ptr noundef @.str.5)
  store ptr %32, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #0
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #0
  br label %33

33:                                               ; preds = %131, %0
  %34 = load i32, ptr @n, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %35
  %37 = getelementptr inbounds [101 x i8], ptr %36, i64 0, i64 0
  %38 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %37)
          to label %39 unwind label %59

39:                                               ; preds = %33
  %40 = icmp eq i32 %38, 1
  br i1 %40, label %41, label %143

41:                                               ; preds = %39
  %42 = load i32, ptr @n, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %43
  %45 = getelementptr inbounds [101 x i8], ptr %44, i64 0, i64 0
  %46 = call i64 @strlen(ptr noundef %45) #12
  %47 = trunc i64 %46 to i32
  %48 = load i32, ptr @n, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #0
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %112, %41
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = load i32, ptr @n, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = icmp slt i32 %52, %56
  br i1 %57, label %63, label %58

58:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #0
  br label %115

59:                                               ; preds = %443, %440, %436, %251, %144, %33
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  br label %448

63:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #0
  %64 = load i32, ptr @n, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %65
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [101 x i8], ptr %66, i64 0, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !11
  %71 = sext i8 %70 to i32
  %72 = call i32 @tolower(i32 noundef %71) #12
  %73 = trunc i32 %72 to i8
  store i8 %73, ptr %7, align 1, !tbaa !11
  %74 = load i8, ptr %7, align 1, !tbaa !11
  %75 = sext i8 %74 to i32
  %76 = load i32, ptr @n, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %77
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [101 x i8], ptr %78, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = icmp ne i32 %75, %83
  %85 = load i32, ptr @n, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [101 x [101 x i8]], ptr @bUpp, i64 0, i64 %86
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [101 x i8], ptr %87, i64 0, i64 %89
  %91 = zext i1 %84 to i8
  store i8 %91, ptr %90, align 1, !tbaa !12
  %92 = load i8, ptr %7, align 1, !tbaa !11
  %93 = load i32, ptr @n, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %94
  %96 = load i32, ptr %6, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [101 x i8], ptr %95, i64 0, i64 %97
  store i8 %92, ptr %98, align 1, !tbaa !11
  %99 = load i8, ptr %7, align 1, !tbaa !11
  %100 = sext i8 %99 to i32
  %101 = icmp sge i32 %100, 97
  br i1 %101, label %102, label %106

102:                                              ; preds = %63
  %103 = load i8, ptr %7, align 1, !tbaa !11
  %104 = sext i8 %103 to i32
  %105 = icmp sle i32 %104, 122
  br label %106

106:                                              ; preds = %102, %63
  %107 = phi i1 [ false, %63 ], [ %105, %102 ]
  br i1 %107, label %108, label %109

108:                                              ; preds = %106
  br label %111

109:                                              ; preds = %106
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.8, i32 noundef 75, ptr noundef @__PRETTY_FUNCTION__.main) #13
  unreachable

110:                                              ; No predecessors!
  br label %111

111:                                              ; preds = %110, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #0
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %6, align 4, !tbaa !9
  br label %51, !llvm.loop !14

115:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #0
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #0
  %116 = load i32, ptr @n, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %117
  %119 = getelementptr inbounds [101 x i8], ptr %118, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %119, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %120 unwind label %134

120:                                              ; preds = %115
  %121 = invoke { ptr, i8 } @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %122 unwind label %138

122:                                              ; preds = %120
  store { ptr, i8 } %121, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %11, i64 9, i1 false)
  %123 = getelementptr inbounds %"struct.std::pair.13", ptr %8, i32 0, i32 1
  %124 = load i8, ptr %123, align 8, !tbaa !16, !range !20, !noundef !21
  %125 = trunc i8 %124 to i1
  %126 = xor i1 %125, true
  %127 = load i32, ptr @n, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %128
  %130 = zext i1 %126 to i8
  store i8 %130, ptr %129, align 1, !tbaa !12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #0
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #0
  br label %131

131:                                              ; preds = %122
  %132 = load i32, ptr @n, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr @n, align 4, !tbaa !9
  br label %33, !llvm.loop !22

134:                                              ; preds = %115
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %4, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %5, align 4
  br label %142

138:                                              ; preds = %120
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %4, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #0
  br label %142

142:                                              ; preds = %138, %134
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #0
  br label %448

143:                                              ; preds = %39
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #0
  br label %144

144:                                              ; preds = %239, %143
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = load i32, ptr @m, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %147
  %149 = getelementptr inbounds [101 x i8], ptr %148, i64 0, i64 0
  %150 = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %145, ptr noundef @.str.6, ptr noundef %149)
          to label %151 unwind label %59

151:                                              ; preds = %144
  %152 = icmp eq i32 %150, 1
  br i1 %152, label %153, label %251

153:                                              ; preds = %151
  %154 = load i32, ptr @m, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %155
  %157 = getelementptr inbounds [101 x i8], ptr %156, i64 0, i64 0
  %158 = call i64 @strlen(ptr noundef %157) #12
  %159 = trunc i64 %158 to i32
  %160 = load i32, ptr @m, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [1701 x i32], ptr @pLen, i64 0, i64 %161
  store i32 %159, ptr %162, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #0
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %220, %153
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = load i32, ptr @m, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1701 x i32], ptr @pLen, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = icmp slt i32 %164, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #0
  br label %223

171:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #0
  %172 = load i32, ptr @m, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %173
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [101 x i8], ptr %174, i64 0, i64 %176
  %178 = load i8, ptr %177, align 1, !tbaa !11
  %179 = sext i8 %178 to i32
  %180 = call i32 @tolower(i32 noundef %179) #12
  %181 = trunc i32 %180 to i8
  store i8 %181, ptr %13, align 1, !tbaa !11
  %182 = load i8, ptr %13, align 1, !tbaa !11
  %183 = sext i8 %182 to i32
  %184 = load i32, ptr @m, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %185
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [101 x i8], ptr %186, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !11
  %191 = sext i8 %190 to i32
  %192 = icmp ne i32 %183, %191
  %193 = load i32, ptr @m, align 4, !tbaa !9
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [101 x [101 x i8]], ptr @pUpp, i64 0, i64 %194
  %196 = load i32, ptr %12, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [101 x i8], ptr %195, i64 0, i64 %197
  %199 = zext i1 %192 to i8
  store i8 %199, ptr %198, align 1, !tbaa !12
  %200 = load i8, ptr %13, align 1, !tbaa !11
  %201 = load i32, ptr @m, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %202
  %204 = load i32, ptr %12, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [101 x i8], ptr %203, i64 0, i64 %205
  store i8 %200, ptr %206, align 1, !tbaa !11
  %207 = load i8, ptr %13, align 1, !tbaa !11
  %208 = sext i8 %207 to i32
  %209 = icmp sge i32 %208, 97
  br i1 %209, label %210, label %214

210:                                              ; preds = %171
  %211 = load i8, ptr %13, align 1, !tbaa !11
  %212 = sext i8 %211 to i32
  %213 = icmp sle i32 %212, 122
  br label %214

214:                                              ; preds = %210, %171
  %215 = phi i1 [ false, %171 ], [ %213, %210 ]
  br i1 %215, label %216, label %217

216:                                              ; preds = %214
  br label %219

217:                                              ; preds = %214
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.8, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__.main) #13
  unreachable

218:                                              ; No predecessors!
  br label %219

219:                                              ; preds = %218, %216
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #0
  br label %220

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

223:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #0
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #0
  %224 = load i32, ptr @m, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %225
  %227 = getelementptr inbounds [101 x i8], ptr %226, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #0
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %227, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %228 unwind label %242

228:                                              ; preds = %223
  %229 = invoke { ptr, i8 } @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %230 unwind label %246

230:                                              ; preds = %228
  store { ptr, i8 } %229, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %17, i64 9, i1 false)
  %231 = getelementptr inbounds %"struct.std::pair.13", ptr %14, i32 0, i32 1
  %232 = load i8, ptr %231, align 8, !tbaa !16, !range !20, !noundef !21
  %233 = trunc i8 %232 to i1
  %234 = xor i1 %233, true
  %235 = load i32, ptr @m, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [1701 x i8], ptr @pDup, i64 0, i64 %236
  %238 = zext i1 %234 to i8
  store i8 %238, ptr %237, align 1, !tbaa !12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #0
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #0
  br label %239

239:                                              ; preds = %230
  %240 = load i32, ptr @m, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr @m, align 4, !tbaa !9
  br label %144, !llvm.loop !24

242:                                              ; preds = %223
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %4, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %5, align 4
  br label %250

246:                                              ; preds = %228
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %4, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #0
  br label %250

250:                                              ; preds = %246, %242
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #0
  br label %448

251:                                              ; preds = %151
  %252 = load ptr, ptr %2, align 8, !tbaa !5
  %253 = invoke i32 @fclose(ptr noundef %252)
          to label %254 unwind label %59

254:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #0
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %255

255:                                              ; preds = %428, %254
  %256 = load i32, ptr %18, align 4, !tbaa !9
  %257 = load i32, ptr @n, align 4, !tbaa !9
  %258 = icmp slt i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 14, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #0
  br label %436

260:                                              ; preds = %255
  %261 = load i32, ptr %18, align 4, !tbaa !9
  %262 = load i32, ptr %18, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [101 x i32], ptr @ord, i64 0, i64 %263
  store i32 %261, ptr %264, align 4, !tbaa !9
  %265 = load i32, ptr %18, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %266
  %268 = load i8, ptr %267, align 1, !tbaa !12, !range !20, !noundef !21
  %269 = trunc i8 %268 to i1
  br i1 %269, label %270, label %271

270:                                              ; preds = %260
  br label %428

271:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #0
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %272

272:                                              ; preds = %408, %271
  %273 = load i32, ptr %20, align 4, !tbaa !9
  %274 = load i32, ptr @m, align 4, !tbaa !9
  %275 = icmp slt i32 %273, %274
  br i1 %275, label %277, label %276

276:                                              ; preds = %272
  store i32 17, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #0
  br label %412

277:                                              ; preds = %272
  %278 = load i32, ptr %18, align 4, !tbaa !9
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !9
  %282 = load i32, ptr %20, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [1701 x i32], ptr @pLen, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !9
  %286 = icmp ne i32 %281, %285
  br i1 %286, label %293, label %287

287:                                              ; preds = %277
  %288 = load i32, ptr %20, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [1701 x i8], ptr @pDup, i64 0, i64 %289
  %291 = load i8, ptr %290, align 1, !tbaa !12, !range !20, !noundef !21
  %292 = trunc i8 %291 to i1
  br i1 %292, label %293, label %294

293:                                              ; preds = %287, %277
  br label %408

294:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #0
  store i8 0, ptr %21, align 1, !tbaa !12
  %295 = load atomic i8, ptr @_ZGVZ4mainE3cur acquire, align 8
  %296 = icmp eq i8 %295, 0
  br i1 %296, label %297, label %302, !prof !25

297:                                              ; preds = %294
  %298 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ4mainE3cur) #0
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %300, label %302

300:                                              ; preds = %297
  call void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #0
  %301 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev, ptr @_ZZ4mainE3cur, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ4mainE3cur) #0
  br label %302

302:                                              ; preds = %300, %297, %294
  call void @_ZNSt6vectorISt4pairIicESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #0
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ4mainE2tr, i8 0, i64 27, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #0
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %303

303:                                              ; preds = %372, %302
  %304 = load i32, ptr %22, align 4, !tbaa !9
  %305 = load i32, ptr %18, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %306
  %308 = load i32, ptr %307, align 4, !tbaa !9
  %309 = icmp slt i32 %304, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %303
  store i32 20, ptr %19, align 4
  br label %375

311:                                              ; preds = %303
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #0
  %312 = load i32, ptr %18, align 4, !tbaa !9
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %313
  %315 = load i32, ptr %22, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [101 x i8], ptr %314, i64 0, i64 %316
  %318 = load i8, ptr %317, align 1, !tbaa !11
  %319 = sext i8 %318 to i32
  %320 = sub nsw i32 %319, 97
  store i32 %320, ptr %23, align 4, !tbaa !9
  %321 = load i32, ptr %23, align 4, !tbaa !9
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %322
  %324 = load i8, ptr %323, align 1, !tbaa !11
  %325 = icmp ne i8 %324, 0
  br i1 %325, label %326, label %342

326:                                              ; preds = %311
  %327 = load i32, ptr %20, align 4, !tbaa !9
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %328
  %330 = load i32, ptr %22, align 4, !tbaa !9
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [101 x i8], ptr %329, i64 0, i64 %331
  %333 = load i8, ptr %332, align 1, !tbaa !11
  %334 = sext i8 %333 to i32
  %335 = load i32, ptr %23, align 4, !tbaa !9
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %336
  %338 = load i8, ptr %337, align 1, !tbaa !11
  %339 = sext i8 %338 to i32
  %340 = icmp ne i32 %334, %339
  br i1 %340, label %341, label %342

341:                                              ; preds = %326
  store i8 1, ptr %21, align 1, !tbaa !12
  store i32 20, ptr %19, align 4
  br label %369

342:                                              ; preds = %326, %311
  %343 = load i32, ptr %23, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %344
  %346 = load i8, ptr %345, align 1, !tbaa !11
  %347 = icmp ne i8 %346, 0
  br i1 %347, label %368, label %348

348:                                              ; preds = %342
  %349 = load i32, ptr %20, align 4, !tbaa !9
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %350
  %352 = load i32, ptr %22, align 4, !tbaa !9
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [101 x i8], ptr %351, i64 0, i64 %353
  %355 = load i8, ptr %354, align 1, !tbaa !11
  %356 = load i32, ptr %23, align 4, !tbaa !9
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %357
  store i8 %355, ptr %358, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #0
  %359 = load i32, ptr %23, align 4, !tbaa !9
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %360
  invoke void @_ZNSt4pairIicEC2IRiRcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(5) %24, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 1 dereferenceable(1) %361)
          to label %362 unwind label %364

362:                                              ; preds = %348
  invoke void @_ZNSt6vectorISt4pairIicESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur, ptr noundef nonnull align 4 dereferenceable(5) %24)
          to label %363 unwind label %364

363:                                              ; preds = %362
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  br label %368

364:                                              ; preds = %362, %348
  %365 = landingpad { ptr, i32 }
          cleanup
  %366 = extractvalue { ptr, i32 } %365, 0
  store ptr %366, ptr %4, align 8
  %367 = extractvalue { ptr, i32 } %365, 1
  store i32 %367, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #0
  br label %411

368:                                              ; preds = %363, %342
  store i32 0, ptr %19, align 4
  br label %369

369:                                              ; preds = %368, %341
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  %370 = load i32, ptr %19, align 4
  switch i32 %370, label %375 [
    i32 0, label %371
  ]

371:                                              ; preds = %369
  br label %372

372:                                              ; preds = %371
  %373 = load i32, ptr %22, align 4, !tbaa !9
  %374 = add nsw i32 %373, 1
  store i32 %374, ptr %22, align 4, !tbaa !9
  br label %303, !llvm.loop !26

375:                                              ; preds = %369, %310
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #0
  br label %376

376:                                              ; preds = %375
  %377 = load i8, ptr %21, align 1, !tbaa !12, !range !20, !noundef !21
  %378 = trunc i8 %377 to i1
  br i1 %378, label %407, label %379

379:                                              ; preds = %376
  %380 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #0
  %381 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %25, i32 0, i32 0
  store ptr %380, ptr %381, align 8
  %382 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #0
  %383 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %26, i32 0, i32 0
  store ptr %382, ptr %383, align 8
  %384 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %25, i32 0, i32 0
  %385 = load ptr, ptr %384, align 8
  %386 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %26, i32 0, i32 0
  %387 = load ptr, ptr %386, align 8
  invoke void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEERSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEvT_SC_OT0_(ptr %385, ptr %387, ptr noundef nonnull align 8 dereferenceable(2504) @rnd)
          to label %388 unwind label %394

388:                                              ; preds = %379
  %389 = load i32, ptr %18, align 4, !tbaa !9
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %390
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #0
  invoke void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEEC2IRiRS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur)
          to label %392 unwind label %398

392:                                              ; preds = %388
  invoke void @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %391, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %393 unwind label %402

393:                                              ; preds = %392
  call void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #0
  br label %407

394:                                              ; preds = %379
  %395 = landingpad { ptr, i32 }
          cleanup
  %396 = extractvalue { ptr, i32 } %395, 0
  store ptr %396, ptr %4, align 8
  %397 = extractvalue { ptr, i32 } %395, 1
  store i32 %397, ptr %5, align 4
  br label %411

398:                                              ; preds = %388
  %399 = landingpad { ptr, i32 }
          cleanup
  %400 = extractvalue { ptr, i32 } %399, 0
  store ptr %400, ptr %4, align 8
  %401 = extractvalue { ptr, i32 } %399, 1
  store i32 %401, ptr %5, align 4
  br label %406

402:                                              ; preds = %392
  %403 = landingpad { ptr, i32 }
          cleanup
  %404 = extractvalue { ptr, i32 } %403, 0
  store ptr %404, ptr %4, align 8
  %405 = extractvalue { ptr, i32 } %403, 1
  store i32 %405, ptr %5, align 4
  call void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #0
  br label %406

406:                                              ; preds = %402, %398
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #0
  br label %411

407:                                              ; preds = %393, %376
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #0
  br label %408

408:                                              ; preds = %407, %293
  %409 = load i32, ptr %20, align 4, !tbaa !9
  %410 = add nsw i32 %409, 1
  store i32 %410, ptr %20, align 4, !tbaa !9
  br label %272, !llvm.loop !27

411:                                              ; preds = %406, %394, %364
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #0
  br label %435

412:                                              ; preds = %276
  %413 = load i32, ptr %18, align 4, !tbaa !9
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %414
  %416 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %415) #0
  %417 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %416, ptr %417, align 8
  %418 = load i32, ptr %18, align 4, !tbaa !9
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %419
  %421 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %420) #0
  %422 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %421, ptr %422, align 8
  %423 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %424 = load ptr, ptr %423, align 8
  %425 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  %426 = load ptr, ptr %425, align 8
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS2_IicESaIS4_EEES3_IS7_SaIS7_EEEEZ4mainE3$_0EvT_SD_T0_"(ptr %424, ptr %426)
          to label %427 unwind label %431

427:                                              ; preds = %412
  br label %428

428:                                              ; preds = %427, %270
  %429 = load i32, ptr %18, align 4, !tbaa !9
  %430 = add nsw i32 %429, 1
  store i32 %430, ptr %18, align 4, !tbaa !9
  br label %255, !llvm.loop !28

431:                                              ; preds = %412
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %4, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %5, align 4
  br label %435

435:                                              ; preds = %431, %411
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #0
  br label %448

436:                                              ; preds = %259
  %437 = load i32, ptr @n, align 4, !tbaa !9
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds i32, ptr @ord, i64 %438
  invoke void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef @ord, ptr noundef %439)
          to label %440 unwind label %59

440:                                              ; preds = %436
  %441 = invoke noundef zeroext i1 @_Z3dfsi(i32 noundef 0)
          to label %442 unwind label %59

442:                                              ; preds = %440
  br i1 %441, label %446, label %443

443:                                              ; preds = %442
  %444 = invoke i32 @puts(ptr noundef @.str.9)
          to label %445 unwind label %59

445:                                              ; preds = %443
  br label %446

446:                                              ; preds = %445, %442
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #0
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #0
  %447 = load i32, ptr %1, align 4
  ret i32 %447

448:                                              ; preds = %435, %250, %142, %59
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #0
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #0
  br label %449

449:                                              ; preds = %448
  %450 = load ptr, ptr %4, align 8
  %451 = load i32, ptr %5, align 4
  %452 = insertvalue { ptr, i32 } poison, ptr %450, 0
  %453 = insertvalue { ptr, i32 } %452, i32 %451, 1
  resume { ptr, i32 } %453
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) #6

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

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

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

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

declare i32 @fclose(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIicEC2IRiRcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(5), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEERSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEvT_SC_OT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(2504)) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #10 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS2_IicESaIS4_EEES3_IS7_SaIS7_EEEEZ4mainE3$_0EvT_SD_T0_"(ptr, ptr) #11

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) #11

declare i32 @puts(ptr noundef) #5

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

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

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

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

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


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mersenne_twister_engine" = type { [312 x i64], i64 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = 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 }
%"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.16" = type { i8 }
%"struct.std::pair.6" = type <{ i32, i8, [3 x i8] }>
%"struct.std::pair" = type { i32, %"class.std::vector.0" }

@__dso_handle = external hidden global i8
@e = external dso_local global [101 x %"class.std::vector"], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@bLen = external dso_local local_unnamed_addr global [101 x i32], align 16
@pLen = external dso_local local_unnamed_addr global [1701 x i32], align 16
@ord = external dso_local global [101 x i32], align 16
@buf = external dso_local global [101 x [101 x i8]], align 16
@pat = external dso_local global [1701 x [101 x i8]], align 16
@bDup = external dso_local local_unnamed_addr global [101 x i8], align 16
@pDup = external dso_local local_unnamed_addr global [1701 x i8], align 16
@bUpp = external dso_local local_unnamed_addr global [101 x [101 x i8]], align 16
@pUpp = external dso_local local_unnamed_addr global [101 x [101 x i8]], align 16
@rnd = external dso_local global %"class.std::mersenne_twister_engine", align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE3cur = external hidden global %"class.std::vector.0", align 8
@_ZGVZ4mainE3cur = external hidden global i64, align 8
@_ZZ4mainE2tr = external hidden global [27 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 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_set", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.16", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.16", align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.6", align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #13
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #13
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %12
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %13)
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %0, %38
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %17
  %19 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %18) #14
  %20 = trunc i64 %19 to i32
  %21 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %17
  store i32 %20, ptr %21, align 4, !tbaa !5
  %22 = icmp sgt i32 %20, 0
  br i1 %22, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph97
  %wide.trip.count = and i64 %19, 2147483647
  br label %.lr.ph

23:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %23, %.lr.ph97
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #13
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #13
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %18, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %36 unwind label %50

.loopexit:                                        ; preds = %55
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %187

.loopexit.split-lp:                               ; preds = %._crit_edge114, %181
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %187

.lr.ph:                                           ; preds = %.lr.ph.preheader, %23
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %23 ]
  %24 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %17, i64 %indvars.iv
  %25 = load i8, ptr %24, align 1, !tbaa !11
  %26 = sext i8 %25 to i32
  %27 = call i32 @tolower(i32 noundef %26) #14
  %28 = trunc i32 %27 to i8
  %sext83 = shl i32 %27, 24
  %29 = ashr exact i32 %sext83, 24
  %30 = icmp ne i32 %29, %26
  %31 = getelementptr inbounds [101 x [101 x i8]], ptr @bUpp, i64 0, i64 %17, i64 %indvars.iv
  %32 = zext i1 %30 to i8
  store i8 %32, ptr %31, align 1, !tbaa !12
  store i8 %28, ptr %24, align 1, !tbaa !11
  %33 = add nsw i32 %29, -97
  %34 = icmp ult i32 %33, 26
  br i1 %34, label %23, label %35

35:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, i32 noundef 75, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #15
  unreachable

36:                                               ; preds = %._crit_edge
  %37 = invoke { ptr, i8 } @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %38 unwind label %52

38:                                               ; preds = %36
  %.fca.1.extract34 = extractvalue { ptr, i8 } %37, 1
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %40
  %42 = and i8 %.fca.1.extract34, 1
  %43 = xor i8 %42, 1
  store i8 %43, ptr %41, align 1, !tbaa !12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #13
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #13
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr @n, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %46
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %47)
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %.lr.ph97, label %._crit_edge98, !llvm.loop !14

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %36
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #13
  br label %54

54:                                               ; preds = %52, %50
  %.pn80 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #13
  br label %187

._crit_edge98:                                    ; preds = %38, %0
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %1) #13
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %85, %._crit_edge98
  %56 = phi i32 [ %92, %85 ], [ %.pre, %._crit_edge98 ]
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %57
  %59 = invoke i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %10, ptr noundef nonnull @.str.6, ptr noundef nonnull %58)
          to label %60 unwind label %.loopexit

60:                                               ; preds = %55
  %61 = icmp eq i32 %59, 1
  br i1 %61, label %62, label %98

62:                                               ; preds = %60
  %63 = load i32, ptr @m, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %64
  %66 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %65) #14
  %67 = trunc i64 %66 to i32
  %68 = getelementptr inbounds [1701 x i32], ptr @pLen, i64 0, i64 %64
  store i32 %67, ptr %68, align 4, !tbaa !5
  %69 = icmp sgt i32 %67, 0
  br i1 %69, label %.lr.ph101.preheader, label %._crit_edge102

.lr.ph101.preheader:                              ; preds = %62
  %wide.trip.count120 = and i64 %66, 2147483647
  br label %.lr.ph101

70:                                               ; preds = %.lr.ph101
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count120
  br i1 %exitcond121.not, label %._crit_edge102, label %.lr.ph101, !llvm.loop !15

._crit_edge102:                                   ; preds = %70, %62
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #13
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #13
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %65, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %83 unwind label %93

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %70
  %indvars.iv117 = phi i64 [ 0, %.lr.ph101.preheader ], [ %indvars.iv.next118, %70 ]
  %71 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %64, i64 %indvars.iv117
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = call i32 @tolower(i32 noundef %73) #14
  %75 = trunc i32 %74 to i8
  %sext = shl i32 %74, 24
  %76 = ashr exact i32 %sext, 24
  %77 = icmp ne i32 %76, %73
  %78 = getelementptr inbounds [101 x [101 x i8]], ptr @pUpp, i64 0, i64 %64, i64 %indvars.iv117
  %79 = zext i1 %77 to i8
  store i8 %79, ptr %78, align 1, !tbaa !12
  store i8 %75, ptr %71, align 1, !tbaa !11
  %80 = add nsw i32 %76, -97
  %81 = icmp ult i32 %80, 26
  br i1 %81, label %70, label %82

82:                                               ; preds = %.lr.ph101
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #15
  unreachable

83:                                               ; preds = %._crit_edge102
  %84 = invoke { ptr, i8 } @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %85 unwind label %95

85:                                               ; preds = %83
  %.fca.1.extract = extractvalue { ptr, i8 } %84, 1
  %86 = load i32, ptr @m, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1701 x i8], ptr @pDup, i64 0, i64 %87
  %89 = and i8 %.fca.1.extract, 1
  %90 = xor i8 %89, 1
  store i8 %90, ptr %88, align 1, !tbaa !12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #13
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #13
  %91 = load i32, ptr @m, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @m, align 4, !tbaa !5
  br label %55, !llvm.loop !16

93:                                               ; preds = %._crit_edge102
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %83
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #13
  br label %97

97:                                               ; preds = %95, %93
  %.pn78 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #13
  br label %187

98:                                               ; preds = %60
  %99 = call i32 @fclose(ptr noundef %10)
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %.lr.ph113, label %.._crit_edge114_crit_edge

.._crit_edge114_crit_edge:                        ; preds = %98
  %.pre131 = sext i32 %100 to i64
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %175, %.._crit_edge114_crit_edge
  %.pre-phi = phi i64 [ %.pre131, %.._crit_edge114_crit_edge ], [ %177, %175 ]
  %102 = getelementptr inbounds i32, ptr @ord, i64 %.pre-phi
  invoke void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef nonnull @ord, ptr noundef nonnull %102)
          to label %181 unwind label %.loopexit.split-lp

.lr.ph113:                                        ; preds = %98, %175
  %103 = phi i32 [ %176, %175 ], [ %100, %98 ]
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %175 ], [ 0, %98 ]
  %104 = getelementptr inbounds [101 x i32], ptr @ord, i64 0, i64 %indvars.iv125
  %105 = trunc nuw nsw i64 %indvars.iv125 to i32
  store i32 %105, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %indvars.iv125
  %107 = load i8, ptr %106, align 1, !tbaa !12, !range !17, !noundef !18
  %108 = trunc nuw i8 %107 to i1
  br i1 %108, label %175, label %109

109:                                              ; preds = %.lr.ph113
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #13
  store i32 0, ptr %6, align 4, !tbaa !5
  %110 = load i32, ptr @m, align 4, !tbaa !5
  %111 = icmp sgt i32 %110, 0
  br i1 %111, label %.lr.ph109, label %._crit_edge110

.lr.ph109:                                        ; preds = %109
  %112 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %indvars.iv125
  %113 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv125
  br label %117

._crit_edge110:                                   ; preds = %169, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #13
  %114 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv125
  %115 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #13
  %116 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #13
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS2_IicESaIS4_EEES3_IS7_SaIS7_EEEEZ4mainE3$_0EvT_SD_T0_"(ptr %115, ptr %116)
          to label %._crit_edge110._crit_edge unwind label %179

._crit_edge110._crit_edge:                        ; preds = %._crit_edge110
  %.pre130 = load i32, ptr @n, align 4, !tbaa !5
  br label %175

117:                                              ; preds = %.lr.ph109, %169
  %storemerge107 = phi i32 [ 0, %.lr.ph109 ], [ %171, %169 ]
  %118 = load i32, ptr %112, align 4, !tbaa !5
  %119 = sext i32 %storemerge107 to i64
  %120 = getelementptr inbounds [1701 x i32], ptr @pLen, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %.not = icmp eq i32 %118, %121
  br i1 %.not, label %122, label %169

122:                                              ; preds = %117
  %123 = getelementptr inbounds [1701 x i8], ptr @pDup, i64 0, i64 %119
  %124 = load i8, ptr %123, align 1, !tbaa !12, !range !17, !noundef !18
  %125 = trunc nuw i8 %124 to i1
  br i1 %125, label %169, label %126

126:                                              ; preds = %122
  %127 = load atomic i8, ptr @_ZGVZ4mainE3cur acquire, align 8
  %128 = icmp eq i8 %127, 0
  br i1 %128, label %129, label %133, !prof !19

129:                                              ; preds = %126
  %130 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ4mainE3cur) #13
  %.not71 = icmp eq i32 %130, 0
  br i1 %.not71, label %133, label %131

131:                                              ; preds = %129
  call void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #13
  %132 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev, ptr nonnull @_ZZ4mainE3cur, ptr nonnull @__dso_handle) #13
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ4mainE3cur) #13
  br label %133

133:                                              ; preds = %131, %129, %126
  call void @_ZNSt6vectorISt4pairIicESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(27) @_ZZ4mainE2tr, i8 0, i64 27, i1 false)
  %134 = load i32, ptr %112, align 4, !tbaa !5
  %135 = icmp sgt i32 %134, 0
  br i1 %135, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %133, %153
  %136 = phi i32 [ %154, %153 ], [ %134, %133 ]
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %153 ], [ 0, %133 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #13
  %137 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv125, i64 %indvars.iv122
  %138 = load i8, ptr %137, align 1, !tbaa !11
  %139 = sext i8 %138 to i32
  %140 = add nsw i32 %139, -97
  store i32 %140, ptr %7, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [27 x i8], ptr @_ZZ4mainE2tr, i64 0, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !11
  %.not72 = icmp eq i8 %143, 0
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [1701 x [101 x i8]], ptr @pat, i64 0, i64 %145, i64 %indvars.iv122
  %147 = load i8, ptr %146, align 1, !tbaa !11
  br i1 %.not72, label %149, label %148

148:                                              ; preds = %.lr.ph105
  %.not73 = icmp eq i8 %147, %143
  br i1 %.not73, label %153, label %.thread88

149:                                              ; preds = %.lr.ph105
  store i8 %147, ptr %142, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #13
  call void @_ZNSt4pairIicEC2IRiRcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(5) %8, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %142)
  invoke void @_ZNSt6vectorISt4pairIicESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur, ptr noundef nonnull align 4 dereferenceable(5) %8)
          to label %150 unwind label %151

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  %.pre128 = load i32, ptr %112, align 4, !tbaa !5
  br label %153

151:                                              ; preds = %149
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #13
  br label %174

.thread88:                                        ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #13
  br label %169

153:                                              ; preds = %148, %150
  %154 = phi i32 [ %136, %148 ], [ %.pre128, %150 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #13
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %155 = sext i32 %154 to i64
  %156 = icmp slt i64 %indvars.iv.next123, %155
  br i1 %156, label %.lr.ph105, label %._crit_edge106, !llvm.loop !20

._crit_edge106:                                   ; preds = %153, %133
  %157 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #13
  %158 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur) #13
  invoke void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEERSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEvT_SC_OT0_(ptr %157, ptr %158, ptr noundef nonnull align 8 dereferenceable(2504) @rnd)
          to label %159 unwind label %162

159:                                              ; preds = %._crit_edge106
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #13
  invoke void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEEC2IRiRS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(24) @_ZZ4mainE3cur)
          to label %160 unwind label %164

160:                                              ; preds = %159
  invoke void @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %161 unwind label %166

161:                                              ; preds = %160
  call void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #13
  %.pre129 = load i32, ptr %6, align 4, !tbaa !5
  br label %169

162:                                              ; preds = %._crit_edge106
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %174

164:                                              ; preds = %159
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %168

166:                                              ; preds = %160
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #13
  br label %168

168:                                              ; preds = %166, %164
  %.pn = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #13
  br label %174

169:                                              ; preds = %.thread88, %161, %117, %122
  %170 = phi i32 [ %144, %.thread88 ], [ %.pre129, %161 ], [ %storemerge107, %117 ], [ %storemerge107, %122 ]
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %6, align 4, !tbaa !5
  %172 = load i32, ptr @m, align 4, !tbaa !5
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %117, label %._crit_edge110, !llvm.loop !21

174:                                              ; preds = %168, %162, %151
  %.pn.pn = phi { ptr, i32 } [ %.pn, %168 ], [ %163, %162 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #13
  br label %187

175:                                              ; preds = %._crit_edge110._crit_edge, %.lr.ph113
  %176 = phi i32 [ %.pre130, %._crit_edge110._crit_edge ], [ %103, %.lr.ph113 ]
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %177 = sext i32 %176 to i64
  %178 = icmp slt i64 %indvars.iv.next126, %177
  br i1 %178, label %.lr.ph113, label %._crit_edge114, !llvm.loop !22

179:                                              ; preds = %._crit_edge110
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %187

181:                                              ; preds = %._crit_edge114
  %182 = invoke noundef zeroext i1 @_Z3dfsi(i32 noundef 0)
          to label %183 unwind label %.loopexit.split-lp

183:                                              ; preds = %181
  br i1 %182, label %186, label %184

184:                                              ; preds = %183
  %185 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %186

186:                                              ; preds = %184, %183
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #13
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #13
  ret i32 0

187:                                              ; preds = %.loopexit, %.loopexit.split-lp, %174, %179, %97, %54
  %.pn80.pn = phi { ptr, i32 } [ %.pn80, %54 ], [ %.pn78, %97 ], [ %.pn.pn, %174 ], [ %180, %179 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #13
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #13
  resume { ptr, i32 } %.pn80.pn
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #5

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) local_unnamed_addr #7

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #8

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #1 align 2

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

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #9

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIicESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIicESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIicEC2IRiRcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(5), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS3_SaIS3_EEEERSt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEvT_SC_OT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(2504)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiSt6vectorIS_IicESaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #11 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS2_IicESaIS4_EEES3_IS7_SaIS7_EEEEZ4mainE3$_0EvT_SD_T0_"(ptr, ptr) local_unnamed_addr #12

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #12

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

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

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

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

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

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


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