If it appears to the court or judge that the party is guilty of a criminal offense, or should not be discharged, the court or judge, although the charge is defectively set forth in the process or warrant of commitment, shall cause the witnesses to be subpoenaed to attend at the time ordered to testify before such court or judge. Upon the examination, the court shall discharge the prisoner, admit him to bail, if the offense is bailable, or recommit him to custody.
A.R.S. § 13-4134