; (B) in the preceding year, to the knowledge of the licensee, such other licensee has since failed to implement or update business practices to prevent firearm trafficking or straw purchasing; (C) such other licensee lacks adequate security to prevent loss or theft of firearms or ammunition from the inventory of such other licensee; or (D) in the most recent inspection of such other licensee under this chapter, the Attorney General has found 3 or more violations relating to failures to timely or accurately record information in firearm acquisition and disposition records. (b) Affirmative defenses It shall be an affirmative defense to a charge of violating— (1) subsection (a)(1) of this section, that the licensee took all reasonable steps, including the implementation of and updates to business practices pursuant to subsection 923(g)(7)(D), to prevent the diversion of inventory firearms from lawful commerce; and (2) subsection (a)(2) of this section, that the licensee took all reasonable steps to comply with subsection (a)(2) and failed to discover facts that would render disposition of firearms to a licensee unlawful under subsection (a)(2) only as the direct result of a violation of Federal law by the licensee. (c) Penalties (1) In general Any person who violates subsection (a)(1) shall be fined under this title, imprisoned for not more than 15 years, or both. (2) Licensees (A) Civil penalties Any licensee who violates subsection (a)(2) shall, after notice and opportunity for a hearing, disgorge all profits from the transfer of the firearms that are the subject of the violation, and the court may impose on the licensee a civil money penalty equal to the greater of— (i) $10,000 for each firearm involved, or $50,000 with respect to any such firearm that was subsequently used in a crime under Federal, State, or local law