; LLVM IR from tangjz/acm-icpc :: codeforces/complete (963D)

; 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 }
%class.anon = type { i8 }
%"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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i64, %"class.std::vector" }

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@len = external dso_local global [100001 x i32], align 16
@rep = external dso_local global [100001 x i32], align 16
@ord = external dso_local global [100001 x i32], align 16
@ans = external dso_local global [100001 x i32], align 16
@buf = external dso_local global [100001 x i8], align 16
@pat = external dso_local global [100001 x i8], align 16
@pw = external dso_local global [100001 x i64], align 16
@h = external dso_local global [100001 x i64], align 16
@val = external dso_local global [100001 x i64], align 16
@Hash = external dso_local global %"class.std::unordered_map", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #10
  br label %80

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = sub nsw i32 %47, 97
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !9
  store i64 %53, ptr %4, align 8, !tbaa !9
  %54 = load i64, ptr %4, align 8, !tbaa !9
  %55 = mul nsw i64 %54, 27
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = add nsw i64 %55, %57
  %59 = srem i64 %58, 1000000007
  store i64 %59, ptr %4, align 8, !tbaa !9
  %60 = load i64, ptr %4, align 8, !tbaa !9
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %63
  store i64 %60, ptr %64, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x i64], ptr @pw, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !9
  store i64 %68, ptr %5, align 8, !tbaa !9
  %69 = load i64, ptr %5, align 8, !tbaa !9
  %70 = mul nsw i64 %69, 27
  %71 = srem i64 %70, 1000000007
  store i64 %71, ptr %5, align 8, !tbaa !9
  %72 = load i64, ptr %5, align 8, !tbaa !9
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100001 x i64], ptr @pw, i64 0, i64 %75
  store i64 %72, ptr %76, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  br label %77

77:                                               ; preds = %42
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %2, align 4, !tbaa !5
  br label %37, !llvm.loop !12

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

81:                                               ; preds = %130, %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr @q, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %133

86:                                               ; preds = %81
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr @rep, i64 %88
  %90 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %89, ptr noundef @pat)
  %91 = call i64 @strlen(ptr noundef @pat) #9
  %92 = trunc i64 %91 to i32
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %94
  store i32 %92, ptr %95, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %118, %86
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp slt i32 %97, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %96
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %121

104:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100001 x i8], ptr @pat, i64 0, i64 %106
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = sub nsw i32 %109, 97
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %10, align 4, !tbaa !5
  %112 = load i64, ptr %8, align 8, !tbaa !9
  %113 = mul nsw i64 %112, 27
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = add nsw i64 %113, %115
  %117 = srem i64 %116, 1000000007
  store i64 %117, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %118

118:                                              ; preds = %104
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %9, align 4, !tbaa !5
  br label %96, !llvm.loop !14

121:                                              ; preds = %103
  %122 = load i64, ptr %8, align 8, !tbaa !9
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %124
  store i64 %122, ptr %125, align 8, !tbaa !9
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %128
  store i32 %126, ptr %129, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %130

130:                                              ; preds = %121
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %6, align 4, !tbaa !5
  br label %81, !llvm.loop !15

133:                                              ; preds = %85
  %134 = load i32, ptr @q, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr @ord, i64 %135
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef @ord, ptr noundef %136)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %287, %133
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = load i32, ptr @q, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %290

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  store i32 %146, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %148
  store i32 100001, ptr %149, align 4, !tbaa !5
  store ptr %149, ptr %15, align 8, !tbaa !16
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = icmp ne i32 %150, %154
  br i1 %155, label %156, label %242

156:                                              ; preds = %142
  %157 = load i32, ptr %14, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  store i32 %160, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %16) #10
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #10
  call void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE4swapERSB_(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(56) @Hash) #10
  call void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %161 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %161, ptr %17, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %189, %156
  %163 = load i32, ptr %17, align 4, !tbaa !5
  %164 = load i32, ptr @q, align 4, !tbaa !5
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %166, label %176

166:                                              ; preds = %162
  %167 = load i32, ptr %17, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = icmp eq i32 %173, %174
  br label %176

176:                                              ; preds = %166, %162
  %177 = phi i1 [ false, %162 ], [ %175, %166 ]
  br i1 %177, label %179, label %178

178:                                              ; preds = %176
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %196

179:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #10
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  %180 = load i32, ptr %17, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %184
  %186 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %185)
          to label %187 unwind label %192

187:                                              ; preds = %179
  %188 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %186, ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #10
  br label %189

189:                                              ; preds = %187
  %190 = load i32, ptr %17, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %17, align 4, !tbaa !5
  br label %162, !llvm.loop !18

192:                                              ; preds = %179
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %19, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %20, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %315

196:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100001 x i64], ptr @pw, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !9
  %201 = sub nsw i64 1000000007, %200
  store i64 %201, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %202 = load i32, ptr %22, align 4, !tbaa !5
  %203 = load i32, ptr %13, align 4, !tbaa !5
  %204 = add nsw i32 %202, %203
  store i32 %204, ptr %23, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %236, %196
  %206 = load i32, ptr %23, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %208 = icmp sle i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %241

210:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %211 = load i32, ptr %22, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !9
  store i64 %214, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %215 = load i32, ptr %23, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !9
  store i64 %218, ptr %25, align 8, !tbaa !9
  %219 = load i64, ptr %24, align 8, !tbaa !9
  %220 = load i64, ptr %21, align 8, !tbaa !9
  %221 = mul nsw i64 %219, %220
  %222 = load i64, ptr %25, align 8, !tbaa !9
  %223 = add nsw i64 %221, %222
  %224 = srem i64 %223, 1000000007
  store i64 %224, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %225 = call ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %226 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %26, i32 0, i32 0
  %227 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %226, i32 0, i32 0
  store ptr %225, ptr %227, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %228 = call ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @Hash) #10
  %229 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %27, i32 0, i32 0
  %230 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %229, i32 0, i32 0
  store ptr %228, ptr %230, align 8
  %231 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxSt6vectorIiSaIiEEELb0EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  br i1 %231, label %232, label %235

232:                                              ; preds = %210
  %233 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxSt6vectorIiSaIiEEELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #10
  %234 = getelementptr inbounds %"struct.std::pair", ptr %233, i32 0, i32 1
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %234, ptr noundef nonnull align 4 dereferenceable(4) %22)
  br label %235

235:                                              ; preds = %232, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %22, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %22, align 4, !tbaa !5
  %239 = load i32, ptr %23, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %23, align 4, !tbaa !5
  br label %205, !llvm.loop !19

241:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %242

242:                                              ; preds = %241, %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %243 = load i32, ptr %14, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %244
  %246 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %245)
  store ptr %246, ptr %28, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %247 = load ptr, ptr %28, align 8, !tbaa !16
  %248 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %247) #10
  %249 = trunc i64 %248 to i32
  store i32 %249, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 0, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [100001 x i32], ptr @rep, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = sub nsw i32 %253, 1
  store i32 %254, ptr %31, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %281, %242
  %256 = load i32, ptr %31, align 4, !tbaa !5
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = icmp slt i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  br label %286

260:                                              ; preds = %255
  %261 = load ptr, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  %262 = load ptr, ptr %28, align 8, !tbaa !16
  %263 = load i32, ptr %31, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %264) #10
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = load ptr, ptr %28, align 8, !tbaa !16
  %268 = load i32, ptr %30, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %269) #10
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %272 = sub nsw i32 %266, %271
  %273 = load i32, ptr %14, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !5
  %277 = add nsw i32 %272, %276
  store i32 %277, ptr %32, align 4, !tbaa !5
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %261, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = load ptr, ptr %15, align 8, !tbaa !16
  store i32 %279, ptr %280, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  br label %281

281:                                              ; preds = %260
  %282 = load i32, ptr %30, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %30, align 4, !tbaa !5
  %284 = load i32, ptr %31, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %31, align 4, !tbaa !5
  br label %255, !llvm.loop !20

286:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %287

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

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

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

295:                                              ; preds = %291
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %314

296:                                              ; preds = %291
  %297 = load i32, ptr %33, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %301 = icmp slt i32 %300, 100001
  br i1 %301, label %302, label %307

302:                                              ; preds = %296
  %303 = load i32, ptr %33, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !5
  br label %308

307:                                              ; preds = %296
  br label %308

308:                                              ; preds = %307, %302
  %309 = phi i32 [ %306, %302 ], [ -1, %307 ]
  %310 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %309)
  br label %311

311:                                              ; preds = %308
  %312 = load i32, ptr %33, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %33, align 4, !tbaa !5
  br label %291, !llvm.loop !22

314:                                              ; preds = %295
  ret i32 0

315:                                              ; preds = %192
  %316 = load ptr, ptr %19, align 8
  %317 = load i32, ptr %20, align 4
  %318 = insertvalue { ptr, i32 } poison, ptr %316, 0
  %319 = insertvalue { ptr, i32 } %318, i32 %317, 1
  resume { ptr, i32 } %319
}

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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 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 #3 = { "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 = { 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 #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 willreturn memory(read) }
attributes #10 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}


; 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 }
%"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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@n = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local global i32, align 4
@len = external dso_local local_unnamed_addr global [100001 x i32], align 16
@rep = external dso_local global [100001 x i32], align 16
@ord = external dso_local global [100001 x i32], align 16
@ans = external dso_local global [100001 x i32], align 16
@buf = external dso_local global [100001 x i8], align 16
@pat = external dso_local global [100001 x i8], align 16
@pw = external dso_local local_unnamed_addr global [100001 x i64], align 16
@h = external dso_local local_unnamed_addr global [100001 x i64], align 16
@val = external dso_local global [100001 x i64], align 16
@Hash = external dso_local global %"class.std::unordered_map", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEED2Ev(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 #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::unordered_map", align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca i32, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf, ptr noundef nonnull @q)
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @buf) #9
  %10 = trunc i64 %9 to i32
  store i32 %10, ptr @n, align 4, !tbaa !5
  store i64 1, ptr @pw, align 16, !tbaa !9
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %.preheader79

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = and i64 %9, 2147483647
  %.pre = load i64, ptr @h, align 16, !tbaa !9
  br label %.lr.ph

.preheader79:                                     ; preds = %.lr.ph, %0
  %12 = load i32, ptr @q, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph85, label %.preheader79.._crit_edge86_crit_edge

.preheader79.._crit_edge86_crit_edge:             ; preds = %.preheader79
  %.pre142 = sext i32 %12 to i64
  br label %._crit_edge86

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %14 = phi i64 [ 1, %.lr.ph.preheader ], [ %25, %.lr.ph ]
  %15 = phi i64 [ %.pre, %.lr.ph.preheader ], [ %22, %.lr.ph ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %16 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv
  %17 = load i8, ptr %16, align 1, !tbaa !11
  %18 = sext i8 %17 to i64
  %19 = add nsw i64 %18, -96
  %20 = mul nsw i64 %15, 27
  %21 = add nsw i64 %19, %20
  %22 = srem i64 %21, 1000000007
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %indvars.iv.next
  store i64 %22, ptr %23, align 8, !tbaa !9
  %24 = mul nsw i64 %14, 27
  %25 = srem i64 %24, 1000000007
  %26 = getelementptr inbounds [100001 x i64], ptr @pw, i64 0, i64 %indvars.iv.next
  store i64 %25, ptr %26, align 8, !tbaa !9
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader79, label %.lr.ph, !llvm.loop !12

._crit_edge86:                                    ; preds = %._crit_edge, %.preheader79.._crit_edge86_crit_edge
  %.pre-phi = phi i64 [ %.pre142, %.preheader79.._crit_edge86_crit_edge ], [ %48, %._crit_edge ]
  %27 = getelementptr inbounds i32, ptr @ord, i64 %.pre-phi
  tail call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull @ord, ptr noundef nonnull %27)
  %28 = load i32, ptr @q, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph105, label %._crit_edge108

.lr.ph85:                                         ; preds = %.preheader79, %._crit_edge
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %._crit_edge ], [ 0, %.preheader79 ]
  %30 = getelementptr inbounds i32, ptr @rep, i64 %indvars.iv118
  %31 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %30, ptr noundef nonnull @pat)
  %32 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @pat) #9
  %33 = trunc i64 %32 to i32
  %34 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %indvars.iv118
  store i32 %33, ptr %34, align 4, !tbaa !5
  %35 = icmp sgt i32 %33, 0
  br i1 %35, label %.lr.ph83.preheader, label %._crit_edge

.lr.ph83.preheader:                               ; preds = %.lr.ph85
  %wide.trip.count116 = and i64 %32, 2147483647
  %xtraiter = and i64 %32, 1
  %36 = icmp eq i64 %wide.trip.count116, 1
  br i1 %36, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph83.preheader.new

.lr.ph83.preheader.new:                           ; preds = %.lr.ph83.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count116, %xtraiter
  br label %.lr.ph83

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph83, %.lr.ph83.preheader
  %.lcssa147.ph = phi i64 [ poison, %.lr.ph83.preheader ], [ %63, %.lr.ph83 ]
  %indvars.iv113.unr = phi i64 [ 0, %.lr.ph83.preheader ], [ %indvars.iv.next114.1, %.lr.ph83 ]
  %.07082.unr = phi i64 [ 0, %.lr.ph83.preheader ], [ %63, %.lr.ph83 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph83.epil

.lr.ph83.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %37 = getelementptr inbounds [100001 x i8], ptr @pat, i64 0, i64 %indvars.iv113.unr
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i64
  %40 = mul nsw i64 %.07082.unr, 27
  %41 = add nsw i64 %40, -96
  %42 = add nsw i64 %41, %39
  %43 = srem i64 %42, 1000000007
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph83.epil, %._crit_edge.loopexit.unr-lcssa, %.lr.ph85
  %.070.lcssa = phi i64 [ 0, %.lr.ph85 ], [ %.lcssa147.ph, %._crit_edge.loopexit.unr-lcssa ], [ %43, %.lr.ph83.epil ]
  %44 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %indvars.iv118
  store i64 %.070.lcssa, ptr %44, align 8, !tbaa !9
  %45 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv118
  %46 = trunc nuw nsw i64 %indvars.iv118 to i32
  store i32 %46, ptr %45, align 4, !tbaa !5
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %47 = load i32, ptr @q, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next119, %48
  br i1 %49, label %.lr.ph85, label %._crit_edge86, !llvm.loop !14

.lr.ph83:                                         ; preds = %.lr.ph83, %.lr.ph83.preheader.new
  %indvars.iv113 = phi i64 [ 0, %.lr.ph83.preheader.new ], [ %indvars.iv.next114.1, %.lr.ph83 ]
  %.07082 = phi i64 [ 0, %.lr.ph83.preheader.new ], [ %63, %.lr.ph83 ]
  %niter = phi i64 [ 0, %.lr.ph83.preheader.new ], [ %niter.next.1, %.lr.ph83 ]
  %50 = getelementptr inbounds [100001 x i8], ptr @pat, i64 0, i64 %indvars.iv113
  %51 = load i8, ptr %50, align 2, !tbaa !11
  %52 = sext i8 %51 to i64
  %53 = mul nsw i64 %.07082, 27
  %54 = add nsw i64 %53, -96
  %55 = add nsw i64 %54, %52
  %56 = srem i64 %55, 1000000007
  %indvars.iv.next114 = or disjoint i64 %indvars.iv113, 1
  %57 = getelementptr inbounds [100001 x i8], ptr @pat, i64 0, i64 %indvars.iv.next114
  %58 = load i8, ptr %57, align 1, !tbaa !11
  %59 = sext i8 %58 to i64
  %60 = mul nsw i64 %56, 27
  %61 = add nsw i64 %60, -96
  %62 = add nsw i64 %61, %59
  %63 = srem i64 %62, 1000000007
  %indvars.iv.next114.1 = add nuw nsw i64 %indvars.iv113, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph83, !llvm.loop !15

.preheader:                                       ; preds = %._crit_edge100
  %64 = icmp sgt i32 %129, 0
  br i1 %64, label %.lr.ph107, label %._crit_edge108

.lr.ph105:                                        ; preds = %._crit_edge86, %._crit_edge100
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %._crit_edge100 ], [ 0, %._crit_edge86 ]
  %.074101 = phi i32 [ %.1, %._crit_edge100 ], [ 0, %._crit_edge86 ]
  %65 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv121
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %67
  store i32 100001, ptr %68, align 4, !tbaa !5
  %69 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %67
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %.not = icmp eq i32 %.074101, %70
  br i1 %.not, label %118, label %71

71:                                               ; preds = %.lr.ph105
  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_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #10
  call void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE4swapERSB_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) @Hash) #10
  call void @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #10
  %72 = load i32, ptr @q, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv121, %73
  br i1 %74, label %.lr.ph90, label %.critedge

.lr.ph90:                                         ; preds = %71, %91
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %91 ], [ %indvars.iv121, %71 ]
  %75 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv123
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100001 x i32], ptr @len, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp eq i32 %79, %70
  br i1 %80, label %86, label %.critedge

.critedge:                                        ; preds = %.lr.ph90, %91, %71
  %81 = sext i32 %70 to i64
  %82 = getelementptr inbounds [100001 x i64], ptr @pw, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = sub nsw i64 1000000007, %83
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  store i32 0, ptr %3, align 4, !tbaa !5
  %85 = load i32, ptr @n, align 4, !tbaa !5
  %.not7892 = icmp sgt i32 %70, %85
  br i1 %.not7892, label %._crit_edge95, label %.lr.ph94

86:                                               ; preds = %.lr.ph90
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #10
  %87 = load i32, ptr %75, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %88
  %90 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %91 unwind label %96

91:                                               ; preds = %86
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 8 dereferenceable(24) %2) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #10
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %93 = load i32, ptr @q, align 4, !tbaa !5
  %94 = trunc nuw i64 %indvars.iv.next124 to i32
  %95 = icmp sgt i32 %93, %94
  br i1 %95, label %.lr.ph90, label %.critedge, !llvm.loop !16

96:                                               ; preds = %86
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #10
  resume { ptr, i32 } %97

._crit_edge95:                                    ; preds = %113, %.critedge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  br label %118

.lr.ph94:                                         ; preds = %.critedge, %113
  %98 = phi i32 [ %115, %113 ], [ 0, %.critedge ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %113 ], [ %81, %.critedge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds [100001 x i64], ptr @h, i64 0, i64 %indvars.iv126
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = mul nsw i64 %101, %84
  %105 = add nsw i64 %103, %104
  %106 = srem i64 %105, 1000000007
  store i64 %106, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %107 = call ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store ptr %107, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %108 = call ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @Hash) #10
  store ptr %108, ptr %6, align 8
  %109 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxSt6vectorIiSaIiEEELb0EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br i1 %109, label %110, label %113

110:                                              ; preds = %.lr.ph94
  %111 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxSt6vectorIiSaIiEEELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %112, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %113

113:                                              ; preds = %110, %.lr.ph94
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %3, align 4, !tbaa !5
  %indvars.iv.next127 = add nsw i64 %indvars.iv126, 1
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %.not78.not = icmp slt i64 %indvars.iv126, %117
  br i1 %.not78.not, label %.lr.ph94, label %._crit_edge95, !llvm.loop !17

118:                                              ; preds = %._crit_edge95, %.lr.ph105
  %.1 = phi i32 [ %70, %._crit_edge95 ], [ %.074101, %.lr.ph105 ]
  %119 = getelementptr inbounds [100001 x i64], ptr @val, i64 0, i64 %67
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIxSt6vectorIiSaIiEESt4hashIxESt8equal_toIxESaISt4pairIKxS2_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(56) @Hash, ptr noundef nonnull align 8 dereferenceable(8) %119)
  %121 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #10
  %122 = trunc i64 %121 to i32
  %123 = getelementptr inbounds [100001 x i32], ptr @rep, i64 0, i64 %67
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %.not109 = icmp sgt i32 %124, %122
  br i1 %.not109, label %._crit_edge100, label %.lr.ph99.preheader

.lr.ph99.preheader:                               ; preds = %118
  %125 = add i32 %124, -1
  %126 = sext i32 %125 to i64
  %127 = add i32 %122, 1
  %128 = sub i32 %127, %124
  %wide.trip.count136 = zext i32 %128 to i64
  br label %.lr.ph99

._crit_edge100:                                   ; preds = %.lr.ph99, %118
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %129 = load i32, ptr @q, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next122, %130
  br i1 %131, label %.lr.ph105, label %.preheader, !llvm.loop !18

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.lr.ph99
  %indvars.iv131 = phi i64 [ 0, %.lr.ph99.preheader ], [ %indvars.iv.next132, %.lr.ph99 ]
  %indvars.iv129 = phi i64 [ %126, %.lr.ph99.preheader ], [ %indvars.iv.next130, %.lr.ph99 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %indvars.iv129) #10
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %indvars.iv131) #10
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = sub i32 %133, %135
  %137 = load i32, ptr %69, align 4, !tbaa !5
  %138 = add nsw i32 %136, %137
  store i32 %138, ptr %7, align 4, !tbaa !5
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %68, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %68, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %indvars.iv.next130 = add nsw i64 %indvars.iv129, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count136
  br i1 %exitcond137.not, label %._crit_edge100, label %.lr.ph99, !llvm.loop !19

._crit_edge108:                                   ; preds = %.lr.ph107, %._crit_edge86, %.preheader
  ret i32 0

.lr.ph107:                                        ; preds = %.preheader, %.lr.ph107
  %indvars.iv139 = phi i64 [ %indvars.iv.next140, %.lr.ph107 ], [ 0, %.preheader ]
  %141 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv139
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = icmp slt i32 %142, 100001
  %spec.select = select i1 %143, i32 %142, i32 -1
  %144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %spec.select)
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %145 = load i32, ptr @q, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = icmp slt i64 %indvars.iv.next140, %146
  br i1 %147, label %.lr.ph107, label %._crit_edge108, !llvm.loop !20
}

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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 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 #3 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 willreturn memory(read) }
attributes #10 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass