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

; 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::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ptr = type { %"class.std::shared_ptr.46" }
%"class.std::shared_ptr.46" = type { %"class.std::__shared_ptr.47" }
%"class.std::__shared_ptr.47" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"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.ts::data::SourceFileLike" = type { %"struct.ts::data::Declaration", %"class.std::__cxx11::basic_string", %"class.std::vector.35", %"class.std::function.90" }
%"struct.ts::data::Declaration" = type { %"struct.ts::data::DeclarationStatement", %struct.ptr.86, %struct.ptr.86 }
%"struct.ts::data::DeclarationStatement" = type { %"struct.ts::data::Statement" }
%"struct.ts::data::Statement" = type { %"struct.ts::data::PrimaryExpression" }
%"struct.ts::data::PrimaryExpression" = type { %"struct.ts::data::MemberExpression" }
%"struct.ts::data::MemberExpression" = type { %"struct.ts::data::LeftHandSideExpression" }
%"struct.ts::data::LeftHandSideExpression" = type { %"struct.ts::data::UpdateExpression" }
%"struct.ts::data::UpdateExpression" = type { %"struct.ts::data::UnaryExpression" }
%"struct.ts::data::UnaryExpression" = type { %"struct.ts::data::ExpressionWithTypeArguments" }
%"struct.ts::data::ExpressionWithTypeArguments" = type { %"struct.ts::data::NodeWithTypeArguments", %struct.ptr.82 }
%"struct.ts::data::NodeWithTypeArguments" = type { %"struct.ts::data::Expression", %"struct.ts::data::NodeArray.74" }
%"struct.ts::data::Expression" = type { %"struct.ts::data::TypeNode" }
%"struct.ts::data::TypeNode" = type { %"struct.ts::data::JSDocContainer" }
%"struct.ts::data::JSDocContainer" = type { %"struct.ts::data::Node.base", [3 x i8], %"struct.ts::data::NodeArray.58", %"struct.ts::data::NodeArray.66" }
%"struct.ts::data::Node.base" = type <{ ptr, %"struct.ts::data::TextRange", i32, i32, i32, i32, [4 x i8], %"struct.ts::data::NodeArray", i32, [4 x i8], %struct.ptr.54, %struct.ptr.54, i32, i8 }>
%"struct.ts::data::TextRange" = type { %"struct.ts::pos_type", i32 }
%"struct.ts::pos_type" = type { i32, i32 }
%"struct.ts::data::NodeArray" = type <{ %"struct.ts::data::ReadonlyArray", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray" = type { %"class.std::vector.49" }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ptr.54 = type { %"class.std::shared_ptr.55" }
%"class.std::shared_ptr.55" = type { %"class.std::__shared_ptr.56" }
%"class.std::__shared_ptr.56" = type { ptr, %"class.std::__shared_count" }
%"struct.ts::data::NodeArray.58" = type <{ %"struct.ts::data::ReadonlyArray.59", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.59" = type { %"class.std::vector.60" }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::NodeArray.66" = type <{ %"struct.ts::data::ReadonlyArray.67", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.67" = type { %"class.std::vector.68" }
%"class.std::vector.68" = type { %"struct.std::_Vector_base.69" }
%"struct.std::_Vector_base.69" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::NodeArray.74" = type <{ %"struct.ts::data::ReadonlyArray.75", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.75" = type { %"class.std::vector.76" }
%"class.std::vector.76" = type { %"struct.std::_Vector_base.77" }
%"struct.std::_Vector_base.77" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ptr.82 = type { %"class.std::shared_ptr.83" }
%"class.std::shared_ptr.83" = type { %"class.std::__shared_ptr.84" }
%"class.std::__shared_ptr.84" = type { ptr, %"class.std::__shared_count" }
%struct.ptr.86 = type { %"class.std::shared_ptr.87" }
%"class.std::shared_ptr.87" = type { %"class.std::__shared_ptr.88" }
%"class.std::__shared_ptr.88" = type { ptr, %"class.std::__shared_count" }
%"class.std::function.90" = 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 } }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2ts7Scanner29getPositionOfLineAndCharacterE3ptrINS_4data14SourceFileLikeEEiib(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::vector.35", align 8
  %13 = alloca %struct.ptr, align 8
  %14 = alloca i1, align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca i1, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  %20 = zext i1 %4 to i8
  store i8 %20, ptr %11, align 1, !tbaa !11
  %21 = load ptr, ptr %7, align 8
  %22 = call noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %23 = getelementptr inbounds %"struct.ts::data::SourceFileLike", ptr %22, i32 0, i32 3
  %24 = call noundef zeroext i1 @_ZNKSt8functionIFiiibEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #3
  store i1 false, ptr %14, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %19, align 1
  br i1 %24, label %25, label %33

25:                                               ; preds = %5
  %26 = call noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %27 = getelementptr inbounds %"struct.ts::data::SourceFileLike", ptr %26, i32 0, i32 3
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %31 = trunc i8 %30 to i1
  %32 = call noundef i32 @_ZNKSt8functionIFiiibEEclEiib(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef %28, i32 noundef %29, i1 noundef zeroext %31)
  br label %45

33:                                               ; preds = %5
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %1) #3
  store i1 true, ptr %14, align 1
  invoke void @_ZN2ts7Scanner13getLineStartsE3ptrINS_4data14SourceFileLikeEE(ptr dead_on_unwind writable sret(%"class.std::vector.35") align 8 %12, ptr noundef nonnull align 8 dereferenceable(176) %21, ptr noundef %13)
          to label %34 unwind label %57

34:                                               ; preds = %33
  store i1 true, ptr %17, align 1
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = invoke noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %38 unwind label %61

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"struct.ts::data::SourceFileLike", ptr %37, i32 0, i32 1
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %40 unwind label %61

40:                                               ; preds = %38
  store i1 true, ptr %19, align 1
  %41 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %42 = trunc i8 %41 to i1
  %43 = invoke noundef i32 @_ZN2ts7Scanner33computePositionOfLineAndCharacterESt6vectorIiSaIiEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEb(ptr noundef nonnull align 8 dereferenceable(176) %21, ptr noundef %12, i32 noundef %35, i32 noundef %36, ptr noundef %18, i1 noundef zeroext %42)
          to label %44 unwind label %65

44:                                               ; preds = %40
  br label %45

45:                                               ; preds = %44, %25
  %46 = phi i32 [ %32, %25 ], [ %43, %44 ]
  store i32 %46, ptr %6, align 4
  %47 = load i1, ptr %19, align 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #3
  br label %49

49:                                               ; preds = %48, %45
  %50 = load i1, ptr %17, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  br label %52

52:                                               ; preds = %51, %49
  %53 = load i1, ptr %14, align 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #3
  br label %55

55:                                               ; preds = %54, %52
  %56 = load i32, ptr %6, align 4
  ret i32 %56

57:                                               ; preds = %33
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %15, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %16, align 4
  br label %76

61:                                               ; preds = %38, %34
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %15, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %16, align 4
  br label %72

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %15, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %16, align 4
  %69 = load i1, ptr %19, align 1
  br i1 %69, label %70, label %71

70:                                               ; preds = %65
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #3
  br label %71

71:                                               ; preds = %70, %65
  br label %72

72:                                               ; preds = %71, %61
  %73 = load i1, ptr %17, align 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  br label %75

75:                                               ; preds = %74, %72
  br label %76

76:                                               ; preds = %75, %57
  %77 = load i1, ptr %14, align 1
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #3
  br label %79

79:                                               ; preds = %78, %76
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %15, align 8
  %82 = load i32, ptr %16, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFiiibEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts7Scanner13getLineStartsE3ptrINS_4data14SourceFileLikeEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.35") align 8, ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) #1 align 2

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ptr = type { %"class.std::shared_ptr.46" }
%"class.std::shared_ptr.46" = type { %"class.std::__shared_ptr.47" }
%"class.std::__shared_ptr.47" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"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] }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2ts7Scanner29getPositionOfLineAndCharacterE3ptrINS_4data14SourceFileLikeEEiib(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector.35", align 8
  %7 = alloca %struct.ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = tail call noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %10 = getelementptr inbounds i8, ptr %9, i64 384
  %11 = tail call noundef zeroext i1 @_ZNKSt8functionIFiiibEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #3
  br i1 %11, label %.thread, label %15

.thread:                                          ; preds = %5
  %12 = tail call noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %13 = getelementptr inbounds i8, ptr %12, i64 384
  %14 = tail call noundef i32 @_ZNKSt8functionIFiiibEEclEiib(ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4)
  br label %.critedge22

15:                                               ; preds = %5
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %1) #3
  invoke void @_ZN2ts7Scanner13getLineStartsE3ptrINS_4data14SourceFileLikeEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.35") align 8 %6, ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %7)
          to label %16 unwind label %22

16:                                               ; preds = %15
  %17 = call noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %18 = getelementptr inbounds i8, ptr %17, i64 328
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %19 unwind label %24

19:                                               ; preds = %16
  %20 = invoke noundef i32 @_ZN2ts7Scanner33computePositionOfLineAndCharacterESt6vectorIiSaIiEEiiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEb(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull %6, i32 noundef %2, i32 noundef %3, ptr noundef nonnull %8, i1 noundef zeroext %4)
          to label %.critedge unwind label %26

.critedge:                                        ; preds = %19
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #3
  br label %.critedge22

.critedge22:                                      ; preds = %.thread, %.critedge
  %21 = phi i32 [ %14, %.thread ], [ %20, %.critedge ]
  ret i32 %21

22:                                               ; preds = %15
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %29

24:                                               ; preds = %16
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %19
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #3
  br label %28

28:                                               ; preds = %24, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %29

29:                                               ; preds = %22, %28
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %23, %22 ]
  call void @_ZN3ptrIN2ts4data14SourceFileLikeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #3
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3ptrIN2ts4data14SourceFileLikeEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFiiibEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { 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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass