; LLVM IR from dynexcoin/Dynex :: src/DynexCNCore (Transaction)

; 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.DynexCN::MultisignatureOutput" = type <{ %"class.std::vector.42", i8, [7 x i8] }>
%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl" }
%"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl" = type { %"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::TransactionOutput" = type { i64, %"class.boost::variant.39" }
%"class.boost::variant.39" = type { i32, [4 x i8], %"class.boost::aligned_storage.40" }
%"class.boost::aligned_storage.40" = type { %"struct.boost::detail::aligned_storage::aligned_storage_imp.41" }
%"struct.boost::detail::aligned_storage::aligned_storage_imp.41" = type { %"union.boost::detail::aligned_storage::aligned_storage_imp<32, 8>::data_t" }
%"union.boost::detail::aligned_storage::aligned_storage_imp<32, 8>::data_t" = type { [32 x i8] }
%"class.DynexCN::TransactionImpl" = type { %"class.DynexCN::ITransaction", %"struct.DynexCN::Transaction", %"class.boost::optional", %"class.boost::optional.21", %"class.DynexCN::TransactionExtra" }
%"class.DynexCN::ITransaction" = type { %"class.DynexCN::ITransactionReader", %"class.DynexCN::ITransactionWriter" }
%"class.DynexCN::ITransactionReader" = type { ptr }
%"class.DynexCN::ITransactionWriter" = type { ptr }
%"struct.DynexCN::Transaction" = type { %"struct.DynexCN::TransactionPrefix", %"class.std::vector.16" }
%"struct.DynexCN::TransactionPrefix" = type { i8, i64, %"class.std::vector", %"class.std::vector.6", %"class.std::vector.11" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = 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.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = 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.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = 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.boost::optional" = type { %"class.boost::optional_detail::optional_base" }
%"class.boost::optional_detail::optional_base" = type { i8, %"class.boost::optional_detail::aligned_storage" }
%"class.boost::optional_detail::aligned_storage" = type { %"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" = type { [32 x i8] }
%"class.boost::optional.21" = type { %"class.boost::optional_detail::optional_base.22" }
%"class.boost::optional_detail::optional_base.22" = type { i8, %"class.boost::optional_detail::aligned_storage.23" }
%"class.boost::optional_detail::aligned_storage.23" = type { %"union.boost::optional_detail::aligned_storage<Crypto::Hash>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::Hash>::dummy_u" = type { [32 x i8] }
%"class.DynexCN::TransactionExtra" = type { %"class.std::vector.24" }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>, std::allocator<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>, std::allocator<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>, std::allocator<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>, std::allocator<boost::variant<DynexCN::TransactionExtraPadding, DynexCN::TransactionExtraPublicKey, DynexCN::TransactionExtraNonce, DynexCN::TransactionExtraMergeTag, DynexCN::TransactionExtraFromAddress, DynexCN::TransactionExtraToAddress, DynexCN::TransactionExtraAmount, DynexCN::TransactionExtraTxkey>>>::_Vector_impl_data" = type { 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN15TransactionImpl14invalidateHashEv(ptr noundef nonnull align 8 dereferenceable(224)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7DynexCN15TransactionImpl14checkIfSigningEv(ptr noundef nonnull align 8 dereferenceable(224)) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_115derivePublicKeyERKN7DynexCN20AccountPublicAddressERKN6Crypto9SecretKeyEmRNS4_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(64), ptr noundef nonnull align 1 dereferenceable(32), i64 noundef, ptr noundef nonnull align 1 dereferenceable(32)) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN7DynexCN15TransactionImpl9addOutputEmRKSt6vectorINS_20AccountPublicAddressESaIS2_EEj(ptr noundef nonnull align 8 dereferenceable(224) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.DynexCN::MultisignatureOutput", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"struct.DynexCN::TransactionOutput", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !11
  %16 = load ptr, ptr %5, align 8
  call void @_ZNK7DynexCN15TransactionImpl14checkIfSigningEv(ptr noundef nonnull align 8 dereferenceable(224) %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %17 = call noundef nonnull align 1 dereferenceable(32) ptr @_ZNK7DynexCN15TransactionImpl11txSecretKeyEv(ptr noundef nonnull align 8 dereferenceable(224) %16)
  store ptr %17, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %18 = getelementptr inbounds %"class.DynexCN::TransactionImpl", ptr %16, i32 0, i32 1
  %19 = getelementptr inbounds %"struct.DynexCN::TransactionPrefix", ptr %18, i32 0, i32 3
  %20 = call noundef i64 @_ZNKSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  store i64 %20, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @_ZN7DynexCN20MultisignatureOutputC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #4
  %21 = load i32, ptr %8, align 4, !tbaa !11
  %22 = trunc i32 %21 to i8
  %23 = getelementptr inbounds %"struct.DynexCN::MultisignatureOutput", ptr %11, i32 0, i32 1
  store i8 %22, ptr %23, align 8, !tbaa !13
  %24 = getelementptr inbounds %"struct.DynexCN::MultisignatureOutput", ptr %11, i32 0, i32 0
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  invoke void @_ZNSt6vectorIN6Crypto9PublicKeyESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26)
          to label %27 unwind label %34

27:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %28

28:                                               ; preds = %48, %27
  %29 = load i64, ptr %14, align 8, !tbaa !9
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = icmp ult i64 %29, %31
  br i1 %32, label %38, label %33

33:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %55

34:                                               ; preds = %4
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %12, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %13, align 4
  br label %74

38:                                               ; preds = %28
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = load i64, ptr %14, align 8, !tbaa !9
  %41 = call noundef nonnull align 1 dereferenceable(64) ptr @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %40) #4
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = getelementptr inbounds %"struct.DynexCN::MultisignatureOutput", ptr %11, i32 0, i32 0
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = call noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto9PublicKeyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %45) #4
  invoke void @_ZN12_GLOBAL__N_115derivePublicKeyERKN7DynexCN20AccountPublicAddressERKN6Crypto9SecretKeyEmRNS4_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(64) %41, ptr noundef nonnull align 1 dereferenceable(32) %42, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(32) %46)
          to label %47 unwind label %51

47:                                               ; preds = %38
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %14, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %14, align 8, !tbaa !9
  br label %28, !llvm.loop !19

51:                                               ; preds = %38
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %12, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %74

55:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #4
  %56 = getelementptr inbounds %"struct.DynexCN::TransactionOutput", ptr %15, i32 0, i32 0
  %57 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %57, ptr %56, align 8, !tbaa !21
  %58 = getelementptr inbounds %"struct.DynexCN::TransactionOutput", ptr %15, i32 0, i32 1
  invoke void @_ZN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEC2IS3_EERT_NS_9enable_ifINS_3mpl3or_INS9_4and_INS9_4not_INS_8is_constIS6_EEEENSC_INS_7is_sameIS6_S4_EEEENS_6detail7variant29is_variant_constructible_fromIS7_NS9_6l_itemIN4mpl_5long_ILl2EEES2_NSM_INSO_ILl1EEES3_NS9_5l_endEEEEEEENSN_5bool_ILb1EEESW_EENSG_IS6_NS_18recursive_variant_EEENSV_ILb0EEES10_S10_EEbE4typeE(ptr noundef nonnull align 8 dereferenceable(40) %58, ptr noundef nonnull align 8 dereferenceable(25) %11, i1 noundef zeroext true)
          to label %59 unwind label %65

59:                                               ; preds = %55
  %60 = getelementptr inbounds %"class.DynexCN::TransactionImpl", ptr %16, i32 0, i32 1
  %61 = getelementptr inbounds %"struct.DynexCN::TransactionPrefix", ptr %60, i32 0, i32 3
  %62 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE12emplace_backIJRS1_EEES5_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %63 unwind label %69

63:                                               ; preds = %59
  call void @_ZN7DynexCN15TransactionImpl14invalidateHashEv(ptr noundef nonnull align 8 dereferenceable(224) %16)
  %64 = load i64, ptr %10, align 8, !tbaa !9
  call void @_ZN7DynexCN17TransactionOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #4
  call void @_ZN7DynexCN20MultisignatureOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret i64 %64

65:                                               ; preds = %55
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %12, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %13, align 4
  br label %73

69:                                               ; preds = %59
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %12, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %13, align 4
  call void @_ZN7DynexCN17TransactionOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  br label %73

73:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #4
  br label %74

74:                                               ; preds = %73, %51, %34
  call void @_ZN7DynexCN20MultisignatureOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %75

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEC2IS3_EERT_NS_9enable_ifINS_3mpl3or_INS9_4and_INS9_4not_INS_8is_constIS6_EEEENSC_INS_7is_sameIS6_S4_EEEENS_6detail7variant29is_variant_constructible_fromIS7_NS9_6l_itemIN4mpl_5long_ILl2EEES2_NSM_INSO_ILl1EEES3_NS9_5l_endEEEEEEENSN_5bool_ILb1EEESW_EENSG_IS6_NS_18recursive_variant_EEENSV_ILb0EEES10_S10_EEbE4typeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(25), i1 noundef zeroext) unnamed_addr #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = { 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 #4 = { 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 = !{!"int", !7, i64 0}
!13 = !{!14, !7, i64 24}
!14 = !{!"_ZTSN7DynexCN20MultisignatureOutputE", !15, i64 0, !7, i64 24}
!15 = !{!"_ZTSSt6vectorIN6Crypto9PublicKeyESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTSN7DynexCN17TransactionOutputE", !10, i64 0, !23, i64 8}
!23 = !{!"_ZTSN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEE", !12, i64 0, !24, i64 8}
!24 = !{!"_ZTSN5boost15aligned_storageILm32ELm8EEE", !25, i64 0}
!25 = !{!"_ZTSN5boost6detail15aligned_storage19aligned_storage_impILm32ELm8EEE", !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"

%"struct.DynexCN::MultisignatureOutput" = type <{ %"class.std::vector.42", i8, [7 x i8] }>
%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl" }
%"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl" = type { %"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Crypto::PublicKey, std::allocator<Crypto::PublicKey>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::TransactionOutput" = type { i64, %"class.boost::variant.39" }
%"class.boost::variant.39" = type { i32, [4 x i8], %"class.boost::aligned_storage.40" }
%"class.boost::aligned_storage.40" = type { %"struct.boost::detail::aligned_storage::aligned_storage_imp.41" }
%"struct.boost::detail::aligned_storage::aligned_storage_imp.41" = type { %"union.boost::detail::aligned_storage::aligned_storage_imp<32, 8>::data_t" }
%"union.boost::detail::aligned_storage::aligned_storage_imp<32, 8>::data_t" = type { [32 x i8] }

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7DynexCN15TransactionImpl14checkIfSigningEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_115derivePublicKeyERKN7DynexCN20AccountPublicAddressERKN6Crypto9SecretKeyEmRNS4_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(64), ptr noundef nonnull align 1 dereferenceable(32), i64 noundef, ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE4sizeEv(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(48) ptr @_ZNSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE12emplace_backIJRS1_EEES5_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN7DynexCN15TransactionImpl9addOutputEmRKSt6vectorINS_20AccountPublicAddressESaIS2_EEj(ptr noundef nonnull align 8 dereferenceable(224) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.DynexCN::MultisignatureOutput", align 8
  %6 = alloca %"struct.DynexCN::TransactionOutput", align 8
  tail call void @_ZNK7DynexCN15TransactionImpl14checkIfSigningEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
  %7 = tail call noundef nonnull align 1 dereferenceable(32) ptr @_ZNK7DynexCN15TransactionImpl11txSecretKeyEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = tail call noundef i64 @_ZNKSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN7DynexCN20MultisignatureOutputC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #4
  %10 = trunc i32 %3 to i8
  %11 = getelementptr inbounds i8, ptr %5, i64 24
  store i8 %10, ptr %11, align 8, !tbaa !5
  %12 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  invoke void @_ZNSt6vectorIN6Crypto9PublicKeyESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %12)
          to label %.preheader unwind label %15

.preheader:                                       ; preds = %4
  %13 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %19, %.preheader
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #4
  store i64 %1, ptr %6, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %6, i64 8
  invoke void @_ZN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEC2IS3_EERT_NS_9enable_ifINS_3mpl3or_INS9_4and_INS9_4not_INS_8is_constIS6_EEEENSC_INS_7is_sameIS6_S4_EEEENS_6detail7variant29is_variant_constructible_fromIS7_NS9_6l_itemIN4mpl_5long_ILl2EEES2_NSM_INSO_ILl1EEES3_NS9_5l_endEEEEEEENSN_5bool_ILb1EEESW_EENSG_IS6_NS_18recursive_variant_EEENSV_ILb0EEES10_S10_EEbE4typeE(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(25) %5, i1 noundef zeroext true)
          to label %25 unwind label %28

15:                                               ; preds = %4
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %33

.lr.ph:                                           ; preds = %.preheader, %19
  %.020 = phi i64 [ %20, %19 ], [ 0, %.preheader ]
  %17 = call noundef nonnull align 1 dereferenceable(64) ptr @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.020) #4
  %18 = call noundef nonnull align 1 dereferenceable(32) ptr @_ZNSt6vectorIN6Crypto9PublicKeyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.020) #4
  invoke void @_ZN12_GLOBAL__N_115derivePublicKeyERKN7DynexCN20AccountPublicAddressERKN6Crypto9SecretKeyEmRNS4_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(64) %17, ptr noundef nonnull align 1 dereferenceable(32) %7, i64 noundef %9, ptr noundef nonnull align 1 dereferenceable(32) %18)
          to label %19 unwind label %23

19:                                               ; preds = %.lr.ph
  %20 = add nuw i64 %.020, 1
  %21 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20AccountPublicAddressESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !21

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %33

25:                                               ; preds = %._crit_edge
  %26 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE12emplace_backIJRS1_EEES5_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %27 unwind label %30

27:                                               ; preds = %25
  call void @_ZN7DynexCN15TransactionImpl14invalidateHashEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
  call void @_ZN7DynexCN17TransactionOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #4
  call void @_ZN7DynexCN20MultisignatureOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret i64 %9

28:                                               ; preds = %._crit_edge
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %25
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7DynexCN17TransactionOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #4
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #4
  br label %33

33:                                               ; preds = %32, %23, %15
  %.pn18 = phi { ptr, i32 } [ %24, %23 ], [ %.pn, %32 ], [ %16, %15 ]
  call void @_ZN7DynexCN20MultisignatureOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn18
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEC2IS3_EERT_NS_9enable_ifINS_3mpl3or_INS9_4and_INS9_4not_INS_8is_constIS6_EEEENSC_INS_7is_sameIS6_S4_EEEENS_6detail7variant29is_variant_constructible_fromIS7_NS9_6l_itemIN4mpl_5long_ILl2EEES2_NSM_INSO_ILl1EEES3_NS9_5l_endEEEEEEENSN_5bool_ILb1EEESW_EENSG_IS6_NS_18recursive_variant_EEENSV_ILb0EEES10_S10_EEbE4typeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(25), i1 noundef zeroext) unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = { 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 #4 = { 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, !12, i64 24}
!6 = !{!"_ZTSN7DynexCN20MultisignatureOutputE", !7, i64 0, !12, i64 24}
!7 = !{!"_ZTSSt6vectorIN6Crypto9PublicKeyESaIS1_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN6Crypto9PublicKeyESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN7DynexCN17TransactionOutputE", !16, i64 0, !17, i64 8}
!16 = !{!"long", !12, i64 0}
!17 = !{!"_ZTSN5boost7variantIN7DynexCN9KeyOutputEJNS1_20MultisignatureOutputEEEE", !18, i64 0, !19, i64 8}
!18 = !{!"int", !12, i64 0}
!19 = !{!"_ZTSN5boost15aligned_storageILm32ELm8EEE", !20, i64 0}
!20 = !{!"_ZTSN5boost6detail15aligned_storage19aligned_storage_impILm32ELm8EEE", !12, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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