(B) without diminution by reason of dividends distributed during the taxable year ending with or including such date, and (C) increased by the amount of any qualified deficit (within the meaning of section 952(c)(1)(B)(ii)) arising before January 1, 2018, which is treated as a qualified deficit (within the meaning of such section as amended by the Tax Cuts and Jobs Act ) for purposes of such foreign corporation’s first taxable year beginning after December 31, 2017. (e) Specified foreign corporation (1) In general For purposes of this section, the term specified foreign corporation means— (A) any controlled foreign corporation, and (B) any foreign corporation with respect to which one or more domestic corporations is a United States shareholder (determined without regard to section 958(b)(4)). (2) Application to certain foreign corporations For purposes of sections 951 and 961, a foreign corporation described in paragraph (1)(B) shall be treated as a controlled foreign corporation solely for purposes of taking into account the subpart F income of such corporation under subsection (a) (and for purposes of applying subsection (f)). (3) Exception for passive foreign investment companies The term specified foreign corporation shall not include any passive foreign investment company (within the meaning of subpart D of part VI of subchapter P) that is not a controlled foreign corporation. (f) Determinations of pro rata share For purposes of this section, the determination of any United States shareholder’s pro rata share of any amount with respect to any specified foreign corporation shall be determined under rules similar to the rules of section 951(a)(2) by treating such amount in the same manner as subpart F income (and by treating such specified foreign corporation as a controlled foreign corporation). (g) Disallowance of foreign tax credit, etc (1) In general No credit shall be allowed under section 901 for the applicable percentage of any taxes paid or accrued (or treated as paid or accrued) with respect to any