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

; 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::collections::EnumerableForEachIterator.671" = type { %"class.vl::collections::ForEachIterator.672", %"class.vl::Ptr.673" }
%"class.vl::collections::ForEachIterator.672" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.673" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.46" = type { ptr, ptr, ptr, ptr }
%"class.vl::parsing::ParsingTreeArray" = type { %"class.vl::parsing::ParsingTreeNode.base", %"class.vl::reflection::Description.base.610", %"class.vl::ObjectString", %"class.vl::collections::List.598", %"class.vl::reflection::DescriptableObject" }
%"class.vl::parsing::ParsingTreeNode.base" = type { %"class.vl::Object", %"class.vl::reflection::Description.base.597", %"struct.vl::parsing::ParsingTextRange", ptr, %"class.vl::collections::List.598" }
%"class.vl::reflection::Description.base.597" = type { ptr }
%"struct.vl::parsing::ParsingTextRange" = type { %"struct.vl::parsing::ParsingTextPos", %"struct.vl::parsing::ParsingTextPos", i64 }
%"struct.vl::parsing::ParsingTextPos" = type { i64, i64, i64 }
%"class.vl::reflection::Description.base.610" = type { ptr }
%"class.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::collections::List.598" = type { %"class.vl::collections::ListBase.base.604", %"class.vl::collections::IEnumerable.602" }
%"class.vl::collections::ListBase.base.604" = type <{ %"class.vl::collections::ArrayBase.base.603", i64, i8 }>
%"class.vl::collections::ArrayBase.base.603" = type { %"class.vl::collections::ListStore.601", ptr, i64 }
%"class.vl::collections::ListStore.601" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.602" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"class.vl::reflection::DescriptableObject" = type { ptr, i64, ptr, i64, ptr, %"class.vl::Ptr.12" }
%"class.vl::Ptr.12" = type { ptr, ptr, ptr, ptr }

; 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 void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind noalias writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_3PtrINS_7parsing15ParsingTreeNodeEEEPS4_E5ClearEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl7parsing16ParsingTreeArray5ClearEv(ptr noundef nonnull align 8 dereferenceable(232) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca %"class.vl::collections::EnumerableForEachIterator.671", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.vl::Ptr.46", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.vl::Ptr.46", align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.vl::collections::EnumerableForEachIterator.671", align 8
  %15 = alloca %"class.vl::Ptr.46", align 8
  %16 = alloca %"class.vl::Ptr.46", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 1, ptr %4, align 1, !tbaa !9
  %18 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %68

20:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #4
  %21 = getelementptr inbounds %"class.vl::parsing::ParsingTreeArray", ptr %17, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %25)
  store ptr %6, ptr %5, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %64, %20
  %27 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  store i32 2, ptr %7, align 4
  br label %65

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  invoke void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %31 unwind label %40

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %58, %31
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = getelementptr inbounds ptr, ptr %34, i64 2
  %36 = load ptr, ptr %35, align 8
  %37 = invoke noundef zeroext i1 %36(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %38 unwind label %44

38:                                               ; preds = %32
  br i1 %37, label %48, label %39

39:                                               ; preds = %38
  store i32 5, ptr %7, align 4
  br label %59

40:                                               ; preds = %30
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %10, align 4
  br label %62

44:                                               ; preds = %48, %32
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  br label %61

48:                                               ; preds = %38
  invoke void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %49 unwind label %44

49:                                               ; preds = %48
  %50 = invoke noundef zeroext i1 @_ZN2vl7parsing15ParsingTreeNode17BeforeRemoveChildENS_3PtrIS1_EE(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef %11)
          to label %51 unwind label %54

51:                                               ; preds = %49
  %52 = xor i1 %50, true
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br i1 %52, label %53, label %58

53:                                               ; preds = %51
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %59

54:                                               ; preds = %49
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %9, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %10, align 4
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %61

58:                                               ; preds = %51
  br label %32, !llvm.loop !15

59:                                               ; preds = %53, %39
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  %60 = load i32, ptr %7, align 4
  switch i32 %60, label %65 [
    i32 5, label %63
  ]

61:                                               ; preds = %54, %44
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %62

62:                                               ; preds = %61, %40
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  br label %119

63:                                               ; preds = %59
  br label %64

64:                                               ; preds = %63
  store i8 0, ptr %4, align 1, !tbaa !9
  br label %26, !llvm.loop !17

65:                                               ; preds = %59, %29
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %66 = load i32, ptr %7, align 4
  switch i32 %66, label %69 [
    i32 2, label %67
  ]

67:                                               ; preds = %65
  br label %68

68:                                               ; preds = %67, %1
  store i32 0, ptr %7, align 4
  br label %69

69:                                               ; preds = %68, %65
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  %70 = load i32, ptr %7, align 4
  switch i32 %70, label %124 [
    i32 0, label %71
    i32 1, label %117
  ]

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 1, ptr %12, align 1, !tbaa !9
  %72 = load i8, ptr %12, align 1, !tbaa !9, !range !11, !noundef !12
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %114

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  %75 = getelementptr inbounds %"class.vl::parsing::ParsingTreeArray", ptr %17, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = getelementptr i8, ptr %76, i64 -24
  %78 = load i64, ptr %77, align 8
  %79 = getelementptr inbounds i8, ptr %75, i64 %78
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %79)
  store ptr %14, ptr %13, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %112, %74
  %81 = load i8, ptr %12, align 1, !tbaa !9, !range !11, !noundef !12
  %82 = trunc i8 %81 to i1
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 7, ptr %7, align 4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %113

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  invoke void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %85 unwind label %94

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %104, %85
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load ptr, ptr %87, align 8, !tbaa !13
  %89 = getelementptr inbounds ptr, ptr %88, i64 2
  %90 = load ptr, ptr %89, align 8
  %91 = invoke noundef zeroext i1 %90(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %92 unwind label %98

92:                                               ; preds = %86
  br i1 %91, label %102, label %93

93:                                               ; preds = %92
  store i32 10, ptr %7, align 4
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  br label %111

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %110

98:                                               ; preds = %102, %86
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %9, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %10, align 4
  br label %109

102:                                              ; preds = %92
  invoke void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %103 unwind label %98

103:                                              ; preds = %102
  invoke void @_ZN2vl7parsing15ParsingTreeNode16AfterRemoveChildENS_3PtrIS1_EE(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef %16)
          to label %104 unwind label %105

104:                                              ; preds = %103
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %86, !llvm.loop !18

105:                                              ; preds = %103
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %9, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %10, align 4
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %109

109:                                              ; preds = %105, %98
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %110

110:                                              ; preds = %109, %94
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  br label %119

111:                                              ; preds = %93
  br label %112

112:                                              ; preds = %111
  store i8 0, ptr %12, align 1, !tbaa !9
  br label %80, !llvm.loop !19

113:                                              ; preds = %83
  br label %114

114:                                              ; preds = %113, %71
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  %115 = getelementptr inbounds %"class.vl::parsing::ParsingTreeArray", ptr %17, i32 0, i32 3
  %116 = call noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_3PtrINS_7parsing15ParsingTreeNodeEEEPS4_E5ClearEv(ptr noundef nonnull align 8 dereferenceable(33) %115)
  store i1 true, ptr %2, align 1
  br label %117

117:                                              ; preds = %114, %69
  %118 = load i1, ptr %2, align 1
  ret i1 %118

119:                                              ; preds = %110, %62
  %120 = load ptr, ptr %9, align 8
  %121 = load i32, ptr %10, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123

124:                                              ; preds = %69
  unreachable
}

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 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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::collections::EnumerableForEachIterator.671" = type { %"class.vl::collections::ForEachIterator.672", %"class.vl::Ptr.673" }
%"class.vl::collections::ForEachIterator.672" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.673" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.46" = type { ptr, ptr, ptr, 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 void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind noalias writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl7parsing15ParsingTreeNode16AfterRemoveChildENS_3PtrIS1_EE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_3PtrINS_7parsing15ParsingTreeNodeEEEPS4_E5ClearEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl7parsing16ParsingTreeArray5ClearEv(ptr noundef nonnull align 8 dereferenceable(232) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
.critedge:
  %1 = alloca %"class.vl::collections::EnumerableForEachIterator.671", align 8
  %2 = alloca %"class.vl::Ptr.46", align 8
  %3 = alloca %"class.vl::Ptr.46", align 8
  %4 = alloca %"class.vl::collections::EnumerableForEachIterator.671", align 8
  %5 = alloca %"class.vl::Ptr.46", align 8
  %6 = alloca %"class.vl::Ptr.46", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 184
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr %7, i64 %10
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind nonnull writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8 %1, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2)
  br label %12

12:                                               ; preds = %22, %.critedge
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load ptr, ptr %14, align 8
  %16 = invoke noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %17 unwind label %18

17:                                               ; preds = %12
  br i1 %16, label %20, label %.critedge29

18:                                               ; preds = %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %26

20:                                               ; preds = %17
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %2)
  %21 = invoke noundef zeroext i1 @_ZN2vl7parsing15ParsingTreeNode17BeforeRemoveChildENS_3PtrIS1_EE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %3)
          to label %22 unwind label %23

22:                                               ; preds = %20
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br i1 %21, label %12, label %25, !llvm.loop !8

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %26

25:                                               ; preds = %22
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #4
  br label %46

26:                                               ; preds = %23, %18
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %19, %18 ]
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #4
  br label %47

.critedge29:                                      ; preds = %17
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %7, i64 %29
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind nonnull writable sret(%"class.vl::collections::EnumerableForEachIterator.671") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %30)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  br label %31

31:                                               ; preds = %42, %.critedge29
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef zeroext i1 %34(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %36 unwind label %39

36:                                               ; preds = %31
  br i1 %35, label %41, label %37

37:                                               ; preds = %36
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  %38 = call noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_3PtrINS_7parsing15ParsingTreeNodeEEEPS4_E5ClearEv(ptr noundef nonnull align 8 dereferenceable(33) %7)
  br label %46

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %45

41:                                               ; preds = %36
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %5)
  invoke void @_ZN2vl7parsing15ParsingTreeNode16AfterRemoveChildENS_3PtrIS1_EE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %6)
          to label %42 unwind label %43

42:                                               ; preds = %41
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %31, !llvm.loop !10

43:                                               ; preds = %41
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %45

45:                                               ; preds = %43, %39
  %.pn25 = phi { ptr, i32 } [ %44, %43 ], [ %40, %39 ]
  call void @_ZN2vl3PtrINS_7parsing15ParsingTreeNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_7parsing15ParsingTreeNodeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  br label %47

46:                                               ; preds = %25, %37
  %.5 = xor i1 %16, true
  ret i1 %.5

47:                                               ; preds = %45, %26
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %45 ], [ %.pn, %26 ]
  resume { ptr, i32 } %.pn25.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, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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