fn asLimbs(v: anytype) Limbs(@TypeOf(v))
fn asLimbs(v: anytype) Limbs(@TypeOf(v)) { const T = @TypeOf(v); const int_info = @typeInfo(T).int; const limb_cnt = comptime limbCount(int_info.bits); const ET = @Int(int_info.signedness, limb_cnt * 64); const low_to_high: Limbs(T) = @bitCast(@as(ET, v)); switch (endian) { .little => return low_to_high, .big => { var swapped: Limbs(T) = undefined; for (low_to_high, 0..) |x, i| { swapped[limb_cnt - i - 1] = x; } return swapped; }, } }