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

; 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 ptr @_ZN2vl7parsing9analyzing9Automaton9CopyStateEPNS1_5StateE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl7parsing9analyzing14GetMappedStateENS_3PtrINS1_9AutomatonEEEPNS1_5StateERNS_11collections4ListIS6_S6_EERNS7_10DictionaryIS6_S6_S6_S6_EE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(104) %3) #1 {
  %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 i64, align 8
  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
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %11 = load ptr, ptr %8, align 8, !tbaa !5
  %12 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E4KeysEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
  %13 = call noundef i64 @_ZNK2vl11collections10SortedListIPNS_7parsing9analyzing5StateES5_E7IndexOfERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %12, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i64 %13, ptr %10, align 8, !tbaa !9
  %14 = load i64, ptr %10, align 8, !tbaa !9
  %15 = icmp eq i64 %14, -1
  br i1 %15, label %16, label %22

16:                                               ; preds = %4
  %17 = call noundef ptr @_ZNK2vl3PtrINS_7parsing9analyzing9AutomatonEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = call noundef ptr @_ZN2vl7parsing9analyzing9Automaton9CopyStateEPNS1_5StateE(ptr noundef nonnull align 8 dereferenceable(224) %17, ptr noundef %18)
  store ptr %19, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZN2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E3AddERKS5_S8_(ptr noundef nonnull align 8 dereferenceable(104) %20, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %9)
  br label %28

22:                                               ; preds = %4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %23)
  %25 = load i64, ptr %10, align 8, !tbaa !9
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseIPNS_7parsing9analyzing5StateEE3GetEl(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %25)
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %27, ptr %9, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %22, %16
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZNK2vl11collections4ListIPNS_7parsing9analyzing5StateES5_E8ContainsERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %29, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %30, label %34, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call noundef i64 @_ZN2vl11collections4ListIPNS_7parsing9analyzing5StateES5_E3AddERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %32, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br label %34

34:                                               ; preds = %31, %28
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret ptr %35
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN2vl11collections4ListIPNS_7parsing9analyzing5StateES5_E3AddERKS5_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(8)) #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}


; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress 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 ptr @_ZN2vl7parsing9analyzing9Automaton9CopyStateEPNS1_5StateE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2vl7parsing9analyzing14GetMappedStateENS_3PtrINS1_9AutomatonEEEPNS1_5StateERNS_11collections4ListIS6_S6_EERNS7_10DictionaryIS6_S6_S6_S6_EE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(104) %3) local_unnamed_addr #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %7 = tail call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E4KeysEv(ptr noundef nonnull align 8 dereferenceable(104) %3)
  %8 = call noundef i64 @_ZNK2vl11collections10SortedListIPNS_7parsing9analyzing5StateES5_E7IndexOfERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %9 = icmp eq i64 %8, -1
  br i1 %9, label %10, label %15

10:                                               ; preds = %4
  %11 = call noundef ptr @_ZNK2vl3PtrINS_7parsing9analyzing9AutomatonEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call noundef ptr @_ZN2vl7parsing9analyzing9Automaton9CopyStateEPNS1_5StateE(ptr noundef nonnull align 8 dereferenceable(224) %11, ptr noundef %12)
  store ptr %13, ptr %6, align 8, !tbaa !5
  %14 = call noundef zeroext i1 @_ZN2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E3AddERKS5_S8_(ptr noundef nonnull align 8 dereferenceable(104) %3, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br label %19

15:                                               ; preds = %4
  %16 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %3)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseIPNS_7parsing9analyzing5StateEE3GetEl(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %8)
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %18, ptr %6, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %15, %10
  %20 = call noundef zeroext i1 @_ZNK2vl11collections4ListIPNS_7parsing9analyzing5StateES5_E8ContainsERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %20, label %23, label %21

21:                                               ; preds = %19
  %22 = call noundef i64 @_ZN2vl11collections4ListIPNS_7parsing9analyzing5StateES5_E3AddERKS5_(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br label %23

23:                                               ; preds = %21, %19
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  ret ptr %24
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E4KeysEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryIPNS_7parsing9analyzing5StateES5_S5_S5_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

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

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

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

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


; Effective O3 passes: DSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass