; LLVM IR from emeraldacoustics/atcoder-solutions :: abc362_g (main)

; 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::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" }
%"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.SuffixAutomaton = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.SuffixAutomaton<char>::Node" = type <{ i32, i32, [26 x i32], i32, i8, [3 x i8] }>

@_ZSt3cin = external global %"class.std::basic_istream", 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 %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %class.SuffixAutomaton, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.3", align 8
  %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 %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %19 = invoke 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) %2)
          to label %20 unwind label %29

20:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  invoke void @_ZN15SuffixAutomatonIcEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %21 unwind label %33

21:                                               ; preds = %20
  invoke void @_ZN15SuffixAutomatonIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %22 unwind label %37

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

23:                                               ; preds = %50, %22
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %27 = icmp ult i64 %25, %26
  br i1 %27, label %41, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %57

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %3, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %4, align 4
  br label %207

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %3, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %4, align 4
  br label %206

37:                                               ; preds = %21
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %3, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %4, align 4
  br label %205

41:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %43)
          to label %45 unwind label %53

45:                                               ; preds = %41
  %46 = invoke noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %47 unwind label %53

47:                                               ; preds = %45
  store i32 %46, ptr %7, align 4, !tbaa !5
  %48 = invoke noundef i32 @_ZN15SuffixAutomatonIcE6extendERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %49 unwind label %53

49:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %6, align 4, !tbaa !5
  br label %23, !llvm.loop !9

53:                                               ; preds = %47, %45, %41
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %3, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %205

57:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %75, %57
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = getelementptr inbounds %class.SuffixAutomaton, ptr %5, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = icmp slt i32 %59, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %82

64:                                               ; preds = %58
  %65 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %66 unwind label %78

66:                                               ; preds = %64
  %67 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %65, i32 0, i32 4
  %68 = load i8, ptr %67, align 4, !tbaa !18, !range !21, !noundef !22
  %69 = trunc i8 %68 to i1
  %70 = xor i1 %69, true
  %71 = zext i1 %70 to i32
  %72 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %73 unwind label %78

73:                                               ; preds = %66
  %74 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %72, i32 0, i32 3
  store i32 %71, ptr %74, align 4, !tbaa !23
  br label %75

75:                                               ; preds = %73
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %8, align 4, !tbaa !5
  br label %58, !llvm.loop !24

78:                                               ; preds = %66, %64
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %3, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %205

82:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  invoke void @_ZN15SuffixAutomatonIcE14sorted_indicesEv(ptr dead_on_unwind writable sret(%"class.std::vector.3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %83 unwind label %91

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %84 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %85 = sub i64 %84, 1
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr %10, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %123, %83
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = icmp sge i32 %88, 0
  br i1 %89, label %95, label %90

90:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %126

91:                                               ; preds = %82
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %3, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %4, align 4
  br label %204

95:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %97) #7
  %99 = load i32, ptr %98, align 4, !tbaa !5
  store i32 %99, ptr %11, align 4, !tbaa !5
  %100 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %101 unwind label %118

101:                                              ; preds = %95
  %102 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %100, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !25
  %104 = icmp sge i32 %103, 0
  br i1 %104, label %105, label %122

105:                                              ; preds = %101
  %106 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %107 unwind label %118

107:                                              ; preds = %105
  %108 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %106, i32 0, i32 3
  %109 = load i32, ptr %108, align 4, !tbaa !23
  %110 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %111 unwind label %118

111:                                              ; preds = %107
  %112 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %110, i32 0, i32 1
  %113 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %112)
          to label %114 unwind label %118

114:                                              ; preds = %111
  %115 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %113, i32 0, i32 3
  %116 = load i32, ptr %115, align 4, !tbaa !23
  %117 = add nsw i32 %116, %109
  store i32 %117, ptr %115, align 4, !tbaa !23
  br label %122

118:                                              ; preds = %111, %107, %105, %95
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %3, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %203

122:                                              ; preds = %114, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = add nsw i32 %124, -1
  store i32 %125, ptr %10, align 4, !tbaa !5
  br label %87, !llvm.loop !26

126:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %127 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %128 unwind label %134

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %191, %128
  %130 = load i32, ptr %13, align 4, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %138, label %133

133:                                              ; preds = %129
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %200

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

138:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %140 unwind label %147

140:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %172, %140
  %142 = load i32, ptr %17, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  %145 = icmp ult i64 %143, %144
  br i1 %145, label %151, label %146

146:                                              ; preds = %141
  store i32 14, ptr %14, align 4
  br label %175

147:                                              ; preds = %138
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %3, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %4, align 4
  br label %199

151:                                              ; preds = %141
  %152 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %153 unwind label %167

153:                                              ; preds = %151
  %154 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %152, i32 0, i32 2
  %155 = load i32, ptr %17, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %15, i64 noundef %156)
          to label %158 unwind label %167

158:                                              ; preds = %153
  %159 = invoke noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(1) %157)
          to label %160 unwind label %167

160:                                              ; preds = %158
  %161 = sext i32 %159 to i64
  %162 = getelementptr inbounds [26 x i32], ptr %154, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  store i32 %163, ptr %16, align 4, !tbaa !5
  %164 = load i32, ptr %16, align 4, !tbaa !5
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %171

166:                                              ; preds = %160
  store i32 -1, ptr %16, align 4, !tbaa !5
  store i32 14, ptr %14, align 4
  br label %175

167:                                              ; preds = %158, %153, %151
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %3, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %198

171:                                              ; preds = %160
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %17, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %17, align 4, !tbaa !5
  br label %141, !llvm.loop !27

175:                                              ; preds = %166, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %16, align 4, !tbaa !5
  %178 = icmp slt i32 %177, 0
  br i1 %178, label %179, label %180

179:                                              ; preds = %176
  br label %185

180:                                              ; preds = %176
  %181 = invoke noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %182 unwind label %194

182:                                              ; preds = %180
  %183 = getelementptr inbounds %"class.SuffixAutomaton<char>::Node", ptr %181, i32 0, i32 3
  %184 = load i32, ptr %183, align 4, !tbaa !23
  br label %185

185:                                              ; preds = %182, %179
  %186 = phi i32 [ 0, %179 ], [ %184, %182 ]
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %186)
          to label %188 unwind label %194

188:                                              ; preds = %185
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %187, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %190 unwind label %194

190:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %13, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %13, align 4, !tbaa !5
  br label %129, !llvm.loop !28

194:                                              ; preds = %188, %185, %180
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %3, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %4, align 4
  br label %198

198:                                              ; preds = %194, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %199

199:                                              ; preds = %198, %147
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %202

200:                                              ; preds = %133
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  %201 = load i32, ptr %1, align 4
  ret i32 %201

202:                                              ; preds = %199, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %203

203:                                              ; preds = %202, %118
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %204

204:                                              ; preds = %203, %91
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %205

205:                                              ; preds = %204, %78, %53, %37
  call void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %206

206:                                              ; preds = %205, %33
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  br label %207

207:                                              ; preds = %206, %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %3, align 8
  %210 = load i32, ptr %4, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) #3 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) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15SuffixAutomatonIcE14sorted_indicesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind }

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

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


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

%"class.std::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" }
%"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.SuffixAutomaton = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SuffixAutomaton<char>::Node, std::allocator<SuffixAutomaton<char>::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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 }

@_ZSt3cin = external global %"class.std::basic_istream", 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 %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %class.SuffixAutomaton, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.3", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i32, align 4
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %11 = invoke 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) %1)
          to label %12 unwind label %17

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  invoke void @_ZN15SuffixAutomatonIcEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %13 unwind label %19

13:                                               ; preds = %12
  invoke void @_ZN15SuffixAutomatonIcE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %.preheader32 unwind label %21

.preheader32:                                     ; preds = %13
  %14 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %26, %.preheader32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 8, !tbaa !9
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph35, label %._crit_edge36

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %109

19:                                               ; preds = %12
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %108

21:                                               ; preds = %13
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %107

.lr.ph:                                           ; preds = %.preheader32, %26
  %indvars.iv = phi i64 [ %indvars.iv.next, %26 ], [ 0, %.preheader32 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %24 = call noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 1 dereferenceable(1) %23)
  store i32 %24, ptr %3, align 4, !tbaa !5
  %25 = invoke noundef i32 @_ZN15SuffixAutomatonIcE6extendERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %26 unwind label %29

26:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %28 = icmp ugt i64 %27, %indvars.iv.next
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !16

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %107

._crit_edge36:                                    ; preds = %.lr.ph35, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  invoke void @_ZN15SuffixAutomatonIcE14sorted_indicesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.3") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %42 unwind label %50

.lr.ph35:                                         ; preds = %._crit_edge, %.lr.ph35
  %31 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %32 = getelementptr inbounds i8, ptr %31, i64 116
  %33 = load i8, ptr %32, align 4, !tbaa !18, !range !21, !noundef !22
  %34 = xor i8 %33, 1
  %35 = zext nneg i8 %34 to i32
  %36 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %37 = getelementptr inbounds i8, ptr %36, i64 112
  store i32 %35, ptr %37, align 4, !tbaa !23
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 8, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %.lr.ph35, label %._crit_edge36, !llvm.loop !24

42:                                               ; preds = %._crit_edge36
  %43 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %44 = trunc i64 %43 to i32
  %.01437 = add i32 %44, -1
  %45 = icmp sgt i32 %.01437, -1
  br i1 %45, label %.lr.ph40.preheader, label %._crit_edge41

.lr.ph40.preheader:                               ; preds = %42
  %46 = zext nneg i32 %.01437 to i64
  br label %.lr.ph40

._crit_edge41:                                    ; preds = %68, %42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %.preheader unwind label %70

.preheader:                                       ; preds = %._crit_edge41
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph47, label %._crit_edge48

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

.lr.ph40:                                         ; preds = %.lr.ph40.preheader, %68
  %indvars.iv51 = phi i64 [ %46, %.lr.ph40.preheader ], [ %indvars.iv.next52, %68 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv51) #7
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %6, align 4, !tbaa !5
  %54 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %55 = getelementptr inbounds i8, ptr %54, i64 4
  %56 = load i32, ptr %55, align 4, !tbaa !25
  %57 = icmp sgt i32 %56, -1
  br i1 %57, label %58, label %68

58:                                               ; preds = %.lr.ph40
  %59 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %60 = getelementptr inbounds i8, ptr %59, i64 112
  %61 = load i32, ptr %60, align 4, !tbaa !23
  %62 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %63 = getelementptr inbounds i8, ptr %62, i64 4
  %64 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %65 = getelementptr inbounds i8, ptr %64, i64 112
  %66 = load i32, ptr %65, align 4, !tbaa !23
  %67 = add nsw i32 %66, %61
  store i32 %67, ptr %65, align 4, !tbaa !23
  br label %68

68:                                               ; preds = %58, %.lr.ph40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %indvars.iv.next52 = add nsw i64 %indvars.iv51, -1
  %69 = icmp sgt i64 %indvars.iv51, 0
  br i1 %69, label %.lr.ph40, label %._crit_edge41, !llvm.loop !26

._crit_edge48:                                    ; preds = %98, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 0

70:                                               ; preds = %._crit_edge41
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %105

.lr.ph47:                                         ; preds = %.preheader, %98
  %.01346 = phi i32 [ %99, %98 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %72 = invoke 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) %8)
          to label %73 unwind label %78

73:                                               ; preds = %.lr.ph47
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  %74 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %.not49 = icmp eq i64 %74, 0
  br i1 %.not49, label %._crit_edge45, label %.lr.ph44

75:                                               ; preds = %.lr.ph44
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %76 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %77 = icmp ugt i64 %76, %indvars.iv.next55
  br i1 %77, label %.lr.ph44, label %._crit_edge45, !llvm.loop !27

78:                                               ; preds = %.lr.ph47
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %104

.lr.ph44:                                         ; preds = %73, %75
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %75 ], [ 0, %73 ]
  %80 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %indvars.iv54)
  %83 = call noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 1 dereferenceable(1) %82)
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [26 x i32], ptr %81, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr %9, align 4, !tbaa !5
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %.thread, label %75

.thread:                                          ; preds = %.lr.ph44
  store i32 -1, ptr %9, align 4, !tbaa !5
  br label %93

._crit_edge45:                                    ; preds = %75, %73
  %.pr = load i32, ptr %9, align 4, !tbaa !5
  %88 = icmp slt i32 %.pr, 0
  br i1 %88, label %93, label %89

89:                                               ; preds = %._crit_edge45
  %90 = call noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %91 = getelementptr inbounds i8, ptr %90, i64 112
  %92 = load i32, ptr %91, align 4, !tbaa !23
  br label %93

93:                                               ; preds = %.thread, %._crit_edge45, %89
  %94 = phi i32 [ %92, %89 ], [ 0, %._crit_edge45 ], [ 0, %.thread ]
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %94)
          to label %96 unwind label %102

96:                                               ; preds = %93
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %98 unwind label %102

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %99 = add nuw nsw i32 %.01346, 1
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %.lr.ph47, label %._crit_edge48, !llvm.loop !28

102:                                              ; preds = %96, %93
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %104

104:                                              ; preds = %102, %78
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %79, %78 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %105

105:                                              ; preds = %104, %70
  %.pn.pn = phi { ptr, i32 } [ %.pn, %104 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %106

106:                                              ; preds = %105, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %105 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %107

107:                                              ; preds = %106, %29, %21
  %.pn28 = phi { ptr, i32 } [ %30, %29 ], [ %.pn.pn.pn, %106 ], [ %22, %21 ]
  call void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %108

108:                                              ; preds = %107, %19
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %107 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %109

109:                                              ; preds = %108, %17
  %.pn28.pn.pn = phi { ptr, i32 } [ %.pn28.pn, %108 ], [ %18, %17 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn28.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN15SuffixAutomatonIcE3idxERKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 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 #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(117) ptr @_ZN15SuffixAutomatonIcEixERKi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15SuffixAutomatonIcE14sorted_indicesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15SuffixAutomatonIcED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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, !6, i64 0}
!10 = !{!"_ZTS15SuffixAutomatonIcE", !6, i64 0, !6, i64 4, !11, i64 8}
!11 = !{!"_ZTSSt6vectorIN15SuffixAutomatonIcE4NodeESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN15SuffixAutomatonIcE4NodeESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN15SuffixAutomatonIcE4NodeESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN15SuffixAutomatonIcE4NodeESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !20, i64 116}
!19 = !{!"_ZTSN15SuffixAutomatonIcE4NodeE", !6, i64 0, !6, i64 4, !7, i64 8, !6, i64 112, !20, i64 116}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!19, !6, i64 112}
!24 = distinct !{!24, !17}
!25 = !{!19, !6, i64 4}
!26 = distinct !{!26, !17}
!27 = distinct !{!27, !17}
!28 = distinct !{!28, !17}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass