; LLVM IR from dynexcoin/Dynex :: src/WalletLegacy (WalletTransactionSender)

; 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.std::_List_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.154" = type { ptr }
%class.anon.155 = type { i8 }
%"struct.std::pair" = type { i32, %"struct.Crypto::PublicKey" }
%"struct.Crypto::PublicKey" = type { [32 x i8] }
%"class.__gnu_cxx::__normal_iterator.161" = type { ptr }
%class.anon.162 = type { ptr }
%"class.__gnu_cxx::__normal_iterator.163" = type { ptr }
%"struct.DynexCN::TransactionOutputInformation" = type { i8, i64, i32, i32, %"struct.Crypto::Hash", %"struct.Crypto::PublicKey", %union.anon.122 }
%"struct.Crypto::Hash" = type { [32 x i8] }
%union.anon.122 = type { i32, [28 x i8] }
%"struct.DynexCN::TransactionSourceEntry" = type { %"class.std::vector.149", i64, %"struct.Crypto::PublicKey", i64, i64 }
%"class.std::vector.149" = type { %"struct.std::_Vector_base.150" }
%"struct.std::_Vector_base.150" = type { %"struct.std::_Vector_base<std::pair<unsigned int, Crypto::PublicKey>, std::allocator<std::pair<unsigned int, Crypto::PublicKey>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, Crypto::PublicKey>, std::allocator<std::pair<unsigned int, Crypto::PublicKey>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, Crypto::PublicKey>, std::allocator<std::pair<unsigned int, Crypto::PublicKey>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, Crypto::PublicKey>, std::allocator<std::pair<unsigned int, Crypto::PublicKey>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amount" = type { i64, %"class.std::vector.156" }
%"class.std::vector.156" = type { %"struct.std::_Vector_base.157" }
%"struct.std::_Vector_base.157" = type { %"struct.std::_Vector_base<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry, std::allocator<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry, std::allocator<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry, std::allocator<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry, std::allocator<DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry" = type { i64, %"struct.Crypto::PublicKey" }

; 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt7__cxx114listIN7DynexCN28TransactionOutputInformationESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINS_28TransactionOutputInformationESaIS3_EEERSt6vectorINS_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS9_EERS8_INS_22TransactionSourceEntryESaISD_EEm(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %4) #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.std::_List_const_iterator", align 8
  %14 = alloca %"struct.std::_List_const_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.154", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.154", align 8
  %20 = alloca %class.anon.155, align 1
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.154", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.154", align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %29 = alloca %class.anon.162, align 8
  %30 = alloca %"struct.std::pair", align 4
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.163", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i64 %4, ptr %10, align 8, !tbaa !9
  %34 = load ptr, ptr %6, align 8
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %35, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = call ptr @_ZNKSt7__cxx114listIN7DynexCN28TransactionOutputInformationESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %38 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %13, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = call ptr @_ZNKSt7__cxx114listIN7DynexCN28TransactionOutputInformationESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #6
  %41 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %14, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  br label %42

42:                                               ; preds = %184, %5
  %43 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEES4_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %186

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %46 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  store ptr %46, ptr %16, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = call noundef i64 @_ZNKSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #6
  %50 = add i64 %49, 1
  call void @_ZNSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #6
  store ptr %52, ptr %17, align 8, !tbaa !5
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = load ptr, ptr %17, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %56, i32 0, i32 4
  store i64 %55, ptr %57, align 8, !tbaa !17
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = call noundef i64 @_ZNKSt6vectorIN7DynexCN58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #6
  %60 = icmp ne i64 %59, 0
  br i1 %60, label %61, label %133

61:                                               ; preds = %45
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = icmp ugt i64 %62, 0
  br i1 %63, label %64, label %133

64:                                               ; preds = %61
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load i64, ptr %11, align 8, !tbaa !9
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7DynexCN58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %66) #6
  %68 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amount", ptr %67, i32 0, i32 1
  %69 = call ptr @_ZNSt6vectorIN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #6
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %18, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7DynexCN58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %72) #6
  %74 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amount", ptr %73, i32 0, i32 1
  %75 = call ptr @_ZNSt6vectorIN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #6
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %19, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %18, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %19, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  call void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESt6vectorIS3_SaIS3_EEEEZNS2_23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINS2_28TransactionOutputInformationESaISC_EEERS5_INS2_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISH_EERS5_INS2_22TransactionSourceEntryESaISL_EEmE3$_0EvT_SQ_T0_"(ptr %78, ptr %80)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i64, ptr %11, align 8, !tbaa !9
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN7DynexCN58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82) #6
  %84 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amount", ptr %83, i32 0, i32 1
  store ptr %84, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  %86 = call ptr @_ZNSt6vectorIN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #6
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %22, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %88 = load ptr, ptr %21, align 8, !tbaa !5
  %89 = call ptr @_ZNSt6vectorIN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.154", ptr %23, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  br label %91

91:                                               ; preds = %129, %64
  %92 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %92, label %94, label %93

93:                                               ; preds = %91
  store i32 4, ptr %15, align 4
  br label %131

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %95 = call noundef nonnull align 1 dereferenceable(40) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  store ptr %95, ptr %24, align 8, !tbaa !5
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 8, !tbaa !23
  %99 = zext i32 %98 to i64
  %100 = load ptr, ptr %24, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry", ptr %100, i32 0, i32 0
  %102 = load i64, ptr %101, align 1, !tbaa !24
  %103 = icmp eq i64 %99, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %94
  store i32 5, ptr %15, align 4
  br label %126

105:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 36, ptr %25) #6
  call void @_ZNSt4pairIjN6Crypto9PublicKeyEEC2IjS1_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(36) %25)
  %106 = load ptr, ptr %24, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry", ptr %106, i32 0, i32 0
  %108 = load i64, ptr %107, align 1, !tbaa !24
  %109 = trunc i64 %108 to i32
  %110 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 0
  store i32 %109, ptr %110, align 4, !tbaa !26
  %111 = load ptr, ptr %24, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.DynexCN::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entry", ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 1 %112, i64 32, i1 false), !tbaa.struct !28
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %114, i32 0, i32 0
  call void @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %115, ptr noundef nonnull align 4 dereferenceable(36) %25)
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %116, i32 0, i32 0
  %118 = call noundef i64 @_ZNKSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #6
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = icmp uge i64 %118, %119
  br i1 %120, label %121, label %122

121:                                              ; preds = %105
  store i32 4, ptr %15, align 4
  br label %123

122:                                              ; preds = %105
  store i32 0, ptr %15, align 4
  br label %123

123:                                              ; preds = %122, %121
  call void @llvm.lifetime.end.p0(i64 36, ptr %25) #6
  %124 = load i32, ptr %15, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
  ]

125:                                              ; preds = %123
  store i32 0, ptr %15, align 4
  br label %126

126:                                              ; preds = %125, %123, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  %127 = load i32, ptr %15, align 4
  switch i32 %127, label %131 [
    i32 0, label %128
    i32 5, label %129
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128, %126
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %91

131:                                              ; preds = %126, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132, %61, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %134, i32 0, i32 0
  %136 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #6
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %27, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %138, i32 0, i32 0
  %140 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %139) #6
  %141 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %28, i32 0, i32 0
  store ptr %140, ptr %141, align 8
  %142 = getelementptr inbounds %class.anon.162, ptr %29, i32 0, i32 0
  %143 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %143, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %27, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8
  %146 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %28, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8
  %148 = getelementptr inbounds %class.anon.162, ptr %29, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8
  %150 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS5_SaIS5_EEEEZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINSB_28TransactionOutputInformationESaISF_EEERS7_INSB_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISK_EERS7_INSB_22TransactionSourceEntryESaISO_EEmE3$_1ET_ST_ST_T0_"(ptr %145, ptr %147, ptr %149)
  %151 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %26, i32 0, i32 0
  store ptr %150, ptr %151, align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr %30) #6
  call void @_ZNSt4pairIjN6Crypto9PublicKeyEEC2IjS1_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(36) %30)
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %152, i32 0, i32 2
  %154 = load i32, ptr %153, align 8, !tbaa !23
  %155 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  store i32 %154, ptr %155, align 4, !tbaa !26
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %156, i32 0, i32 6
  %158 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %158, ptr align 8 %157, i64 32, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %159, i32 0, i32 0
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.163", ptr %32, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EERS8_(ptr noundef nonnull align 8 dereferenceable(24) %160, ptr %162, ptr noundef nonnull align 4 dereferenceable(36) %30)
  %164 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %31, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  %165 = load ptr, ptr %16, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %165, i32 0, i32 5
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %167, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %168, ptr align 8 %166, i64 32, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %169, i32 0, i32 0
  %171 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #6
  %172 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.161", ptr %33, i32 0, i32 0
  store ptr %171, ptr %172, align 8
  %173 = call noundef i64 @_ZN9__gnu_cxxmiIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSC_SF_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  %174 = load ptr, ptr %17, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %174, i32 0, i32 1
  store i64 %173, ptr %175, align 8, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  %176 = load ptr, ptr %16, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.DynexCN::TransactionOutputInformation", ptr %176, i32 0, i32 3
  %178 = load i32, ptr %177, align 4, !tbaa !31
  %179 = zext i32 %178 to i64
  %180 = load ptr, ptr %17, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.DynexCN::TransactionSourceEntry", ptr %180, i32 0, i32 3
  store i64 %179, ptr %181, align 8, !tbaa !32
  %182 = load i64, ptr %11, align 8, !tbaa !9
  %183 = add i64 %182, 1
  store i64 %183, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %184

184:                                              ; preds = %133
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %42

186:                                              ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret void
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryESt6vectorIS3_SaIS3_EEEEZNS2_23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINS2_28TransactionOutputInformationESaISC_EEERS5_INS2_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISH_EERS5_INS2_22TransactionSourceEntryESaISL_EEmE3$_0EvT_SQ_T0_"(ptr, ptr) #4

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIjN6Crypto9PublicKeyEEC2IjS1_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(36)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS5_SaIS5_EEEEZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINSB_28TransactionOutputInformationESaISF_EEERS7_INSB_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISK_EERS7_INSB_22TransactionSourceEntryESaISO_EEmE3$_1ET_ST_ST_T0_"(ptr, ptr, ptr) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EERS8_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr noundef nonnull align 4 dereferenceable(36)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSC_SF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { 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 #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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN7DynexCN28TransactionOutputInformationE", !13, i64 0, !10, i64 8, !14, i64 16, !14, i64 20, !15, i64 24, !16, i64 56, !7, i64 88}
!13 = !{!"_ZTSN7DynexCN16TransactionTypes10OutputTypeE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!16 = !{!"_ZTSN6Crypto9PublicKeyE", !7, i64 0}
!17 = !{!18, !10, i64 72}
!18 = !{!"_ZTSN7DynexCN22TransactionSourceEntryE", !19, i64 0, !10, i64 24, !16, i64 32, !10, i64 64, !10, i64 72}
!19 = !{!"_ZTSSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!12, !14, i64 16}
!24 = !{!25, !10, i64 0}
!25 = !{!"_ZTSN7DynexCN52COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_out_entryE", !10, i64 0, !16, i64 8}
!26 = !{!27, !14, i64 0}
!27 = !{!"_ZTSSt4pairIjN6Crypto9PublicKeyEE", !14, i64 0, !16, i64 4}
!28 = !{i64 0, i64 32, !29}
!29 = !{!7, !7, i64 0}
!30 = !{!18, !10, i64 24}
!31 = !{!12, !14, i64 20}
!32 = !{!18, !10, i64 64}


; 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.std::_List_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.161" = type { ptr }
%"struct.std::pair" = type { i32, %"struct.Crypto::PublicKey" }
%"struct.Crypto::PublicKey" = type { [32 x i8] }
%"class.__gnu_cxx::__normal_iterator.163" = 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINS_28TransactionOutputInformationESaIS3_EEERSt6vectorINS_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS9_EERS8_INS_22TransactionSourceEntryESaISD_EEm(ptr nocapture noundef nonnull readnone align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %4) local_unnamed_addr #3 align 2 {
  %6 = alloca %"struct.std::_List_const_iterator", align 8
  %7 = alloca %"struct.std::_List_const_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.163", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.161", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %13 = tail call ptr @_ZNKSt7__cxx114listIN7DynexCN28TransactionOutputInformationESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %13, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %14 = tail call ptr @_ZNKSt7__cxx114listIN7DynexCN28TransactionOutputInformationESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %14, ptr %7, align 8
  %15 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %16 = getelementptr inbounds i8, ptr %9, i64 4
  br label %17

._crit_edge:                                      ; preds = %17, %5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  ret void

17:                                               ; preds = %.lr.ph, %17
  %18 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %19 = call noundef i64 @_ZNKSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %20 = add i64 %19, 1
  call void @_ZNSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %20)
  %21 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorIN7DynexCN22TransactionSourceEntryESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %22 = getelementptr inbounds i8, ptr %18, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %21, i64 72
  store i64 %23, ptr %24, align 8, !tbaa !14
  %25 = call noundef i64 @_ZNKSt6vectorIN7DynexCN58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %26 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %27 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %28 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS5_SaIS5_EEEEZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINSB_28TransactionOutputInformationESaISF_EEERS7_INSB_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISK_EERS7_INSB_22TransactionSourceEntryESaISO_EEmE3$_1ET_ST_ST_T0_"(ptr %26, ptr %27, ptr nonnull %18)
  store ptr %28, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #6
  call void @_ZNSt4pairIjN6Crypto9PublicKeyEEC2IjS1_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(36) %9)
  %29 = getelementptr inbounds i8, ptr %18, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !21
  store i32 %30, ptr %9, align 4, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %18, i64 88
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %31, i64 32, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %32 = load ptr, ptr %11, align 8
  %33 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EERS8_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr %32, ptr noundef nonnull align 4 dereferenceable(36) %9)
  store ptr %33, ptr %10, align 8
  %34 = getelementptr inbounds i8, ptr %18, i64 56
  %35 = getelementptr inbounds i8, ptr %21, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %34, i64 32, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %36 = call ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  store ptr %36, ptr %12, align 8
  %37 = call noundef i64 @_ZN9__gnu_cxxmiIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSC_SF_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %38 = getelementptr inbounds i8, ptr %21, i64 24
  store i64 %37, ptr %38, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  %39 = getelementptr inbounds i8, ptr %18, i64 20
  %40 = load i32, ptr %39, align 4, !tbaa !27
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %21, i64 64
  store i64 %41, ptr %42, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %44 = call noundef zeroext i1 @_ZStneRKSt20_List_const_iteratorIN7DynexCN28TransactionOutputInformationEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %44, label %17, label %._crit_edge
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIjN6Crypto9PublicKeyEEC2IjS1_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS5_SaIS5_EEEEZN7DynexCN23WalletTransactionSender13prepareInputsERKNSt7__cxx114listINSB_28TransactionOutputInformationESaISF_EEERS7_INSB_58COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_outs_for_amountESaISK_EERS7_INSB_22TransactionSourceEntryESaISO_EEmE3$_1ET_ST_ST_T0_"(ptr, ptr, ptr) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EERS8_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPSt4pairIjN6Crypto9PublicKeyEESt6vectorIS4_SaIS4_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSC_SF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { 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 #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, !10, i64 8}
!6 = !{!"_ZTSN7DynexCN28TransactionOutputInformationE", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !13, i64 56, !8, i64 88}
!7 = !{!"_ZTSN7DynexCN16TransactionTypes10OutputTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTSN6Crypto4HashE", !8, i64 0}
!13 = !{!"_ZTSN6Crypto9PublicKeyE", !8, i64 0}
!14 = !{!15, !10, i64 72}
!15 = !{!"_ZTSN7DynexCN22TransactionSourceEntryE", !16, i64 0, !10, i64 24, !13, i64 32, !10, i64 64, !10, i64 72}
!16 = !{!"_ZTSSt6vectorISt4pairIjN6Crypto9PublicKeyEESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt4pairIjN6Crypto9PublicKeyEESaIS3_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!6, !11, i64 16}
!22 = !{!23, !11, i64 0}
!23 = !{!"_ZTSSt4pairIjN6Crypto9PublicKeyEE", !11, i64 0, !13, i64 4}
!24 = !{i64 0, i64 32, !25}
!25 = !{!8, !8, i64 0}
!26 = !{!15, !10, i64 24}
!27 = !{!6, !11, i64 20}
!28 = !{!15, !10, i64 64}


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