This may be outside of where this thread is progressing but it may address the OP.
I am not a biologist and my education may be outdated. My understanding is that the medulla of the brain controls basic functions such as resperation or the heartbeat. That is why it, or its equivalent is present in all chordates. The cerebellum, which controls the basics of motor function, is present in chordates beyond the most primitive, such as tunicates. beyond this such as in fish, amphibians, reptiles, there is the beginning of a cerebrum. The cerebrum in this form is primarily dedicated to emotions rather than what one would call thought. Literature referred to this as the R-complex.
As species evolved, layers were added to the basic cerebrum in birds and mammmals. In mammals such layering resulted in a more pronounced wrinkling or crenulation of the brain which is responsible for higher functions such as planning outcomes.
Evolution, being what it is, an adding or substiuting the functioning of preexisting parts rather than a sudden pop-into-existance out-of-nowhere organ such as would be predicted by intelligent design, the brain of mammals includes the primitive medulla for the most primitive of functions such as the heartbeat, cerebellum for motor function, and a layered cerebrum. Such a cerebrum includes the more primitive R-complex deeply imbedded inside, which is dominant in fish, amphibians and reptiles, layered over by the gradually slightly wrinkled brain of birds and then the greatly wrinkled brain of more advanced mammals.
The R-complex is the part of the brain associated with raw emotion.
Of course, the previous does not imply that all parts of the brain in any given organism are mutually exclusive. The brain works with all parts simultaneously in, dare I say, a holistic manner.
Thats what I read several years back, and it is an over-simplified explanation, so to anyone better educated in such manners please feel free to quote me when you show what I said is wrong in light of modern advances.