Caster Semenya was assigned the sex female a birth. “She” has 5α-Reductase 2 deficiency, which according to Wikipedia is a rare condition that only affects genetic males. This defect results in a spectrum of phenotypes including overt genital ambiguity, hypospadias (failure of the urethra to open), and micropenis (sadly, what it sounds like). Affected males still develop typical masculine features at puberty (deep voice, facial hair, muscle bulk).
If you have an X-chromosome and can impregnant a woman, you’re a man.
Especially if you're a caster of semen, ya!
Y