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

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

%"class.std::__cxx11::basic_regex" = type { i32, %"class.std::locale", %"class.std::shared_ptr" }
%"class.std::locale" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::regex_iterator" = type { %"class.__gnu_cxx::__normal_iterator.109", %"class.__gnu_cxx::__normal_iterator.109", ptr, i32, %"class.std::__cxx11::match_results" }
%"class.__gnu_cxx::__normal_iterator.109" = type { ptr }
%"class.std::__cxx11::match_results" = type { %"class.std::vector.110", %"class.__gnu_cxx::__normal_iterator.109" }
%"class.std::vector.110" = type { %"struct.std::_Vector_base.111" }
%"struct.std::_Vector_base.111" = type { %"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.115" = type { ptr }
%"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::__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] }
%"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 } }

@_ZN2ts7Scanner14jsDocSeeOrLinkB5cxx11E = external dso_local global %"class.std::__cxx11::basic_regex", align 8

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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 dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2ESA_SA_RKNS_11basic_regexIwSC_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(64), ptr, ptr, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2ts7Scanner16shouldParseJSDocEv(ptr noundef nonnull align 8 dereferenceable(176) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::__cxx11::regex_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %11 = alloca %"class.std::__cxx11::regex_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  %15 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 14
  %16 = load i32, ptr %15, align 4, !tbaa !9
  switch i32 %16, label %19 [
    i32 0, label %17
    i32 1, label %18
  ]

17:                                               ; preds = %1
  store i1 true, ptr %2, align 1
  br label %62

18:                                               ; preds = %1
  store i1 false, ptr %2, align 1
  br label %62

19:                                               ; preds = %1
  %20 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !29
  %22 = icmp ne i32 %21, 3
  br i1 %22, label %23, label %28

23:                                               ; preds = %19
  %24 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !29
  %26 = icmp ne i32 %25, 4
  br i1 %26, label %27, label %28

27:                                               ; preds = %23
  store i1 true, ptr %2, align 1
  br label %62

28:                                               ; preds = %23, %19
  %29 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 14
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = icmp eq i32 %30, 3
  br i1 %31, label %32, label %33

32:                                               ; preds = %28
  store i1 false, ptr %2, align 1
  br label %62

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 64, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %34 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 4
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32) %34)
  %36 = call ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %35) #4
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %7, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 7
  %39 = load i32, ptr %38, align 8, !tbaa !30
  %40 = sext i32 %39 to i64
  %41 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %40) #4
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %6, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEC2IPwvEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %43 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 4
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32) %43)
  %45 = call ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %44) #4
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %10, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = getelementptr inbounds %"class.ts::Scanner", ptr %14, i32 0, i32 5
  %48 = load i32, ptr %47, align 8, !tbaa !31
  %49 = sext i32 %48 to i64
  %50 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %49) #4
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %9, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEC2IPwvEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.109", ptr %5, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.109", ptr %8, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2ESA_SA_RKNS_11basic_regexIwSC_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(64) %4, ptr %53, ptr %55, ptr noundef nonnull align 8 dereferenceable(32) @_ZN2ts7Scanner14jsDocSeeOrLinkB5cxx11E, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #4
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 64, i1 false)
  invoke void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %11)
          to label %56 unwind label %58

56:                                               ; preds = %33
  %57 = call noundef zeroext i1 @_ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(64) %4, ptr noundef nonnull align 8 dereferenceable(64) %11) #4
  store i1 %57, ptr %2, align 1
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #4
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #4
  br label %62

58:                                               ; preds = %33
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %12, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #4
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #4
  br label %64

62:                                               ; preds = %56, %32, %27, %18, %17
  %63 = load i1, ptr %2, align 1
  ret i1 %63

64:                                               ; preds = %58
  %65 = load ptr, ptr %12, align 8
  %66 = load i32, ptr %13, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

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

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


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

%"class.std::__cxx11::basic_regex" = type { i32, %"class.std::locale", %"class.std::shared_ptr" }
%"class.std::locale" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::regex_iterator" = type { %"class.__gnu_cxx::__normal_iterator.109", %"class.__gnu_cxx::__normal_iterator.109", ptr, i32, %"class.std::__cxx11::match_results" }
%"class.__gnu_cxx::__normal_iterator.109" = type { ptr }
%"class.std::__cxx11::match_results" = type { %"class.std::vector.110", %"class.__gnu_cxx::__normal_iterator.109" }
%"class.std::vector.110" = type { %"struct.std::_Vector_base.111" }
%"struct.std::_Vector_base.111" = type { %"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<const wchar_t *, std::__cxx11::basic_string<wchar_t>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.115" = type { ptr }

@_ZN2ts7Scanner14jsDocSeeOrLinkB5cxx11E = external dso_local global %"class.std::__cxx11::basic_regex", align 8

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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 dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2ESA_SA_RKNS_11basic_regexIwSC_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(64), ptr, ptr, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2ts7Scanner16shouldParseJSDocEv(ptr noundef nonnull align 8 dereferenceable(176) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::regex_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %9 = alloca %"class.std::__cxx11::regex_iterator", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 140
  %11 = load i32, ptr %10, align 4, !tbaa !5
  switch i32 %11, label %13 [
    i32 0, label %37
    i32 1, label %12
  ]

12:                                               ; preds = %1
  br label %37

13:                                               ; preds = %1
  %14 = load i32, ptr %0, align 8, !tbaa !28
  %.off = add i32 %14, -3
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %15, label %37

15:                                               ; preds = %13
  %16 = icmp eq i32 %11, 3
  br i1 %16, label %37, label %17

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %20 = tail call ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  store ptr %20, ptr %5, align 8
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  %22 = load i32, ptr %21, align 8, !tbaa !29
  %23 = sext i32 %22 to i64
  %24 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %23) #4
  store ptr %24, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEC2IPwvEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2ts11safe_stringcvRNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %26 = call ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  store ptr %26, ptr %8, align 8
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  %28 = load i32, ptr %27, align 8, !tbaa !30
  %29 = sext i32 %28 to i64
  %30 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %29) #4
  store ptr %30, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEC2IPwvEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %31 = load ptr, ptr %3, align 8
  %32 = load ptr, ptr %6, align 8
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2ESA_SA_RKNS_11basic_regexIwSC_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(64) %2, ptr %31, ptr %32, ptr noundef nonnull align 8 dereferenceable(32) @_ZN2ts7Scanner14jsDocSeeOrLinkB5cxx11E, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  invoke void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9)
          to label %33 unwind label %35

33:                                               ; preds = %17
  %34 = call noundef zeroext i1 @_ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(64) %2, ptr noundef nonnull align 8 dereferenceable(64) %9) #4
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #4
  br label %37

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @_ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKwNS_12basic_stringIwSt11char_traitsIwESaIwEEEEEwNS_12regex_traitsIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #4
  resume { ptr, i32 } %36

37:                                               ; preds = %13, %15, %1, %33, %12
  %.0 = phi i1 [ %34, %33 ], [ false, %12 ], [ true, %1 ], [ true, %13 ], [ false, %15 ]
  ret i1 %.0
}

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass