A cotton gin , or a cotton engine is a machine that pulls cotton fibers away from the cotton seeds . A cotton gin ( short for cotton engine ) is a machine that quickly and easily separates the cotton fibers from the seeds , a job formerly performed by hand .