based on CFC taxable units Section 951A is amended by adding at the end the following new subsection: (g) Country-by-Country application of section based on CFC taxable units (1) In general If any CFC taxable unit of a United States shareholder is a tax resident of (or, in the case of a branch, is located in) a country which is different from the country with respect to which any other CFC taxable unit of such United States shareholder is a tax resident (or, in the case of a branch, is located in)— (A) such shareholder’s net CFC tested income for purposes of subsection (a) shall be the sum of the amounts of net CFC tested income determined separately with respect to each such country, and (B) for purposes of determining such separate amounts of net CFC tested income— (i) except as otherwise provided by the Secretary, any reference in subsection (c) to a controlled foreign corporation of such shareholder shall be treated as reference to a CFC taxable unit of such shareholder, and (ii) net CFC tested income and such other items and amounts as the Secretary may provide, shall be determined separately with respect to each such country by determining such amounts with respect to the CFC taxable units of such shareholder which are a tax resident of such country. (2) Definitions For purposes of this subsection— (A) CFC taxable unit The term CFC taxable unit means any taxable unit described in clause (ii), (iii), or (iv) of section 904(e)(2)(B), determined— (i) by substituting controlled foreign corporation for foreign corporation each place it appears in such clauses, and (ii) without regard to the references to the taxpayer in clauses (iii) and (iv) of such section. (B) Application of other definitions Terms used in this subsection which are also used in section 904(e) shall have the same meaning as when used in section 904(e). (3) Special rules For purposes of this subsection— (A) Application of certain rules Except as otherwise provided by the Secretary, rules similar to the rules of section 904(e) shall apply. (B)