If I just paid off my 401k loan, how much will a new loan be with $47K vested and a high loan balance of $8600 in the past year?

I have a vested balance of $47.9K.  I have a zero loan balance as of today.  My highest loan balance was $8700 in the past 12 months.  Do I deduct the $8700 from 50% of my vested balance or from $50K per the new IRS guidelines?