In my opinion a person with a valid I-94 is in status until that date the I-94 expires. Sometime DHS issues forms I-94 which are valid to dates which are beyond the 6 year maximum person someone can be in H-1B status. In my opinion that doesn't change the fact that one's I-94 is valid to the date written on it unless and until the government revokes it or otherwise makes a formal finding that you are not in valid H-1B status. Based upon the facts stated you may wish to obtain a second opinion regarding your status, and if that opinion is that you may work to 7/21/14, you might be able to use it to persuade your company to continue to allow you to be employed until 7/21/14, by which time there is a good chance you will have an approved I-94. Also, even by its own terms your attorney's reported calculations seem incorrect since obviously you have been outside the U.S. for at least some period of time and therefore your 6 years in the U.S. in H-1B status will apparently expire on some date later than 9/30/31 after the days you spent outside the U.S. are "recaptured" (also there are only 30 days in September).
Talk to that attorney in-person ... preferably face-to-face ... either live or via Skype.
He/she has the answers ... we don't.
PROFESSOR OF IMMIGRATION LAW for over 10 years -- This blog posting is offered for informational purposes only. It does not constitute an attorney-client relationship. Also, keep in mind that this is an INTERNET BLOG. You should not rely on anything you read here to make decisions which impact on your life. Meet with an attorney, via Skype, or in person, to obtain competent personal and professional guidance.
Call the lawyer and ask for a review. The date on the I-94 and the extension that was filed to get the new date may have included time that was recaptured or not previously spent in the US. The company attorney may not have calculated the time properly when he sent the email.
The answer provided here is general in nature and does not take into account other factors that may need to be reviewed for a more precise answer. You should consult with an immigration attorney before taking any action. The answer here is not intended to create an attorney-client relationship.