They want to be equally happy when all the muffins are divided.
When they are equally happy they stop.
Otherwise the happier person gives the unhappier person a muffin. This is the muffin they want least in comparison to the other person.
If giving a whole muffin over will make the receiver happier then the giver the giver gives the portion of the muffin that makes them equally happy.