only the germ cells in ovaries or testicles divided in such a manner to produce cells with only half of their original genetic code-eggs in females , spermatozoa in males-allowing for the mix of genetic material .