(A) taxable years beginning after December 31, 2017, and (B) taxable years beginning on or before December 31, 2017, to which net operating losses arising in taxable years beginning after December 31, 2017, are carried. (2) Carryforwards and carrybacks The amendments made by subsections (b), (c), and (d)(1) shall apply to net operating losses arising in taxable years beginning after December 31, 2017. . (2) Section 172(b)(1)(A) of the Internal Revenue Code of 1986 is amended to read as follows: (A) General rule A net operating loss for any taxable year— (i) shall be a net operating loss carryback to the extent provided in subparagraphs (B) and (C)(i), and (ii) except as provided in subparagraph (C)(ii), shall be a net operating loss carryover— (I) in the case of a net operating loss arising in a taxable year beginning before January 1, 2018, to each of the 20 taxable years following the taxable year of the loss, and (II) in the case of a net operating loss arising in a taxable year beginning after December 31, 2017, to each taxable year following the taxable year of the loss. . (d) Effective dates (1) Net operating loss limitation The amendments made by subsection (a) shall apply— (A) to taxable years beginning after December 31, 2017, and (B) taxable years beginning on or before December 31, 2017, to which net operating losses arising in taxable years beginning after December 31, 2017, are carried. (2) Carryforwards and carrybacks The amendment made by subsection (b) shall apply to net operating losses arising in taxable years beginning after December 31, 2017. (3) Technical amendments The amendments made by subsection (c) shall take effect as if included in the provisions of Public Law 115–97 to which they relate. (4) Special rule In the case of a net operating loss arising in a taxable year beginning before January 1, 2018, and ending after December 31, 2017— (A) an application under section 6411(a) of the Internal Revenue Code of 1986 with respect to the carryback of such net operating loss shall not fail to