(7) as paragraphs (2) through (6), respectively, and (5) by amending paragraph (6), as redesignated by paragraph (4) of this subsection, to read as follows: (6) Regulations The Secretary may prescribe such regulations as may be necessary to carry out the purposes of this subsection, including regulations to ensure proper calculation of the credit provided in this subsection. . (b) Controlled group and single taxpayer rules Paragraph (3) of section 5041(c), as redesignated by subsection (a)(4), is amended by striking section 5051(a)(2)(B) and inserting section 5051(a)(5) . (c) Allowance of credit for foreign manufacturers and importers Subsection (c) of section 5041 of the Internal Revenue Code of 1986, as amended by subsection (a), is amended— (1) in subparagraph (A) of paragraph (1), by inserting but only if the importer is an electing importer under paragraph (6) and the wine gallons of wine have been assigned to the importer pursuant to such paragraph after into the United States during the calendar year , (2) by redesignating paragraph (6) as paragraph (7), and (3) by inserting after paragraph (5) the following new paragraph: (6) Allowance of credit for foreign manufacturers and importers (A) In general In the case of any wine gallons of wine which have been produced outside of the United States and imported into the United States, the credit allowable under paragraph (1) (referred to in this paragraph as the tax credit ) may be assigned by the person who produced such wine (referred to in this paragraph as the foreign producer ), provided that such person makes an election described in subparagraph (B)(ii), to any electing importer of such wine gallons pursuant to the requirements established by the Secretary of the Treasury under subparagraph (B). (B) Assignment The Secretary of the Treasury, in consultation with the Secretary of Health and Human Services and the Secretary of the Department of Homeland Security, shall, through such rules, regulations, and procedures as are determined appropriate, establish