; 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::reflection::description::TypeDescriptorImpl" = type { %"class.vl::Object", %"class.vl::reflection::description::ITypeDescriptor.base", i8, %"class.vl::ObjectString", %"class.vl::ObjectString", %"class.vl::Ptr.918", %"class.vl::collections::List.919", %"class.vl::collections::Dictionary.927", %"class.vl::collections::Dictionary.938", %"class.vl::collections::Dictionary.949", %"class.vl::Ptr.960", %"class.vl::reflection::IDescriptable.base", %"class.vl::Interface", %"class.vl::reflection::DescriptableObject" }
%"class.vl::reflection::description::ITypeDescriptor.base" = type { %"class.vl::reflection::Description.base.779" }
%"class.vl::reflection::Description.base.779" = type { ptr }
%"class.vl::Ptr.918" = type { ptr, ptr, ptr, ptr }
%"class.vl::collections::List.919" = type { %"class.vl::collections::ListBase.base.925", %"class.vl::collections::IEnumerable.923" }
%"class.vl::collections::ListBase.base.925" = type <{ %"class.vl::collections::ArrayBase.base.924", i64, i8 }>
%"class.vl::collections::ArrayBase.base.924" = type { %"class.vl::collections::ListStore.922", ptr, i64 }
%"class.vl::collections::ListStore.922" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.923" = type { %"class.vl::Interface" }
%"class.vl::collections::Dictionary.927" = type { %"class.vl::Object", %"class.vl::collections::SortedList", %"class.vl::collections::List.928", %"class.vl::collections::IEnumerable.936" }
%"class.vl::collections::SortedList" = type { %"class.vl::collections::ListBase.base", %"class.vl::collections::IEnumerable.2" }
%"class.vl::collections::ListBase.base" = type <{ %"class.vl::collections::ArrayBase.base.3", i64, i8 }>
%"class.vl::collections::ArrayBase.base.3" = type { %"class.vl::collections::ListStore.1", ptr, i64 }
%"class.vl::collections::ListStore.1" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.2" = type { %"class.vl::Interface" }
%"class.vl::collections::List.928" = type { %"class.vl::collections::ListBase.base.934", %"class.vl::collections::IEnumerable.932" }
%"class.vl::collections::ListBase.base.934" = type <{ %"class.vl::collections::ArrayBase.base.933", i64, i8 }>
%"class.vl::collections::ArrayBase.base.933" = type { %"class.vl::collections::ListStore.931", ptr, i64 }
%"class.vl::collections::ListStore.931" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.932" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.936" = type { %"class.vl::Interface" }
%"class.vl::collections::Dictionary.938" = type { %"class.vl::Object", %"class.vl::collections::SortedList", %"class.vl::collections::List.939", %"class.vl::collections::IEnumerable.947" }
%"class.vl::collections::List.939" = type { %"class.vl::collections::ListBase.base.945", %"class.vl::collections::IEnumerable.943" }
%"class.vl::collections::ListBase.base.945" = type <{ %"class.vl::collections::ArrayBase.base.944", i64, i8 }>
%"class.vl::collections::ArrayBase.base.944" = type { %"class.vl::collections::ListStore.942", ptr, i64 }
%"class.vl::collections::ListStore.942" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.943" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.947" = type { %"class.vl::Interface" }
%"class.vl::collections::Dictionary.949" = type { %"class.vl::Object", %"class.vl::collections::SortedList", %"class.vl::collections::List.950", %"class.vl::collections::IEnumerable.958" }
%"class.vl::collections::List.950" = type { %"class.vl::collections::ListBase.base.956", %"class.vl::collections::IEnumerable.954" }
%"class.vl::collections::ListBase.base.956" = type <{ %"class.vl::collections::ArrayBase.base.955", i64, i8 }>
%"class.vl::collections::ArrayBase.base.955" = type { %"class.vl::collections::ListStore.953", ptr, i64 }
%"class.vl::collections::ListStore.953" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.954" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.958" = type { %"class.vl::Interface" }
%"class.vl::Ptr.960" = type { ptr, ptr, ptr, ptr }
%"class.vl::reflection::IDescriptable.base" = type { %"class.vl::reflection::Description.base.17" }
%"class.vl::reflection::Description.base.17" = type { ptr }
%"class.vl::Interface" = type { ptr }
%"class.vl::reflection::DescriptableObject" = type { ptr, i64, ptr, i64, ptr, %"class.vl::Ptr.12" }
%"class.vl::Ptr.12" = type { ptr, ptr, ptr, ptr }

@.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 uwtable
declare dso_local void @_ZN2vl10reflection11description19MethodGroupInfoImplC1EPNS1_15ITypeDescriptorERKNS_12ObjectStringIwEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl10reflection11description18TypeDescriptorImpl23PrepareConstructorGroupEv(ptr noundef nonnull align 8 dereferenceable(568) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.vl::ObjectString", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.vl::reflection::description::TypeDescriptorImpl", ptr %7, i32 0, i32 10
  %9 = call noundef zeroext i1 @_ZNK2vl3PtrINS_10reflection11description19MethodGroupInfoImplEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
  br i1 %9, label %30, label %10

10:                                               ; preds = %1
  %11 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 216) #5
  store i1 true, ptr %6, align 1
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #6
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef @.str.2, i1 noundef zeroext true)
          to label %13 unwind label %18

13:                                               ; preds = %10
  invoke void @_ZN2vl10reflection11description19MethodGroupInfoImplC1EPNS1_15ITypeDescriptorERKNS_12ObjectStringIwEE(ptr noundef nonnull align 8 dereferenceable(120) %11, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(48) %3)
          to label %14 unwind label %22

14:                                               ; preds = %13
  store i1 false, ptr %6, align 1
  %15 = getelementptr inbounds %"class.vl::reflection::description::TypeDescriptorImpl", ptr %7, i32 0, i32 10
  %16 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_10reflection11description19MethodGroupInfoImplEEaSEPS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %11)
          to label %17 unwind label %22

17:                                               ; preds = %14
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #6
  br label %30

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %4, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %5, align 4
  br label %26

22:                                               ; preds = %14, %13
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %4, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %5, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  br label %26

26:                                               ; preds = %22, %18
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #6
  %27 = load i1, ptr %6, align 1
  br i1 %27, label %28, label %29

28:                                               ; preds = %26
  call void @_ZdlPvm(ptr noundef %11, i64 noundef 216) #7
  br label %29

29:                                               ; preds = %28, %26
  br label %33

30:                                               ; preds = %17, %1
  %31 = getelementptr inbounds %"class.vl::reflection::description::TypeDescriptorImpl", ptr %7, i32 0, i32 10
  %32 = call noundef ptr @_ZNK2vl3PtrINS_10reflection11description19MethodGroupInfoImplEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  ret ptr %32

33:                                               ; preds = %29
  %34 = load ptr, ptr %4, align 8
  %35 = load i32, ptr %5, align 4
  %36 = insertvalue { ptr, i32 } poison, ptr %34, 0
  %37 = insertvalue { ptr, i32 } %36, i32 %35, 1
  resume { ptr, i32 } %37
}

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

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

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 = { 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)"}
!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 }

@.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 uwtable
declare dso_local void @_ZN2vl10reflection11description19MethodGroupInfoImplC1EPNS1_15ITypeDescriptorERKNS_12ObjectStringIwEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl10reflection11description18TypeDescriptorImpl23PrepareConstructorGroupEv(ptr noundef nonnull align 8 dereferenceable(568) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.vl::ObjectString", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 536
  %4 = tail call noundef zeroext i1 @_ZNK2vl3PtrINS_10reflection11description19MethodGroupInfoImplEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br i1 %4, label %17, label %5

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

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  invoke void @_ZN2vl10reflection11description19MethodGroupInfoImplC1EPNS1_15ITypeDescriptorERKNS_12ObjectStringIwEE(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %10 unwind label %.thread10

.thread10:                                        ; preds = %7
  %9 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  br label %16

10:                                               ; preds = %7
  %11 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_10reflection11description19MethodGroupInfoImplEEaSEPS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %6)
          to label %12 unwind label %14

12:                                               ; preds = %10
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  br label %17

.thread:                                          ; preds = %5
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  br label %16

14:                                               ; preds = %10
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  br label %19

16:                                               ; preds = %.thread10, %.thread
  %.pn9 = phi { ptr, i32 } [ %13, %.thread ], [ %9, %.thread10 ]
  call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 216) #7
  br label %19

17:                                               ; preds = %12, %1
  %18 = call noundef ptr @_ZNK2vl3PtrINS_10reflection11description19MethodGroupInfoImplEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  ret ptr %18

19:                                               ; preds = %14, %16
  %.pn8 = phi { ptr, i32 } [ %15, %14 ], [ %.pn9, %16 ]
  resume { ptr, i32 } %.pn8
}

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

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

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,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass