not allowed with respect to oil and gas activities (a) In general Section 199A(c)(3)(B) of the Internal Revenue Code of 1986 is amended by redesignating clause (vii) as clause (viii), and by inserting after clause (vi) the following new clause: (vii) The production, refining, processing, transportation, or distribution of oil, gas, or any primary product thereof. . (b) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2022. 10. Prohibition on using last-in, first-out accounting for oil and gas companies (a) In general Section 472 of the Internal Revenue Code of 1986 is amended by adding at the end the following new subsection: (h) Oil and gas companies (1) In general Notwithstanding any other provision of this section, a major integrated oil company may not use the method provided in subsection (b) in inventorying of any goods. (2) Major integrated oil company For purposes of this subsection, the term major integrated oil company means, with respect to any taxable year, a producer of crude oil— (A) which has an average daily worldwide production of crude oil of at least 500,000 barrels for the taxable year, (B) which has gross receipts in excess of $1,000,000,000 for the taxable year, and (C) the average daily refinery runs of the taxpayer and related persons for the taxable year exceed 75,000 barrels. (3) Special rules (A) Crude production and gross receipts For purposes of subparagraphs (A) and (B) of paragraph (2)— (i) Controlled groups and common control All persons treated as a single employer under subsections (a) and (b) of section 52 shall be treated as 1 person. (ii) Short taxable years In case of a short taxable year, the rule under section 448(c)(3)(B) shall apply. (B) Average daily refinery runs For purposes of paragraph (2)(C)— (i) In general The average daily refinery runs for any taxable year shall be determined by dividing the aggregate refinery runs for the taxable year by the number of days in the taxable year. (ii) Related persons A