arg1 = MAX(int64_t arg1, uint64_t arg2) gave the wrong result, if arg1 < 0, it was presented as a larger value. And ALARM_REG = (uin32_t)arg1. This leads to an infinite loop. Fixed: both args are int64_t. Closes: WIFI-1511