Operation Stonegarden: Provided , That notwithstanding subsection (c)(4) of such section 2004, for fiscal year 2018, the Commonwealth of Puerto Rico shall make available to local and tribal governments amounts provided to the Commonwealth of Puerto Rico under this paragraph in accordance with subsection (c)(1) of such section 2004. (2) $630,000,000 for the Urban Area Security Initiative under section 2003 of the Homeland Security Act of 2002 ( 6 U.S.C. 604 ), of which $50,000,000 shall be for organizations (as described under section 501(c)(3) of the Internal Revenue Code of 1986 and exempt from tax under section 501(a) of such code) determined by the Secretary of Homeland Security to be at high risk of a terrorist attack. (3) $100,000,000 for Public Transportation Security Assistance and Railroad Security Assistance under sections 1406 and 1513 of the Implementing Recommendations of the 9/11 Commission Act of 2007 ( 6 U.S.C. 1135 and 1163), of which $10,000,000 shall be for Amtrak security. (4) $100,000,000 for Port Security Grants in accordance with section 70107 of title 46, United States Code. (5) $690,000,000, to remain available until September 30, 2018, of which $345,000,000 shall be for Assistance to Firefighter Grants and $345,000,000 shall be for Staffing for Adequate Fire and Emergency Response Grants under sections 33 and 34 respectively of the Federal Fire Prevention and Control Act of 1974 ( 15 U.S.C. 2229 and 2229a). (6) $350,000,000 for emergency management performance grants under the National Flood Insurance Act of 1968 ( 42 U.S.C. 4001 ), the Robert T. Stafford Disaster Relief and Emergency Assistance Act ( 42 U.S.C. 5121 ), the Earthquake Hazards Reduction Act of 1977 ( 42 U.S.C. 7701 ), 6 U.S.C. 762 , and Reorganization Plan No. 3 of 1978 (5 U.S.C. App.). (7) $100,000,000 for the National Predisaster Mitigation Fund under section 203 of the Robert T. Stafford Disaster Relief and Emergency Assistance Act ( 42 U.S.C. 5133 ), to remain available until expended. (8) $177,531,000 for necessary