There are a couple bugs in BigInt.asUintN.
One is that it currently fails to trim high zero digits off the result, invalidating the invariant that the most-significant-digit of a BigInt has at least one bit set.
The next is that when the result bit size is a multiple of the digit bit size, we shift a "mask" value by a full 64 (or 32) bits. It "works" fine on Intel but on ARM, such a shift will result in the top digit's bits all being masked off. Many thanks to Jakob Kummerow for the report.
Patch will fix these issues.