Generally speaking the bar for the insanity defense isn’t even insanity. If he were insane but capable of understanding that beating someone with a hammer was wrong he’d fail to meet the bar. You basically have to have no idea at all what you’re doing or that it’s wrong, and you have the burden of proving it.
Great now that’s all I’ll think about when I hear TJ Maxx.