Help w/ formula for variable loan amount

I need to calculate a loan amount that can be reduced by a portion of funds from a separate account.

I have a known maximum loan amount (say $14MM) and a pool of funds from which funds will be applied to effectively reduce the amount funded (say $5MM). The problem is that, from the pool, I need to set aside an amount that will equal a set number of pmts of the resulting pmt in reserve (say 12 months pmts).

So, it looks like this:

Max. Amt - (Pool - Reserve) = Adjusted max; where Reserve = 12* PMT(Adjusted Max)

The Max Amt, Pool, and Months Reserve (as well as the variables req'd to calc a pmt) are all variable but known prior to this calculation. Is there a way to solve this non-recursively?