; LLVM IR from dynexcoin/Dynex :: src/DynexCNCore/BlockIndex.ll (ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.DynexCN::BlockIndex" = type { %"class.boost::multi_index::multi_index_container", ptr }
%"class.boost::multi_index::multi_index_container" = type { [8 x i8], %"struct.boost::multi_index::detail::header_holder", %"class.boost::multi_index::detail::random_access_index", i64 }
%"struct.boost::multi_index::detail::header_holder" = type { ptr }
%"class.boost::multi_index::detail::random_access_index" = type { %"class.boost::multi_index::detail::hashed_index", %"class.boost::multi_index::detail::random_access_index_ptr_array" }
%"class.boost::multi_index::detail::hashed_index" = type { [8 x i8], %"class.boost::multi_index::detail::bucket_array", float, i64 }
%"class.boost::multi_index::detail::bucket_array" = type { i64, %"struct.boost::multi_index::detail::auto_space" }
%"struct.boost::multi_index::detail::auto_space" = type { [8 x i8], i64, ptr }
%"class.boost::multi_index::detail::random_access_index_ptr_array" = type { i64, i64, %"struct.boost::multi_index::detail::auto_space.4" }
%"struct.boost::multi_index::detail::auto_space.4" = type { [8 x i8], i64, ptr }

@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE = external hidden unnamed_addr constant [92 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7DynexCN10BlockIndex14getBlockHeightERKN6Crypto4HashERj(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef nonnull align 1 dereferenceable(32) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8
  %14 = getelementptr inbounds %"class.DynexCN::BlockIndex", ptr %13, i32 0, i32 1
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNK5boost11multi_index6detail12hashed_indexINS0_8identityIN6Crypto4HashEEENS_4hashIS5_EESt8equal_toIS5_ENS1_9nth_layerILi2ES5_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EEEENS0_13hashed_uniqueIS6_SG_SG_SG_EESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EESaIS5_EEENS_3mpl7vector0ISG_EENS1_17hashed_unique_tagEE5countIS5_EEmRKT_(ptr noundef nonnull align 8 dereferenceable(56) %15, ptr noundef nonnull align 1 dereferenceable(32) %16)
  %18 = icmp ugt i64 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  br label %22

20:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__._ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE) #5
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !28
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call noundef zeroext i1 @_ZNK7DynexCN10BlockIndex14getBlockHeightERKN6Crypto4HashERj(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 1 dereferenceable(32) %23, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i1 false, ptr %8, align 1
  call void @_ZNSt6vectorIN6Crypto4HashESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %25 = load i32, ptr %7, align 4, !tbaa !28
  %26 = add i32 %25, 1
  %27 = zext i32 %26 to i64
  store i64 %27, ptr %9, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 1, ptr %10, align 8, !tbaa !30
  br label %28

28:                                               ; preds = %43, %22
  %29 = load i64, ptr %10, align 8, !tbaa !30
  %30 = load i64, ptr %9, align 8, !tbaa !30
  %31 = icmp ule i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %50

33:                                               ; preds = %28
  %34 = getelementptr inbounds %"class.DynexCN::BlockIndex", ptr %13, i32 0, i32 0
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load i64, ptr %9, align 8, !tbaa !30
  %37 = load i64, ptr %10, align 8, !tbaa !30
  %38 = sub i64 %36, %37
  %39 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %35, i64 noundef %38)
          to label %40 unwind label %46

40:                                               ; preds = %33
  %41 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE12emplace_backIJRKS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(32) %39)
          to label %42 unwind label %46

42:                                               ; preds = %40
  br label %43

43:                                               ; preds = %42
  %44 = load i64, ptr %10, align 8, !tbaa !30
  %45 = mul i64 %44, 2
  store i64 %45, ptr %10, align 8, !tbaa !30
  br label %28, !llvm.loop !31

46:                                               ; preds = %40, %33
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %11, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %71

50:                                               ; preds = %32
  %51 = call noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %52 = getelementptr inbounds %"class.DynexCN::BlockIndex", ptr %13, i32 0, i32 0
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %53, i64 noundef 0)
          to label %55 unwind label %65

55:                                               ; preds = %50
  %56 = invoke noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %51, ptr noundef nonnull align 1 dereferenceable(32) %54)
          to label %57 unwind label %65

57:                                               ; preds = %55
  br i1 %56, label %58, label %69

58:                                               ; preds = %57
  %59 = getelementptr inbounds %"class.DynexCN::BlockIndex", ptr %13, i32 0, i32 0
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %61 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %60, i64 noundef 0)
          to label %62 unwind label %65

62:                                               ; preds = %58
  %63 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE12emplace_backIJRKS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(32) %61)
          to label %64 unwind label %65

64:                                               ; preds = %62
  br label %69

65:                                               ; preds = %62, %58, %55, %50
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  br label %71

69:                                               ; preds = %64, %57
  store i1 true, ptr %8, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %70 = load i1, ptr %8, align 1
  br i1 %70, label %73, label %72

71:                                               ; preds = %65, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorIN6Crypto4HashESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %74

72:                                               ; preds = %69
  call void @_ZNSt6vectorIN6Crypto4HashESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %73

73:                                               ; preds = %72, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

74:                                               ; preds = %71
  %75 = load ptr, ptr %11, align 8
  %76 = load i32, ptr %12, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 = { inlinehint 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 = { noreturn nounwind }
attributes #6 = { 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, !6, i64 120}
!10 = !{!"_ZTSN7DynexCN10BlockIndexE", !11, i64 0, !6, i64 120}
!11 = !{!"_ZTSN5boost11multi_index21multi_index_containerIN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EEEENS0_13hashed_uniqueINS0_8identityIS3_EES8_S8_S8_EES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EESaIS3_EEE", !12, i64 0, !14, i64 8, !15, i64 16, !21, i64 112}
!12 = !{!"_ZTSN5boost16base_from_memberISaINS_11multi_index6detail24random_access_index_nodeINS2_17hashed_index_nodeINS2_15index_node_baseIN6Crypto4HashESaIS7_EEEEEEEELi0EEE", !13, i64 0}
!13 = !{!"_ZTSSaIN5boost11multi_index6detail24random_access_index_nodeINS1_17hashed_index_nodeINS1_15index_node_baseIN6Crypto4HashESaIS6_EEEEEEEE"}
!14 = !{!"_ZTSN5boost11multi_index6detail13header_holderIPNS1_24random_access_index_nodeINS1_17hashed_index_nodeINS1_15index_node_baseIN6Crypto4HashESaIS7_EEEEEEENS0_21multi_index_containerIS7_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_EEEENS0_13hashed_uniqueINS0_8identityIS7_EESI_SI_SI_EESI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_EES8_EEEE", !6, i64 0}
!15 = !{!"_ZTSN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEE", !16, i64 0, !25, i64 56}
!16 = !{!"_ZTSN5boost11multi_index6detail12hashed_indexINS0_8identityIN6Crypto4HashEEENS_4hashIS5_EESt8equal_toIS5_ENS1_9nth_layerILi2ES5_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EEEENS0_13hashed_uniqueIS6_SG_SG_SG_EESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EESaIS5_EEENS_3mpl7vector0ISG_EENS1_17hashed_unique_tagEEE", !17, i64 0, !18, i64 1, !19, i64 2, !20, i64 8, !24, i64 40, !21, i64 48}
!17 = !{!"_ZTSN5boost11multi_index8identityIN6Crypto4HashEEE"}
!18 = !{!"_ZTSN5boost4hashIN6Crypto4HashEEE"}
!19 = !{!"_ZTSSt8equal_toIN6Crypto4HashEE"}
!20 = !{!"_ZTSN5boost11multi_index6detail12bucket_arrayISaIN6Crypto4HashEEEE", !21, i64 0, !22, i64 8}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN5boost11multi_index6detail10auto_spaceINS1_27hashed_index_base_node_implISaIcEEESaIN6Crypto4HashEEEE", !23, i64 0, !21, i64 8, !6, i64 16}
!23 = !{!"_ZTSSaIN5boost11multi_index6detail27hashed_index_base_node_implISaIcEEEE"}
!24 = !{!"float", !7, i64 0}
!25 = !{!"_ZTSN5boost11multi_index6detail29random_access_index_ptr_arrayISaIN6Crypto4HashEEEE", !21, i64 0, !21, i64 8, !26, i64 16}
!26 = !{!"_ZTSN5boost11multi_index6detail10auto_spaceIPNS1_29random_access_index_node_implISaIcEEESaIN6Crypto4HashEEEE", !27, i64 0, !21, i64 8, !6, i64 16}
!27 = !{!"_ZTSSaIPN5boost11multi_index6detail29random_access_index_node_implISaIcEEEE"}
!28 = !{!29, !29, i64 0}
!29 = !{!"int", !7, i64 0}
!30 = !{!21, !21, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE = external hidden unnamed_addr constant [92 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef nonnull align 1 dereferenceable(32) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %1, i64 120
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef i64 @_ZNK5boost11multi_index6detail12hashed_indexINS0_8identityIN6Crypto4HashEEENS_4hashIS5_EESt8equal_toIS5_ENS1_9nth_layerILi2ES5_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EEEENS0_13hashed_uniqueIS6_SG_SG_SG_EESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EESaIS5_EEENS_3mpl7vector0ISG_EENS1_17hashed_unique_tagEE5countIS5_EEmRKT_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 1 dereferenceable(32) %2)
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %8, label %9

8:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7DynexCN10BlockIndex16buildSparseChainERKN6Crypto4HashE) #5
  unreachable

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr %4, align 4, !tbaa !27
  %10 = call noundef zeroext i1 @_ZNK7DynexCN10BlockIndex14getBlockHeightERKN6Crypto4HashERj(ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef nonnull align 1 dereferenceable(32) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt6vectorIN6Crypto4HashESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %11 = load i32, ptr %4, align 4, !tbaa !27
  %12 = add i32 %11, 1
  %13 = zext i32 %12 to i64
  %.not1315 = icmp eq i32 %12, 0
  br i1 %.not1315, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  br label %18

._crit_edge:                                      ; preds = %23, %9
  %15 = call noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %16, i64 noundef 0)
          to label %27 unwind label %33

18:                                               ; preds = %.lr.ph, %23
  %.01116 = phi i64 [ 1, %.lr.ph ], [ %24, %23 ]
  %19 = sub nsw i64 %13, %.01116
  %20 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %14, i64 noundef %19)
          to label %21 unwind label %25

21:                                               ; preds = %18
  %22 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE12emplace_backIJRKS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(32) %20)
          to label %23 unwind label %25

23:                                               ; preds = %21
  %24 = shl nuw nsw i64 %.01116, 1
  %.not13 = icmp ugt i64 %24, %13
  br i1 %.not13, label %._crit_edge, label %18, !llvm.loop !29

25:                                               ; preds = %21, %18
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %35

27:                                               ; preds = %._crit_edge
  %28 = call noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %15, ptr noundef nonnull align 1 dereferenceable(32) %17)
  br i1 %28, label %29, label %36

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNK5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEixEm(ptr noundef nonnull align 8 dereferenceable(96) %16, i64 noundef 0)
          to label %31 unwind label %33

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto4HashESaIS1_EE12emplace_backIJRKS1_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(32) %30)
          to label %36 unwind label %33

33:                                               ; preds = %31, %29, %._crit_edge
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %35

35:                                               ; preds = %33, %25
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %34, %33 ]
  call void @_ZNSt6vectorIN6Crypto4HashESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn

36:                                               ; preds = %27, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 = { inlinehint 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 = { noreturn nounwind }
attributes #6 = { 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, !11, i64 120}
!6 = !{!"_ZTSN7DynexCN10BlockIndexE", !7, i64 0, !11, i64 120}
!7 = !{!"_ZTSN5boost11multi_index21multi_index_containerIN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EEEENS0_13hashed_uniqueINS0_8identityIS3_EES8_S8_S8_EES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EESaIS3_EEE", !8, i64 0, !10, i64 8, !14, i64 16, !20, i64 112}
!8 = !{!"_ZTSN5boost16base_from_memberISaINS_11multi_index6detail24random_access_index_nodeINS2_17hashed_index_nodeINS2_15index_node_baseIN6Crypto4HashESaIS7_EEEEEEEELi0EEE", !9, i64 0}
!9 = !{!"_ZTSSaIN5boost11multi_index6detail24random_access_index_nodeINS1_17hashed_index_nodeINS1_15index_node_baseIN6Crypto4HashESaIS6_EEEEEEEE"}
!10 = !{!"_ZTSN5boost11multi_index6detail13header_holderIPNS1_24random_access_index_nodeINS1_17hashed_index_nodeINS1_15index_node_baseIN6Crypto4HashESaIS7_EEEEEEENS0_21multi_index_containerIS7_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_EEEENS0_13hashed_uniqueINS0_8identityIS7_EESI_SI_SI_EESI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_SI_EES8_EEEE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN6Crypto4HashENS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EEEENS0_13hashed_uniqueINS0_8identityIS5_EESA_SA_SA_EESA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_SA_EESaIS5_EEENS_3mpl7vector0ISA_EEEE", !15, i64 0, !24, i64 56}
!15 = !{!"_ZTSN5boost11multi_index6detail12hashed_indexINS0_8identityIN6Crypto4HashEEENS_4hashIS5_EESt8equal_toIS5_ENS1_9nth_layerILi2ES5_NS0_10indexed_byINS0_13random_accessINS0_3tagIN4mpl_2naESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EEEENS0_13hashed_uniqueIS6_SG_SG_SG_EESG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_SG_EESaIS5_EEENS_3mpl7vector0ISG_EENS1_17hashed_unique_tagEEE", !16, i64 0, !17, i64 1, !18, i64 2, !19, i64 8, !23, i64 40, !20, i64 48}
!16 = !{!"_ZTSN5boost11multi_index8identityIN6Crypto4HashEEE"}
!17 = !{!"_ZTSN5boost4hashIN6Crypto4HashEEE"}
!18 = !{!"_ZTSSt8equal_toIN6Crypto4HashEE"}
!19 = !{!"_ZTSN5boost11multi_index6detail12bucket_arrayISaIN6Crypto4HashEEEE", !20, i64 0, !21, i64 8}
!20 = !{!"long", !12, i64 0}
!21 = !{!"_ZTSN5boost11multi_index6detail10auto_spaceINS1_27hashed_index_base_node_implISaIcEEESaIN6Crypto4HashEEEE", !22, i64 0, !20, i64 8, !11, i64 16}
!22 = !{!"_ZTSSaIN5boost11multi_index6detail27hashed_index_base_node_implISaIcEEEE"}
!23 = !{!"float", !12, i64 0}
!24 = !{!"_ZTSN5boost11multi_index6detail29random_access_index_ptr_arrayISaIN6Crypto4HashEEEE", !20, i64 0, !20, i64 8, !25, i64 16}
!25 = !{!"_ZTSN5boost11multi_index6detail10auto_spaceIPNS1_29random_access_index_node_implISaIcEEESaIN6Crypto4HashEEEE", !26, i64 0, !20, i64 8, !11, i64 16}
!26 = !{!"_ZTSSaIPN5boost11multi_index6detail29random_access_index_node_implISaIcEEEE"}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !12, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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