Some of these `as` casts are mighty scary. We should audit for overflows when casting to and from `CFIndex` and `uint`, for example.