Any actual distribution made during a taxable year shall be treated as being made subsequent to any deemed distribution made during such year. Any actual distribution made pursuant to section 992(c) (relating to distributions to meet qualification requirements) shall be treated as being made before any other actual distributions during the taxable year.
If section 995(c) applies to a redemption of stock in a DISC or former DISC, the accumulated DISC income shall be reduced by an amount equal to the gain described in section 995(c) with respect to such stock which is (or has been) treated as ordinary income, except to the extent distributions with respect to such stock have been treated under paragraph (1).
Amounts representing deemed distributions as provided in section 995(b) shall increase the basis of the stock with respect to which the distribution is made.
The portion of an actual distribution made out of previously taxed income shall reduce the basis of the stock with respect to which it is made, and to the extent that it exceeds the adjusted basis of such stock, shall be treated as gain from the sale or exchange of property. In the case of stock includible in the gross estate of a decedent for which an election is made under section 2032 (relating to alternate valuation), this paragraph shall not apply to any distribution made after the date of the decedent’s death and before the alternate valuation date provided by section 2032.
The earnings and profits derived by a corporation during a taxable year in which such corporation is a DISC, before reduction for any distributions during the year, but reduced by amounts deemed distributed under section 995(b)(1), shall constitute the DISC income for such year. The earnings and profits of a DISC for a taxable year include any amounts includible in such DISC’s gross income pursuant to section 951(a) for such year. Accumulated DISC income shall be reduced by deemed distributions under section 995(b)(2).
Earnings and profits deemed distributed under section 995(b) for a taxable year shall constitute previously taxed income for such year.
In the case of a shareholder who is a nonresident alien individual or a foreign corporation, trust, or estate, gains referred to in section 995(c) and all distributions out of accumulated DISC income including deemed distributions shall be treated as gains and distributions which are effectively connected with the conduct of a trade or business conducted through a permanent establishment of such shareholder within the United States and which are derived from sources within the United States.