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

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl10reflection11description10IValueList6CreateENS_11collections8LazyListINS1_5ValueEEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.837") align 8 %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.vl::Ptr.838", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  %8 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #6
  invoke void @_ZN2vl11collections4ListINS_10reflection11description5ValueES4_EC1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %9 unwind label %25

9:                                                ; preds = %2
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEEC2EPS6_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %8)
  %10 = invoke noundef ptr @_ZNK2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %11 unwind label %29

11:                                               ; preds = %9
  invoke void @_ZN2vl11collections8CopyFromINS0_4ListINS_10reflection11description5ValueES5_EENS0_8LazyListIS5_EEEEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33) %10, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext false)
          to label %12 unwind label %29

12:                                               ; preds = %11
  %13 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 152) #6
          to label %14 unwind label %29

14:                                               ; preds = %12
  invoke void @_ZN2vl10reflection11description16ValueListWrapperINS_3PtrINS_11collections4ListINS1_5ValueES6_EEEEEC1ERKS8_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %15 unwind label %33

15:                                               ; preds = %14
  %16 = icmp eq ptr %13, null
  br i1 %16, label %22, label %17

17:                                               ; preds = %15
  %18 = load ptr, ptr %13, align 8, !tbaa !9
  %19 = getelementptr i8, ptr %18, i64 -64
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr %13, i64 %20
  br label %22

22:                                               ; preds = %17, %15
  %23 = phi ptr [ %21, %17 ], [ null, %15 ]
  invoke void @_ZN2vl3PtrINS_10reflection11description10IValueListEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %23)
          to label %24 unwind label %29

24:                                               ; preds = %22
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  ret void

25:                                               ; preds = %2
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %6, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %8, i64 noundef 48) #7
  br label %38

29:                                               ; preds = %22, %12, %11, %9
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  br label %37

33:                                               ; preds = %14
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %13, i64 noundef 152) #7
  br label %37

37:                                               ; preds = %33, %29
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %38

38:                                               ; preds = %37, %25
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %39

39:                                               ; preds = %38
  %40 = load ptr, ptr %6, align 8
  %41 = load i32, ptr %7, align 4
  %42 = insertvalue { ptr, i32 } poison, ptr %40, 0
  %43 = insertvalue { ptr, i32 } %42, i32 %41, 1
  resume { ptr, i32 } %43
}

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 = { 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 #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 = { 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}


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

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl10reflection11description10IValueList6CreateENS_11collections8LazyListINS1_5ValueEEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.837") align 8 %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.vl::Ptr.838", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  %4 = tail call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #6
  invoke void @_ZN2vl11collections4ListINS_10reflection11description5ValueES4_EC1Ev(ptr noundef nonnull align 8 dereferenceable(33) %4)
          to label %5 unwind label %15

5:                                                ; preds = %2
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEEC2EPS6_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %4)
  %6 = call noundef ptr @_ZNK2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEE3ObjEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  invoke void @_ZN2vl11collections8CopyFromINS0_4ListINS_10reflection11description5ValueES5_EENS0_8LazyListIS5_EEEEvRT_RKT0_b(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext false)
          to label %7 unwind label %17

7:                                                ; preds = %5
  %8 = invoke noalias noundef nonnull dereferenceable(152) ptr @_Znwm(i64 noundef 152) #6
          to label %9 unwind label %17

9:                                                ; preds = %7
  invoke void @_ZN2vl10reflection11description16ValueListWrapperINS_3PtrINS_11collections4ListINS1_5ValueES6_EEEEEC1ERKS8_(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %10 unwind label %19

10:                                               ; preds = %9
  %11 = load ptr, ptr %8, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -64
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %8, i64 %13
  call void @_ZN2vl3PtrINS_10reflection11description10IValueListEEC2EPS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %14)
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  ret void

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %4, i64 noundef 48) #7
  br label %22

17:                                               ; preds = %7, %5
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %9
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 152) #7
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @_ZN2vl3PtrINS_11collections4ListINS_10reflection11description5ValueES5_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %22

22:                                               ; preds = %21, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %21 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn
}

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 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 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass