Known gang member shot officers six times, prosecutor says