All moneys in the court appointed attorney and public defender payment fund shall be annually distributed by the state treasurer to the counties on a pro rata basis. The state treasurer shall, within sixty days of the end of the fiscal year, determine and verify from receipts and expenditure records the total expenditures by all counties in the state for court appointed attorneys and public defender offices. He shall then establish a percentage ratio between moneys collected in the fund for the past fiscal year and the total expenditures by counties for court appointed attorneys and public defender offices. That percentage ratio shall then be applied to each county's gross expenditure for court appointed attorneys and public defender offices to determine its respective payment from the fund.
SDCL 23A-40-20