; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing9analyzing13ParsingSymbol6IsTypeEv(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 @_ZN2vl7parsing9analyzing20ParsingSymbolManager8AddFieldERKNS_12ObjectStringIwEEPNS1_13ParsingSymbolES8_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2, ptr noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %11 = alloca %"class.vl::ObjectString", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca %"class.vl::Ptr.223", align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %63

20:                                               ; preds = %4
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call noundef i32 @_ZN2vl7parsing9analyzing13ParsingSymbol7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %21)
  %23 = icmp eq i32 %22, 2
  br i1 %23, label %24, label %63

24:                                               ; preds = %20
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %63

27:                                               ; preds = %24
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZN2vl7parsing9analyzing13ParsingSymbol6IsTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %28)
  br i1 %29, label %30, label %63

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %31 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 304) #6
  store i1 true, ptr %14, align 1
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #5
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef @.str.2, i1 noundef zeroext true)
          to label %34 unwind label %42

34:                                               ; preds = %30
  invoke void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr noundef nonnull align 8 dereferenceable(304) %31, ptr noundef %17, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef %33, ptr noundef nonnull align 8 dereferenceable(48) %11)
          to label %35 unwind label %46

35:                                               ; preds = %34
  store i1 false, ptr %14, align 1
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  store ptr %31, ptr %10, align 8, !tbaa !5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %36)
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = invoke noundef zeroext i1 @_ZN2vl7parsing9analyzing20ParsingSymbolManager15TryAddSubSymbolENS_3PtrINS1_13ParsingSymbolEEEPS4_(ptr noundef nonnull align 8 dereferenceable(632) %17, ptr noundef %15, ptr noundef %37)
          to label %39 unwind label %54

39:                                               ; preds = %35
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br i1 %38, label %40, label %58

40:                                               ; preds = %39
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %41, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %59

42:                                               ; preds = %30
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %12, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %13, align 4
  br label %50

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

50:                                               ; preds = %46, %42
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #5
  %51 = load i1, ptr %14, align 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  call void @_ZdlPvm(ptr noundef %31, i64 noundef 304) #7
  br label %53

53:                                               ; preds = %52, %50
  br label %62

54:                                               ; preds = %35
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %12, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %13, align 4
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %62

58:                                               ; preds = %39
  store i32 0, ptr %16, align 4
  br label %59

59:                                               ; preds = %58, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %60 = load i32, ptr %16, align 4
  switch i32 %60, label %71 [
    i32 0, label %61
    i32 1, label %64
  ]

61:                                               ; preds = %59
  br label %63

62:                                               ; preds = %54, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %66

63:                                               ; preds = %61, %27, %24, %20, %4
  store ptr null, ptr %5, align 8
  br label %64

64:                                               ; preds = %63, %59
  %65 = load ptr, ptr %5, align 8
  ret ptr %65

66:                                               ; preds = %62
  %67 = load ptr, ptr %12, align 8
  %68 = load i32, ptr %13, align 4
  %69 = insertvalue { ptr, i32 } poison, ptr %67, 0
  %70 = insertvalue { ptr, i32 } %69, i32 %68, 1
  resume { ptr, i32 } %70

71:                                               ; preds = %59
  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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl7parsing9analyzing13ParsingSymbol6IsTypeEv(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 @_ZN2vl7parsing9analyzing20ParsingSymbolManager8AddFieldERKNS_12ObjectStringIwEEPNS1_13ParsingSymbolES8_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.vl::ObjectString", align 8
  %6 = alloca %"class.vl::Ptr.223", align 8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %27, label %7

7:                                                ; preds = %4
  %8 = tail call noundef i32 @_ZN2vl7parsing9analyzing13ParsingSymbol7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %2)
  %9 = icmp eq i32 %8, 2
  %10 = icmp ne ptr %3, null
  %or.cond = and i1 %10, %9
  br i1 %or.cond, label %11, label %27

11:                                               ; preds = %7
  %12 = tail call noundef zeroext i1 @_ZN2vl7parsing9analyzing13ParsingSymbol6IsTypeEv(ptr noundef nonnull align 8 dereferenceable(304) %3)
  br i1 %12, label %13, label %27

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

15:                                               ; preds = %13
  invoke void @_ZN2vl7parsing9analyzing13ParsingSymbolC1EPNS1_20ParsingSymbolManagerENS2_10SymbolTypeERKNS_12ObjectStringIwEEPS2_S9_(ptr noundef nonnull align 8 dereferenceable(304) %14, ptr noundef nonnull %0, i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %3, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %16 unwind label %21

16:                                               ; preds = %15
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %14)
  %17 = invoke noundef zeroext i1 @_ZN2vl7parsing9analyzing20ParsingSymbolManager15TryAddSubSymbolENS_3PtrINS1_13ParsingSymbolEEEPS4_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %6, ptr noundef nonnull %2)
          to label %18 unwind label %24

18:                                               ; preds = %16
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br i1 %17, label %28, label %27

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %23

21:                                               ; preds = %15
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  br label %23

23:                                               ; preds = %21, %19
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 304) #7
  br label %26

24:                                               ; preds = %16
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_7parsing9analyzing13ParsingSymbolEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %26

26:                                               ; preds = %23, %24
  %.pn23 = phi { ptr, i32 } [ %25, %24 ], [ %.pn, %23 ]
  resume { ptr, i32 } %.pn23

27:                                               ; preds = %18, %11, %7, %4
  br label %28

28:                                               ; preds = %18, %27
  %.119 = phi ptr [ %14, %18 ], [ null, %27 ]
  ret ptr %.119
}

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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass