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

; 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.64" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.61" = type { ptr, ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl7parsing7tabling18CreateStrictParserENS_3PtrINS1_12ParsingTableEEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.64") align 8 %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.vl::Ptr.61", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca %"class.vl::Ptr.61", align 8
  %10 = alloca i1, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = call noundef zeroext i1 @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %11, label %12, label %49

12:                                               ; preds = %2
  %13 = call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %14 = call noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingTable12GetAmbiguityEv(ptr noundef nonnull align 8 dereferenceable(656) %13)
  br i1 %14, label %15, label %32

15:                                               ; preds = %12
  %16 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #4
  store i1 true, ptr %8, align 1
  invoke void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %17 unwind label %20

17:                                               ; preds = %15
  invoke void @_ZN2vl7parsing7tabling22ParsingAmbiguousParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr noundef nonnull align 8 dereferenceable(96) %16, ptr noundef %5)
          to label %18 unwind label %24

18:                                               ; preds = %17
  store i1 false, ptr %8, align 1
  invoke void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %16)
          to label %19 unwind label %24

19:                                               ; preds = %18
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %50

20:                                               ; preds = %15
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %6, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %7, align 4
  br label %28

24:                                               ; preds = %18, %17
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %6, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %7, align 4
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %28

28:                                               ; preds = %24, %20
  %29 = load i1, ptr %8, align 1
  br i1 %29, label %30, label %31

30:                                               ; preds = %28
  call void @_ZdlPvm(ptr noundef %16, i64 noundef 96) #6
  br label %31

31:                                               ; preds = %30, %28
  br label %51

32:                                               ; preds = %12
  %33 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #4
  store i1 true, ptr %10, align 1
  invoke void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %34 unwind label %37

34:                                               ; preds = %32
  invoke void @_ZN2vl7parsing7tabling19ParsingStrictParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef %9)
          to label %35 unwind label %41

35:                                               ; preds = %34
  store i1 false, ptr %10, align 1
  invoke void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %33)
          to label %36 unwind label %41

36:                                               ; preds = %35
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %50

37:                                               ; preds = %32
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  br label %45

41:                                               ; preds = %35, %34
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %45

45:                                               ; preds = %41, %37
  %46 = load i1, ptr %10, align 1
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  call void @_ZdlPvm(ptr noundef %33, i64 noundef 40) #6
  br label %48

48:                                               ; preds = %47, %45
  br label %51

49:                                               ; preds = %2
  call void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  br label %50

50:                                               ; preds = %49, %36, %19
  ret void

51:                                               ; preds = %48, %31
  %52 = load ptr, ptr %6, align 8
  %53 = load i32, ptr %7, align 4
  %54 = insertvalue { ptr, i32 } poison, ptr %52, 0
  %55 = insertvalue { ptr, i32 } %54, i32 %53, 1
  resume { ptr, i32 } %55
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingTable12GetAmbiguityEv(ptr noundef nonnull align 8 dereferenceable(656)) #3 align 2

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

declare void @_ZN2vl7parsing7tabling19ParsingStrictParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr, ptr)

declare void @_ZN2vl7parsing7tabling22ParsingAmbiguousParserC1ENS_3PtrINS1_12ParsingTableEEE(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 = { 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 #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 = { 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 = { builtin allocsize(0) }
attributes #5 = { nounwind }
attributes #6 = { 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"}


; 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.64" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.61" = type { ptr, ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl7parsing7tabling18CreateStrictParserENS_3PtrINS1_12ParsingTableEEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.64") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.vl::Ptr.61", align 8
  %4 = alloca %"class.vl::Ptr.61", align 8
  %5 = tail call noundef zeroext i1 @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %5, label %6, label %29

6:                                                ; preds = %2
  %7 = tail call noundef ptr @_ZNK2vl3PtrINS_7parsing7tabling12ParsingTableEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %8 = tail call noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingTable12GetAmbiguityEv(ptr noundef nonnull align 8 dereferenceable(656) %7)
  br i1 %8, label %9, label %19

9:                                                ; preds = %6
  %10 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #4
  invoke void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %11 unwind label %.thread

11:                                               ; preds = %9
  invoke void @_ZN2vl7parsing7tabling22ParsingAmbiguousParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr noundef nonnull align 8 dereferenceable(96) %10, ptr noundef nonnull %3)
          to label %13 unwind label %.thread17

.thread17:                                        ; preds = %11
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %18

13:                                               ; preds = %11
  invoke void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %10)
          to label %14 unwind label %16

14:                                               ; preds = %13
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %30

.thread:                                          ; preds = %9
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %18

16:                                               ; preds = %13
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %31

18:                                               ; preds = %.thread17, %.thread
  %.pn1116 = phi { ptr, i32 } [ %15, %.thread ], [ %12, %.thread17 ]
  call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 96) #6
  br label %31

19:                                               ; preds = %6
  %20 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #4
  invoke void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %21 unwind label %.thread19

21:                                               ; preds = %19
  invoke void @_ZN2vl7parsing7tabling19ParsingStrictParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull %4)
          to label %23 unwind label %.thread23

.thread23:                                        ; preds = %21
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %28

23:                                               ; preds = %21
  invoke void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %20)
          to label %24 unwind label %26

24:                                               ; preds = %23
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %30

.thread19:                                        ; preds = %19
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %23
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing7tabling12ParsingTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %31

28:                                               ; preds = %.thread23, %.thread19
  %.pn22 = phi { ptr, i32 } [ %25, %.thread19 ], [ %22, %.thread23 ]
  call void @_ZdlPvm(ptr noundef nonnull %20, i64 noundef 40) #6
  br label %31

29:                                               ; preds = %2
  tail call void @_ZN2vl3PtrINS_7parsing7tabling20ParsingGeneralParserEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  br label %30

30:                                               ; preds = %29, %24, %14
  ret void

31:                                               ; preds = %26, %16, %28, %18
  %.pn11.pn = phi { ptr, i32 } [ %.pn1116, %18 ], [ %17, %16 ], [ %.pn22, %28 ], [ %27, %26 ]
  resume { ptr, i32 } %.pn11.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing7tabling12ParsingTable12GetAmbiguityEv(ptr noundef nonnull align 8 dereferenceable(656)) local_unnamed_addr #3 align 2

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

declare void @_ZN2vl7parsing7tabling19ParsingStrictParserC1ENS_3PtrINS1_12ParsingTableEEE(ptr, ptr) local_unnamed_addr

declare void @_ZN2vl7parsing7tabling22ParsingAmbiguousParserC1ENS_3PtrINS1_12ParsingTableEEE(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 = { 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 #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 = { 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 = { builtin allocsize(0) }
attributes #5 = { nounwind }
attributes #6 = { 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)"}


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