brains, beating (one's)
trying very hard to understand or think out something difficult; tiring (oneself) out by thinking.