; LLVM IR from vczh/herodb :: Kernel/Source/Vlpp.ll (ZN2vl7parsing7tabling12ParsingState11TestExploreElPNS2_6FutureE)

; 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.vl::Ptr.542" = type { ptr, ptr, ptr, ptr }
%"struct.vl::parsing::tabling::ParsingState::Future" = type { i64, i64, %"class.vl::collections::List.116", ptr, i64, ptr, ptr, ptr }
%"class.vl::collections::List.116" = type { %"class.vl::collections::ListBase.base.122", %"class.vl::collections::IEnumerable.120" }
%"class.vl::collections::ListBase.base.122" = type <{ %"class.vl::collections::ArrayBase.base.121", i64, i8 }>
%"class.vl::collections::ArrayBase.base.121" = type { %"class.vl::collections::ListStore.119", ptr, i64 }
%"class.vl::collections::ListStore.119" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::collections::IEnumerable.120" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"class.vl::parsing::tabling::ParsingState" = type { %"class.vl::Object", %"class.vl::ObjectString", %"class.vl::Ptr.61", %"class.vl::collections::List.47", %"class.vl::Ptr.62", %"class.vl::ObjectString", i64, %"class.vl::Ptr.63" }
%"class.vl::Ptr.61" = type { ptr, ptr, ptr, ptr }
%"class.vl::collections::List.47" = type { %"class.vl::collections::ListBase.base.53", %"class.vl::collections::IEnumerable.51" }
%"class.vl::collections::ListBase.base.53" = type <{ %"class.vl::collections::ArrayBase.base.52", i64, i8 }>
%"class.vl::collections::ArrayBase.base.52" = type { %"class.vl::collections::ListStore.50", ptr, i64 }
%"class.vl::collections::ListStore.50" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.51" = type { %"class.vl::Interface" }
%"class.vl::Ptr.62" = type { ptr, ptr, ptr, ptr }
%"class.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Ptr.63" = type { ptr, ptr, ptr, ptr }
%"struct.vl::parsing::tabling::ParsingState::StateGroup" = type { %"class.vl::collections::List.116", i64, i64, %"class.vl::collections::List.626", ptr, ptr }
%"class.vl::collections::List.626" = type { %"class.vl::collections::ListBase.base.632", %"class.vl::collections::IEnumerable.630" }
%"class.vl::collections::ListBase.base.632" = type <{ %"class.vl::collections::ArrayBase.base.631", i64, i8 }>
%"class.vl::collections::ArrayBase.base.631" = type { %"class.vl::collections::ListStore.629", ptr, i64 }
%"class.vl::collections::ListStore.629" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.630" = type { %"class.vl::Interface" }
%"class.vl::parsing::tabling::ParsingTable::TransitionBag" = type { %"class.vl::collections::List.543" }
%"class.vl::collections::List.543" = type { %"class.vl::collections::ListBase.base.549", %"class.vl::collections::IEnumerable.547" }
%"class.vl::collections::ListBase.base.549" = type <{ %"class.vl::collections::ArrayBase.base.548", i64, i8 }>
%"class.vl::collections::ArrayBase.base.548" = type { %"class.vl::collections::ListStore.546", ptr, i64 }
%"class.vl::collections::ListStore.546" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.547" = type { %"class.vl::Interface" }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl7parsing7tabling12ParsingTable16GetTransitionBagEll(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.542") align 8, ptr noundef nonnull align 8 dereferenceable(656), i64 noundef, i64 noundef) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState26TestTransitionItemInFutureElPNS2_6FutureEPNS1_12ParsingTable14TransitionItemEPKNS_11collections11IEnumerableIlEE(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState11TestExploreElPNS2_6FutureE(ptr noundef nonnull align 8 dereferenceable(256) %0, i64 noundef %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.vl::parsing::tabling::ParsingState::Future", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.vl::Ptr.542", align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr %8) #4
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %8)
  %18 = getelementptr inbounds %"class.vl::parsing::tabling::ParsingState", ptr %17, i32 0, i32 7
  %19 = invoke noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingState10StateGroupEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %20 unwind label %52

20:                                               ; preds = %3
  %21 = getelementptr inbounds %"struct.vl::parsing::tabling::ParsingState::StateGroup", ptr %19, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %"struct.vl::parsing::tabling::ParsingState::Future", ptr %8, i32 0, i32 0
  store i64 %22, ptr %23, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %20
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  br label %29

28:                                               ; preds = %20
  br label %29

29:                                               ; preds = %28, %26
  %30 = phi ptr [ %27, %26 ], [ %8, %28 ]
  store ptr %30, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  %31 = getelementptr inbounds %"class.vl::parsing::tabling::ParsingState", ptr %17, i32 0, i32 2
  %32 = invoke noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %33 unwind label %56

33:                                               ; preds = %29
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.vl::parsing::tabling::ParsingState::Future", ptr %34, i32 0, i32 0
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZN2vl7parsing7tabling12ParsingTable16GetTransitionBagEll(ptr dead_on_unwind writable sret(%"class.vl::Ptr.542") align 8 %13, ptr noundef nonnull align 8 dereferenceable(656) %32, i64 noundef %36, i64 noundef %37)
          to label %38 unwind label %56

38:                                               ; preds = %33
  %39 = invoke noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTable13TransitionBagEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %40 unwind label %60

40:                                               ; preds = %38
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTable13TransitionBagEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  store ptr %39, ptr %12, align 8, !tbaa !5
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %98

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %91, %43
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.vl::parsing::tabling::ParsingTable::TransitionBag", ptr %46, i32 0, i32 0
  %48 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
          to label %49 unwind label %65

49:                                               ; preds = %44
  %50 = icmp slt i64 %45, %48
  br i1 %50, label %69, label %51

51:                                               ; preds = %49
  store i32 2, ptr %15, align 4
  br label %94

52:                                               ; preds = %3
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %9, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %10, align 4
  br label %102

56:                                               ; preds = %33, %29
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %64

60:                                               ; preds = %38
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTable13TransitionBagEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  br label %64

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

65:                                               ; preds = %44
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  br label %96

69:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.vl::parsing::tabling::ParsingTable::TransitionBag", ptr %70, i32 0, i32 0
  %72 = load i64, ptr %14, align 8, !tbaa !9
  %73 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEEEPS6_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %71, i64 noundef %72)
          to label %74 unwind label %83

74:                                               ; preds = %69
  %75 = invoke noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %73)
          to label %76 unwind label %83

76:                                               ; preds = %74
  store ptr %75, ptr %16, align 8, !tbaa !5
  %77 = load i64, ptr %6, align 8, !tbaa !9
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = invoke noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState26TestTransitionItemInFutureElPNS2_6FutureEPNS1_12ParsingTable14TransitionItemEPKNS_11collections11IEnumerableIlEE(ptr noundef nonnull align 8 dereferenceable(256) %17, i64 noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef null)
          to label %81 unwind label %83

81:                                               ; preds = %76
  br i1 %80, label %82, label %87

82:                                               ; preds = %81
  store i1 true, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %88

83:                                               ; preds = %76, %74, %69
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %96

87:                                               ; preds = %81
  store i32 0, ptr %15, align 4
  br label %88

88:                                               ; preds = %87, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %89 = load i32, ptr %15, align 4
  switch i32 %89, label %94 [
    i32 0, label %90
  ]

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90
  %92 = load i64, ptr %14, align 8, !tbaa !9
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %14, align 8, !tbaa !9
  br label %44, !llvm.loop !25

94:                                               ; preds = %88, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %95 = load i32, ptr %15, align 4
  switch i32 %95, label %99 [
    i32 2, label %97
  ]

96:                                               ; preds = %83, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %101

97:                                               ; preds = %94
  br label %98

98:                                               ; preds = %97, %40
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %99

99:                                               ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %8) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %8) #4
  %100 = load i1, ptr %4, align 1
  ret i1 %100

101:                                              ; preds = %96, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %102

102:                                              ; preds = %101, %52
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %8) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %8) #4
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %9, align 8
  %105 = load i32, ptr %10, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"_ZTSN2vl7parsing7tabling12ParsingState10StateGroupE", !13, i64 0, !10, i64 48, !10, i64 56, !19, i64 64, !6, i64 112, !6, i64 120}
!13 = !{!"_ZTSN2vl11collections4ListIllEE", !14, i64 0}
!14 = !{!"_ZTSN2vl11collections8ListBaseIllEE", !15, i64 0, !10, i64 24, !18, i64 32}
!15 = !{!"_ZTSN2vl11collections9ArrayBaseIlEE", !16, i64 0, !6, i64 8, !10, i64 16}
!16 = !{!"_ZTSN2vl11collections9ListStoreIlLb1EEE", !17, i64 0}
!17 = !{!"_ZTSN2vl6ObjectE"}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN2vl11collections4ListIPNS_5regex10RegexTokenES4_EE", !20, i64 0}
!20 = !{!"_ZTSN2vl11collections8ListBaseIPNS_5regex10RegexTokenES4_EE", !21, i64 0, !10, i64 24, !18, i64 32}
!21 = !{!"_ZTSN2vl11collections9ArrayBaseIPNS_5regex10RegexTokenEEE", !22, i64 0, !6, i64 8, !10, i64 16}
!22 = !{!"_ZTSN2vl11collections9ListStoreIPNS_5regex10RegexTokenELb1EEE", !17, i64 0}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN2vl7parsing7tabling12ParsingState6FutureE", !10, i64 0, !10, i64 8, !13, i64 16, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!25 = distinct !{!25, !26}
!26 = !{!"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"

%"class.vl::Ptr.542" = type { ptr, ptr, ptr, ptr }
%"struct.vl::parsing::tabling::ParsingState::Future" = type { i64, i64, %"class.vl::collections::List.116", ptr, i64, ptr, ptr, ptr }
%"class.vl::collections::List.116" = type { %"class.vl::collections::ListBase.base.122", %"class.vl::collections::IEnumerable.120" }
%"class.vl::collections::ListBase.base.122" = type <{ %"class.vl::collections::ArrayBase.base.121", i64, i8 }>
%"class.vl::collections::ArrayBase.base.121" = type { %"class.vl::collections::ListStore.119", ptr, i64 }
%"class.vl::collections::ListStore.119" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::collections::IEnumerable.120" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl7parsing7tabling12ParsingTable16GetTransitionBagEll(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.542") align 8, ptr noundef nonnull align 8 dereferenceable(656), i64 noundef, i64 noundef) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState26TestTransitionItemInFutureElPNS2_6FutureEPNS1_12ParsingTable14TransitionItemEPKNS_11collections11IEnumerableIlEE(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState11TestExploreElPNS2_6FutureE(ptr noundef nonnull align 8 dereferenceable(256) %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.vl::parsing::tabling::ParsingState::Future", align 8
  %5 = alloca %"class.vl::Ptr.542", align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %4) #4
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %4)
  %6 = getelementptr inbounds i8, ptr %0, i64 224
  %7 = call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingState10StateGroupEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %8 = getelementptr inbounds i8, ptr %7, i64 48
  %9 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %9, ptr %4, align 8, !tbaa !21
  %.not = icmp eq ptr %2, null
  %10 = select i1 %.not, ptr %4, ptr %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %13 = load i64, ptr %10, align 8, !tbaa !21
  invoke void @_ZN2vl7parsing7tabling12ParsingTable16GetTransitionBagEll(ptr dead_on_unwind nonnull writable sret(%"class.vl::Ptr.542") align 8 %5, ptr noundef nonnull align 8 dereferenceable(656) %12, i64 noundef %13, i64 noundef %1)
          to label %14 unwind label %20

14:                                               ; preds = %3
  %15 = call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTable13TransitionBagEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTable13TransitionBagEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  %.not25 = icmp eq ptr %15, null
  br i1 %.not25, label %.critedge, label %.preheader

.preheader:                                       ; preds = %14
  %16 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not2728 = icmp sgt i64 %16, 0
  br i1 %.not2728, label %.lr.ph, label %.critedge

17:                                               ; preds = %28
  %18 = add nuw nsw i64 %.02129, 1
  %19 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not27 = icmp slt i64 %18, %19
  br i1 %.not27, label %.lr.ph, label %.critedge, !llvm.loop !23

20:                                               ; preds = %3
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %29

.lr.ph:                                           ; preds = %.preheader, %17
  %.02129 = phi i64 [ %18, %17 ], [ 0, %.preheader ]
  %22 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEEEPS6_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %15, i64 noundef %.02129)
          to label %23 unwind label %26

23:                                               ; preds = %.lr.ph
  %24 = call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTable14TransitionItemEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  %25 = invoke noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingState26TestTransitionItemInFutureElPNS2_6FutureEPNS1_12ParsingTable14TransitionItemEPKNS_11collections11IEnumerableIlEE(ptr noundef nonnull align 8 dereferenceable(256) %0, i64 noundef %1, ptr noundef nonnull %10, ptr noundef %24, ptr noundef null)
          to label %28 unwind label %26

26:                                               ; preds = %23, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %29

28:                                               ; preds = %23
  br i1 %25, label %.critedge, label %17

.critedge:                                        ; preds = %28, %17, %.preheader, %14
  %.3 = phi i1 [ false, %14 ], [ false, %.preheader ], [ %25, %17 ], [ %25, %28 ]
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %4) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #4
  ret i1 %.3

29:                                               ; preds = %26, %20
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %21, %20 ]
  call void @_ZN2vl7parsing7tabling12ParsingState6FutureD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %4) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn
}

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, !15, i64 48}
!6 = !{!"_ZTSN2vl7parsing7tabling12ParsingState10StateGroupE", !7, i64 0, !15, i64 48, !15, i64 56, !17, i64 64, !12, i64 112, !12, i64 120}
!7 = !{!"_ZTSN2vl11collections4ListIllEE", !8, i64 0}
!8 = !{!"_ZTSN2vl11collections8ListBaseIllEE", !9, i64 0, !15, i64 24, !16, i64 32}
!9 = !{!"_ZTSN2vl11collections9ArrayBaseIlEE", !10, i64 0, !12, i64 8, !15, i64 16}
!10 = !{!"_ZTSN2vl11collections9ListStoreIlLb1EEE", !11, i64 0}
!11 = !{!"_ZTSN2vl6ObjectE"}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"long", !13, i64 0}
!16 = !{!"bool", !13, i64 0}
!17 = !{!"_ZTSN2vl11collections4ListIPNS_5regex10RegexTokenES4_EE", !18, i64 0}
!18 = !{!"_ZTSN2vl11collections8ListBaseIPNS_5regex10RegexTokenES4_EE", !19, i64 0, !15, i64 24, !16, i64 32}
!19 = !{!"_ZTSN2vl11collections9ArrayBaseIPNS_5regex10RegexTokenEEE", !20, i64 0, !12, i64 8, !15, i64 16}
!20 = !{!"_ZTSN2vl11collections9ListStoreIPNS_5regex10RegexTokenELb1EEE", !11, i64 0}
!21 = !{!22, !15, i64 0}
!22 = !{!"_ZTSN2vl7parsing7tabling12ParsingState6FutureE", !15, i64 0, !15, i64 8, !7, i64 16, !12, i64 64, !15, i64 72, !12, i64 80, !12, i64 88, !12, i64 96}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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