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

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

@_ZN2ts11DiagnosticsL27Unterminated_string_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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2Ev(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 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: 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 uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts7Scanner10scanStringB5cxx11Eb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %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
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %struct.ptr.100, align 8
  %24 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  %27 = zext i1 %2 to i8
  store i8 %27, ptr %6, align 1, !tbaa !9
  %28 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %29 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %30 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %29, i32 noundef %31)
  store i32 %32, ptr %7, align 4, !tbaa !30
  %33 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %33, align 8, !tbaa !11
  store i1 false, ptr %8, align 1
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %36 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %37 = load i32, ptr %36, align 8, !tbaa !11
  store i32 %37, ptr %9, align 4, !tbaa !32
  br label %38

38:                                               ; preds = %220, %218, %3
  br label %39

39:                                               ; preds = %38
  %40 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 6
  %43 = load i32, ptr %42, align 4, !tbaa !33
  %44 = icmp sge i32 %41, %43
  br i1 %44, label %45, label %92

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  %46 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %47 = load i32, ptr %9, align 4, !tbaa !32
  %48 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %49 = load i32, ptr %48, align 8, !tbaa !11
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %46, i32 noundef %47, i32 noundef %49)
          to label %50 unwind label %60

50:                                               ; preds = %45
  %51 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %52 unwind label %64

52:                                               ; preds = %50
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  %53 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 11
  %54 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %53, i32 noundef 4)
          to label %55 unwind label %69

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 128, ptr %14) #4
  invoke void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %14, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL27Unterminated_string_literalE)
          to label %56 unwind label %73

56:                                               ; preds = %55
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(121) %14)
          to label %57 unwind label %77

57:                                               ; preds = %56
  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 %58 unwind label %81

58:                                               ; preds = %57
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %28, ptr noundef %13, i32 noundef -1, i32 noundef 0, ptr noundef %15)
          to label %59 unwind label %85

59:                                               ; preds = %58
  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
  br label %222

60:                                               ; preds = %45
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  br label %68

64:                                               ; preds = %50
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %11, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %224

69:                                               ; preds = %52
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %11, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %12, align 4
  br label %224

73:                                               ; preds = %55
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %11, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %12, align 4
  br label %91

77:                                               ; preds = %56
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %11, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %12, align 4
  br label %90

81:                                               ; preds = %57
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %11, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %12, align 4
  br label %89

85:                                               ; preds = %58
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %11, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %89

89:                                               ; preds = %85, %81
  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 %90

90:                                               ; preds = %89, %77
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %14) #4
  br label %91

91:                                               ; preds = %90, %73
  call void @llvm.lifetime.end.p0(i64 128, ptr %14) #4
  br label %224

92:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %93 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %94 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %95 = load i32, ptr %94, align 8, !tbaa !11
  %96 = invoke noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %93, i32 noundef %95)
          to label %97 unwind label %112

97:                                               ; preds = %92
  store i32 %96, ptr %17, align 4, !tbaa !30
  %98 = load i32, ptr %17, align 4, !tbaa !30
  %99 = load i32, ptr %7, align 4, !tbaa !30
  %100 = icmp eq i32 %98, %99
  br i1 %100, label %101, label %125

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #4
  %102 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %103 = load i32, ptr %9, align 4, !tbaa !32
  %104 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %105 = load i32, ptr %104, align 8, !tbaa !11
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %102, i32 noundef %103, i32 noundef %105)
          to label %106 unwind label %116

106:                                              ; preds = %101
  %107 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %108 unwind label %120

108:                                              ; preds = %106
  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
  %109 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %110 = load i32, ptr %109, align 8, !tbaa !11
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %109, align 8, !tbaa !11
  store i32 3, ptr %19, align 4
  br label %218

112:                                              ; preds = %178, %92
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %221

116:                                              ; preds = %101
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %124

120:                                              ; preds = %106
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  br label %221

125:                                              ; preds = %97
  %126 = load i32, ptr %17, align 4, !tbaa !30
  %127 = icmp eq i32 %126, 92
  br i1 %127, label %128, label %162

128:                                              ; preds = %125
  %129 = load i8, ptr %6, align 1, !tbaa !9, !range !34, !noundef !35
  %130 = trunc i8 %129 to i1
  br i1 %130, label %162, label %131

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #4
  %132 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %133 = load i32, ptr %9, align 4, !tbaa !32
  %134 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %135 = load i32, ptr %134, align 8, !tbaa !11
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %132, i32 noundef %133, i32 noundef %135)
          to label %136 unwind label %144

136:                                              ; preds = %131
  %137 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %138 unwind label %148

138:                                              ; preds = %136
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  invoke void @_ZN2ts7Scanner18scanEscapeSequenceB5cxx11Eb(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef nonnull align 8 dereferenceable(176) %28, i1 noundef zeroext true)
          to label %139 unwind label %153

139:                                              ; preds = %138
  %140 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %141 unwind label %157

141:                                              ; preds = %139
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  %142 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %143 = load i32, ptr %142, align 8, !tbaa !11
  store i32 %143, ptr %9, align 4, !tbaa !32
  store i32 2, ptr %19, align 4
  br label %218, !llvm.loop !36

144:                                              ; preds = %131
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %11, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %12, align 4
  br label %152

148:                                              ; preds = %136
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %11, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  br label %152

152:                                              ; preds = %148, %144
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #4
  br label %221

153:                                              ; preds = %138
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %11, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %12, align 4
  br label %161

157:                                              ; preds = %139
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %11, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  br label %161

161:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  br label %221

162:                                              ; preds = %128, %125
  %163 = load i32, ptr %17, align 4, !tbaa !30
  %164 = icmp eq i32 %163, 10
  br i1 %164, label %168, label %165

165:                                              ; preds = %162
  %166 = load i32, ptr %17, align 4, !tbaa !30
  %167 = icmp eq i32 %166, 13
  br i1 %167, label %168, label %214

168:                                              ; preds = %165, %162
  %169 = load i8, ptr %6, align 1, !tbaa !9, !range !34, !noundef !35
  %170 = trunc i8 %169 to i1
  br i1 %170, label %214, label %171

171:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  %172 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 4
  %173 = load i32, ptr %9, align 4, !tbaa !32
  %174 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %175 = load i32, ptr %174, align 8, !tbaa !11
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %172, i32 noundef %173, i32 noundef %175)
          to label %176 unwind label %186

176:                                              ; preds = %171
  %177 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %178 unwind label %190

178:                                              ; preds = %176
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  %179 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 11
  %180 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %179, i32 noundef 4)
          to label %181 unwind label %112

181:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 128, ptr %24) #4
  invoke void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %24, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL27Unterminated_string_literalE)
          to label %182 unwind label %195

182:                                              ; preds = %181
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(121) %24)
          to label %183 unwind label %199

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

184:                                              ; preds = %183
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %28, ptr noundef %23, i32 noundef -1, i32 noundef 0, ptr noundef %25)
          to label %185 unwind label %207

185:                                              ; preds = %184
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %24) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %24) #4
  store i32 3, ptr %19, align 4
  br label %218

186:                                              ; preds = %171
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %11, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %12, align 4
  br label %194

190:                                              ; preds = %176
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %11, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %194

194:                                              ; preds = %190, %186
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  br label %221

195:                                              ; preds = %181
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %11, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %12, align 4
  br label %213

199:                                              ; preds = %182
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %11, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %12, align 4
  br label %212

203:                                              ; preds = %183
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %11, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %12, align 4
  br label %211

207:                                              ; preds = %184
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %11, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  br label %211

211:                                              ; preds = %207, %203
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  br label %212

212:                                              ; preds = %211, %199
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %24) #4
  br label %213

213:                                              ; preds = %212, %195
  call void @llvm.lifetime.end.p0(i64 128, ptr %24) #4
  br label %221

214:                                              ; preds = %168, %165
  %215 = getelementptr inbounds %"class.ts::Scanner", ptr %28, i32 0, i32 5
  %216 = load i32, ptr %215, align 8, !tbaa !11
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %215, align 8, !tbaa !11
  store i32 0, ptr %19, align 4
  br label %218

218:                                              ; preds = %214, %185, %141, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  %219 = load i32, ptr %19, align 4
  switch i32 %219, label %232 [
    i32 0, label %220
    i32 3, label %222
    i32 2, label %38
  ]

220:                                              ; preds = %218
  br label %38, !llvm.loop !36

221:                                              ; preds = %213, %194, %161, %152, %124, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %224

222:                                              ; preds = %218, %59
  store i1 true, ptr %8, align 1
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %223 = load i1, ptr %8, align 1
  br i1 %223, label %226, label %225

224:                                              ; preds = %221, %91, %69, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %227

225:                                              ; preds = %222
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %226

226:                                              ; preds = %225, %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void

227:                                              ; preds = %224
  %228 = load ptr, ptr %11, align 8
  %229 = load i32, ptr %12, align 4
  %230 = insertvalue { ptr, i32 } poison, ptr %228, 0
  %231 = insertvalue { ptr, i32 } %230, i32 %229, 1
  resume { ptr, i32 } %231

232:                                              ; preds = %218
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts7Scanner18scanEscapeSequenceB5cxx11Eb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext) #2 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 = { 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 = !{!31, !31, i64 0}
!31 = !{!"_ZTS14CharacterCodes", !7, i64 0}
!32 = !{!20, !20, i64 0}
!33 = !{!12, !20, i64 52}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !37}
!37 = !{!"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.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 }

@_ZN2ts11DiagnosticsL27Unterminated_string_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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2Ev(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 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) 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 uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts7Scanner10scanStringB5cxx11Eb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(176) %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %struct.ptr.100, align 8
  %6 = alloca %"struct.ts::data::DiagnosticMessage", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %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 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = getelementptr inbounds i8, ptr %1, i64 48
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = tail call noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %19)
  %21 = load i32, ptr %18, align 8, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %18, align 8, !tbaa !5
  tail call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %23 = load i32, ptr %18, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %1, i64 52
  %25 = load i32, ptr %24, align 4, !tbaa !28
  %.not72 = icmp slt i32 %23, %25
  br i1 %.not72, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  br i1 %2, label %.lr.ph.split.us.split, label %.lr.ph.split

.lr.ph.split.us.split:                            ; preds = %.lr.ph, %30
  %26 = phi i32 [ %32, %30 ], [ %23, %.lr.ph ]
  %27 = invoke noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %26)
          to label %28 unwind label %.split.us

28:                                               ; preds = %.lr.ph.split.us.split
  %29 = icmp eq i32 %27, %20
  br i1 %29, label %.split76.us, label %30

30:                                               ; preds = %28
  %31 = load i32, ptr %18, align 8, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %18, align 8, !tbaa !5
  %33 = load i32, ptr %24, align 4, !tbaa !28
  %.not.us = icmp slt i32 %32, %33
  br i1 %.not.us, label %.lr.ph.split.us.split, label %._crit_edge

.split.us:                                        ; preds = %.lr.ph.split.us.split
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %128

._crit_edge:                                      ; preds = %125, %30, %3
  %.030.lcssa = phi i32 [ %23, %3 ], [ %23, %30 ], [ %.131, %125 ]
  %.lcssa = phi i32 [ %23, %3 ], [ %32, %30 ], [ %126, %125 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %.030.lcssa, i32 noundef %.lcssa)
          to label %35 unwind label %44

35:                                               ; preds = %._crit_edge
  %36 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %37 unwind label %46

37:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  %38 = getelementptr inbounds i8, ptr %1, i64 104
  %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 nonnull %6) #4
  invoke void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %6, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL27Unterminated_string_literalE)
          to label %40 unwind label %49

40:                                               ; preds = %37
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(121) %6)
          to label %41 unwind label %51

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

42:                                               ; preds = %41
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %5, i32 noundef -1, i32 noundef 0, ptr noundef nonnull %7)
          to label %43 unwind label %55

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

44:                                               ; preds = %._crit_edge
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

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

48:                                               ; preds = %46, %44
  %.pn46 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %128

49:                                               ; preds = %37
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %59

51:                                               ; preds = %40
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %58

53:                                               ; preds = %41
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %57

57:                                               ; preds = %55, %53
  %.pn48 = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  br label %58

58:                                               ; preds = %57, %51
  %.pn48.pn = phi { ptr, i32 } [ %.pn48, %57 ], [ %52, %51 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %6) #4
  br label %59

59:                                               ; preds = %58, %49
  %.pn48.pn.pn = phi { ptr, i32 } [ %.pn48.pn, %58 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #4
  br label %128

.lr.ph.split:                                     ; preds = %.lr.ph, %125
  %60 = phi i32 [ %126, %125 ], [ %23, %.lr.ph ]
  %.03073 = phi i32 [ %.131, %125 ], [ %23, %.lr.ph ]
  %61 = invoke noundef i32 @_ZN2ts11safe_stringixEi(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %60)
          to label %62 unwind label %.split

62:                                               ; preds = %.lr.ph.split
  %63 = icmp eq i32 %61, %20
  br i1 %63, label %.split76.us, label %76

.split76.us:                                      ; preds = %62, %28
  %.us-phi77 = phi i32 [ %23, %28 ], [ %.03073, %62 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  %64 = load i32, ptr %18, align 8, !tbaa !5
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %.us-phi77, i32 noundef %64)
          to label %65 unwind label %71

65:                                               ; preds = %.split76.us
  %66 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %67 unwind label %73

67:                                               ; preds = %65
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  %68 = load i32, ptr %18, align 8, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %18, align 8, !tbaa !5
  br label %.thread

.split:                                           ; preds = %.lr.ph.split
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %128

71:                                               ; preds = %.split76.us
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %75

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %75

75:                                               ; preds = %73, %71
  %.pn43 = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %128

76:                                               ; preds = %62
  switch i32 %61, label %122 [
    i32 92, label %77
    i32 13, label %.split79
    i32 10, label %.split79
  ]

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  %78 = load i32, ptr %18, align 8, !tbaa !5
  invoke 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) %17, i32 noundef %.03073, i32 noundef %78)
          to label %79 unwind label %86

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %81 unwind label %88

81:                                               ; preds = %79
  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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  invoke void @_ZN2ts7Scanner18scanEscapeSequenceB5cxx11Eb(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(176) %1, i1 noundef zeroext true)
          to label %82 unwind label %91

82:                                               ; preds = %81
  %83 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %84 unwind label %93

84:                                               ; preds = %82
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  %85 = load i32, ptr %18, align 8, !tbaa !5
  br label %125, !llvm.loop !29

86:                                               ; preds = %77
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %90

88:                                               ; preds = %79
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %90

90:                                               ; preds = %88, %86
  %.pn = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  br label %128

91:                                               ; preds = %81
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

93:                                               ; preds = %82
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %95

95:                                               ; preds = %93, %91
  %.pn35 = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %128

.split79:                                         ; preds = %76, %76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  %96 = load i32, ptr %18, align 8, !tbaa !5
  invoke void @_ZN2ts11safe_string9substringB5cxx11Eii(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %.03073, i32 noundef %96)
          to label %97 unwind label %106

97:                                               ; preds = %.split79
  %98 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %99 unwind label %108

99:                                               ; preds = %97
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  %100 = getelementptr inbounds i8, ptr %1, i64 104
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2tsoRERNS_10TokenFlagsES0_(ptr noundef nonnull align 4 dereferenceable(4) %100, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %14) #4
  invoke void @_ZN2ts4data17DiagnosticMessageC2ERNS_22DiagnosticMessageStoreE(ptr noundef nonnull align 8 dereferenceable(121) %14, ptr noundef nonnull align 8 dereferenceable(72) @_ZN2ts11DiagnosticsL27Unterminated_string_literalE)
          to label %102 unwind label %111

102:                                              ; preds = %99
  invoke void @_ZN3ptrIN2ts4data17DiagnosticMessageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(121) %14)
          to label %103 unwind label %113

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 nonnull @.str.6452, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %104 unwind label %115

104:                                              ; preds = %103
  invoke void @_ZN2ts7Scanner5errorE3ptrINS_4data17DiagnosticMessageEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE(ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %13, i32 noundef -1, i32 noundef 0, ptr noundef nonnull %15)
          to label %105 unwind label %117

105:                                              ; preds = %104
  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 nonnull %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 nonnull %14) #4
  br label %.thread

106:                                              ; preds = %.split79
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %110

108:                                              ; preds = %97
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %110

110:                                              ; preds = %108, %106
  %.pn37 = phi { ptr, i32 } [ %109, %108 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br label %128

111:                                              ; preds = %99
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %121

113:                                              ; preds = %102
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %120

115:                                              ; preds = %103
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %104
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %119

119:                                              ; preds = %117, %115
  %.pn39 = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @_ZNSt15__new_allocatorIwED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @_ZN3ptrIN2ts4data17DiagnosticMessageEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  br label %120

120:                                              ; preds = %119, %113
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %119 ], [ %114, %113 ]
  call void @_ZN2ts4data17DiagnosticMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(121) %14) #4
  br label %121

121:                                              ; preds = %120, %111
  %.pn39.pn.pn = phi { ptr, i32 } [ %.pn39.pn, %120 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %14) #4
  br label %128

122:                                              ; preds = %76
  %123 = load i32, ptr %18, align 8, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %18, align 8, !tbaa !5
  br label %125

125:                                              ; preds = %122, %84
  %126 = phi i32 [ %124, %122 ], [ %85, %84 ]
  %.131 = phi i32 [ %.03073, %122 ], [ %85, %84 ]
  %127 = load i32, ptr %24, align 4, !tbaa !28
  %.not = icmp slt i32 %126, %127
  br i1 %.not, label %.lr.ph.split, label %._crit_edge

128:                                              ; preds = %.split, %.split.us, %75, %90, %95, %110, %121, %59, %48
  %.pn48.pn.pn.pn = phi { ptr, i32 } [ %.pn48.pn.pn, %59 ], [ %.pn46, %48 ], [ %.pn43, %75 ], [ %.pn39.pn.pn, %121 ], [ %.pn37, %110 ], [ %.pn35, %95 ], [ %.pn, %90 ], [ %70, %.split ], [ %34, %.split.us ]
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  resume { ptr, i32 } %.pn48.pn.pn.pn

.thread:                                          ; preds = %105, %67, %43
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts7Scanner18scanEscapeSequenceB5cxx11Eb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext) local_unnamed_addr #2 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 = { 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 52}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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