of such controlled foreign corporation (solely for purposes of determining such amount) by an amount that bears the same ratio (not greater than 1) to such shareholder’s pro rata share of the tested loss of such controlled foreign corporation as— (A) the aggregate amount determined under subsection (c)(1)(A) with respect to such shareholder, bears to (B) the aggregate amount determined under subsection (c)(1)(B) with respect to such shareholder. . (b) Foreign tax credit (1) Application of deemed paid foreign tax credit Section 960, as amended by the preceding provisions of this Act, is amended by redesignating subsections (d) and (e) as subsections (e) and (f), respectively, and by inserting after subsection (c) the following new subsection: (d) Deemed paid credit for taxes properly attributable to tested income (1) In general For purposes of this subpart, if any amount is includible in the gross income of a domestic corporation under section 951A, such domestic corporation shall be deemed to have paid foreign income taxes equal to 80 percent of— (A) such domestic corporation’s foreign high return percentage, multiplied by (B) the aggregate tested foreign income taxes paid or accrued by controlled foreign corporations with respect to which such domestic corporation is a United States shareholder. (2) Foreign high return percentage For purposes of paragraph (1), the term foreign high return percentage means, with respect to any domestic corporation, the ratio (expressed as a percentage) of— (A) such corporation’s foreign high return amount (as defined in section 951A(b)), divided by (B) the aggregate amount determined under section 951A(c)(1)(A) with respect to such corporation. (3) Tested foreign income taxes For purposes of paragraph (1), the term tested foreign income taxes means, with respect to any domestic corporation which is a United States shareholder of a controlled foreign corporation, the foreign income taxes paid or accrued by such foreign corporation which are properly attributable to gross income