Tom flung open the door and rushed out of the room, totally losing his calmness.
What does the underlined part function as?
A、object complement
B、subject complement
C、adverbial
D、attributive