she struggled to gather her wits through a pounding headache , piecing together fragments of memories and perceptions until , with a dizzying rush of clarity , she remembered where she was and what had happened to her .