; LLVM IR from ASDAlexander77/TypeScriptCompiler :: tsc/tsc-new-parser/scanner.ll (ZN2ts7Scanner16reScanSlashTokenEv)

; 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"

%"struct.ts::DiagnosticMessageStore" = type { i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.ptr.100 = type { %"class.std::shared_ptr.101" }
%"class.std::shared_ptr.101" = type { %"class.std::__shared_ptr.102" }
%"class.std::__shared_ptr.102" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.ts::data::DiagnosticMessage" = type <{ i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::vector.104", %"class.std::vector.104", i8, [7 x i8] }>
%"class.std::vector.104" = type { %"struct.std::_Vector_base.105" }
%"struct.std::_Vector_base.105" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%"class.ts::Scanner" = type { i32, i32, i8, i32, %"struct.ts::safe_string", i32, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", i32, %"class.std::vector.41", i32, i32, %"class.std::function" }
%"struct.ts::safe_string" = type { %"class.std::__cxx11::basic_string" }
%"class.std::vector.41" = type { %"struct.std::_Vector_base.42" }
%"struct.std::_Vector_base.42" = type { %"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@.str.6452 = external hidden unnamed_addr constant [1 x i32], align 4

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(121)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2ts7Scanner16isIdentifierPartE14CharacterCodesNS_12ScriptTargetENS_15LanguageVariantE(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2ts7Scanner16reScanSlashTokenEv(ptr noundef nonnull align 8 dereferenceable(176) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca %struct.ptr.100, align 8
  %7 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca i32, align 4
  %13 = alloca %struct.ptr.100, align 8
  %14 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  %20 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 9
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i32 %21, 44
  br i1 %22, label %27, label %23

23:                                               ; preds = %1
  %24 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 9
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 69
  br i1 %26, label %27, label %148

27:                                               ; preds = %23, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %28 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 8
  %29 = load i32, ptr %28, align 4, !tbaa !29
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %3, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 0, ptr %4, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 0, ptr %5, align 1, !tbaa !31
  br label %31

31:                                               ; preds = %117, %27
  br label %32

32:                                               ; preds = %31
  %33 = load i32, ptr %3, align 4, !tbaa !30
  %34 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 6
  %35 = load i32, ptr %34, align 4, !tbaa !32
  %36 = icmp sge i32 %33, %35
  br i1 %36, label %37, label %57

37:                                               ; preds = %32
  %38 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 11
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %38, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #4
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %7, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(121) %7)
          to label %40 unwind label %43

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %41 unwind label %47

41:                                               ; preds = %40
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %19, ptr noundef %6, i32 noundef -1, i32 noundef 0, ptr noundef %10)
          to label %42 unwind label %51

42:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %7) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #4
  br label %118

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  br label %56

47:                                               ; preds = %40
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  br label %55

51:                                               ; preds = %41
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %55

55:                                               ; preds = %51, %47
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br label %56

56:                                               ; preds = %55, %43
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %7) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #4
  br label %147

57:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %58 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 4
  %59 = load i32, ptr %3, align 4, !tbaa !30
  %60 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %58, i32 noundef %59)
  store i32 %60, ptr %12, align 4, !tbaa !33
  %61 = load i32, ptr %12, align 4, !tbaa !33
  %62 = call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %19, i32 noundef %61)
  br i1 %62, label %63, label %83

63:                                               ; preds = %57
  %64 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 11
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %64, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr %14) #4
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %14, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(121) %14)
          to label %66 unwind label %69

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %67 unwind label %73

67:                                               ; preds = %66
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %19, ptr noundef %13, i32 noundef -1, i32 noundef 0, ptr noundef %15)
          to label %68 unwind label %77

68:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %14) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %14) #4
  store i32 3, ptr %17, align 4
  br label %115

69:                                               ; preds = %63
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %82

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %8, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %9, align 4
  br label %81

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %8, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  br label %82

82:                                               ; preds = %81, %69
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %14) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %147

83:                                               ; preds = %57
  %84 = load i8, ptr %4, align 1, !tbaa !31, !range !35, !noundef !36
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %87

86:                                               ; preds = %83
  store i8 0, ptr %4, align 1, !tbaa !31
  br label %112

87:                                               ; preds = %83
  %88 = load i32, ptr %12, align 4, !tbaa !33
  %89 = icmp eq i32 %88, 47
  br i1 %89, label %90, label %96

90:                                               ; preds = %87
  %91 = load i8, ptr %5, align 1, !tbaa !31, !range !35, !noundef !36
  %92 = trunc i8 %91 to i1
  br i1 %92, label %96, label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %3, align 4, !tbaa !30
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %3, align 4, !tbaa !30
  store i32 3, ptr %17, align 4
  br label %115

96:                                               ; preds = %90, %87
  %97 = load i32, ptr %12, align 4, !tbaa !33
  %98 = icmp eq i32 %97, 91
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  store i8 1, ptr %5, align 1, !tbaa !31
  br label %110

100:                                              ; preds = %96
  %101 = load i32, ptr %12, align 4, !tbaa !33
  %102 = icmp eq i32 %101, 92
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  store i8 1, ptr %4, align 1, !tbaa !31
  br label %109

104:                                              ; preds = %100
  %105 = load i32, ptr %12, align 4, !tbaa !33
  %106 = icmp eq i32 %105, 93
  br i1 %106, label %107, label %108

107:                                              ; preds = %104
  store i8 0, ptr %5, align 1, !tbaa !31
  br label %108

108:                                              ; preds = %107, %104
  br label %109

109:                                              ; preds = %108, %103
  br label %110

110:                                              ; preds = %109, %99
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111, %86
  %113 = load i32, ptr %3, align 4, !tbaa !30
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %3, align 4, !tbaa !30
  store i32 0, ptr %17, align 4
  br label %115

115:                                              ; preds = %112, %93, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %116 = load i32, ptr %17, align 4
  switch i32 %116, label %156 [
    i32 0, label %117
    i32 3, label %118
  ]

117:                                              ; preds = %115
  br label %31, !llvm.loop !37

118:                                              ; preds = %115, %42
  br label %119

119:                                              ; preds = %133, %118
  %120 = load i32, ptr %3, align 4, !tbaa !30
  %121 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 6
  %122 = load i32, ptr %121, align 4, !tbaa !32
  %123 = icmp slt i32 %120, %122
  br i1 %123, label %124, label %131

124:                                              ; preds = %119
  %125 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 4
  %126 = load i32, ptr %3, align 4, !tbaa !30
  %127 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %125, i32 noundef %126)
  %128 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 1
  %129 = load i32, ptr %128, align 4, !tbaa !39
  %130 = call noundef zeroext i1 @_ZN2ts7Scanner16isIdentifierPartE14CharacterCodesNS_12ScriptTargetENS_15LanguageVariantE(ptr noundef nonnull align 8 dereferenceable(176) %19, i32 noundef %127, i32 noundef %129, i32 noundef 0)
  br label %131

131:                                              ; preds = %124, %119
  %132 = phi i1 [ false, %119 ], [ %130, %124 ]
  br i1 %132, label %133, label %136

133:                                              ; preds = %131
  %134 = load i32, ptr %3, align 4, !tbaa !30
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %3, align 4, !tbaa !30
  br label %119, !llvm.loop !40

136:                                              ; preds = %131
  %137 = load i32, ptr %3, align 4, !tbaa !30
  %138 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 5
  store i32 %137, ptr %138, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #4
  %139 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 4
  %140 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 8
  %141 = load i32, ptr %140, align 4, !tbaa !29
  %142 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 5
  %143 = load i32, ptr %142, align 8, !tbaa !41
  call void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %139, i32 noundef %141, i32 noundef %143)
  %144 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 10
  %145 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %144, ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  %146 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 9
  store i32 14, ptr %146, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %148

147:                                              ; preds = %82, %56
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %151

148:                                              ; preds = %136, %23
  %149 = getelementptr inbounds %"class.ts::Scanner", ptr %19, i32 0, i32 9
  %150 = load i32, ptr %149, align 8, !tbaa !9
  ret i32 %150

151:                                              ; preds = %147
  %152 = load ptr, ptr %8, align 8
  %153 = load i32, ptr %9, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155

156:                                              ; preds = %115
  unreachable
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !20, i64 64}
!10 = !{!"_ZTSN2ts7ScannerE", !11, i64 0, !12, i64 4, !13, i64 8, !14, i64 12, !15, i64 16, !19, i64 48, !19, i64 52, !19, i64 56, !19, i64 60, !20, i64 64, !16, i64 72, !21, i64 104, !22, i64 112, !19, i64 136, !26, i64 140, !27, i64 144}
!11 = !{!"_ZTSN2ts10ScriptKindE", !7, i64 0}
!12 = !{!"_ZTSN2ts12ScriptTargetE", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN2ts15LanguageVariantE", !7, i64 0}
!15 = !{!"_ZTSN2ts11safe_stringE", !16, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE", !17, i64 0, !18, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTS10SyntaxKind", !7, i64 0}
!21 = !{!"_ZTSN2ts10TokenFlagsE", !7, i64 0}
!22 = !{!"_ZTSSt6vectorI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN2ts16JSDocParsingModeE", !7, i64 0}
!27 = !{!"_ZTSSt8functionIFv3ptrIN2ts4data17DiagnosticMessageEEiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE", !28, i64 0, !6, i64 24}
!28 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!29 = !{!10, !19, i64 60}
!30 = !{!19, !19, i64 0}
!31 = !{!13, !13, i64 0}
!32 = !{!10, !19, i64 52}
!33 = !{!34, !34, i64 0}
!34 = !{!"_ZTS14CharacterCodes", !7, i64 0}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!10, !12, i64 4}
!40 = distinct !{!40, !38}
!41 = !{!10, !19, i64 48}


; 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"

%"struct.ts::DiagnosticMessageStore" = type { i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.ptr.100 = type { %"class.std::shared_ptr.101" }
%"class.std::shared_ptr.101" = type { %"class.std::__shared_ptr.102" }
%"class.std::__shared_ptr.102" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.ts::data::DiagnosticMessage" = type <{ i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::vector.104", %"class.std::vector.104", i8, [7 x i8] }>
%"class.std::vector.104" = type { %"struct.std::_Vector_base.105" }
%"struct.std::_Vector_base.105" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }

@_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@.str.6452 = external hidden unnamed_addr constant [1 x i32], align 4

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(121)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2ts7Scanner16isIdentifierPartE14CharacterCodesNS_12ScriptTargetENS_15LanguageVariantE(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2ts7Scanner16reScanSlashTokenEv(ptr noundef nonnull align 8 dereferenceable(176) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.ptr.100, align 8
  %3 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %struct.ptr.100, align 8
  %7 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  %12 = load i32, ptr %11, align 8, !tbaa !5
  switch i32 %12, label %76 [
    i32 44, label %13
    i32 69, label %13
  ]

13:                                               ; preds = %1, %1
  %14 = getelementptr inbounds i8, ptr %0, i64 60
  %15 = load i32, ptr %14, align 4, !tbaa !28
  %16 = getelementptr inbounds i8, ptr %0, i64 52
  %.01853 = add nsw i32 %15, 1
  %17 = load i32, ptr %16, align 4, !tbaa !29
  %.not54 = icmp slt i32 %.01853, %17
  br i1 %.not54, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  br label %32

._crit_edge:                                      ; preds = %56, %13
  %.018.lcssa = phi i32 [ %.01853, %13 ], [ %.018, %56 ]
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #4
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %3, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(121) %3)
          to label %21 unwind label %24

21:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %26

22:                                               ; preds = %21
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %2, i32 noundef -1, i32 noundef 0, ptr noundef nonnull %4)
          to label %23 unwind label %28

23:                                               ; preds = %22
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #4
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %3) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #4
  br label %.thread

24:                                               ; preds = %._crit_edge
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %31

26:                                               ; preds = %21
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %22
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %30

30:                                               ; preds = %28, %26
  %.pn38 = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #4
  br label %31

31:                                               ; preds = %30, %24
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %30 ], [ %25, %24 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %3) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #4
  br label %75

32:                                               ; preds = %.lr.ph, %56
  %.01858 = phi i32 [ %.01853, %.lr.ph ], [ %.018, %56 ]
  %.018.in57 = phi i32 [ %15, %.lr.ph ], [ %.01858, %56 ]
  %.02856 = phi i1 [ false, %.lr.ph ], [ %.129, %56 ]
  %.03155 = phi i1 [ false, %.lr.ph ], [ %.132, %56 ]
  %33 = tail call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef %.01858)
  %34 = tail call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %33)
  br i1 %34, label %35, label %49

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %0, i64 104
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #4
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %7, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unterminated_regular_expression_literalE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(121) %7)
          to label %38 unwind label %41

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %39 unwind label %43

39:                                               ; preds = %38
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %6, i32 noundef -1, i32 noundef 0, ptr noundef nonnull %8)
          to label %40 unwind label %45

40:                                               ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %7) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #4
  br label %.thread

41:                                               ; preds = %35
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %48

43:                                               ; preds = %38
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %47

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %47

47:                                               ; preds = %45, %43
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %44, %43 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br label %48

48:                                               ; preds = %47, %41
  %.pn.pn = phi { ptr, i32 } [ %.pn, %47 ], [ %42, %41 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %7) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #4
  br label %75

49:                                               ; preds = %32
  br i1 %.03155, label %56, label %50

50:                                               ; preds = %49
  switch i32 %33, label %.fold.split [
    i32 47, label %51
    i32 91, label %56
    i32 92, label %54
    i32 93, label %55
  ]

51:                                               ; preds = %50
  br i1 %.02856, label %.fold.split, label %52

52:                                               ; preds = %51
  %53 = add nsw i32 %.018.in57, 2
  br label %.thread

54:                                               ; preds = %50
  br label %56

55:                                               ; preds = %50
  br label %56

.fold.split:                                      ; preds = %51, %50
  br label %56

56:                                               ; preds = %55, %54, %49, %.fold.split, %50
  %.132 = phi i1 [ true, %54 ], [ false, %55 ], [ false, %49 ], [ false, %50 ], [ false, %.fold.split ]
  %.129 = phi i1 [ %.02856, %54 ], [ false, %55 ], [ %.02856, %49 ], [ true, %50 ], [ %.02856, %.fold.split ]
  %.018 = add nsw i32 %.01858, 1
  %57 = load i32, ptr %16, align 4, !tbaa !29
  %.not = icmp slt i32 %.018, %57
  br i1 %.not, label %32, label %._crit_edge

.thread:                                          ; preds = %52, %40, %23
  %.2 = phi i32 [ %.018.lcssa, %23 ], [ %53, %52 ], [ %.01858, %40 ]
  %58 = load i32, ptr %16, align 4, !tbaa !29
  %59 = icmp slt i32 %.2, %58
  br i1 %59, label %.lr.ph60, label %.critedge

.lr.ph60:                                         ; preds = %.thread
  %60 = getelementptr inbounds i8, ptr %0, i64 16
  %61 = getelementptr inbounds i8, ptr %0, i64 4
  br label %62

62:                                               ; preds = %.lr.ph60, %66
  %.359 = phi i32 [ %.2, %.lr.ph60 ], [ %67, %66 ]
  %63 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %60, i32 noundef %.359)
  %64 = load i32, ptr %61, align 4, !tbaa !30
  %65 = call noundef zeroext i1 @_ZN2ts7Scanner16isIdentifierPartE14CharacterCodesNS_12ScriptTargetENS_15LanguageVariantE(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %63, i32 noundef %64, i32 noundef 0)
  br i1 %65, label %66, label %.critedge

66:                                               ; preds = %62
  %67 = add nsw i32 %.359, 1
  %68 = load i32, ptr %16, align 4, !tbaa !29
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %62, label %.critedge, !llvm.loop !31

.critedge:                                        ; preds = %62, %66, %.thread
  %.3.lcssa = phi i32 [ %.2, %.thread ], [ %67, %66 ], [ %.359, %62 ]
  %70 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %.3.lcssa, ptr %70, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  %71 = getelementptr inbounds i8, ptr %0, i64 16
  %72 = load i32, ptr %14, align 4, !tbaa !28
  call void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %71, i32 noundef %72, i32 noundef %.3.lcssa)
  %73 = getelementptr inbounds i8, ptr %0, i64 72
  %74 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  store i32 14, ptr %11, align 8, !tbaa !5
  br label %76

75:                                               ; preds = %48, %31
  %.pn38.pn.pn = phi { ptr, i32 } [ %.pn38.pn, %31 ], [ %.pn.pn, %48 ]
  resume { ptr, i32 } %.pn38.pn.pn

76:                                               ; preds = %1, %.critedge
  %77 = phi i32 [ %12, %1 ], [ 14, %.critedge ]
  ret i32 %77
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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, !19, i64 64}
!6 = !{!"_ZTSN2ts7ScannerE", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 12, !13, i64 16, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !19, i64 64, !14, i64 72, !20, i64 104, !21, i64 112, !18, i64 136, !25, i64 140, !26, i64 144}
!7 = !{!"_ZTSN2ts10ScriptKindE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN2ts12ScriptTargetE", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN2ts15LanguageVariantE", !8, i64 0}
!13 = !{!"_ZTSN2ts11safe_stringE", !14, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE", !15, i64 0, !17, i64 8, !8, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_Alloc_hiderE", !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!"_ZTS10SyntaxKind", !8, i64 0}
!20 = !{!"_ZTSN2ts10TokenFlagsE", !8, i64 0}
!21 = !{!"_ZTSSt6vectorI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data16CommentDirectiveEESaIS4_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!25 = !{!"_ZTSN2ts16JSDocParsingModeE", !8, i64 0}
!26 = !{!"_ZTSSt8functionIFv3ptrIN2ts4data17DiagnosticMessageEEiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE", !27, i64 0, !16, i64 24}
!27 = !{!"_ZTSSt14_Function_base", !8, i64 0, !16, i64 16}
!28 = !{!6, !18, i64 60}
!29 = !{!6, !18, i64 52}
!30 = !{!6, !10, i64 4}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!6, !18, i64 48}


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