@rysiek
There are multiple conflicting definitions of “gender” — I take it here to be a synonym for “sex”, but you're free to specify a different meaning.
If the test shows Amal is a XY person with 5-alpha-reductase deficiency, that would mean Amal is male.