This solution saves roughly 50 SUM from my initial approach. The solution seems expensive for SUM but removing multiarms/arms yielded solutions that were way too slow while increasing the instruction count.