; 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::reflection::description::MethodInfoImpl" = type <{ %"class.vl::Object", %"class.vl::reflection::description::IMethodInfo.base", ptr, ptr, %"class.vl::collections::List.876", %"class.vl::Ptr.872", i8, [7 x i8], %"class.vl::reflection::description::IMemberInfo.base", %"class.vl::reflection::IDescriptable.base", %"class.vl::Interface", %"class.vl::reflection::DescriptableObject" }>
%"class.vl::Object" = type { ptr }
%"class.vl::reflection::description::IMethodInfo.base" = type { %"class.vl::reflection::Description.base.795" }
%"class.vl::reflection::Description.base.795" = type { ptr }
%"class.vl::collections::List.876" = type { %"class.vl::collections::ListBase.base.882", %"class.vl::collections::IEnumerable.880" }
%"class.vl::collections::ListBase.base.882" = type <{ %"class.vl::collections::ArrayBase.base.881", i64, i8 }>
%"class.vl::collections::ArrayBase.base.881" = type { %"class.vl::collections::ListStore.879", ptr, i64 }
%"class.vl::collections::ListStore.879" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.880" = type { %"class.vl::Interface" }
%"class.vl::Ptr.872" = type { ptr, ptr, ptr, ptr }
%"class.vl::reflection::description::IMemberInfo.base" = type { %"class.vl::reflection::Description.base.785" }
%"class.vl::reflection::Description.base.785" = type { 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 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_10reflection11description14IParameterInfoEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl10reflection11description14MethodInfoImpl12AddParameterENS_3PtrINS1_14IParameterInfoEEE(ptr noundef nonnull align 8 dereferenceable(113) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %9

9:                                                ; preds = %40, %2
  %10 = load i64, ptr %6, align 8, !tbaa !9
  %11 = getelementptr inbounds %"class.vl::reflection::description::MethodInfoImpl", ptr %8, i32 0, i32 4
  %12 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_10reflection11description14IParameterInfoEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %13 = icmp slt i64 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  store i32 2, ptr %7, align 4
  br label %43

15:                                               ; preds = %9
  %16 = getelementptr inbounds %"class.vl::reflection::description::MethodInfoImpl", ptr %8, i32 0, i32 4
  %17 = load i64, ptr %6, align 8, !tbaa !9
  %18 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_3PtrINS_10reflection11description14IParameterInfoEEEPS5_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %16, i64 noundef %17)
  %19 = call noundef ptr @_ZNK2vl3PtrINS_10reflection11description14IParameterInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr i8, ptr %20, i64 -32
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %19, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds ptr, ptr %24, i64 3
  %26 = load ptr, ptr %25, align 8
  %27 = call noundef nonnull align 8 dereferenceable(48) ptr %26(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %28 = call noundef ptr @_ZNK2vl3PtrINS_10reflection11description14IParameterInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr i8, ptr %29, i64 -32
  %31 = load i64, ptr %30, align 8
  %32 = getelementptr inbounds i8, ptr %28, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds ptr, ptr %33, i64 3
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef nonnull align 8 dereferenceable(48) ptr %35(ptr noundef nonnull align 8 dereferenceable(8) %32)
  %37 = call noundef zeroext i1 @_ZNK2vl12ObjectStringIwEeqERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 8 dereferenceable(48) %36)
  br i1 %37, label %38, label %39

38:                                               ; preds = %15
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %43

39:                                               ; preds = %15
  br label %40

40:                                               ; preds = %39
  %41 = load i64, ptr %6, align 8, !tbaa !9
  %42 = add nsw i64 %41, 1
  store i64 %42, ptr %6, align 8, !tbaa !9
  br label %9, !llvm.loop !13

43:                                               ; preds = %38, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %44 = load i32, ptr %7, align 4
  switch i32 %44, label %50 [
    i32 2, label %45
    i32 1, label %48
  ]

45:                                               ; preds = %43
  %46 = getelementptr inbounds %"class.vl::reflection::description::MethodInfoImpl", ptr %8, i32 0, i32 4
  %47 = call noundef i64 @_ZN2vl11collections4ListINS_3PtrINS_10reflection11description14IParameterInfoEEEPS5_E3AddERKS6_(ptr noundef nonnull align 8 dereferenceable(33) %46, ptr noundef nonnull align 8 dereferenceable(32) %1)
  store i1 true, ptr %3, align 1
  br label %48

48:                                               ; preds = %45, %43
  %49 = load i1, ptr %3, align 1
  ret i1 %49

50:                                               ; preds = %43
  unreachable
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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"

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_10reflection11description14IParameterInfoEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl10reflection11description14MethodInfoImpl12AddParameterENS_3PtrINS1_14IParameterInfoEEE(ptr noundef nonnull align 8 dereferenceable(113) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = tail call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_10reflection11description14IParameterInfoEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %5 = icmp slt i64 %4, 1
  br i1 %5, label %._crit_edge, label %.lr.ph

6:                                                ; preds = %.lr.ph
  %7 = add nuw nsw i64 %.0513, 1
  %8 = tail call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_10reflection11description14IParameterInfoEEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %.not = icmp slt i64 %7, %8
  br i1 %.not, label %.lr.ph, label %._crit_edge, !llvm.loop !5

.lr.ph:                                           ; preds = %2, %6
  %.0513 = phi i64 [ %7, %6 ], [ 0, %2 ]
  %9 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_3PtrINS_10reflection11description14IParameterInfoEEEPS5_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %3, i64 noundef %.0513)
  %10 = tail call noundef ptr @_ZNK2vl3PtrINS_10reflection11description14IParameterInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %11 = load ptr, ptr %10, align 8, !tbaa !7
  %12 = getelementptr i8, ptr %11, i64 -32
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %10, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !7
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load ptr, ptr %16, align 8
  %18 = tail call noundef nonnull align 8 dereferenceable(48) ptr %17(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %19 = tail call noundef ptr @_ZNK2vl3PtrINS_10reflection11description14IParameterInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %20 = load ptr, ptr %19, align 8, !tbaa !7
  %21 = getelementptr i8, ptr %20, i64 -32
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %19, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !7
  %25 = getelementptr inbounds i8, ptr %24, i64 24
  %26 = load ptr, ptr %25, align 8
  %27 = tail call noundef nonnull align 8 dereferenceable(48) ptr %26(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %28 = tail call noundef zeroext i1 @_ZNK2vl12ObjectStringIwEeqERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(48) %27)
  br i1 %28, label %.loopexit, label %6

._crit_edge:                                      ; preds = %6, %2
  %29 = tail call noundef i64 @_ZN2vl11collections4ListINS_3PtrINS_10reflection11description14IParameterInfoEEEPS5_E3AddERKS6_(ptr noundef nonnull align 8 dereferenceable(33) %3, ptr noundef nonnull align 8 dereferenceable(32) %1)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %._crit_edge
  %30 = phi i1 [ true, %._crit_edge ], [ false, %.lr.ph ]
  ret i1 %30
}

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

attributes #0 = { 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 #1 = { 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"vtable pointer", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass