; 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::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.223" = type { ptr, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [1 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(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i1 noundef zeroext) unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl7parsing9analyzing20ParsingSymbolManager11AddEnumItemERKNS_12ObjectStringIwEEPNS1_13ParsingSymbolE(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2) #2 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 %"class.vl::ObjectString", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  %13 = alloca %"class.vl::Ptr.223", align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %55

18:                                               ; preds = %3
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = call noundef i32 @_ZN2vl7parsing9analyzing13ParsingSymbol7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %19)
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %55

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %23 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 304) #6
  store i1 true, ptr %12, align 1
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #5
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef @.str.2, i1 noundef zeroext true)
          to label %26 unwind label %34

26:                                               ; preds = %22
  invoke void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr noundef nonnull align 8 dereferenceable(304) %23, ptr noundef %15, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef %25, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %27 unwind label %38

27:                                               ; preds = %26
  store i1 false, ptr %12, align 1
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  store ptr %23, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %28)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = invoke noundef zeroext i1 @_ZN2vl7parsing9analyzing20ParsingSymbolManager15TryAddSubSymbolENS_3PtrINS1_13ParsingSymbolEEEPS4_(ptr noundef nonnull align 8 dereferenceable(632) %15, ptr noundef %13, ptr noundef %29)
          to label %31 unwind label %46

31:                                               ; preds = %27
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br i1 %30, label %32, label %50

32:                                               ; preds = %31
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %33, ptr %4, align 8
  store i32 1, ptr %14, align 4
  br label %51

34:                                               ; preds = %22
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %10, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %11, align 4
  br label %42

38:                                               ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %11, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  br label %42

42:                                               ; preds = %38, %34
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  %43 = load i1, ptr %12, align 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %42
  call void @_ZdlPvm(ptr noundef %23, i64 noundef 304) #7
  br label %45

45:                                               ; preds = %44, %42
  br label %54

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %10, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %11, align 4
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %54

50:                                               ; preds = %31
  store i32 0, ptr %14, align 4
  br label %51

51:                                               ; preds = %50, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %52 = load i32, ptr %14, align 4
  switch i32 %52, label %63 [
    i32 0, label %53
    i32 1, label %56
  ]

53:                                               ; preds = %51
  br label %55

54:                                               ; preds = %46, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %58

55:                                               ; preds = %53, %18, %3
  store ptr null, ptr %4, align 8
  br label %56

56:                                               ; preds = %55, %51
  %57 = load ptr, ptr %4, align 8
  ret ptr %57

58:                                               ; preds = %54
  %59 = load ptr, ptr %10, align 8
  %60 = load i32, ptr %11, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62

63:                                               ; preds = %51
  unreachable
}

declare void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr, ptr, i32, ptr, 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 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { 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::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.223" = type { ptr, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [1 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(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i1 noundef zeroext) unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl7parsing9analyzing20ParsingSymbolManager11AddEnumItemERKNS_12ObjectStringIwEEPNS1_13ParsingSymbolE(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.vl::ObjectString", align 8
  %5 = alloca %"class.vl::Ptr.223", align 8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %23, label %6

6:                                                ; preds = %3
  %7 = tail call noundef i32 @_ZN2vl7parsing9analyzing13ParsingSymbol7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %2)
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %9, label %23

9:                                                ; preds = %6
  %10 = tail call noalias noundef nonnull dereferenceable(304) ptr @_Znwm(i64 noundef 304) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull @.str.2, i1 noundef zeroext true)
          to label %11 unwind label %15

11:                                               ; preds = %9
  invoke void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr noundef nonnull align 8 dereferenceable(304) %10, ptr noundef nonnull %0, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %2, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %12 unwind label %17

12:                                               ; preds = %11
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %10)
  %13 = invoke noundef zeroext i1 @_ZN2vl7parsing9analyzing20ParsingSymbolManager15TryAddSubSymbolENS_3PtrINS1_13ParsingSymbolEEEPS4_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %5, ptr noundef nonnull %2)
          to label %14 unwind label %20

14:                                               ; preds = %12
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br i1 %13, label %24, label %23

15:                                               ; preds = %9
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %19

17:                                               ; preds = %11
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  br label %19

19:                                               ; preds = %17, %15
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 304) #7
  br label %22

20:                                               ; preds = %12
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %22

22:                                               ; preds = %19, %20
  %.pn19 = phi { ptr, i32 } [ %21, %20 ], [ %.pn, %19 ]
  resume { ptr, i32 } %.pn19

23:                                               ; preds = %14, %6, %3
  br label %24

24:                                               ; preds = %14, %23
  %.116 = phi ptr [ %10, %14 ], [ null, %23 ]
  ret ptr %.116
}

declare void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr, ptr, i32, ptr, 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 = { 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 = { 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 #5 = { builtin allocsize(0) }
attributes #6 = { nounwind }
attributes #7 = { 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,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass