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

; 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::regex::RegexNode" = type { %"class.vl::Object", %"class.vl::Ptr.1009" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.1009" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.1098" = type { ptr, ptr, ptr, ptr }
%"class.vl::regex_internal::CharRange" = type { i32, i32 }
%"class.vl::regex_internal::CharSetExpression" = type <{ %"class.vl::regex_internal::Expression", %"class.vl::collections::SortedList.1001", i8, [7 x i8] }>
%"class.vl::regex_internal::Expression" = type { %"class.vl::Object" }
%"class.vl::collections::SortedList.1001" = type { %"class.vl::collections::ListBase.base.1007", %"class.vl::collections::IEnumerable.1005" }
%"class.vl::collections::ListBase.base.1007" = type <{ %"class.vl::collections::ArrayBase.base.1006", i64, i8 }>
%"class.vl::collections::ArrayBase.base.1006" = type { %"class.vl::collections::ListStore.1004", ptr, i64 }
%"class.vl::collections::ListStore.1004" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.1005" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }

@_ZTIN2vl5ErrorE = external dso_local constant { ptr, ptr }, align 8
@_ZTIN2vl14regex_internal10ExpressionE = external dso_local constant { ptr, ptr, i32, i32, ptr, i64, ptr, i64 }, align 8
@_ZTIN2vl14regex_internal17CharSetExpressionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.555 = external hidden unnamed_addr constant [97 x i32], align 4
@.str.556 = external hidden unnamed_addr constant [92 x i32], align 4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections8CopyFromINS0_10SortedListINS_14regex_internal9CharRangeES4_EES5_EEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEEixEl(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl14regex_internal17CharSetExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #6 align 2

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

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #7

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK2vl5regex9RegexNodermERKS1_(ptr dead_on_unwind noalias writable sret(%"class.vl::regex::RegexNode") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.vl::Ptr.1098", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.vl::regex_internal::CharRange", align 4
  %14 = alloca %"class.vl::Ptr.1009", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %16 = getelementptr inbounds %"class.vl::regex::RegexNode", ptr %15, i32 0, i32 1
  %17 = call noundef ptr @_ZNK2vl3PtrINS_14regex_internal10ExpressionEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %21, label %19

19:                                               ; preds = %3
  %20 = call ptr @__dynamic_cast(ptr %17, ptr @_ZTIN2vl14regex_internal10ExpressionE, ptr @_ZTIN2vl14regex_internal17CharSetExpressionE, i64 0) #8
  br label %22

21:                                               ; preds = %3
  br label %22

22:                                               ; preds = %21, %19
  %23 = phi ptr [ %20, %19 ], [ null, %21 ]
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.vl::regex::RegexNode", ptr %24, i32 0, i32 1
  %26 = call noundef ptr @_ZNK2vl3PtrINS_14regex_internal10ExpressionEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %27 = icmp eq ptr %26, null
  br i1 %27, label %30, label %28

28:                                               ; preds = %22
  %29 = call ptr @__dynamic_cast(ptr %26, ptr @_ZTIN2vl14regex_internal10ExpressionE, ptr @_ZTIN2vl14regex_internal17CharSetExpressionE, i64 0) #8
  br label %31

30:                                               ; preds = %22
  br label %31

31:                                               ; preds = %30, %28
  %32 = phi ptr [ %29, %28 ], [ null, %30 ]
  store ptr %32, ptr %8, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %31
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %49

36:                                               ; preds = %33
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %49

39:                                               ; preds = %36
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %40, i32 0, i32 2
  %42 = load i8, ptr %41, align 8, !tbaa !9, !range !19, !noundef !20
  %43 = trunc i8 %42 to i1
  br i1 %43, label %49, label %44

44:                                               ; preds = %39
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %45, i32 0, i32 2
  %47 = load i8, ptr %46, align 8, !tbaa !9, !range !19, !noundef !20
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %56

49:                                               ; preds = %44, %39, %36, %33
  %50 = call ptr @__cxa_allocate_exception(i64 8) #8
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @.str.555)
          to label %51 unwind label %52

51:                                               ; preds = %49
  call void @__cxa_throw(ptr %50, ptr @_ZTIN2vl5ErrorE, ptr null) #9
  unreachable

52:                                               ; preds = %49
  %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
  call void @__cxa_free_exception(ptr %50) #8
  br label %125

56:                                               ; preds = %44
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  %59 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
  invoke void @_ZN2vl14regex_internal17CharSetExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57) %59)
          to label %60 unwind label %78

60:                                               ; preds = %58
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %59)
  %61 = invoke noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %62 unwind label %82

62:                                               ; preds = %60
  %63 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %61, i32 0, i32 2
  store i8 0, ptr %63, align 8, !tbaa !9
  %64 = invoke noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %65 unwind label %82

65:                                               ; preds = %62
  %66 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %64, i32 0, i32 1
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %67, i32 0, i32 1
  invoke void @_ZN2vl11collections8CopyFromINS0_10SortedListINS_14regex_internal9CharRangeES4_EES5_EEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33) %66, ptr noundef nonnull align 8 dereferenceable(33) %68, i1 noundef zeroext false)
          to label %69 unwind label %82

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !21
  br label %70

70:                                               ; preds = %112, %69
  %71 = load i64, ptr %12, align 8, !tbaa !21
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %72, i32 0, i32 1
  %74 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %73)
          to label %75 unwind label %86

75:                                               ; preds = %70
  %76 = icmp slt i64 %71, %74
  br i1 %76, label %90, label %77

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %116

78:                                               ; preds = %58
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %59, i64 noundef 64) #11
  br label %124

82:                                               ; preds = %116, %65, %62, %60
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  br label %123

86:                                               ; preds = %104, %97, %92, %90, %70
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  br label %115

90:                                               ; preds = %75
  %91 = invoke noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %92 unwind label %86

92:                                               ; preds = %90
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.vl::regex_internal::CharSetExpression", ptr %93, i32 0, i32 1
  %95 = load i64, ptr %12, align 8, !tbaa !21
  %96 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95)
          to label %97 unwind label %86

97:                                               ; preds = %92
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %96, i64 8, i1 false), !tbaa.struct !22
  %98 = load i64, ptr %13, align 4
  %99 = invoke noundef zeroext i1 @_ZN2vl14regex_internal17CharSetExpression20AddRangeWithConflictENS0_9CharRangeE(ptr noundef nonnull align 8 dereferenceable(57) %91, i64 %98)
          to label %100 unwind label %86

100:                                              ; preds = %97
  br i1 %99, label %111, label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  %103 = call ptr @__cxa_allocate_exception(i64 8) #8
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef @.str.556)
          to label %104 unwind label %105

104:                                              ; preds = %102
  invoke void @__cxa_throw(ptr %103, ptr @_ZTIN2vl5ErrorE, ptr null) #9
          to label %131 unwind label %86

105:                                              ; preds = %102
  %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 @__cxa_free_exception(ptr %103) #8
  br label %115

109:                                              ; No predecessors!
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110, %100
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %12, align 8, !tbaa !21
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %12, align 8, !tbaa !21
  br label %70, !llvm.loop !25

115:                                              ; preds = %105, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %123

116:                                              ; preds = %77
  invoke void @_ZN2vl3PtrINS_14regex_internal10ExpressionEEC2INS1_17CharSetExpressionEEERKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %117 unwind label %82

117:                                              ; preds = %116
  invoke void @_ZN2vl5regex9RegexNodeC1ENS_3PtrINS_14regex_internal10ExpressionEEE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %14)
          to label %118 unwind label %119

118:                                              ; preds = %117
  call void @_ZN2vl3PtrINS_14regex_internal10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  ret void

119:                                              ; preds = %117
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %9, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %10, align 4
  call void @_ZN2vl3PtrINS_14regex_internal10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  br label %123

123:                                              ; preds = %119, %115, %82
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %124

124:                                              ; preds = %123, %78
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  br label %125

125:                                              ; preds = %124, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %9, align 8
  %128 = load i32, ptr %10, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130

131:                                              ; preds = %104
  unreachable
}

declare void @_ZN2vl5ErrorC1EPKw(ptr, ptr)

declare void @_ZN2vl5regex9RegexNodeC1ENS_3PtrINS_14regex_internal10ExpressionEEE(ptr, ptr)

attributes #0 = { nobuiltin nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint 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 #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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, !18, i64 56}
!10 = !{!"_ZTSN2vl14regex_internal17CharSetExpressionE", !11, i64 0, !13, i64 8, !18, i64 56}
!11 = !{!"_ZTSN2vl14regex_internal10ExpressionE", !12, i64 0}
!12 = !{!"_ZTSN2vl6ObjectE"}
!13 = !{!"_ZTSN2vl11collections10SortedListINS_14regex_internal9CharRangeES3_EE", !14, i64 0}
!14 = !{!"_ZTSN2vl11collections8ListBaseINS_14regex_internal9CharRangeES3_EE", !15, i64 0, !17, i64 24, !18, i64 32}
!15 = !{!"_ZTSN2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEEE", !16, i64 0, !6, i64 8, !17, i64 16}
!16 = !{!"_ZTSN2vl11collections9ListStoreINS_14regex_internal9CharRangeELb1EEE", !12, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!17, !17, i64 0}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23}
!23 = !{!24, !24, i64 0}
!24 = !{!"wchar_t", !7, i64 0}
!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::regex::RegexNode" = type { %"class.vl::Object", %"class.vl::Ptr.1009" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.1009" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.1098" = type { ptr, ptr, ptr, ptr }

@_ZTIN2vl5ErrorE = external dso_local constant { ptr, ptr }, align 8
@_ZTIN2vl14regex_internal10ExpressionE = external dso_local constant { ptr, ptr, i32, i32, ptr, i64, ptr, i64 }, align 8
@_ZTIN2vl14regex_internal17CharSetExpressionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.555 = external hidden unnamed_addr constant [97 x i32], align 4
@.str.556 = external hidden unnamed_addr constant [92 x i32], align 4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections8CopyFromINS0_10SortedListINS_14regex_internal9CharRangeES4_EES5_EEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33), i1 noundef zeroext) local_unnamed_addr #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl14regex_internal17CharSetExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK2vl5regex9RegexNodermERKS1_(ptr dead_on_unwind noalias writable sret(%"class.vl::regex::RegexNode") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.vl::Ptr.1098", align 8
  %5 = alloca %"class.vl::Ptr.1009", align 8
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = tail call noundef ptr @_ZNK2vl3PtrINS_14regex_internal10ExpressionEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %11, label %9

9:                                                ; preds = %3
  %10 = tail call ptr @__dynamic_cast(ptr nonnull %7, ptr nonnull @_ZTIN2vl14regex_internal10ExpressionE, ptr nonnull @_ZTIN2vl14regex_internal17CharSetExpressionE, i64 0) #7
  br label %11

11:                                               ; preds = %3, %9
  %12 = phi ptr [ %10, %9 ], [ null, %3 ]
  %13 = getelementptr inbounds i8, ptr %2, i64 8
  %14 = tail call noundef ptr @_ZNK2vl3PtrINS_14regex_internal10ExpressionEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %15 = icmp eq ptr %14, null
  br i1 %15, label %.thread, label %16

16:                                               ; preds = %11
  %17 = tail call ptr @__dynamic_cast(ptr nonnull %14, ptr nonnull @_ZTIN2vl14regex_internal10ExpressionE, ptr nonnull @_ZTIN2vl14regex_internal17CharSetExpressionE, i64 0) #7
  %18 = icmp ne ptr %12, null
  %19 = icmp ne ptr %17, null
  %or.cond = select i1 %18, i1 %19, i1 false
  br i1 %or.cond, label %20, label %.thread

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %12, i64 56
  %22 = load i8, ptr %21, align 8, !tbaa !5, !range !18, !noundef !19
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %.thread, label %24

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %17, i64 56
  %26 = load i8, ptr %25, align 8, !tbaa !5, !range !18, !noundef !19
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %.thread, label %32

.thread:                                          ; preds = %11, %24, %20, %16
  %28 = tail call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.555)
          to label %29 unwind label %30

29:                                               ; preds = %.thread
  tail call void @__cxa_throw(ptr %28, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #8
  unreachable

30:                                               ; preds = %.thread
  %31 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %28) #7
  br label %67

32:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  %33 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #9
  invoke void @_ZN2vl14regex_internal17CharSetExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57) %33)
          to label %34 unwind label %47

34:                                               ; preds = %32
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %33)
  %35 = call noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %36 = getelementptr inbounds i8, ptr %35, i64 56
  store i8 0, ptr %36, align 8, !tbaa !5
  %37 = call noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = getelementptr inbounds i8, ptr %12, i64 8
  invoke void @_ZN2vl11collections8CopyFromINS0_10SortedListINS_14regex_internal9CharRangeES4_EES5_EEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33) %38, ptr noundef nonnull align 8 dereferenceable(33) %39, i1 noundef zeroext false)
          to label %.preheader unwind label %49

.preheader:                                       ; preds = %34
  %40 = getelementptr inbounds i8, ptr %17, i64 8
  %41 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

43:                                               ; preds = %55
  %44 = add nuw nsw i64 %.01429, 1
  %45 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %43, %.preheader
  invoke void @_ZN2vl3PtrINS_14regex_internal10ExpressionEEC2INS1_17CharSetExpressionEEERKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %61 unwind label %49

47:                                               ; preds = %32
  %48 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %33, i64 noundef 64) #10
  br label %66

49:                                               ; preds = %._crit_edge, %34
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %65

.loopexit:                                        ; preds = %.lr.ph, %53
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %65

.loopexit.split-lp:                               ; preds = %58
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %65

.lr.ph:                                           ; preds = %.preheader, %43
  %.01429 = phi i64 [ %44, %43 ], [ 0, %.preheader ]
  %51 = call noundef ptr @_ZNK2vl3PtrINS_14regex_internal17CharSetExpressionEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %52 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %.01429)
          to label %53 unwind label %.loopexit

53:                                               ; preds = %.lr.ph
  %.sroa.0.0.copyload = load i64, ptr %52, align 4
  %54 = invoke noundef zeroext i1 @_ZN2vl14regex_internal17CharSetExpression20AddRangeWithConflictENS0_9CharRangeE(ptr noundef nonnull align 8 dereferenceable(57) %51, i64 %.sroa.0.0.copyload)
          to label %55 unwind label %.loopexit

55:                                               ; preds = %53
  br i1 %54, label %43, label %56

56:                                               ; preds = %55
  %57 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @.str.556)
          to label %58 unwind label %59

58:                                               ; preds = %56
  invoke void @__cxa_throw(ptr %57, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #8
          to label %68 unwind label %.loopexit.split-lp

59:                                               ; preds = %56
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %57) #7
  br label %65

61:                                               ; preds = %._crit_edge
  invoke void @_ZN2vl5regex9RegexNodeC1ENS_3PtrINS_14regex_internal10ExpressionEEE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull %5)
          to label %62 unwind label %63

62:                                               ; preds = %61
  call void @_ZN2vl3PtrINS_14regex_internal10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  ret void

63:                                               ; preds = %61
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_14regex_internal10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %65

65:                                               ; preds = %.loopexit, %.loopexit.split-lp, %59, %63, %49
  %.pn.pn = phi { ptr, i32 } [ %64, %63 ], [ %50, %49 ], [ %60, %59 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN2vl3PtrINS_14regex_internal17CharSetExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %66

66:                                               ; preds = %65, %47
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %65 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %67

67:                                               ; preds = %66, %30
  %.pn26 = phi { ptr, i32 } [ %31, %30 ], [ %.pn.pn.pn, %66 ]
  resume { ptr, i32 } %.pn26

68:                                               ; preds = %58
  unreachable
}

declare void @_ZN2vl5ErrorC1EPKw(ptr, ptr) local_unnamed_addr

declare void @_ZN2vl5regex9RegexNodeC1ENS_3PtrINS_14regex_internal10ExpressionEEE(ptr, ptr) local_unnamed_addr

attributes #0 = { nobuiltin nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin allocsize(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 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 = { 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 #5 = { inlinehint 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 #6 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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, !17, i64 56}
!6 = !{!"_ZTSN2vl14regex_internal17CharSetExpressionE", !7, i64 0, !9, i64 8, !17, i64 56}
!7 = !{!"_ZTSN2vl14regex_internal10ExpressionE", !8, i64 0}
!8 = !{!"_ZTSN2vl6ObjectE"}
!9 = !{!"_ZTSN2vl11collections10SortedListINS_14regex_internal9CharRangeES3_EE", !10, i64 0}
!10 = !{!"_ZTSN2vl11collections8ListBaseINS_14regex_internal9CharRangeES3_EE", !11, i64 0, !16, i64 24, !17, i64 32}
!11 = !{!"_ZTSN2vl11collections9ArrayBaseINS_14regex_internal9CharRangeEEE", !12, i64 0, !13, i64 8, !16, i64 16}
!12 = !{!"_ZTSN2vl11collections9ListStoreINS_14regex_internal9CharRangeELb1EEE", !8, i64 0}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"long", !14, i64 0}
!17 = !{!"bool", !14, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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