Cheyne Stokes breathing when dying - does it indicate loss of higher brain function?

The last couple days I've sat with a dying friend in a nursing home. He's having Cheyne-Stokes breathing. Yesterday, he still responded to my talking by turning his head. But I'm not sure that he had the cognitive function to actually understand what I was saying, or the awareness that I was there.

I thought that breathing pattern happens when the higher brain centers were no longer functioning, and it was brainstem CO2 detection that was regulating his breathing.

Is that true?