fn __popcount_limb64(a_ptr: [*]const u64, bits: u16) callconv(.c) u16
fn __popcount_limb64(a_ptr: [*]const u64, bits: u16) callconv(.c) u16 { const limb_cnt = usedLimbCount(bits); const a = constLimbs(a_ptr, bits); var res: u16 = 0; var i: usize = 0; while (i < limb_cnt - 1) : (i += 1) { res += @popCount(limbGet(a, i)); } var limb = limbGet(a, i); if (bits % 64 != 0) { limb <<= @intCast(64 - bits % 64); } res += @popCount(limb); return res; }