controlled foreign corporation any pro rata amount from which is taken into account in determining the global intangible low-taxed income included in gross income of a United States shareholder under subsection (a), the portion of such global intangible low-taxed income which is treated as being with respect to such controlled foreign corporation is— (A) in the case of a controlled foreign corporation with no tested income, zero, and (B) in the case of a controlled foreign corporation with tested income, the portion of such global intangible low-taxed income which bears the same ratio to such global intangible low-taxed income as— (i) such United States shareholder’s pro rata amount of the tested income of such controlled foreign corporation, bears to (ii) the aggregate amount described in subsection (c)(1)(A) with respect to such United States shareholder. . (b) Foreign tax credit (1) Application of deemed paid foreign tax credit Section 960 is amended adding at the end 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 the product of— (A) such domestic corporation’s inclusion percentage, multiplied by (B) the aggregate tested foreign income taxes paid or accrued by controlled foreign corporations. (2) Inclusion percentage For purposes of paragraph (1), the term inclusion percentage means, with respect to any domestic corporation, the ratio (expressed as a percentage) of— (A) such corporation’s global intangible low-taxed income (as defined in section 951A(b)), divided by (B) the aggregate amount described in 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