I-94 error first, then you are out of status.
Since whatever I-94 is wrong or correct, it determines how long you may stay in the U.S.
But I think the officer made mistake first when you entered the U.S. The I-94 should have been given to you the date of your H1's I-797.