Its a little complex issue. If the denial specifically states that you are out of status, then you are - from date of denial. If denial does not so states, then first step is to check with DSO if SEVIS is still active and not in completed/terminated status. Discuss your options of getting a new I-20 weather with the same or different school. Most likely SEVP is going to cancel the SEVIS and reinstatement will be the only recourse left. MTR on OPT denial is a long shot, but it is definitely possible. The strategy must be carefully worked out - and timeline is really important in this matter. Good luck.