The phrase is part of this following line:
Actually I'm also unsure about the role and meaning of the か in the second to last clause too, but, in case it is unrelated to the clause I cited, I thought the meaning would be something on the lines of "The brain decides on what things to remember": I interpreted both か as "nested questions", so it would be something like "the brain thinks どちらか with 処理をしするか処理をしないか as options.
I think the reasoning is pretty convoluted, but it's the only thing I could come up with. I hope somebody may help me. Thanks in advance.