then the basis shall be the same as it would be in the hands of the transferor, increased in the amount of gain recognized to the transferor on such transfer.
then the basis of such property shall be zero.
then the basis of any property acquired with such money during the 12-month period beginning on the day the contribution is received shall be reduced by the amount of such contribution. The excess (if any) of the amount of such contribution over the amount of the reduction under the preceding sentence shall be applied to the reduction (as of the last day of the period specified in the preceding sentence) of the basis of any other property held by the taxpayer. The particular properties to which the reductions required by this paragraph shall be allocated shall be determined under regulations prescribed by the Secretary.
then, for purposes of determining basis under subsections (a) and (b), the amount of gain recognized by the transferor as a result of the assumption of the liability shall be determined as if the liability assumed by the transferee equaled such transferees ratable portion of such liability determined on the basis of the relative fair market values (determined without regard to section 7701(g)) of all of the assets subject to such liability.
In any case in which the transferor is a partnership, the preceding sentence shall be applied by treating each partner in such partnership as holding such partners proportionate share of the property of such partnership.
then, notwithstanding subsection (a), the transferees aggregate adjusted bases of the property so transferred shall not exceed the fair market value of such property immediately after such transaction.