A 51-year-old woman is evaluated in the emergency department for sudden-onset severe headache and right-sided weakness followed by temporary loss of consciousness that occurred 30 minutes ago. According to her husband, she has hypertension treated with amlodipine and a 20-pack-year smoking history; she stopped smoking 12 years ago.

On physical examination, blood pressure is 158/68 mm Hg, pulse rate is 68/min and regular, and respiration rate is 10/min. Funduscopic examination findings are normal. Nuchal rigidity is noted. On neurologic examination, the patient does not follow commands and has flexor posturing to painful stimuli; pupils are reactive and symmetric in size and shape.

An electrocardiogram shows normal sinus rhythm and no ischemic changes.

Which of the following is the most appropriate next diagnostic test?