Hamilton man faces prison after punching police officer, knocking out friend