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

; 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.std::_Placeholder" = type { i8 }
%"struct.std::_Placeholder.139" = type { i8 }
%"struct.std::_Placeholder.140" = type { i8 }
%"struct.std::_Placeholder.141" = type { i8 }
%"class.std::_Bind.147" = type { { i64, i64 }, %"class.std::tuple.150" }
%"class.std::tuple.150" = type { %"struct.std::_Tuple_impl.151" }
%"struct.std::_Tuple_impl.151" = type { %"struct.std::_Head_base.138" }
%"struct.std::_Head_base.138" = type { ptr }
%"class.std::function.98" = 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 } }
%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 }

@_ZN2ts11DiagnosticsL39Unexpected_token_Did_you_mean_or_rbraceE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@_ZN2ts11DiagnosticsL35Unexpected_token_Did_you_mean_or_gtE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@_ZNSt12placeholders2_1E = external global %"struct.std::_Placeholder", align 1
@_ZNSt12placeholders2_2E = external global %"struct.std::_Placeholder.139", align 1
@_ZNSt12placeholders2_3E = external global %"struct.std::_Placeholder.140", align 1
@_ZNSt12placeholders2_4E = external global %"struct.std::_Placeholder.141", align 1
@.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 noundef zeroext i1 @_ZN2ts7Scanner16isWhiteSpaceLikeE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN2ts7Scanner24scanConflictMarkerTriviaERNS_11safe_stringEiSt8functionIFv3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef) #2 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 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: 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN2ts7ScannerEFv3ptrINS0_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEJPS1_RKSt12_PlaceholderILi1EERKSF_ILi2EERKSF_ILi3EERKSF_ILi4EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueEST_JDpT0_EE4typeEOST_DpOSU_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind.147") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2ts7Scanner12scanJsxTokenEb(ptr noundef nonnull align 8 dereferenceable(176) %0, i1 noundef zeroext %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::function.98", align 8
  %10 = alloca %"class.std::_Bind.147", align 8
  %11 = alloca { i64, i64 }, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.ptr.100, align 8
  %16 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca %struct.ptr.100, align 8
  %20 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.0", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %24 = zext i1 %1 to i8
  store i8 %24, ptr %5, align 1, !tbaa !9
  %25 = load ptr, ptr %4, align 8
  %26 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 8
  store i32 %27, ptr %28, align 4, !tbaa !30
  %29 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 7
  store i32 %27, ptr %29, align 8, !tbaa !31
  %30 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 6
  %33 = load i32, ptr %32, align 4, !tbaa !32
  %34 = icmp sge i32 %31, %33
  br i1 %34, label %35, label %37

35:                                               ; preds = %2
  %36 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 9
  store i32 1, ptr %36, align 8, !tbaa !33
  store i32 1, ptr %3, align 4
  br label %195

37:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %38 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %39 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %40 = load i32, ptr %39, align 8, !tbaa !11
  %41 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %38, i32 noundef %40)
  store i32 %41, ptr %6, align 4, !tbaa !34
  %42 = load i32, ptr %6, align 4, !tbaa !34
  %43 = icmp eq i32 %42, 60
  br i1 %43, label %44, label %61

44:                                               ; preds = %37
  %45 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %46 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = add nsw i32 %47, 1
  %49 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %45, i32 noundef %48)
  %50 = icmp eq i32 %49, 47
  br i1 %50, label %51, label %56

51:                                               ; preds = %44
  %52 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %53 = load i32, ptr %52, align 8, !tbaa !11
  %54 = add nsw i32 %53, 2
  store i32 %54, ptr %52, align 8, !tbaa !11
  %55 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 9
  store i32 31, ptr %55, align 8, !tbaa !33
  store i32 31, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %194

56:                                               ; preds = %44
  %57 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %57, align 8, !tbaa !11
  %60 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 9
  store i32 30, ptr %60, align 8, !tbaa !33
  store i32 30, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %194

61:                                               ; preds = %37
  %62 = load i32, ptr %6, align 4, !tbaa !34
  %63 = icmp eq i32 %62, 123
  br i1 %63, label %64, label %69

64:                                               ; preds = %61
  %65 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %65, align 8, !tbaa !11
  %68 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 9
  store i32 19, ptr %68, align 8, !tbaa !33
  store i32 19, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %194

69:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !36
  br label %70

70:                                               ; preds = %176, %69
  %71 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 6
  %74 = load i32, ptr %73, align 4, !tbaa !32
  %75 = icmp slt i32 %72, %74
  br i1 %75, label %76, label %180

76:                                               ; preds = %70
  %77 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %78 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %77, i32 noundef %79)
  store i32 %80, ptr %6, align 4, !tbaa !34
  %81 = load i32, ptr %6, align 4, !tbaa !34
  %82 = icmp eq i32 %81, 123
  br i1 %82, label %83, label %84

83:                                               ; preds = %76
  br label %180

84:                                               ; preds = %76
  %85 = load i32, ptr %6, align 4, !tbaa !34
  %86 = icmp eq i32 %85, 60
  br i1 %86, label %87, label %105

87:                                               ; preds = %84
  %88 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %89 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %90 = load i32, ptr %89, align 8, !tbaa !11
  %91 = call noundef zeroext i1 @_ZN2ts7Scanner22isConflictMarkerTriviaERNS_11safe_stringEi(ptr noundef nonnull align 8 dereferenceable(176) %25, ptr noundef nonnull align 8 dereferenceable(32) %88, i32 noundef %90)
  br i1 %91, label %92, label %104

92:                                               ; preds = %87
  %93 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %94 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %95 = load i32, ptr %94, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE to i64), i64 0 }, ptr %11, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr %25, ptr %12, align 8, !tbaa !5
  call void @_ZSt4bindIMN2ts7ScannerEFv3ptrINS0_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEJPS1_RKSt12_PlaceholderILi1EERKSF_ILi2EERKSF_ILi3EERKSF_ILi4EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueEST_JDpT0_EE4typeEOST_DpOSU_(ptr dead_on_unwind writable sret(%"class.std::_Bind.147") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_1E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_2E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_3E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_4E)
  call void @_ZNSt8functionIFv3ptrIN2ts4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEC2ISt5_BindIFMNS1_7ScannerEFvS4_iiSA_EPSF_St12_PlaceholderILi1EESJ_ILi2EESJ_ILi3EESJ_ILi4EEEEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %96 = invoke noundef i32 @_ZN2ts7Scanner24scanConflictMarkerTriviaERNS_11safe_stringEiSt8functionIFv3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE(ptr noundef nonnull align 8 dereferenceable(176) %25, ptr noundef nonnull align 8 dereferenceable(32) %93, i32 noundef %95, ptr noundef %9)
          to label %97 unwind label %100

97:                                               ; preds = %92
  %98 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  store i32 %96, ptr %98, align 8, !tbaa !11
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %99 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 9
  store i32 7, ptr %99, align 8, !tbaa !33
  store i32 7, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %192

100:                                              ; preds = %92
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %193

104:                                              ; preds = %87
  br label %180

105:                                              ; preds = %84
  %106 = load i32, ptr %6, align 4, !tbaa !34
  %107 = icmp eq i32 %106, 62
  br i1 %107, label %108, label %128

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 128, ptr %16) #5
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %16, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL35Unexpected_token_Did_you_mean_or_gtE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(121) %16)
          to label %109 unwind label %114

109:                                              ; preds = %108
  %110 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %111 = load i32, ptr %110, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %112 unwind label %118

112:                                              ; preds = %109
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %25, ptr noundef %15, i32 noundef %111, i32 noundef 1, ptr noundef %17)
          to label %113 unwind label %122

113:                                              ; preds = %112
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %16) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #5
  br label %128

114:                                              ; preds = %108
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %13, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %14, align 4
  br label %127

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %13, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %14, align 4
  br label %126

122:                                              ; preds = %112
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %13, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %126

126:                                              ; preds = %122, %118
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  br label %127

127:                                              ; preds = %126, %114
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %16) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #5
  br label %193

128:                                              ; preds = %113, %105
  %129 = load i32, ptr %6, align 4, !tbaa !34
  %130 = icmp eq i32 %129, 125
  br i1 %130, label %131, label %151

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 128, ptr %20) #5
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %20, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unexpected_token_Did_you_mean_or_rbraceE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(121) %20)
          to label %132 unwind label %137

132:                                              ; preds = %131
  %133 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %134 = load i32, ptr %133, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %135 unwind label %141

135:                                              ; preds = %132
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %25, ptr noundef %19, i32 noundef %134, i32 noundef 1, ptr noundef %21)
          to label %136 unwind label %145

136:                                              ; preds = %135
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %20) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #5
  br label %151

137:                                              ; preds = %131
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %13, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %14, align 4
  br label %150

141:                                              ; preds = %132
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %13, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %14, align 4
  br label %149

145:                                              ; preds = %135
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %13, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  br label %149

149:                                              ; preds = %145, %141
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  br label %150

150:                                              ; preds = %149, %137
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %20) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #5
  br label %193

151:                                              ; preds = %136, %128
  %152 = load i32, ptr %6, align 4, !tbaa !34
  %153 = call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %25, i32 noundef %152)
  br i1 %153, label %154, label %158

154:                                              ; preds = %151
  %155 = load i32, ptr %8, align 4, !tbaa !36
  %156 = icmp eq i32 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  store i32 -1, ptr %8, align 4, !tbaa !36
  br label %176

158:                                              ; preds = %154, %151
  %159 = load i8, ptr %5, align 1, !tbaa !9, !range !38, !noundef !39
  %160 = trunc i8 %159 to i1
  br i1 %160, label %168, label %161

161:                                              ; preds = %158
  %162 = load i32, ptr %6, align 4, !tbaa !34
  %163 = call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %25, i32 noundef %162)
  br i1 %163, label %164, label %168

164:                                              ; preds = %161
  %165 = load i32, ptr %8, align 4, !tbaa !36
  %166 = icmp sgt i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %164
  br label %180

168:                                              ; preds = %164, %161, %158
  %169 = load i32, ptr %6, align 4, !tbaa !34
  %170 = call noundef zeroext i1 @_ZN2ts7Scanner16isWhiteSpaceLikeE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %25, i32 noundef %169)
  br i1 %170, label %174, label %171

171:                                              ; preds = %168
  %172 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %173 = load i32, ptr %172, align 8, !tbaa !11
  store i32 %173, ptr %8, align 4, !tbaa !36
  br label %174

174:                                              ; preds = %171, %168
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175, %157
  %177 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %178 = load i32, ptr %177, align 8, !tbaa !11
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %177, align 8, !tbaa !11
  br label %70, !llvm.loop !40

180:                                              ; preds = %167, %104, %83, %70
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #5
  %181 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 4
  %182 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 7
  %183 = load i32, ptr %182, align 8, !tbaa !31
  %184 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 5
  %185 = load i32, ptr %184, align 8, !tbaa !11
  call void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) %181, i32 noundef %183, i32 noundef %185)
  %186 = getelementptr inbounds %"class.ts::Scanner", ptr %25, i32 0, i32 10
  %187 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %186, ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  %188 = load i32, ptr %8, align 4, !tbaa !36
  %189 = icmp eq i32 %188, -1
  %190 = zext i1 %189 to i64
  %191 = select i1 %189, i32 13, i32 12
  store i32 %191, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %192

192:                                              ; preds = %180, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %194

193:                                              ; preds = %150, %127, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %197

194:                                              ; preds = %192, %64, %56, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %195

195:                                              ; preds = %194, %35
  %196 = load i32, ptr %3, align 4
  ret i32 %196

197:                                              ; preds = %193
  %198 = load ptr, ptr %13, align 8
  %199 = load i32, ptr %14, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

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

; 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 = { 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 #5 = { nounwind }

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

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


; 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.std::_Placeholder" = type { i8 }
%"struct.std::_Placeholder.139" = type { i8 }
%"struct.std::_Placeholder.140" = type { i8 }
%"struct.std::_Placeholder.141" = type { i8 }
%"class.std::_Bind.147" = type { { i64, i64 }, %"class.std::tuple.150" }
%"class.std::tuple.150" = type { %"struct.std::_Tuple_impl.151" }
%"struct.std::_Tuple_impl.151" = type { %"struct.std::_Head_base.138" }
%"struct.std::_Head_base.138" = type { ptr }
%"class.std::function.98" = 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 } }
%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 }

@_ZN2ts11DiagnosticsL39Unexpected_token_Did_you_mean_or_rbraceE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@_ZN2ts11DiagnosticsL35Unexpected_token_Did_you_mean_or_gtE = external hidden global %"struct.ts::DiagnosticMessageStore", align 8
@_ZNSt12placeholders2_1E = external global %"struct.std::_Placeholder", align 1
@_ZNSt12placeholders2_2E = external global %"struct.std::_Placeholder.139", align 1
@_ZNSt12placeholders2_3E = external global %"struct.std::_Placeholder.140", align 1
@_ZNSt12placeholders2_4E = external global %"struct.std::_Placeholder.141", align 1
@.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 noundef zeroext i1 @_ZN2ts7Scanner16isWhiteSpaceLikeE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN2ts7Scanner24scanConflictMarkerTriviaERNS_11safe_stringEiSt8functionIFv3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef) local_unnamed_addr #2 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 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: 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN2ts7ScannerEFv3ptrINS0_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEJPS1_RKSt12_PlaceholderILi1EERKSF_ILi2EERKSF_ILi3EERKSF_ILi4EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueEST_JDpT0_EE4typeEOST_DpOSU_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind.147") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 1, 32) i32 @_ZN2ts7Scanner12scanJsxTokenEb(ptr noundef nonnull align 8 dereferenceable(176) %0, i1 noundef zeroext %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::function.98", align 8
  %4 = alloca %"class.std::_Bind.147", align 8
  %5 = alloca { i64, i64 }, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.ptr.100, align 8
  %8 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca %struct.ptr.100, align 8
  %12 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.0", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load i32, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %17, ptr %18, align 4, !tbaa !28
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %17, ptr %19, align 8, !tbaa !29
  %20 = getelementptr inbounds i8, ptr %0, i64 52
  %21 = load i32, ptr %20, align 4, !tbaa !30
  %.not = icmp slt i32 %17, %21
  br i1 %.not, label %24, label %22

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 1, ptr %23, align 8, !tbaa !31
  br label %101

24:                                               ; preds = %2
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = tail call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %17)
  %27 = load i32, ptr %16, align 8, !tbaa !5
  switch i32 %26, label %.preheader [
    i32 60, label %30
    i32 123, label %40
  ]

.preheader:                                       ; preds = %24
  %28 = load i32, ptr %20, align 4, !tbaa !30
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %.lr.ph, label %.loopexit

30:                                               ; preds = %24
  %31 = add nsw i32 %27, 1
  %32 = tail call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %31)
  %33 = icmp eq i32 %32, 47
  %34 = load i32, ptr %16, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %0, i64 64
  br i1 %33, label %36, label %38

36:                                               ; preds = %30
  %37 = add nsw i32 %34, 2
  store i32 %37, ptr %16, align 8, !tbaa !5
  store i32 31, ptr %35, align 8, !tbaa !31
  br label %101

38:                                               ; preds = %30
  %39 = add nsw i32 %34, 1
  store i32 %39, ptr %16, align 8, !tbaa !5
  store i32 30, ptr %35, align 8, !tbaa !31
  br label %101

40:                                               ; preds = %24
  %41 = add nsw i32 %27, 1
  store i32 %41, ptr %16, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 19, ptr %42, align 8, !tbaa !31
  br label %101

.lr.ph:                                           ; preds = %.preheader, %90
  %43 = phi i32 [ %92, %90 ], [ %27, %.preheader ]
  %.02448 = phi i32 [ %.125, %90 ], [ 0, %.preheader ]
  %44 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %43)
  switch i32 %44, label %80 [
    i32 123, label %.loopexit.loopexit
    i32 60, label %45
    i32 62, label %54
    i32 125, label %67
  ]

45:                                               ; preds = %.lr.ph
  %46 = load i32, ptr %16, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN2ts7Scanner22isConflictMarkerTriviaERNS_11safe_stringEi(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %46)
  %.pre61 = load i32, ptr %16, align 8, !tbaa !5
  br i1 %47, label %48, label %.loopexit

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  store i64 ptrtoint (ptr @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE to i64), ptr %5, align 8, !tbaa !32
  %.fca.1.gep = getelementptr inbounds i8, ptr %5, i64 8
  store i64 0, ptr %.fca.1.gep, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store ptr %0, ptr %6, align 8, !tbaa !33
  call void @_ZSt4bindIMN2ts7ScannerEFv3ptrINS0_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEJPS1_RKSt12_PlaceholderILi1EERKSF_ILi2EERKSF_ILi3EERKSF_ILi4EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueEST_JDpT0_EE4typeEOST_DpOSU_(ptr dead_on_unwind nonnull writable sret(%"class.std::_Bind.147") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_1E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_2E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_3E, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_4E)
  call void @_ZNSt8functionIFv3ptrIN2ts4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEC2ISt5_BindIFMNS1_7ScannerEFvS4_iiSA_EPSF_St12_PlaceholderILi1EESJ_ILi2EESJ_ILi3EESJ_ILi4EEEEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %49 = invoke noundef i32 @_ZN2ts7Scanner24scanConflictMarkerTriviaERNS_11safe_stringEiSt8functionIFv3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %.pre61, ptr noundef nonnull %3)
          to label %50 unwind label %52

50:                                               ; preds = %48
  store i32 %49, ptr %16, align 8, !tbaa !5
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %51 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 7, ptr %51, align 8, !tbaa !31
  br label %101

52:                                               ; preds = %48
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %100

54:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %8) #5
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %8, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL35Unexpected_token_Did_you_mean_or_gtE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(121) %8)
          to label %55 unwind label %59

55:                                               ; preds = %54
  %56 = load i32, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %57 unwind label %61

57:                                               ; preds = %55
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %7, i32 noundef %56, i32 noundef 1, ptr noundef nonnull %9)
          to label %58 unwind label %63

58:                                               ; preds = %57
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %8) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #5
  br label %80

59:                                               ; preds = %54
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %55
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %57
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %8) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #5
  br label %100

67:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %12) #5
  call void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %12, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL39Unexpected_token_Did_you_mean_or_rbraceE)
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(121) %12)
          to label %68 unwind label %72

68:                                               ; preds = %67
  %69 = load i32, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaIwEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %70 unwind label %74

70:                                               ; preds = %68
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %11, i32 noundef %69, i32 noundef 1, ptr noundef nonnull %13)
          to label %71 unwind label %76

71:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %12) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %12) #5
  br label %80

72:                                               ; preds = %67
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

74:                                               ; preds = %68
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %70
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %78

78:                                               ; preds = %76, %74
  %.pn35 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  br label %79

79:                                               ; preds = %78, %72
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %78 ], [ %73, %72 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %12) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %12) #5
  br label %100

80:                                               ; preds = %58, %.lr.ph, %71
  %81 = call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %44)
  %82 = icmp eq i32 %.02448, 0
  %or.cond = select i1 %81, i1 %82, i1 false
  br i1 %or.cond, label %._crit_edge, label %83

._crit_edge:                                      ; preds = %80
  %.pre = load i32, ptr %16, align 8, !tbaa !5
  br label %90

83:                                               ; preds = %80
  br i1 %1, label %87, label %84

84:                                               ; preds = %83
  %85 = call noundef zeroext i1 @_ZN2ts7Scanner11isLineBreakE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %44)
  %86 = icmp sgt i32 %.02448, 0
  %or.cond3 = select i1 %85, i1 %86, i1 false
  br i1 %or.cond3, label %.loopexit.loopexit, label %87

87:                                               ; preds = %84, %83
  %88 = call noundef zeroext i1 @_ZN2ts7Scanner16isWhiteSpaceLikeE14CharacterCodes(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %44)
  %89 = load i32, ptr %16, align 8
  %spec.select = select i1 %88, i32 %.02448, i32 %89
  br label %90

90:                                               ; preds = %._crit_edge, %87
  %91 = phi i32 [ %.pre, %._crit_edge ], [ %89, %87 ]
  %.125 = phi i32 [ -1, %._crit_edge ], [ %spec.select, %87 ]
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %16, align 8, !tbaa !5
  %93 = load i32, ptr %20, align 4, !tbaa !30
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %.lr.ph, label %.loopexit.loopexit, !llvm.loop !34

.loopexit.loopexit:                               ; preds = %.lr.ph, %84, %90
  %.02447.ph = phi i32 [ %.02448, %.lr.ph ], [ %.02448, %84 ], [ %.125, %90 ]
  %.pre60 = load i32, ptr %16, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.preheader, %45
  %95 = phi i32 [ %.pre61, %45 ], [ %27, %.preheader ], [ %.pre60, %.loopexit.loopexit ]
  %.02447 = phi i32 [ %.02448, %45 ], [ 0, %.preheader ], [ %.02447.ph, %.loopexit.loopexit ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  %96 = load i32, ptr %19, align 8, !tbaa !29
  call void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef %96, i32 noundef %95)
  %97 = getelementptr inbounds i8, ptr %0, i64 72
  %98 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %97, ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  %.02447.fr = freeze i32 %.02447
  %99 = icmp eq i32 %.02447.fr, -1
  %spec.select69 = select i1 %99, i32 13, i32 12
  br label %101

100:                                              ; preds = %79, %66, %52
  %.pn38 = phi { ptr, i32 } [ %53, %52 ], [ %.pn35.pn, %79 ], [ %.pn.pn, %66 ]
  resume { ptr, i32 } %.pn38

101:                                              ; preds = %.loopexit, %36, %38, %40, %50, %22
  %.228 = phi i32 [ 1, %22 ], [ 31, %36 ], [ 30, %38 ], [ 19, %40 ], [ 7, %50 ], [ %spec.select69, %.loopexit ]
  ret i32 %.228
}

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

; 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 = { 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 #5 = { 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, !18, i64 48}
!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 56}
!30 = !{!6, !18, i64 52}
!31 = !{!6, !19, i64 64}
!32 = !{!8, !8, i64 0}
!33 = !{!16, !16, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


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