; LLVM IR from dynexcoin/Dynex :: src/DynexCNCore/BlockchainIndices.ll (ZN7DynexCN17OrphanBlocksIndex6removeERKNS_5BlockE)

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

%"struct.Crypto::Hash" = type { [32 x i8] }
%"struct.std::pair.104" = type { %"struct.std::__detail::_Node_iterator.102", %"struct.std::__detail::_Node_iterator.102" }
%"struct.std::__detail::_Node_iterator.102" = type { %"struct.std::__detail::_Node_iterator_base.103" }
%"struct.std::__detail::_Node_iterator_base.103" = type { ptr }
%"class.DynexCN::OrphanBlocksIndex" = type <{ %"class.std::unordered_multimap.88", i8, [7 x i8] }>
%"class.std::unordered_multimap.88" = type { %"class.std::_Hashtable.89" }
%"class.std::_Hashtable.89" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.DynexCN::Block" = type { %"struct.DynexCN::BlockHeader", %"struct.DynexCN::ParentBlock", %"struct.DynexCN::Transaction", %"class.std::vector.35" }
%"struct.DynexCN::BlockHeader" = type { i8, i8, i32, i64, %"struct.Crypto::Hash" }
%"struct.DynexCN::ParentBlock" = type { i8, i8, %"struct.Crypto::Hash", i16, %"class.std::vector.35", %"struct.DynexCN::Transaction", %"class.std::vector.35" }
%"struct.DynexCN::Transaction" = type { %"struct.DynexCN::TransactionPrefix", %"class.std::vector.22" }
%"struct.DynexCN::TransactionPrefix" = type { i8, i64, %"class.std::vector.7", %"class.std::vector.12", %"class.std::vector.17" }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = 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 }
%"struct.DynexCN::BaseInput" = type { i32 }
%"struct.std::pair.106" = type { i32, %"struct.Crypto::Hash" }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5boost3getIN7DynexCN9BaseInputES2_JNS1_8KeyInputENS1_19MultisignatureInputEEEENS_13add_referenceIKT_E4typeERKNS_7variantIT0_JDpT1_EEE(ptr noundef nonnull align 8 dereferenceable(72)) #3

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

declare void @_ZN7DynexCN14get_block_hashERKNS_5BlockE(ptr dead_on_unwind writable sret(%"struct.Crypto::Hash") align 1, ptr noundef nonnull align 8 dereferenceable(384)) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7DynexCN17OrphanBlocksIndex6removeERKNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(384) %1) #6 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.Crypto::Hash", align 1
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.104", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator.102", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::__detail::_Node_iterator.102", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator.102", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  %14 = getelementptr inbounds %"class.DynexCN::OrphanBlocksIndex", ptr %13, i32 0, i32 1
  %15 = load i8, ptr %14, align 8, !tbaa !9, !range !18, !noundef !19
  %16 = trunc i8 %15 to i1
  br i1 %16, label %18, label %17

17:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %57

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN7DynexCN14get_block_hashERKNS_5BlockE(ptr dead_on_unwind writable sret(%"struct.Crypto::Hash") align 1 %6, ptr noundef nonnull align 8 dereferenceable(384) %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.DynexCN::Block", ptr %20, i32 0, i32 2
  %22 = getelementptr inbounds %"struct.DynexCN::TransactionPrefix", ptr %21, i32 0, i32 2
  %23 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5boost3getIN7DynexCN9BaseInputES2_JNS1_8KeyInputENS1_19MultisignatureInputEEEENS_13add_referenceIKT_E4typeERKNS_7variantIT0_JDpT1_EEE(ptr noundef nonnull align 8 dereferenceable(72) %23)
  %25 = getelementptr inbounds %"struct.DynexCN::BaseInput", ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 4, !tbaa !20
  store i32 %26, ptr %7, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %27 = getelementptr inbounds %"class.DynexCN::OrphanBlocksIndex", ptr %13, i32 0, i32 0
  %28 = call { ptr, ptr } @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %29 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %30 = extractvalue { ptr, ptr } %28, 0
  store ptr %30, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %32 = extractvalue { ptr, ptr } %28, 1
  store ptr %32, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %33 = getelementptr inbounds %"struct.std::pair.104", ptr %8, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %33, i64 8, i1 false)
  br label %34

34:                                               ; preds = %51, %18
  %35 = getelementptr inbounds %"struct.std::pair.104", ptr %8, i32 0, i32 1
  %36 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKjN6Crypto4HashEELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  store i32 2, ptr %10, align 4
  br label %53

38:                                               ; preds = %34
  %39 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKjN6Crypto4HashEELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %40 = getelementptr inbounds %"struct.std::pair.106", ptr %39, i32 0, i32 1
  %41 = call noundef zeroext i1 @_ZN6CryptoeqERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %40, ptr noundef nonnull align 1 dereferenceable(32) %6)
  br i1 %41, label %42, label %50

42:                                               ; preds = %38
  %43 = getelementptr inbounds %"class.DynexCN::OrphanBlocksIndex", ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %9, i64 8, i1 false)
  %44 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.102", ptr %11, i32 0, i32 0
  %45 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.103", ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = call ptr @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE5eraseENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr %46)
  %48 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.102", ptr %12, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.103", ptr %48, i32 0, i32 0
  store ptr %47, ptr %49, align 8
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %53

50:                                               ; preds = %38
  br label %51

51:                                               ; preds = %50
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKjN6Crypto4HashEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %34, !llvm.loop !24

53:                                               ; preds = %42, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %54 = load i32, ptr %10, align 4
  switch i32 %54, label %56 [
    i32 2, label %55
  ]

55:                                               ; preds = %53
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %56

56:                                               ; preds = %55, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  br label %57

57:                                               ; preds = %56, %17
  %58 = load i1, ptr %3, align 1
  ret i1 %58
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKjN6Crypto4HashEELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 = { "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 #6 = { 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 #7 = { 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, !17, i64 56}
!10 = !{!"_ZTSN7DynexCN17OrphanBlocksIndexE", !11, i64 0, !17, i64 56}
!11 = !{!"_ZTSSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE", !12, i64 0}
!12 = !{!"_ZTSSt10_HashtableIjSt4pairIKjN6Crypto4HashEESaIS4_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb0EEEE", !6, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !6, i64 48}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTSN7DynexCN9BaseInputE", !22, i64 0}
!22 = !{!"int", !7, i64 0}
!23 = !{!22, !22, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"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"

%"struct.Crypto::Hash" = type { [32 x i8] }
%"struct.std::pair.104" = type { %"struct.std::__detail::_Node_iterator.102", %"struct.std::__detail::_Node_iterator.102" }
%"struct.std::__detail::_Node_iterator.102" = type { %"struct.std::__detail::_Node_iterator_base.103" }
%"struct.std::__detail::_Node_iterator_base.103" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoeqERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5boost3getIN7DynexCN9BaseInputES2_JNS1_8KeyInputENS1_19MultisignatureInputEEEENS_13add_referenceIKT_E4typeERKNS_7variantIT0_JDpT1_EEE(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

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

declare void @_ZN7DynexCN14get_block_hashERKNS_5BlockE(ptr dead_on_unwind writable sret(%"struct.Crypto::Hash") align 1, ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7DynexCN17OrphanBlocksIndex6removeERKNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(384) %1) local_unnamed_addr #5 align 2 {
  %3 = alloca %"struct.Crypto::Hash", align 1
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.104", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator.102", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !17, !noundef !18
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %30

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZN7DynexCN14get_block_hashERKNS_5BlockE(ptr dead_on_unwind nonnull writable sret(%"struct.Crypto::Hash") align 1 %3, ptr noundef nonnull align 8 dereferenceable(384) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %11 = getelementptr inbounds i8, ptr %1, i64 264
  %12 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5boost3getIN7DynexCN9BaseInputES2_JNS1_8KeyInputENS1_19MultisignatureInputEEEENS_13add_referenceIKT_E4typeERKNS_7variantIT0_JDpT1_EEE(ptr noundef nonnull align 8 dereferenceable(72) %12)
  %14 = load i32, ptr %13, align 4, !tbaa !19
  store i32 %14, ptr %4, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %15 = call { ptr, ptr } @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %16 = extractvalue { ptr, ptr } %15, 0
  store ptr %16, ptr %5, align 8
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = extractvalue { ptr, ptr } %15, 1
  store ptr %18, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %.cast = ptrtoint ptr %16 to i64
  store i64 %.cast, ptr %6, align 8
  %19 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKjN6Crypto4HashEELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %19, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %10, %25
  %20 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKjN6Crypto4HashEELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  %22 = call noundef zeroext i1 @_ZN6CryptoeqERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %21, ptr noundef nonnull align 1 dereferenceable(32) %3)
  br i1 %22, label %23, label %25

23:                                               ; preds = %.lr.ph
  %.sroa.01.0.copyload = load ptr, ptr %6, align 8
  %24 = call ptr @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE5eraseENSt8__detail14_Node_iteratorIS8_Lb0ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr %.sroa.01.0.copyload)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %28

25:                                               ; preds = %.lr.ph
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKjN6Crypto4HashEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %27 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKjN6Crypto4HashEELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %27, label %.lr.ph, label %.critedge, !llvm.loop !23

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

28:                                               ; preds = %23, %.critedge
  %29 = phi i1 [ true, %23 ], [ false, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %30

30:                                               ; preds = %2, %28
  %.2 = phi i1 [ %29, %28 ], [ false, %2 ]
  ret i1 %.2
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE11equal_rangeERS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 = { "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 = { 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 #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, !16, i64 56}
!6 = !{!"_ZTSN7DynexCN17OrphanBlocksIndexE", !7, i64 0, !16, i64 56}
!7 = !{!"_ZTSSt18unordered_multimapIjN6Crypto4HashESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE", !8, i64 0}
!8 = !{!"_ZTSSt10_HashtableIjSt4pairIKjN6Crypto4HashEESaIS4_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb0EEEE", !9, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !9, i64 48}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !9, i64 0}
!14 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !12, i64 8}
!15 = !{!"float", !10, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !21, i64 0}
!20 = !{!"_ZTSN7DynexCN9BaseInputE", !21, i64 0}
!21 = !{!"int", !10, i64 0}
!22 = !{!21, !21, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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