So that I understand correctly, you ask a single response question ...
Are you ...
And the quota question then needs to be allocated as follows ...
If Male, quota=1
If Female, quota=2
If Diver=quota is randomly allocated to a 1 or 2
Is that correct?
If so, you can create a gender quota variable and save the answer in there, and then operate the quota off the gender quota variable.
Here's the steps ...
1/ Go to the pass-in fields and create a variable called "QTGender" and set it to a whole number.
2/ Insert this Perl Script in to the footer of a question that is not skipped and appears after the gender question (which I assume is Q1).
Begin Unverified Perl
Note #1:I have assumed your gender question is Q1. Change all Q1's in your Perl Script to whatever your question number should be.
Note #2:I have assumed your gender quota variable is QTGender. Change all QTGender's in your Perl Script to whatever you prefer.
3/ Create your quota question with 2 cells ...
1=Male, set the logic to QTGender=1
2=Female, set the logic to QTGender=2
If I have assumed incorrectly about the gender being asked, and it is a pass-in variable instead, the above approach will still work nicely.