(1) the fair market value of the property so transferred, over
(2) the adjusted basis (for purposes of determining gain) of such property in the hands of the transferor.
Subsection (a) shall not apply to a transfer to a trust by a United States person to the extent that any person is treated as the owner of such trust under section 671.
If a trust which is not a foreign trust becomes a foreign trust, such trust shall be treated for purposes of this section as having transferred, immediately before becoming a foreign trust, all of its assets to a foreign trust.