I often come across sentences like this: The children came running into the room.
I know that the following sentences mean the same thing, but I wonder which of the following the original one is grammatically equivalent to.
The children came, running into the room.
The children came into the room, running.