; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK63/Problem C (C)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@base = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global [1001000 x %"class.std::__cxx11::basic_string"], align 16
@mark1 = external dso_local global [1001000 x %"class.std::vector"], align 16
@mark2 = external dso_local global [1001000 x %"class.std::vector"], align 16
@ans = external dso_local global i64, align 8
@h1 = external dso_local global i64, align 8
@h2 = external dso_local global i64, align 8
@MOD = external dso_local global i64, align 8
@powers = external dso_local global [1001000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  store i64 1, ptr @powers, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %50, %0
  %33 = load i32, ptr %2, align 4, !tbaa !11
  %34 = icmp slt i32 %33, 1001000
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %53

36:                                               ; preds = %32
  %37 = load i32, ptr %2, align 4, !tbaa !11
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !8
  %42 = load i32, ptr @base, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = mul nsw i64 %41, %43
  %45 = load i64, ptr @MOD, align 8, !tbaa !8
  %46 = srem i64 %44, %45
  %47 = load i32, ptr %2, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %48
  store i64 %46, ptr %49, align 8, !tbaa !8
  br label %50

50:                                               ; preds = %36
  %51 = load i32, ptr %2, align 4, !tbaa !11
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %2, align 4, !tbaa !11
  br label %32, !llvm.loop !13

53:                                               ; preds = %35
  br label %54

54:                                               ; preds = %384, %53
  %55 = load i32, ptr @t, align 4, !tbaa !11
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr @t, align 4, !tbaa !11
  %57 = icmp ne i32 %55, 0
  br i1 %57, label %58, label %388

58:                                               ; preds = %54
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  store i64 0, ptr @ans, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %60 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #9
  invoke void @_ZN4trieC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %61 unwind label %67

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

62:                                               ; preds = %78, %61
  %63 = load i32, ptr %6, align 4, !tbaa !11
  %64 = load i32, ptr @n, align 4, !tbaa !11
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %71, label %66

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

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %4, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %60, i64 noundef 8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %389

71:                                               ; preds = %62
  %72 = load i32, ptr %6, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark1, i64 0, i64 %73
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #8
  %75 = load i32, ptr %6, align 4, !tbaa !11
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark2, i64 0, i64 %76
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #8
  br label %78

78:                                               ; preds = %71
  %79 = load i32, ptr %6, align 4, !tbaa !11
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !11
  br label %62, !llvm.loop !17

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

82:                                               ; preds = %344, %81
  %83 = load i32, ptr %7, align 4, !tbaa !11
  %84 = load i32, ptr @n, align 4, !tbaa !11
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

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

87:                                               ; preds = %82
  %88 = load i32, ptr %7, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %89
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %90)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %92 = load i32, ptr %7, align 4, !tbaa !11
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %93
  %95 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %94) #8
  %96 = trunc i64 %95 to i32
  store i32 %96, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %97 = load i32, ptr %9, align 4, !tbaa !11
  %98 = sub nsw i32 %97, 1
  store i32 %98, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %99 = load i32, ptr %9, align 4, !tbaa !11
  %100 = sub nsw i32 %99, 2
  store i32 %100, ptr %11, align 4, !tbaa !11
  %101 = load i32, ptr %7, align 4, !tbaa !11
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark1, i64 0, i64 %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %103, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  store i64 0, ptr @h2, align 8, !tbaa !8
  store i64 0, ptr @h1, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %104 = load i32, ptr %9, align 4, !tbaa !11
  %105 = sub nsw i32 %104, 2
  store i32 %105, ptr %13, align 4, !tbaa !11
  br label %106

106:                                              ; preds = %221, %87
  %107 = load i32, ptr %13, align 4, !tbaa !11
  %108 = icmp sge i32 %107, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %224

110:                                              ; preds = %106
  %111 = load i32, ptr %9, align 4, !tbaa !11
  %112 = load i32, ptr %13, align 4, !tbaa !11
  %113 = sub nsw i32 %111, %112
  %114 = srem i32 %113, 2
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %165

116:                                              ; preds = %110
  %117 = load i64, ptr @h1, align 8, !tbaa !8
  %118 = load i32, ptr @base, align 4, !tbaa !11
  %119 = sext i32 %118 to i64
  %120 = mul nsw i64 %117, %119
  %121 = load i64, ptr @MOD, align 8, !tbaa !8
  %122 = srem i64 %120, %121
  store i64 %122, ptr @h1, align 8, !tbaa !8
  %123 = load i64, ptr @h1, align 8, !tbaa !8
  %124 = load i32, ptr %7, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %125
  %127 = load i32, ptr %10, align 4, !tbaa !11
  %128 = add nsw i32 %127, -1
  store i32 %128, ptr %10, align 4, !tbaa !11
  %129 = sext i32 %127 to i64
  %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %126, i64 noundef %129)
  %131 = load i8, ptr %130, align 1, !tbaa !18
  %132 = sext i8 %131 to i32
  %133 = sub nsw i32 %132, 97
  %134 = add nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = add nsw i64 %123, %135
  %137 = load i64, ptr @MOD, align 8, !tbaa !8
  %138 = srem i64 %136, %137
  store i64 %138, ptr @h1, align 8, !tbaa !8
  %139 = load i64, ptr @h2, align 8, !tbaa !8
  %140 = load i32, ptr %7, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %141
  %143 = load i32, ptr %13, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %142, i64 noundef %144)
  %146 = load i8, ptr %145, align 1, !tbaa !18
  %147 = sext i8 %146 to i32
  %148 = sub nsw i32 %147, 97
  %149 = add nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = load i32, ptr %9, align 4, !tbaa !11
  %152 = load i32, ptr %13, align 4, !tbaa !11
  %153 = sub nsw i32 %151, %152
  %154 = sdiv i32 %153, 2
  %155 = add nsw i32 -1, %154
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !8
  %159 = mul nsw i64 %150, %158
  %160 = load i64, ptr @MOD, align 8, !tbaa !8
  %161 = srem i64 %159, %160
  %162 = add nsw i64 %139, %161
  %163 = load i64, ptr @MOD, align 8, !tbaa !8
  %164 = srem i64 %162, %163
  store i64 %164, ptr @h2, align 8, !tbaa !8
  br label %213

165:                                              ; preds = %110
  %166 = load i64, ptr @h2, align 8, !tbaa !8
  %167 = load i32, ptr %7, align 4, !tbaa !11
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %168
  %170 = load i32, ptr %11, align 4, !tbaa !11
  %171 = add nsw i32 %170, -1
  store i32 %171, ptr %11, align 4, !tbaa !11
  %172 = sext i32 %170 to i64
  %173 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %169, i64 noundef %172)
  %174 = load i8, ptr %173, align 1, !tbaa !18
  %175 = sext i8 %174 to i32
  %176 = sub nsw i32 %175, 97
  %177 = add nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = sub nsw i64 %166, %178
  %180 = load i64, ptr @MOD, align 8, !tbaa !8
  %181 = add nsw i64 %179, %180
  %182 = load i64, ptr @MOD, align 8, !tbaa !8
  %183 = srem i64 %181, %182
  store i64 %183, ptr @h2, align 8, !tbaa !8
  %184 = load i64, ptr @h2, align 8, !tbaa !8
  %185 = load i32, ptr %7, align 4, !tbaa !11
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %186
  %188 = load i32, ptr %13, align 4, !tbaa !11
  %189 = sext i32 %188 to i64
  %190 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %187, i64 noundef %189)
  %191 = load i8, ptr %190, align 1, !tbaa !18
  %192 = sext i8 %191 to i32
  %193 = sub nsw i32 %192, 97
  %194 = add nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = load i32, ptr %9, align 4, !tbaa !11
  %197 = load i32, ptr %13, align 4, !tbaa !11
  %198 = sub nsw i32 %196, %197
  %199 = sdiv i32 %198, 2
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !8
  %203 = mul nsw i64 %195, %202
  %204 = load i64, ptr @MOD, align 8, !tbaa !8
  %205 = srem i64 %203, %204
  %206 = add nsw i64 %184, %205
  %207 = load i64, ptr @MOD, align 8, !tbaa !8
  %208 = srem i64 %206, %207
  store i64 %208, ptr @h2, align 8, !tbaa !8
  %209 = load i64, ptr @h2, align 8, !tbaa !8
  %210 = mul nsw i64 %209, 129032259
  %211 = load i64, ptr @MOD, align 8, !tbaa !8
  %212 = srem i64 %210, %211
  store i64 %212, ptr @h2, align 8, !tbaa !8
  br label %213

213:                                              ; preds = %165, %116
  %214 = load i32, ptr %7, align 4, !tbaa !11
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark1, i64 0, i64 %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %217 = load i64, ptr @h1, align 8, !tbaa !8
  %218 = load i64, ptr @h2, align 8, !tbaa !8
  %219 = icmp eq i64 %217, %218
  %220 = zext i1 %219 to i32
  store i32 %220, ptr %14, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %216, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %221

221:                                              ; preds = %213
  %222 = load i32, ptr %13, align 4, !tbaa !11
  %223 = add nsw i32 %222, -1
  store i32 %223, ptr %13, align 4, !tbaa !11
  br label %106, !llvm.loop !19

224:                                              ; preds = %109
  %225 = load i32, ptr %7, align 4, !tbaa !11
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark2, i64 0, i64 %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 1, ptr %15, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %227, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  store i64 0, ptr @h2, align 8, !tbaa !8
  store i64 0, ptr @h1, align 8, !tbaa !8
  store i32 0, ptr %10, align 4, !tbaa !11
  store i32 1, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 1, ptr %16, align 4, !tbaa !11
  br label %228

228:                                              ; preds = %340, %224
  %229 = load i32, ptr %16, align 4, !tbaa !11
  %230 = load i32, ptr %9, align 4, !tbaa !11
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %343

233:                                              ; preds = %228
  %234 = load i32, ptr %16, align 4, !tbaa !11
  %235 = srem i32 %234, 2
  %236 = icmp eq i32 %235, 1
  br i1 %236, label %237, label %285

237:                                              ; preds = %233
  %238 = load i64, ptr @h1, align 8, !tbaa !8
  %239 = load i32, ptr @base, align 4, !tbaa !11
  %240 = sext i32 %239 to i64
  %241 = mul nsw i64 %238, %240
  %242 = load i64, ptr @MOD, align 8, !tbaa !8
  %243 = srem i64 %241, %242
  store i64 %243, ptr @h1, align 8, !tbaa !8
  %244 = load i64, ptr @h1, align 8, !tbaa !8
  %245 = load i32, ptr %7, align 4, !tbaa !11
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %246
  %248 = load i32, ptr %10, align 4, !tbaa !11
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %10, align 4, !tbaa !11
  %250 = sext i32 %248 to i64
  %251 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %247, i64 noundef %250)
  %252 = load i8, ptr %251, align 1, !tbaa !18
  %253 = sext i8 %252 to i32
  %254 = sub nsw i32 %253, 97
  %255 = add nsw i32 %254, 1
  %256 = sext i32 %255 to i64
  %257 = add nsw i64 %244, %256
  %258 = load i64, ptr @MOD, align 8, !tbaa !8
  %259 = srem i64 %257, %258
  store i64 %259, ptr @h1, align 8, !tbaa !8
  %260 = load i64, ptr @h2, align 8, !tbaa !8
  %261 = load i32, ptr %7, align 4, !tbaa !11
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %262
  %264 = load i32, ptr %16, align 4, !tbaa !11
  %265 = sext i32 %264 to i64
  %266 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %263, i64 noundef %265)
  %267 = load i8, ptr %266, align 1, !tbaa !18
  %268 = sext i8 %267 to i32
  %269 = sub nsw i32 %268, 97
  %270 = add nsw i32 %269, 1
  %271 = sext i32 %270 to i64
  %272 = load i32, ptr %16, align 4, !tbaa !11
  %273 = add nsw i32 %272, 1
  %274 = sdiv i32 %273, 2
  %275 = add nsw i32 -1, %274
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %276
  %278 = load i64, ptr %277, align 8, !tbaa !8
  %279 = mul nsw i64 %271, %278
  %280 = load i64, ptr @MOD, align 8, !tbaa !8
  %281 = srem i64 %279, %280
  %282 = add nsw i64 %260, %281
  %283 = load i64, ptr @MOD, align 8, !tbaa !8
  %284 = srem i64 %282, %283
  store i64 %284, ptr @h2, align 8, !tbaa !8
  br label %332

285:                                              ; preds = %233
  %286 = load i64, ptr @h2, align 8, !tbaa !8
  %287 = load i32, ptr %7, align 4, !tbaa !11
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %288
  %290 = load i32, ptr %16, align 4, !tbaa !11
  %291 = sext i32 %290 to i64
  %292 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %289, i64 noundef %291)
  %293 = load i8, ptr %292, align 1, !tbaa !18
  %294 = sext i8 %293 to i32
  %295 = sub nsw i32 %294, 97
  %296 = add nsw i32 %295, 1
  %297 = sext i32 %296 to i64
  %298 = load i32, ptr %16, align 4, !tbaa !11
  %299 = add nsw i32 %298, 1
  %300 = sdiv i32 %299, 2
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %301
  %303 = load i64, ptr %302, align 8, !tbaa !8
  %304 = mul nsw i64 %297, %303
  %305 = load i64, ptr @MOD, align 8, !tbaa !8
  %306 = srem i64 %304, %305
  %307 = add nsw i64 %286, %306
  %308 = load i64, ptr @MOD, align 8, !tbaa !8
  %309 = srem i64 %307, %308
  store i64 %309, ptr @h2, align 8, !tbaa !8
  %310 = load i64, ptr @h2, align 8, !tbaa !8
  %311 = load i32, ptr %7, align 4, !tbaa !11
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %312
  %314 = load i32, ptr %11, align 4, !tbaa !11
  %315 = add nsw i32 %314, 1
  store i32 %315, ptr %11, align 4, !tbaa !11
  %316 = sext i32 %314 to i64
  %317 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %313, i64 noundef %316)
  %318 = load i8, ptr %317, align 1, !tbaa !18
  %319 = sext i8 %318 to i32
  %320 = sub nsw i32 %319, 97
  %321 = add nsw i32 %320, 1
  %322 = sext i32 %321 to i64
  %323 = sub nsw i64 %310, %322
  %324 = load i64, ptr @MOD, align 8, !tbaa !8
  %325 = add nsw i64 %323, %324
  %326 = load i64, ptr @MOD, align 8, !tbaa !8
  %327 = srem i64 %325, %326
  store i64 %327, ptr @h2, align 8, !tbaa !8
  %328 = load i64, ptr @h2, align 8, !tbaa !8
  %329 = mul nsw i64 %328, 129032259
  %330 = load i64, ptr @MOD, align 8, !tbaa !8
  %331 = srem i64 %329, %330
  store i64 %331, ptr @h2, align 8, !tbaa !8
  br label %332

332:                                              ; preds = %285, %237
  %333 = load i32, ptr %7, align 4, !tbaa !11
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark2, i64 0, i64 %334
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %336 = load i64, ptr @h1, align 8, !tbaa !8
  %337 = load i64, ptr @h2, align 8, !tbaa !8
  %338 = icmp eq i64 %336, %337
  %339 = zext i1 %338 to i32
  store i32 %339, ptr %17, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %335, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %340

340:                                              ; preds = %332
  %341 = load i32, ptr %16, align 4, !tbaa !11
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %16, align 4, !tbaa !11
  br label %228, !llvm.loop !20

343:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %7, align 4, !tbaa !11
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %7, align 4, !tbaa !11
  br label %82, !llvm.loop !21

347:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %348

348:                                              ; preds = %359, %347
  %349 = load i32, ptr %18, align 4, !tbaa !11
  %350 = load i32, ptr @n, align 4, !tbaa !11
  %351 = icmp slt i32 %349, %350
  br i1 %351, label %353, label %352

352:                                              ; preds = %348
  store i32 19, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %362

353:                                              ; preds = %348
  %354 = load ptr, ptr %3, align 8, !tbaa !15
  %355 = load i32, ptr %18, align 4, !tbaa !11
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %356
  %358 = load i32, ptr %18, align 4, !tbaa !11
  call void @_ZN4trie6insertERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8) %354, ptr noundef nonnull align 8 dereferenceable(32) %357, i32 noundef %358)
  br label %359

359:                                              ; preds = %353
  %360 = load i32, ptr %18, align 4, !tbaa !11
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %18, align 4, !tbaa !11
  br label %348, !llvm.loop !22

362:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %363

363:                                              ; preds = %377, %362
  %364 = load i32, ptr %19, align 4, !tbaa !11
  %365 = load i32, ptr @n, align 4, !tbaa !11
  %366 = icmp slt i32 %364, %365
  br i1 %366, label %368, label %367

367:                                              ; preds = %363
  store i32 22, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %380

368:                                              ; preds = %363
  %369 = load ptr, ptr %3, align 8, !tbaa !15
  %370 = load i32, ptr %19, align 4, !tbaa !11
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %371
  %373 = load i32, ptr %19, align 4, !tbaa !11
  %374 = call noundef i64 @_ZN4trie3getERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8) %369, ptr noundef nonnull align 8 dereferenceable(32) %372, i32 noundef %373)
  %375 = load i64, ptr @ans, align 8, !tbaa !8
  %376 = add nsw i64 %375, %374
  store i64 %376, ptr @ans, align 8, !tbaa !8
  br label %377

377:                                              ; preds = %368
  %378 = load i32, ptr %19, align 4, !tbaa !11
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %19, align 4, !tbaa !11
  br label %363, !llvm.loop !23

380:                                              ; preds = %367
  %381 = load ptr, ptr %3, align 8, !tbaa !15
  %382 = icmp eq ptr %381, null
  br i1 %382, label %384, label %383

383:                                              ; preds = %380
  call void @_ZN4trieD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %381) #8
  call void @_ZdlPvm(ptr noundef %381, i64 noundef 8) #10
  br label %384

384:                                              ; preds = %383, %380
  %385 = load i64, ptr @ans, align 8, !tbaa !8
  %386 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %385)
  %387 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %386, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %54, !llvm.loop !24

388:                                              ; preds = %54
  ret i32 0

389:                                              ; preds = %67
  %390 = load ptr, ptr %4, align 8
  %391 = load i32, ptr %5, align 4
  %392 = insertvalue { ptr, i32 } poison, ptr %390, 0
  %393 = insertvalue { ptr, i32 } %392, i32 %391, 1
  resume { ptr, i32 } %393
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4trie6insertERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4trie3getERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

attributes #0 = { 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 #1 = { "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 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin allocsize(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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = distinct !{!17, !14}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@base = external dso_local local_unnamed_addr global i32, align 4
@_Z1sB5cxx11 = external dso_local global [1001000 x %"class.std::__cxx11::basic_string"], align 16
@mark1 = external dso_local global [1001000 x %"class.std::vector"], align 16
@mark2 = external dso_local global [1001000 x %"class.std::vector"], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@h1 = external dso_local local_unnamed_addr global i64, align 8
@h2 = external dso_local local_unnamed_addr global i64, align 8
@MOD = external dso_local local_unnamed_addr global i64, align 8
@powers = external dso_local local_unnamed_addr global [1001000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  store i64 1, ptr @powers, align 16, !tbaa !8
  %17 = load i32, ptr @base, align 4, !tbaa !11
  %18 = sext i32 %17 to i64
  %19 = load i64, ptr @MOD, align 8, !tbaa !8
  br label %22

.preheader80:                                     ; preds = %22
  %20 = load i32, ptr @t, align 4, !tbaa !11
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr @t, align 4, !tbaa !11
  %.not100 = icmp eq i32 %20, 0
  br i1 %.not100, label %._crit_edge102, label %.lr.ph101

22:                                               ; preds = %27, %0
  %23 = phi i64 [ 1, %0 ], [ %29, %27 ]
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.1, %27 ]
  %24 = mul nsw i64 %23, %18
  %25 = srem i64 %24, %19
  %26 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %indvars.iv
  store i64 %25, ptr %26, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1001000
  br i1 %exitcond.not, label %.preheader80, label %27, !llvm.loop !13

27:                                               ; preds = %22
  %28 = mul nsw i64 %25, %18
  %29 = srem i64 %28, %19
  %30 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %indvars.iv.next
  store i64 %29, ptr %30, align 8, !tbaa !8
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  br label %22

.lr.ph101:                                        ; preds = %.preheader80, %._crit_edge99
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  store i64 0, ptr @ans, align 8, !tbaa !8
  %32 = call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #8
  invoke void @_ZN4trieC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %.preheader79 unwind label %36

.preheader79:                                     ; preds = %.lr.ph101
  %33 = load i32, ptr @n, align 4, !tbaa !11
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge99

.preheader78:                                     ; preds = %.lr.ph
  %35 = icmp sgt i32 %40, 0
  br i1 %35, label %.lr.ph94, label %._crit_edge99

36:                                               ; preds = %.lr.ph101
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %32, i64 noundef 8) #9
  resume { ptr, i32 } %37

.lr.ph:                                           ; preds = %.preheader79, %.lr.ph
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph ], [ 0, %.preheader79 ]
  %38 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark1, i64 0, i64 %indvars.iv105
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #10
  %39 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark2, i64 0, i64 %indvars.iv105
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #10
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %40 = load i32, ptr @n, align 4, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next106, %41
  br i1 %42, label %.lr.ph, label %.preheader78, !llvm.loop !15

.preheader77:                                     ; preds = %._crit_edge92
  %43 = icmp sgt i32 %120, 0
  br i1 %43, label %.lr.ph96, label %._crit_edge99

.lr.ph94:                                         ; preds = %.preheader78, %._crit_edge92
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %._crit_edge92 ], [ 0, %.preheader78 ]
  %44 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %indvars.iv115
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %44)
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %44) #10
  %47 = trunc i64 %46 to i32
  %48 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark1, i64 0, i64 %indvars.iv115
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #10
  store i32 1, ptr %1, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #10
  store i64 0, ptr @h2, align 8, !tbaa !8
  store i64 0, ptr @h1, align 8, !tbaa !8
  %49 = icmp sgt i32 %47, 1
  br i1 %49, label %.lr.ph86.preheader, label %._crit_edge

.lr.ph86.preheader:                               ; preds = %.lr.ph94
  %50 = add nsw i32 %47, -2
  %51 = add nsw i32 %47, -1
  %52 = zext nneg i32 %50 to i64
  br label %.lr.ph86

._crit_edge:                                      ; preds = %115, %.lr.ph94
  %53 = getelementptr inbounds [1001000 x %"class.std::vector"], ptr @mark2, i64 0, i64 %indvars.iv115
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  store i32 1, ptr %3, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  store i64 0, ptr @h2, align 8, !tbaa !8
  store i64 0, ptr @h1, align 8, !tbaa !8
  br i1 %49, label %.lr.ph91.preheader, label %._crit_edge92

.lr.ph91.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = and i64 %46, 2147483647
  br label %.lr.ph91

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %115
  %indvars.iv108 = phi i64 [ %52, %.lr.ph86.preheader ], [ %indvars.iv.next109, %115 ]
  %.06484 = phi i32 [ %50, %.lr.ph86.preheader ], [ %.1, %115 ]
  %.06583 = phi i32 [ %51, %.lr.ph86.preheader ], [ %.166, %115 ]
  %54 = sub i64 %46, %indvars.iv108
  %55 = trunc i64 %54 to i32
  %56 = and i32 %55, 1
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %89

58:                                               ; preds = %.lr.ph86
  %59 = load i64, ptr @h1, align 8, !tbaa !8
  %60 = load i32, ptr @base, align 4, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = mul nsw i64 %59, %61
  %63 = load i64, ptr @MOD, align 8, !tbaa !8
  %64 = srem i64 %62, %63
  store i64 %64, ptr @h1, align 8, !tbaa !8
  %65 = add nsw i32 %.06583, -1
  %66 = sext i32 %.06583 to i64
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %66)
  %68 = load i8, ptr %67, align 1, !tbaa !16
  %69 = sext i8 %68 to i64
  %70 = add i64 %64, -96
  %71 = add i64 %70, %69
  %72 = load i64, ptr @MOD, align 8, !tbaa !8
  %73 = srem i64 %71, %72
  store i64 %73, ptr @h1, align 8, !tbaa !8
  %74 = load i64, ptr @h2, align 8, !tbaa !8
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %indvars.iv108)
  %76 = load i8, ptr %75, align 1, !tbaa !16
  %77 = sext i8 %76 to i64
  %78 = add nsw i64 %77, -96
  %79 = ashr exact i32 %55, 1
  %80 = add nsw i32 %79, -1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = mul nsw i64 %78, %83
  %85 = load i64, ptr @MOD, align 8, !tbaa !8
  %86 = srem i64 %84, %85
  %87 = add nsw i64 %86, %74
  %88 = srem i64 %87, %85
  br label %115

89:                                               ; preds = %.lr.ph86
  %90 = load i64, ptr @h2, align 8, !tbaa !8
  %91 = add nsw i32 %.06484, -1
  %92 = sext i32 %.06484 to i64
  %93 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %92)
  %94 = load i8, ptr %93, align 1, !tbaa !16
  %95 = sext i8 %94 to i64
  %96 = load i64, ptr @MOD, align 8, !tbaa !8
  %.neg76 = add i64 %90, 96
  %97 = sub i64 %.neg76, %95
  %98 = add nsw i64 %97, %96
  %99 = srem i64 %98, %96
  store i64 %99, ptr @h2, align 8, !tbaa !8
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %indvars.iv108)
  %101 = load i8, ptr %100, align 1, !tbaa !16
  %102 = sext i8 %101 to i64
  %103 = add nsw i64 %102, -96
  %104 = sdiv i32 %55, 2
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = mul nsw i64 %103, %107
  %109 = load i64, ptr @MOD, align 8, !tbaa !8
  %110 = srem i64 %108, %109
  %111 = add nsw i64 %110, %99
  %112 = srem i64 %111, %109
  %113 = mul nsw i64 %112, 129032259
  %114 = srem i64 %113, %109
  br label %115

115:                                              ; preds = %89, %58
  %storemerge73 = phi i64 [ %114, %89 ], [ %88, %58 ]
  %.166 = phi i32 [ %.06583, %89 ], [ %65, %58 ]
  %.1 = phi i32 [ %91, %89 ], [ %.06484, %58 ]
  store i64 %storemerge73, ptr @h2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  %116 = load i64, ptr @h1, align 8, !tbaa !8
  %117 = icmp eq i64 %116, %storemerge73
  %118 = zext i1 %117 to i32
  store i32 %118, ptr %2, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  %indvars.iv.next109 = add nsw i64 %indvars.iv108, -1
  %119 = icmp sgt i64 %indvars.iv108, 0
  br i1 %119, label %.lr.ph86, label %._crit_edge, !llvm.loop !17

._crit_edge92:                                    ; preds = %183, %._crit_edge
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %120 = load i32, ptr @n, align 4, !tbaa !11
  %121 = sext i32 %120 to i64
  %122 = icmp slt i64 %indvars.iv.next116, %121
  br i1 %122, label %.lr.ph94, label %.preheader77, !llvm.loop !18

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %183
  %indvars.iv111 = phi i64 [ 1, %.lr.ph91.preheader ], [ %indvars.iv.next112.pre-phi, %183 ]
  %.288 = phi i32 [ 1, %.lr.ph91.preheader ], [ %.3, %183 ]
  %.26787 = phi i32 [ 0, %.lr.ph91.preheader ], [ %.368, %183 ]
  %123 = and i64 %indvars.iv111, 1
  %.not72 = icmp eq i64 %123, 0
  br i1 %.not72, label %157, label %124

124:                                              ; preds = %.lr.ph91
  %125 = load i64, ptr @h1, align 8, !tbaa !8
  %126 = load i32, ptr @base, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = mul nsw i64 %125, %127
  %129 = load i64, ptr @MOD, align 8, !tbaa !8
  %130 = srem i64 %128, %129
  store i64 %130, ptr @h1, align 8, !tbaa !8
  %131 = add nsw i32 %.26787, 1
  %132 = sext i32 %.26787 to i64
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %132)
  %134 = load i8, ptr %133, align 1, !tbaa !16
  %135 = sext i8 %134 to i64
  %136 = add i64 %130, -96
  %137 = add i64 %136, %135
  %138 = load i64, ptr @MOD, align 8, !tbaa !8
  %139 = srem i64 %137, %138
  store i64 %139, ptr @h1, align 8, !tbaa !8
  %140 = load i64, ptr @h2, align 8, !tbaa !8
  %141 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %indvars.iv111)
  %142 = load i8, ptr %141, align 1, !tbaa !16
  %143 = sext i8 %142 to i64
  %144 = add nsw i64 %143, -96
  %145 = add nuw nsw i64 %indvars.iv111, 1
  %146 = trunc nuw nsw i64 %145 to i32
  %147 = lshr exact i32 %146, 1
  %148 = add nsw i32 %147, -1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !8
  %152 = mul nsw i64 %144, %151
  %153 = load i64, ptr @MOD, align 8, !tbaa !8
  %154 = srem i64 %152, %153
  %155 = add nsw i64 %154, %140
  %156 = srem i64 %155, %153
  br label %183

157:                                              ; preds = %.lr.ph91
  %158 = load i64, ptr @h2, align 8, !tbaa !8
  %159 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %indvars.iv111)
  %160 = load i8, ptr %159, align 1, !tbaa !16
  %161 = sext i8 %160 to i64
  %162 = add nsw i64 %161, -96
  %163 = lshr exact i64 %indvars.iv111, 1
  %164 = and i64 %163, 2147483647
  %165 = getelementptr inbounds [1001000 x i64], ptr @powers, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !8
  %167 = mul nsw i64 %162, %166
  %168 = load i64, ptr @MOD, align 8, !tbaa !8
  %169 = srem i64 %167, %168
  %170 = add nsw i64 %169, %158
  %171 = srem i64 %170, %168
  store i64 %171, ptr @h2, align 8, !tbaa !8
  %172 = add nsw i32 %.288, 1
  %173 = sext i32 %.288 to i64
  %174 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %44, i64 noundef %173)
  %175 = load i8, ptr %174, align 1, !tbaa !16
  %176 = sext i8 %175 to i64
  %177 = load i64, ptr @MOD, align 8, !tbaa !8
  %.neg74 = add i64 %171, 96
  %178 = sub i64 %.neg74, %176
  %179 = add nsw i64 %178, %177
  %180 = srem i64 %179, %177
  %181 = mul nsw i64 %180, 129032259
  %182 = srem i64 %181, %177
  %.pre = or disjoint i64 %indvars.iv111, 1
  br label %183

183:                                              ; preds = %157, %124
  %indvars.iv.next112.pre-phi = phi i64 [ %.pre, %157 ], [ %145, %124 ]
  %storemerge = phi i64 [ %182, %157 ], [ %156, %124 ]
  %.368 = phi i32 [ %.26787, %157 ], [ %131, %124 ]
  %.3 = phi i32 [ %172, %157 ], [ %.288, %124 ]
  store i64 %storemerge, ptr @h2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  %184 = load i64, ptr @h1, align 8, !tbaa !8
  %185 = icmp eq i64 %184, %storemerge
  %186 = zext i1 %185 to i32
  store i32 %186, ptr %4, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  %exitcond114.not = icmp eq i64 %indvars.iv.next112.pre-phi, %wide.trip.count
  br i1 %exitcond114.not, label %._crit_edge92, label %.lr.ph91, !llvm.loop !19

.preheader:                                       ; preds = %.lr.ph96
  %187 = icmp sgt i32 %190, 0
  br i1 %187, label %.lr.ph98, label %._crit_edge99

.lr.ph96:                                         ; preds = %.preheader77, %.lr.ph96
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.lr.ph96 ], [ 0, %.preheader77 ]
  %188 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %indvars.iv118
  %189 = trunc nuw nsw i64 %indvars.iv118 to i32
  call void @_ZN4trie6insertERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(32) %188, i32 noundef %189)
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %190 = load i32, ptr @n, align 4, !tbaa !11
  %191 = sext i32 %190 to i64
  %192 = icmp slt i64 %indvars.iv.next119, %191
  br i1 %192, label %.lr.ph96, label %.preheader, !llvm.loop !20

.lr.ph98:                                         ; preds = %.preheader, %.lr.ph98
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %.lr.ph98 ], [ 0, %.preheader ]
  %193 = getelementptr inbounds [1001000 x %"class.std::__cxx11::basic_string"], ptr @_Z1sB5cxx11, i64 0, i64 %indvars.iv121
  %194 = trunc nuw nsw i64 %indvars.iv121 to i32
  %195 = call noundef i64 @_ZN4trie3getERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(32) %193, i32 noundef %194)
  %196 = load i64, ptr @ans, align 8, !tbaa !8
  %197 = add nsw i64 %196, %195
  store i64 %197, ptr @ans, align 8, !tbaa !8
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %198 = load i32, ptr @n, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = icmp slt i64 %indvars.iv.next122, %199
  br i1 %200, label %.lr.ph98, label %._crit_edge99, !llvm.loop !21

._crit_edge99:                                    ; preds = %.lr.ph98, %.preheader79, %.preheader78, %.preheader77, %.preheader
  call void @_ZN4trieD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #10
  call void @_ZdlPvm(ptr noundef nonnull %32, i64 noundef 8) #9
  %201 = load i64, ptr @ans, align 8, !tbaa !8
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %201)
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %202, i8 noundef signext 10)
  %204 = load i32, ptr @t, align 4, !tbaa !11
  %205 = add nsw i32 %204, -1
  store i32 %205, ptr @t, align 4, !tbaa !11
  %.not = icmp eq i32 %204, 0
  br i1 %.not, label %._crit_edge102, label %.lr.ph101, !llvm.loop !22

._crit_edge102:                                   ; preds = %._crit_edge99, %.preheader80
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4trie6insertERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4trie3getERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #5 align 2

attributes #0 = { 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 #1 = { "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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin allocsize(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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


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