(a) If the owner of trespassing livestock cannot be determined, or if the trespassing livestock has not been recovered within ten days of notifying the owner, the county sheriff shall take possession of the trespassing livestock.
(b) The county sheriff may return the livestock to its owner and seek reimbursement for containment costs. If attempts to return the livestock to the owner fail, the sheriff may, after publishing notice as a Class I legal advertisement, sell the livestock to the highest bidder at a public livestock auction.
(c) The proceeds of the livestock sale shall be distributed in the following order:
(1) Costs incident to the sale;
(2) Costs of containment incurred by the sheriff and the landowner;
(3) Any remaining amount to the owner of the trespassing livestock; and
(4) If the owner is unknown or does not claim the amount remaining within ninety days, that amount shall be deposited into the county treasury.