/* Generated by Cython 0.24 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_24"
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
  #define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__bsd___bsd
#define __PYX_HAVE_API__bsd___bsd
#include "errno.h"
#include "string.h"
#include "stdlib.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "unistd.h"
#include "stdint.h"
#include "limits.h"
#include "sys/uio.h"
#include "sys/param.h"
#include "sys/socket.h"
#include "netinet/in.h"
#include "sys/mount.h"
#include "sys/time.h"
#include "time.h"
#include "sys/resource.h"
#include "sys/user.h"
#include "libutil.h"
#include "libprocstat.h"
#include "sys/sysctl.h"
#include "sys/linker.h"
#include "sys/extattr.h"
#include "sys/acl.h"
#include "sys/bus.h"
#include "devinfo.h"
#include "kvm.h"
#include "net/if.h"
#include "net/bpf.h"
#include "sys/event.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING "utf8"
#define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "bsd/_bsd.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_3bsd_4_bsd_MountPoint;
struct __pyx_obj_3bsd_4_bsd_OpenFile;
struct __pyx_obj_3bsd_4_bsd_OpenVnode;
struct __pyx_obj_3bsd_4_bsd_OpenSocket;
struct __pyx_obj_3bsd_4_bsd_Process;
struct __pyx_obj_3bsd_4_bsd_SwapDevice;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs;
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo;

/* "bsd/_bsd.pyx":144
 * 
 * 
 * cdef class MountPoint(object):             # <<<<<<<<<<<<<<
 *     cdef defs.statfs* statfs
 *     cdef bint free
 */
struct __pyx_obj_3bsd_4_bsd_MountPoint {
  PyObject_HEAD
  struct statfs *statfs;
  int free;
};


/* "bsd/_bsd.pyx":226
 * 
 * 
 * cdef class OpenFile(object):             # <<<<<<<<<<<<<<
 *     cdef defs.procstat* ps
 *     cdef defs.filestat* fs
 */
struct __pyx_obj_3bsd_4_bsd_OpenFile {
  PyObject_HEAD
  struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile *__pyx_vtab;
  struct procstat *ps;
  struct filestat *fs;
};


/* "bsd/_bsd.pyx":277
 * 
 * 
 * cdef class OpenVnode(OpenFile):             # <<<<<<<<<<<<<<
 *     cdef defs.vnstat vn
 * 
 */
struct __pyx_obj_3bsd_4_bsd_OpenVnode {
  struct __pyx_obj_3bsd_4_bsd_OpenFile __pyx_base;
  struct vnstat vn;
};


/* "bsd/_bsd.pyx":318
 * 
 * 
 * cdef class OpenSocket(OpenFile):             # <<<<<<<<<<<<<<
 *     cdef defs.sockstat ss
 * 
 */
struct __pyx_obj_3bsd_4_bsd_OpenSocket {
  struct __pyx_obj_3bsd_4_bsd_OpenFile __pyx_base;
  struct sockstat ss;
};


/* "bsd/_bsd.pyx":377
 * 
 * 
 * cdef class Process(object):             # <<<<<<<<<<<<<<
 *     cdef defs.kinfo_proc* proc
 *     cdef defs.procstat* ps
 */
struct __pyx_obj_3bsd_4_bsd_Process {
  PyObject_HEAD
  struct kinfo_proc *proc;
  struct procstat *ps;
  int free;
};


/* "bsd/_bsd.pyx":536
 *                 fs = fs.next.stqe_next
 * 
 * cdef class SwapDevice(object):             # <<<<<<<<<<<<<<
 *     cdef defs.kvm_swap swap
 * 
 */
struct __pyx_obj_3bsd_4_bsd_SwapDevice {
  PyObject_HEAD
  struct kvm_swap swap;
};


/* "bsd/_bsd.pyx":449
 * 
 *     property argv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_argv
 *             cdef char *ptr
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ {
  PyObject_HEAD
  char **__pyx_v_c_argv;
  PyObject *__pyx_v_i;
  char *__pyx_v_ptr;
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self;
};


/* "bsd/_bsd.pyx":472
 * 
 *     property env:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_env
 *             cdef char *ptr
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ {
  PyObject_HEAD
  char **__pyx_v_c_env;
  PyObject *__pyx_v_i;
  char *__pyx_v_ptr;
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self;
};


/* "bsd/_bsd.pyx":509
 * 
 *     property files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef OpenFile file
 *             cdef defs.filestat_list* fs_list
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ {
  PyObject_HEAD
  PyObject *__pyx_v_cls;
  struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_file;
  struct filestat *__pyx_v_fs;
  struct filestat_list *__pyx_v_fs_list;
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self;
  PyObject *__pyx_v_type_mapping;
};


/* "bsd/_bsd.pyx":559
 * 
 * 
 * def getmntinfo():             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* mntbuf
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo {
  PyObject_HEAD
  int __pyx_v_count;
  long __pyx_v_i;
  struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_mnt;
  struct statfs *__pyx_v_mntbuf;
  int __pyx_t_0;
  long __pyx_t_1;
};


/* "bsd/_bsd.pyx":700
 * 
 * 
 * def getprocs(predicate, arg=0):             # <<<<<<<<<<<<<<
 *     cdef Process proc
 *     cdef defs.procstat *ps
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs {
  PyObject_HEAD
  PyObject *__pyx_v_arg;
  int __pyx_v_c_arg;
  int __pyx_v_c_predicate;
  unsigned int __pyx_v_count;
  long __pyx_v_i;
  PyObject *__pyx_v_predicate;
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_proc;
  struct procstat *__pyx_v_ps;
  struct kinfo_proc *__pyx_v_ret;
  struct kinfo_proc *__pyx_v_tmp;
  struct procstat *__pyx_v_tmp_ps;
  unsigned int __pyx_t_0;
  long __pyx_t_1;
};


/* "bsd/_bsd.pyx":749
 * 
 * 
 * def getswapinfo():             # <<<<<<<<<<<<<<
 *     cdef const char *c_name = "py-bsd"
 *     cdef SwapDevice swapdev
 */
struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo {
  PyObject_HEAD
  char const *__pyx_v_c_name;
  char __pyx_v_errstr[0x80];
  long __pyx_v_i;
  kvm_t *__pyx_v_kd;
  int __pyx_v_ret;
  struct kvm_swap __pyx_v_swap[0x400];
  struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_swapdev;
  int __pyx_t_0;
  long __pyx_t_1;
};



/* "bsd/_bsd.pyx":226
 * 
 * 
 * cdef class OpenFile(object):             # <<<<<<<<<<<<<<
 *     cdef defs.procstat* ps
 *     cdef defs.filestat* fs
 */

struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile {
  PyObject *(*init)(struct __pyx_obj_3bsd_4_bsd_OpenFile *);
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile *__pyx_vtabptr_3bsd_4_bsd_OpenFile;


/* "bsd/_bsd.pyx":277
 * 
 * 
 * cdef class OpenVnode(OpenFile):             # <<<<<<<<<<<<<<
 *     cdef defs.vnstat vn
 * 
 */

struct __pyx_vtabstruct_3bsd_4_bsd_OpenVnode {
  struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile __pyx_base;
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenVnode *__pyx_vtabptr_3bsd_4_bsd_OpenVnode;


/* "bsd/_bsd.pyx":318
 * 
 * 
 * cdef class OpenSocket(OpenFile):             # <<<<<<<<<<<<<<
 *     cdef defs.sockstat ss
 * 
 */

struct __pyx_vtabstruct_3bsd_4_bsd_OpenSocket {
  struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile __pyx_base;
  PyObject *(*get_sock_address)(struct __pyx_obj_3bsd_4_bsd_OpenSocket *, struct sockaddr_storage *);
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenSocket *__pyx_vtabptr_3bsd_4_bsd_OpenSocket;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* ListCompAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* PyThreadStateGet.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyIntBinop.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* py_dict_items.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    ((likely((cfunc)->func)) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
             ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) : __Pyx__CallUnboundCMethod0(cfunc, self)))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* ListAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* SaveResetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* IncludeStringH.proto */
#include <string.h>

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_in_port_t(in_port_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pid_t(pid_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uid_t(uid_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_time_t(time_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_suseconds_t(suseconds_t value);

static PyObject* __pyx_convert__to_py_struct__timeval(struct timeval s);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static PyObject* __pyx_convert__to_py_struct__rusage(struct rusage s);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE clockid_t __Pyx_PyInt_As_clockid_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE time_t __Pyx_PyInt_As_time_t(PyObject *);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* SwapException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname);
static int __Pyx_Coroutine_clear(PyObject *self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, closure, name, qualname)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static PyObject *__pyx_f_3bsd_4_bsd_8OpenFile_init(CYTHON_UNUSED struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3bsd_4_bsd_9OpenVnode_init(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3bsd_4_bsd_10OpenSocket_init(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_3bsd_4_bsd_10OpenSocket_get_sock_address(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self, struct sockaddr_storage *__pyx_v_ss); /* proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'libc.errno' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'posix.types' */

/* Module declarations from 'posix.stat' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'defs' */

/* Module declarations from 'bsd._bsd' */
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_MountPoint = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_OpenFile = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_OpenVnode = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_OpenSocket = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_Process = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd_SwapDevice = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct____get__ = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_1___get__ = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_2___get__ = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_4_getprocs = 0;
static PyTypeObject *__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo = 0;
static double __pyx_f_3bsd_4_bsd_convert_timeval(struct timeval *); /*proto*/
#define __Pyx_MODULE_NAME "bsd._bsd"
int __pyx_module_is_main_bsd___bsd = 0;

/* Implementation of 'bsd._bsd' */
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_OSError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_LookupError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ValueError;
static const char __pyx_k_b[] = "b";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_af[] = "af";
static const char __pyx_k_fd[] = "fd";
static const char __pyx_k_kd[] = "kd";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_ps[] = "ps";
static const char __pyx_k_tp[] = "tp";
static const char __pyx_k_ALL[] = "ALL";
static const char __pyx_k_GID[] = "GID";
static const char __pyx_k_PID[] = "PID";
static const char __pyx_k_PTS[] = "PTS";
static const char __pyx_k_SEM[] = "SEM";
static const char __pyx_k_SHM[] = "SHM";
static const char __pyx_k_TTY[] = "TTY";
static const char __pyx_k_UID[] = "UID";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_cwd[] = "cwd";
static const char __pyx_k_dev[] = "dev";
static const char __pyx_k_dir[] = "dir";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_env[] = "env";
static const char __pyx_k_get[] = "__get__";
static const char __pyx_k_gid[] = "gid";
static const char __pyx_k_iov[] = "iov";
static const char __pyx_k_mnt[] = "mnt";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_pid[] = "pid";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_tmp[] = "tmp";
static const char __pyx_k_uid[] = "uid";
static const char __pyx_k_ACLS[] = "ACLS";
static const char __pyx_k_CDIR[] = "CDIR";
static const char __pyx_k_CTTY[] = "CTTY";
static const char __pyx_k_EXCL[] = "EXCL";
static const char __pyx_k_EXEC[] = "EXEC";
static const char __pyx_k_FIFO[] = "FIFO";
static const char __pyx_k_JAIL[] = "JAIL";
static const char __pyx_k_MMAP[] = "MMAP";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_PGRP[] = "PGRP";
static const char __pyx_k_PIPE[] = "PIPE";
static const char __pyx_k_PROC[] = "PROC";
static const char __pyx_k_RDIR[] = "RDIR";
static const char __pyx_k_READ[] = "READ";
static const char __pyx_k_RGID[] = "RGID";
static const char __pyx_k_RUID[] = "RUID";
static const char __pyx_k_SYNC[] = "SYNC";
static const char __pyx_k_TEXT[] = "TEXT";
static const char __pyx_k_VBAD[] = "VBAD";
static const char __pyx_k_VBLK[] = "VBLK";
static const char __pyx_k_VCHR[] = "VCHR";
static const char __pyx_k_VDIR[] = "VDIR";
static const char __pyx_k_VLNK[] = "VLNK";
static const char __pyx_k_VNON[] = "VNON";
static const char __pyx_k_VREG[] = "VREG";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_argv[] = "argv";
static const char __pyx_k_c_fd[] = "c_fd";
static const char __pyx_k_dest[] = "dest";
static const char __pyx_k_dirs[] = "dirs";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_frac[] = "frac";
static const char __pyx_k_from[] = "from";
static const char __pyx_k_fsid[] = "fsid";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_modf[] = "modf";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_ppid[] = "ppid";
static const char __pyx_k_proc[] = "proc";
static const char __pyx_k_rest[] = "rest";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_swap[] = "swap";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_walk[] = "walk";
static const char __pyx_k_ASYNC[] = "ASYNC";
static const char __pyx_k_CREAT[] = "CREAT";
static const char __pyx_k_FORCE[] = "FORCE";
static const char __pyx_k_TRACE[] = "TRACE";
static const char __pyx_k_TRUNC[] = "TRUNC";
static const char __pyx_k_UNION[] = "UNION";
static const char __pyx_k_VFIFO[] = "VFIFO";
static const char __pyx_k_VNODE[] = "VNODE";
static const char __pyx_k_VSOCK[] = "VSOCK";
static const char __pyx_k_WRITE[] = "WRITE";
static const char __pyx_k_c_arg[] = "c_arg";
static const char __pyx_k_c_dir[] = "c_dir";
static const char __pyx_k_c_pid[] = "c_pid";
static const char __pyx_k_clock[] = "clock";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_dname[] = "dname";
static const char __pyx_k_files[] = "files";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_get_2[] = "get";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lowfd[] = "lowfd";
static const char __pyx_k_ntohl[] = "ntohl";
static const char __pyx_k_ntohs[] = "ntohs";
static const char __pyx_k_proto[] = "proto";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_title[] = "title";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_APPEND[] = "APPEND";
static const char __pyx_k_CRYPTO[] = "CRYPTO";
static const char __pyx_k_DIRECT[] = "DIRECT";
static const char __pyx_k_EXLOCK[] = "EXLOCK";
static const char __pyx_k_KQUEUE[] = "KQUEUE";
static const char __pyx_k_MQUEUE[] = "MQUEUE";
static const char __pyx_k_NOEXEC[] = "NOEXEC";
static const char __pyx_k_NOSUID[] = "NOSUID";
static const char __pyx_k_RDONLY[] = "RDONLY";
static const char __pyx_k_SHLOCK[] = "SHLOCK";
static const char __pyx_k_SOCKET[] = "SOCKET";
static const char __pyx_k_UPTIME[] = "UPTIME";
static const char __pyx_k_c_name[] = "c_name";
static const char __pyx_k_c_path[] = "c_path";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errstr[] = "errstr";
static const char __pyx_k_fflags[] = "fflags";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_fstype[] = "fstype";
static const char __pyx_k_ignore[] = "ignore";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_lchmod[] = "lchmod";
static const char __pyx_k_lchown[] = "lchown";
static const char __pyx_k_mntbuf[] = "mntbuf";
static const char __pyx_k_mntdir[] = "mntdir";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_nmount[] = "nmount";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_socket[] = "socket";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_statfs[] = "statfs";
static const char __pyx_k_tmp_ps[] = "tmp_ps";
static const char __pyx_k_tv_sec[] = "tv_sec";
static const char __pyx_k_uflags[] = "uflags";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_AF_INET[] = "AF_INET";
static const char __pyx_k_HASLOCK[] = "HASLOCK";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_NOATIME[] = "NOATIME";
static const char __pyx_k_OSError[] = "OSError";
static const char __pyx_k_SESSION[] = "SESSION";
static const char __pyx_k_SOFTDEP[] = "SOFTDEP";
static const char __pyx_k_SUIDDIR[] = "SUIDDIR";
static const char __pyx_k_UNKNOWN[] = "UNKNOWN";
static const char __pyx_k_c_flags[] = "c_flags";
static const char __pyx_k_clock_t[] = "clock_t";
static const char __pyx_k_command[] = "command";
static const char __pyx_k_devname[] = "devname";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_swapdev[] = "swapdev";
static const char __pyx_k_tv_usec[] = "tv_usec";
static const char __pyx_k_unmount[] = "unmount";
static const char __pyx_k_AF_INET6[] = "AF_INET6";
static const char __pyx_k_GJOURNAL[] = "GJOURNAL";
static const char __pyx_k_NFS4ACLS[] = "NFS4ACLS";
static const char __pyx_k_NOFOLLOW[] = "NOFOLLOW";
static const char __pyx_k_NONBLOCK[] = "NONBLOCK";
static const char __pyx_k_REALTIME[] = "REALTIME";
static const char __pyx_k_bsd__bsd[] = "bsd._bsd";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_getprocs[] = "getprocs";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_name_max[] = "name_max";
static const char __pyx_k_opencore[] = "opencore";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_refcount[] = "refcount";
static const char __pyx_k_ru_idrss[] = "ru_idrss";
static const char __pyx_k_ru_isrss[] = "ru_isrss";
static const char __pyx_k_ru_ixrss[] = "ru_ixrss";
static const char __pyx_k_ru_nswap[] = "ru_nswap";
static const char __pyx_k_ru_nvcsw[] = "ru_nvcsw";
static const char __pyx_k_ru_stime[] = "ru_stime";
static const char __pyx_k_ru_utime[] = "ru_utime";
static const char __pyx_k_strerror[] = "strerror";
static const char __pyx_k_ClockType[] = "ClockType";
static const char __pyx_k_MONOTONIC[] = "MONOTONIC";
static const char __pyx_k_VnodeType[] = "VnodeType";
static const char __pyx_k_blocksize[] = "blocksize";
static const char __pyx_k_closefrom[] = "closefrom";
static const char __pyx_k_ipaddress[] = "ipaddress";
static const char __pyx_k_login_tty[] = "login_tty";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_predicate[] = "predicate";
static const char __pyx_k_recursive[] = "recursive";
static const char __pyx_k_ru_majflt[] = "ru_majflt";
static const char __pyx_k_ru_maxrss[] = "ru_maxrss";
static const char __pyx_k_ru_minflt[] = "ru_minflt";
static const char __pyx_k_ru_msgrcv[] = "ru_msgrcv";
static const char __pyx_k_ru_msgsnd[] = "ru_msgsnd";
static const char __pyx_k_ru_nivcsw[] = "ru_nivcsw";
static const char __pyx_k_INC_THREAD[] = "INC_THREAD";
static const char __pyx_k_MULTILABEL[] = "MULTILABEL";
static const char __pyx_k_MountFlags[] = "MountFlags";
static const char __pyx_k_NOCLUSTERR[] = "NOCLUSTERR";
static const char __pyx_k_NOCLUSTERW[] = "NOCLUSTERW";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_c_filename[] = "c_filename";
static const char __pyx_k_free_files[] = "free_files";
static const char __pyx_k_getmntinfo[] = "getmntinfo";
static const char __pyx_k_ip_address[] = "ip_address";
static const char __pyx_k_kwargs_len[] = "kwargs_len";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_ru_inblock[] = "ru_inblock";
static const char __pyx_k_ru_oublock[] = "ru_oublock";
static const char __pyx_k_started_at[] = "started_at";
static const char __pyx_k_LookupError[] = "LookupError";
static const char __pyx_k_NOSYMFOLLOW[] = "NOSYMFOLLOW";
static const char __pyx_k_SYNCHRONOUS[] = "SYNCHRONOUS";
static const char __pyx_k_UPTIME_FAST[] = "UPTIME_FAST";
static const char __pyx_k_c_predicate[] = "c_predicate";
static const char __pyx_k_enumeration[] = "enumeration";
static const char __pyx_k_free_blocks[] = "free_blocks";
static const char __pyx_k_getswapinfo[] = "getswapinfo";
static const char __pyx_k_ru_nsignals[] = "ru_nsignals";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_avail_blocks[] = "avail_blocks";
static const char __pyx_k_peer_address[] = "peer_address";
static const char __pyx_k_setproctitle[] = "setproctitle";
static const char __pyx_k_total_blocks[] = "total_blocks";
static const char __pyx_k_Process___get[] = "Process.__get__";
static const char __pyx_k_REALTIME_FAST[] = "REALTIME_FAST";
static const char __pyx_k_clock_gettime[] = "clock_gettime";
static const char __pyx_k_clock_settime[] = "clock_settime";
static const char __pyx_k_fromtimestamp[] = "fromtimestamp";
static const char __pyx_k_kinfo_getproc[] = "kinfo_getproc";
static const char __pyx_k_local_address[] = "local_address";
static const char __pyx_k_DescriptorType[] = "DescriptorType";
static const char __pyx_k_MONOTONIC_FAST[] = "MONOTONIC_FAST";
static const char __pyx_k_UPTIME_PRECISE[] = "UPTIME_PRECISE";
static const char __pyx_k_bitmask_to_set[] = "bitmask_to_set";
static const char __pyx_k_set_to_bitmask[] = "set_to_bitmask";
static const char __pyx_k_DescriptorFlags[] = "DescriptorFlags";
static const char __pyx_k_PID_0_not_found[] = "PID {0} not found";
static const char __pyx_k_REALTIME_PRECISE[] = "REALTIME_PRECISE";
static const char __pyx_k_bsd_SwapDevice_0[] = "<bsd.SwapDevice '{0}'>";
static const char __pyx_k_decoded_filename[] = "decoded_filename";
static const char __pyx_k_MONOTONIC_PRECISE[] = "MONOTONIC_PRECISE";
static const char __pyx_k_DescriptorUseFlags[] = "DescriptorUseFlags";
static const char __pyx_k_bsd_Process_0_pid_1[] = "<bsd.Process '{0}' pid {1}>";
static const char __pyx_k_ProcessLookupPredicate[] = "ProcessLookupPredicate";
static const char __pyx_k_bsd_OpenFile_path_0_type_1[] = "<bsd.OpenFile path '{0}' type {1}>";
static const char __pyx_k_bsd_MountPoint_0_on_1_type_2[] = "<bsd.MountPoint '{0}' on '{1}' type '{2}'>";
static const char __pyx_k_usr_nas_source_py_bsd_bsd__bsd[] = "/usr/nas_source/py-bsd/bsd/_bsd.pyx";
static const char __pyx_k_Process_information_not_found_in[] = "Process information not found in the core file";
static const char __pyx_k_predicate_must_be_ProcessLookupP[] = "predicate must be ProcessLookupPredicate";
static PyObject *__pyx_n_s_ACLS;
static PyObject *__pyx_n_s_AF_INET;
static PyObject *__pyx_n_s_AF_INET6;
static PyObject *__pyx_n_s_ALL;
static PyObject *__pyx_n_s_APPEND;
static PyObject *__pyx_n_s_ASYNC;
static PyObject *__pyx_n_s_CDIR;
static PyObject *__pyx_n_s_CREAT;
static PyObject *__pyx_n_s_CRYPTO;
static PyObject *__pyx_n_s_CTTY;
static PyObject *__pyx_n_s_ClockType;
static PyObject *__pyx_n_s_DIRECT;
static PyObject *__pyx_n_s_DescriptorFlags;
static PyObject *__pyx_n_s_DescriptorType;
static PyObject *__pyx_n_s_DescriptorUseFlags;
static PyObject *__pyx_n_s_EXCL;
static PyObject *__pyx_n_s_EXEC;
static PyObject *__pyx_n_s_EXLOCK;
static PyObject *__pyx_n_s_FIFO;
static PyObject *__pyx_n_s_FORCE;
static PyObject *__pyx_n_s_GID;
static PyObject *__pyx_n_s_GJOURNAL;
static PyObject *__pyx_n_s_HASLOCK;
static PyObject *__pyx_n_s_INC_THREAD;
static PyObject *__pyx_n_s_IntEnum;
static PyObject *__pyx_n_s_JAIL;
static PyObject *__pyx_n_s_KQUEUE;
static PyObject *__pyx_n_s_LookupError;
static PyObject *__pyx_n_s_MMAP;
static PyObject *__pyx_n_s_MONOTONIC;
static PyObject *__pyx_n_s_MONOTONIC_FAST;
static PyObject *__pyx_n_s_MONOTONIC_PRECISE;
static PyObject *__pyx_n_s_MQUEUE;
static PyObject *__pyx_n_s_MULTILABEL;
static PyObject *__pyx_n_s_MountFlags;
static PyObject *__pyx_n_s_NFS4ACLS;
static PyObject *__pyx_n_s_NOATIME;
static PyObject *__pyx_n_s_NOCLUSTERR;
static PyObject *__pyx_n_s_NOCLUSTERW;
static PyObject *__pyx_n_s_NOEXEC;
static PyObject *__pyx_n_s_NOFOLLOW;
static PyObject *__pyx_n_s_NONBLOCK;
static PyObject *__pyx_n_s_NONE;
static PyObject *__pyx_n_s_NOSUID;
static PyObject *__pyx_n_s_NOSYMFOLLOW;
static PyObject *__pyx_n_s_OSError;
static PyObject *__pyx_n_s_PGRP;
static PyObject *__pyx_n_s_PID;
static PyObject *__pyx_kp_s_PID_0_not_found;
static PyObject *__pyx_n_s_PIPE;
static PyObject *__pyx_n_s_PROC;
static PyObject *__pyx_n_s_PTS;
static PyObject *__pyx_n_s_ProcessLookupPredicate;
static PyObject *__pyx_n_s_Process___get;
static PyObject *__pyx_kp_s_Process_information_not_found_in;
static PyObject *__pyx_n_s_RDIR;
static PyObject *__pyx_n_s_RDONLY;
static PyObject *__pyx_n_s_READ;
static PyObject *__pyx_n_s_REALTIME;
static PyObject *__pyx_n_s_REALTIME_FAST;
static PyObject *__pyx_n_s_REALTIME_PRECISE;
static PyObject *__pyx_n_s_RGID;
static PyObject *__pyx_n_s_RUID;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_SEM;
static PyObject *__pyx_n_s_SESSION;
static PyObject *__pyx_n_s_SHLOCK;
static PyObject *__pyx_n_s_SHM;
static PyObject *__pyx_n_s_SOCKET;
static PyObject *__pyx_n_s_SOFTDEP;
static PyObject *__pyx_n_s_SUIDDIR;
static PyObject *__pyx_n_s_SYNC;
static PyObject *__pyx_n_s_SYNCHRONOUS;
static PyObject *__pyx_n_s_TEXT;
static PyObject *__pyx_n_s_TRACE;
static PyObject *__pyx_n_s_TRUNC;
static PyObject *__pyx_n_s_TTY;
static PyObject *__pyx_n_s_UID;
static PyObject *__pyx_n_s_UNION;
static PyObject *__pyx_n_s_UNKNOWN;
static PyObject *__pyx_n_s_UPTIME;
static PyObject *__pyx_n_s_UPTIME_FAST;
static PyObject *__pyx_n_s_UPTIME_PRECISE;
static PyObject *__pyx_n_s_VBAD;
static PyObject *__pyx_n_s_VBLK;
static PyObject *__pyx_n_s_VCHR;
static PyObject *__pyx_n_s_VDIR;
static PyObject *__pyx_n_s_VFIFO;
static PyObject *__pyx_n_s_VLNK;
static PyObject *__pyx_n_s_VNODE;
static PyObject *__pyx_n_s_VNON;
static PyObject *__pyx_n_s_VREG;
static PyObject *__pyx_n_s_VSOCK;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VnodeType;
static PyObject *__pyx_n_s_WRITE;
static PyObject *__pyx_n_s_af;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argv;
static PyObject *__pyx_n_s_avail_blocks;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_bitmask_to_set;
static PyObject *__pyx_n_s_blocksize;
static PyObject *__pyx_kp_s_bsd_MountPoint_0_on_1_type_2;
static PyObject *__pyx_kp_s_bsd_OpenFile_path_0_type_1;
static PyObject *__pyx_kp_s_bsd_Process_0_pid_1;
static PyObject *__pyx_kp_s_bsd_SwapDevice_0;
static PyObject *__pyx_n_s_bsd__bsd;
static PyObject *__pyx_n_s_c_arg;
static PyObject *__pyx_n_s_c_dir;
static PyObject *__pyx_n_s_c_fd;
static PyObject *__pyx_n_s_c_filename;
static PyObject *__pyx_n_s_c_flags;
static PyObject *__pyx_n_s_c_name;
static PyObject *__pyx_n_s_c_path;
static PyObject *__pyx_n_s_c_pid;
static PyObject *__pyx_n_s_c_predicate;
static PyObject *__pyx_n_s_clock;
static PyObject *__pyx_n_s_clock_gettime;
static PyObject *__pyx_n_s_clock_settime;
static PyObject *__pyx_n_s_clock_t;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_closefrom;
static PyObject *__pyx_n_s_command;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_s_cwd;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_decoded_filename;
static PyObject *__pyx_n_s_dest;
static PyObject *__pyx_n_s_dev;
static PyObject *__pyx_n_s_devname;
static PyObject *__pyx_n_s_dir;
static PyObject *__pyx_n_s_dirs;
static PyObject *__pyx_n_s_dname;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumeration;
static PyObject *__pyx_n_s_env;
static PyObject *__pyx_n_s_errstr;
static PyObject *__pyx_n_s_fd;
static PyObject *__pyx_n_s_fflags;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_files;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_frac;
static PyObject *__pyx_n_s_free_blocks;
static PyObject *__pyx_n_s_free_files;
static PyObject *__pyx_n_s_from;
static PyObject *__pyx_n_s_fromtimestamp;
static PyObject *__pyx_n_s_fsid;
static PyObject *__pyx_n_s_fstype;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_2;
static PyObject *__pyx_n_s_getmntinfo;
static PyObject *__pyx_n_s_getprocs;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_getswapinfo;
static PyObject *__pyx_n_s_gid;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_ignore;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_iov;
static PyObject *__pyx_n_s_ip_address;
static PyObject *__pyx_n_s_ipaddress;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_kd;
static PyObject *__pyx_n_s_kinfo_getproc;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_kwargs_len;
static PyObject *__pyx_n_s_lchmod;
static PyObject *__pyx_n_s_lchown;
static PyObject *__pyx_n_s_local_address;
static PyObject *__pyx_n_s_login_tty;
static PyObject *__pyx_n_s_lowfd;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_math;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_mnt;
static PyObject *__pyx_n_s_mntbuf;
static PyObject *__pyx_n_s_mntdir;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_modf;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_max;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_nmount;
static PyObject *__pyx_n_s_ntohl;
static PyObject *__pyx_n_s_ntohs;
static PyObject *__pyx_n_s_opencore;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_peer_address;
static PyObject *__pyx_n_s_pid;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_ppid;
static PyObject *__pyx_n_s_predicate;
static PyObject *__pyx_kp_s_predicate_must_be_ProcessLookupP;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_proc;
static PyObject *__pyx_n_s_proto;
static PyObject *__pyx_n_s_ps;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_recursive;
static PyObject *__pyx_n_s_refcount;
static PyObject *__pyx_n_s_rest;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_ret;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_n_s_ru_idrss;
static PyObject *__pyx_n_s_ru_inblock;
static PyObject *__pyx_n_s_ru_isrss;
static PyObject *__pyx_n_s_ru_ixrss;
static PyObject *__pyx_n_s_ru_majflt;
static PyObject *__pyx_n_s_ru_maxrss;
static PyObject *__pyx_n_s_ru_minflt;
static PyObject *__pyx_n_s_ru_msgrcv;
static PyObject *__pyx_n_s_ru_msgsnd;
static PyObject *__pyx_n_s_ru_nivcsw;
static PyObject *__pyx_n_s_ru_nsignals;
static PyObject *__pyx_n_s_ru_nswap;
static PyObject *__pyx_n_s_ru_nvcsw;
static PyObject *__pyx_n_s_ru_oublock;
static PyObject *__pyx_n_s_ru_stime;
static PyObject *__pyx_n_s_ru_utime;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_set_to_bitmask;
static PyObject *__pyx_n_s_setproctitle;
static PyObject *__pyx_n_s_socket;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_started_at;
static PyObject *__pyx_n_s_statfs;
static PyObject *__pyx_n_s_strerror;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_swap;
static PyObject *__pyx_n_s_swapdev;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_title;
static PyObject *__pyx_n_s_tmp;
static PyObject *__pyx_n_s_tmp_ps;
static PyObject *__pyx_n_s_total_blocks;
static PyObject *__pyx_n_s_tp;
static PyObject *__pyx_n_s_tv_sec;
static PyObject *__pyx_n_s_tv_usec;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_uflags;
static PyObject *__pyx_n_s_uid;
static PyObject *__pyx_n_s_unmount;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_walk;
static int __pyx_pf_3bsd_4_bsd_10MountPoint___cinit__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static void __pyx_pf_3bsd_4_bsd_10MountPoint_2__dealloc__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4__str__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6__repr__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_8__getstate__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_5flags___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6fstype___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6source___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4dest___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_9blocksize___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_12total_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_11free_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_12avail_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_5files___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_10free_files___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_8name_max___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4fsid___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile___repr__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_2__str__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4__getstate__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4type___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_6fflags___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_6uflags___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_2fd___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4path___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_8refcount___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode___getstate__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_7devname___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_6mntdir___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_3dev___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_4fsid___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket___getstate__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_5dname___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_2af___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_5proto___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_13local_address___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_12peer_address___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self); /* proto */
static int __pyx_pf_3bsd_4_bsd_7Process___cinit__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static void __pyx_pf_3bsd_4_bsd_7Process_2__dealloc__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4__repr__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_6__str__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_8__getstate__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3pid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4ppid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_7command___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3uid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3cwd___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4path___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4argv___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3env___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_10started_at___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_6rusage___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7Process_5files___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice___repr__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_2__str__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_7devname___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_4used___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_5total___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_getmntinfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_3statfs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_5nmount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_7unmount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dir, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_9kinfo_getproc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pid); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_11opencore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_13getprocs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_arg); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_16getswapinfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_19clock_gettime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_clock); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_21clock_settime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_clock, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_23lchown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_uid, PyObject *__pyx_v_gid, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_25lchmod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode, PyObject *__pyx_v_recursive); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_27closefrom(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_lowfd); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_29login_tty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fd); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_31setproctitle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_33bitmask_to_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_enumeration); /* proto */
static PyObject *__pyx_pf_3bsd_4_bsd_35set_to_bitmask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_tp_new_3bsd_4_bsd_MountPoint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenVnode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenSocket(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd_Process(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd_SwapDevice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct____get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_1___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_2___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_4_getprocs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static PyObject *__pyx_float_1e9;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;

/* "bsd/_bsd.pyx":148
 *     cdef bint free
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_4_bsd_10MountPoint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3bsd_4_bsd_10MountPoint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint___cinit__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_4_bsd_10MountPoint___cinit__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "bsd/_bsd.pyx":149
 * 
 *     def __cinit__(self):
 *         self.free = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->free = 0;

  /* "bsd/_bsd.pyx":148
 *     cdef bint free
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = False
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":151
 *         self.free = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.free:
 *             free(self.statfs)
 */

/* Python wrapper */
static void __pyx_pw_3bsd_4_bsd_10MountPoint_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3bsd_4_bsd_10MountPoint_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3bsd_4_bsd_10MountPoint_2__dealloc__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3bsd_4_bsd_10MountPoint_2__dealloc__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "bsd/_bsd.pyx":152
 * 
 *     def __dealloc__(self):
 *         if self.free:             # <<<<<<<<<<<<<<
 *             free(self.statfs)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->free != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":153
 *     def __dealloc__(self):
 *         if self.free:
 *             free(self.statfs)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    free(__pyx_v_self->statfs);

    /* "bsd/_bsd.pyx":152
 * 
 *     def __dealloc__(self):
 *         if self.free:             # <<<<<<<<<<<<<<
 *             free(self.statfs)
 * 
 */
  }

  /* "bsd/_bsd.pyx":151
 *         self.free = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.free:
 *             free(self.statfs)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "bsd/_bsd.pyx":155
 *             free(self.statfs)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.MountPoint '{0}' on '{1}' type '{2}'>".format(self.source, self.dest, self.fstype)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_4__str__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4__str__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/_bsd.pyx":156
 * 
 *     def __str__(self):
 *         return "<bsd.MountPoint '{0}' on '{1}' type '{2}'>".format(self.source, self.dest, self.fstype)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bsd_MountPoint_0_on_1_type_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fstype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":155
 *             free(self.statfs)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.MountPoint '{0}' on '{1}' type '{2}'>".format(self.source, self.dest, self.fstype)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":158
 *         return "<bsd.MountPoint '{0}' on '{1}' type '{2}'>".format(self.source, self.dest, self.fstype)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_6__repr__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6__repr__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/_bsd.pyx":159
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":158
 *         return "<bsd.MountPoint '{0}' on '{1}' type '{2}'>".format(self.source, self.dest, self.fstype)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":161
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'flags': [x.name for x in self.flags],
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_8__getstate__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_8__getstate__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "bsd/_bsd.pyx":162
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'flags': [x.name for x in self.flags],
 *             'fstype': self.fstype,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "bsd/_bsd.pyx":163
 *     def __getstate__(self):
 *         return {
 *             'flags': [x.name for x in self.flags],             # <<<<<<<<<<<<<<
 *             'fstype': self.fstype,
 *             'source': self.source,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 163, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 163, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_flags, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":164
 *         return {
 *             'flags': [x.name for x in self.flags],
 *             'fstype': self.fstype,             # <<<<<<<<<<<<<<
 *             'source': self.source,
 *             'dest': self.dest,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fstype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fstype, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":165
 *             'flags': [x.name for x in self.flags],
 *             'fstype': self.fstype,
 *             'source': self.source,             # <<<<<<<<<<<<<<
 *             'dest': self.dest,
 *             'blocksize': self.blocksize,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":166
 *             'fstype': self.fstype,
 *             'source': self.source,
 *             'dest': self.dest,             # <<<<<<<<<<<<<<
 *             'blocksize': self.blocksize,
 *             'total_blocks': self.total_blocks,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dest, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":167
 *             'source': self.source,
 *             'dest': self.dest,
 *             'blocksize': self.blocksize,             # <<<<<<<<<<<<<<
 *             'total_blocks': self.total_blocks,
 *             'free_blocks': self.free_blocks,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blocksize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_blocksize, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":168
 *             'dest': self.dest,
 *             'blocksize': self.blocksize,
 *             'total_blocks': self.total_blocks,             # <<<<<<<<<<<<<<
 *             'free_blocks': self.free_blocks,
 *             'avail_blocks': self.avail_blocks,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_total_blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total_blocks, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":169
 *             'blocksize': self.blocksize,
 *             'total_blocks': self.total_blocks,
 *             'free_blocks': self.free_blocks,             # <<<<<<<<<<<<<<
 *             'avail_blocks': self.avail_blocks,
 *             'files': self.files,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_free_blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_free_blocks, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":170
 *             'total_blocks': self.total_blocks,
 *             'free_blocks': self.free_blocks,
 *             'avail_blocks': self.avail_blocks,             # <<<<<<<<<<<<<<
 *             'files': self.files,
 *             'free_files': self.free_files,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_avail_blocks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_avail_blocks, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":171
 *             'free_blocks': self.free_blocks,
 *             'avail_blocks': self.avail_blocks,
 *             'files': self.files,             # <<<<<<<<<<<<<<
 *             'free_files': self.free_files,
 *             'name_max': self.name_max,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_files); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_files, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":172
 *             'avail_blocks': self.avail_blocks,
 *             'files': self.files,
 *             'free_files': self.free_files,             # <<<<<<<<<<<<<<
 *             'name_max': self.name_max,
 *             'fsid': self.fsid
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_free_files); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_free_files, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":173
 *             'files': self.files,
 *             'free_files': self.free_files,
 *             'name_max': self.name_max,             # <<<<<<<<<<<<<<
 *             'fsid': self.fsid
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name_max, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":174
 *             'free_files': self.free_files,
 *             'name_max': self.name_max,
 *             'fsid': self.fsid             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fsid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fsid, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":161
 *         return str(self)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'flags': [x.name for x in self.flags],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":178
 * 
 *     property flags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.statfs.f_flags, MountFlags)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_5flags___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_5flags___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":179
 *     property flags:
 *         def __get__(self):
 *             return bitmask_to_set(self.statfs.f_flags, MountFlags)             # <<<<<<<<<<<<<<
 * 
 *     property fstype:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bitmask_to_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->statfs->f_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_MountFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":178
 * 
 *     property flags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.statfs.f_flags, MountFlags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":182
 * 
 *     property fstype:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_fstypename
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_6fstype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_6fstype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_6fstype___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6fstype___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":183
 *     property fstype:
 *         def __get__(self):
 *             return self.statfs.f_fstypename             # <<<<<<<<<<<<<<
 * 
 *     property source:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->statfs->f_fstypename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":182
 * 
 *     property fstype:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_fstypename
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.fstype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":186
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_mntfromname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_6source_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_6source_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_6source___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_6source___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":187
 *     property source:
 *         def __get__(self):
 *             return self.statfs.f_mntfromname             # <<<<<<<<<<<<<<
 * 
 *     property dest:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->statfs->f_mntfromname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":186
 * 
 *     property source:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_mntfromname
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":190
 * 
 *     property dest:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_mntonname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_4dest_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_4dest_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_4dest___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4dest___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":191
 *     property dest:
 *         def __get__(self):
 *             return self.statfs.f_mntonname             # <<<<<<<<<<<<<<
 * 
 *     property blocksize:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->statfs->f_mntonname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":190
 * 
 *     property dest:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_mntonname
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.dest.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":194
 * 
 *     property blocksize:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_9blocksize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_9blocksize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_9blocksize___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_9blocksize___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":195
 *     property blocksize:
 *         def __get__(self):
 *             return self.statfs.f_bsize             # <<<<<<<<<<<<<<
 * 
 *     property total_blocks:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->statfs->f_bsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":194
 * 
 *     property blocksize:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.blocksize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":198
 * 
 *     property total_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_blocks
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_12total_blocks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_12total_blocks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_12total_blocks___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_12total_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":199
 *     property total_blocks:
 *         def __get__(self):
 *             return self.statfs.f_blocks             # <<<<<<<<<<<<<<
 * 
 *     property free_blocks:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->statfs->f_blocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":198
 * 
 *     property total_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_blocks
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.total_blocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":202
 * 
 *     property free_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bfree
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_11free_blocks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_11free_blocks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_11free_blocks___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_11free_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":203
 *     property free_blocks:
 *         def __get__(self):
 *             return self.statfs.f_bfree             # <<<<<<<<<<<<<<
 * 
 *     property avail_blocks:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->statfs->f_bfree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":202
 * 
 *     property free_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bfree
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.free_blocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":206
 * 
 *     property avail_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bavail
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_12avail_blocks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_12avail_blocks_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_12avail_blocks___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_12avail_blocks___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":207
 *     property avail_blocks:
 *         def __get__(self):
 *             return self.statfs.f_bavail             # <<<<<<<<<<<<<<
 * 
 *     property files:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->statfs->f_bavail); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":206
 * 
 *     property avail_blocks:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_bavail
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.avail_blocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":210
 * 
 *     property files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_files
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5files_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_5files_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_5files___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_5files___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":211
 *     property files:
 *         def __get__(self):
 *             return self.statfs.f_files             # <<<<<<<<<<<<<<
 * 
 *     property free_files:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->statfs->f_files); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":210
 * 
 *     property files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_files
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.files.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":214
 * 
 *     property free_files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_ffree
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_10free_files_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_10free_files_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_10free_files___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_10free_files___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":215
 *     property free_files:
 *         def __get__(self):
 *             return self.statfs.f_ffree             # <<<<<<<<<<<<<<
 * 
 *     property name_max:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->statfs->f_ffree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":214
 * 
 *     property free_files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_ffree
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.free_files.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":218
 * 
 *     property name_max:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_namemax
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_8name_max_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_8name_max_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_8name_max___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_8name_max___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":219
 *     property name_max:
 *         def __get__(self):
 *             return self.statfs.f_namemax             # <<<<<<<<<<<<<<
 * 
 *     property fsid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->statfs->f_namemax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":218
 * 
 *     property name_max:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_namemax
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.name_max.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":222
 * 
 *     property fsid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_fsid.val[0], self.statfs.f_fsid.val[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_4fsid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10MountPoint_4fsid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10MountPoint_4fsid___get__(((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10MountPoint_4fsid___get__(struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":223
 *     property fsid:
 *         def __get__(self):
 *             return self.statfs.f_fsid.val[0], self.statfs.f_fsid.val[1]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t((__pyx_v_self->statfs->f_fsid.val[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_v_self->statfs->f_fsid.val[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":222
 * 
 *     property fsid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.statfs.f_fsid.val[0], self.statfs.f_fsid.val[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("bsd._bsd.MountPoint.fsid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":230
 *     cdef defs.filestat* fs
 * 
 *     cdef init(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

static PyObject *__pyx_f_3bsd_4_bsd_8OpenFile_init(CYTHON_UNUSED struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":233
 *         pass
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile___repr__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile___repr__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/_bsd.pyx":234
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":233
 *         pass
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":236
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.OpenFile path '{0}' type {1}>".format(
 *             self.path,
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_2__str__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_2__str__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/_bsd.pyx":237
 * 
 *     def __str__(self):
 *         return "<bsd.OpenFile path '{0}' type {1}>".format(             # <<<<<<<<<<<<<<
 *             self.path,
 *             str(self.type)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bsd_OpenFile_path_0_type_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/_bsd.pyx":238
 *     def __str__(self):
 *         return "<bsd.OpenFile path '{0}' type {1}>".format(
 *             self.path,             # <<<<<<<<<<<<<<
 *             str(self.type)
 *         )
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":239
 *         return "<bsd.OpenFile path '{0}' type {1}>".format(
 *             self.path,
 *             str(self.type)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":236
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.OpenFile path '{0}' type {1}>".format(
 *             self.path,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":242
 *         )
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'type': self.type.name,
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_4__getstate__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4__getstate__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "bsd/_bsd.pyx":243
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'type': self.type.name,
 *             'flags': [i.name for i in self.fflags],
 */
  __Pyx_XDECREF(__pyx_r);

  /* "bsd/_bsd.pyx":244
 *     def __getstate__(self):
 *         return {
 *             'type': self.type.name,             # <<<<<<<<<<<<<<
 *             'flags': [i.name for i in self.fflags],
 *             'uflags': [i.name for i in self.uflags],
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":245
 *         return {
 *             'type': self.type.name,
 *             'flags': [i.name for i in self.fflags],             # <<<<<<<<<<<<<<
 *             'uflags': [i.name for i in self.uflags],
 *             'fd': self.fd,
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fflags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 245, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":246
 *             'type': self.type.name,
 *             'flags': [i.name for i in self.fflags],
 *             'uflags': [i.name for i in self.uflags],             # <<<<<<<<<<<<<<
 *             'fd': self.fd,
 *             'path': self.path,
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uflags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 246, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_uflags, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":247
 *             'flags': [i.name for i in self.fflags],
 *             'uflags': [i.name for i in self.uflags],
 *             'fd': self.fd,             # <<<<<<<<<<<<<<
 *             'path': self.path,
 *             'refcount': self.refcount
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fd, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":248
 *             'uflags': [i.name for i in self.uflags],
 *             'fd': self.fd,
 *             'path': self.path,             # <<<<<<<<<<<<<<
 *             'refcount': self.refcount
 *         }
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_path, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":249
 *             'fd': self.fd,
 *             'path': self.path,
 *             'refcount': self.refcount             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_refcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_refcount, __pyx_t_3) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":242
 *         )
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'type': self.type.name,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":253
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return DescriptorType(self.fs.fs_type)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_4type___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4type___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":254
 *     property type:
 *         def __get__(self):
 *             return DescriptorType(self.fs.fs_type)             # <<<<<<<<<<<<<<
 * 
 *     property fflags:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DescriptorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->fs->fs_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":253
 * 
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return DescriptorType(self.fs.fs_type)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":257
 * 
 *     property fflags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.fs.fs_fflags, DescriptorFlags)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_6fflags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_6fflags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_6fflags___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_6fflags___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":258
 *     property fflags:
 *         def __get__(self):
 *             return bitmask_to_set(self.fs.fs_fflags, DescriptorFlags)             # <<<<<<<<<<<<<<
 * 
 *     property uflags:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bitmask_to_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->fs->fs_fflags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DescriptorFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":257
 * 
 *     property fflags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.fs.fs_fflags, DescriptorFlags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.fflags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":261
 * 
 *     property uflags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.fs.fs_uflags, DescriptorUseFlags)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_6uflags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_6uflags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_6uflags___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_6uflags___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":262
 *     property uflags:
 *         def __get__(self):
 *             return bitmask_to_set(self.fs.fs_uflags, DescriptorUseFlags)             # <<<<<<<<<<<<<<
 * 
 *     property fd:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bitmask_to_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->fs->fs_uflags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DescriptorUseFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":261
 * 
 *     property uflags:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return bitmask_to_set(self.fs.fs_uflags, DescriptorUseFlags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.uflags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":265
 * 
 *     property fd:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_fd
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_2fd_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_2fd___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_2fd___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":266
 *     property fd:
 *         def __get__(self):
 *             return self.fs.fs_fd             # <<<<<<<<<<<<<<
 * 
 *     property path:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->fs->fs_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":265
 * 
 *     property fd:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_fd
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":269
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_path or None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_4path_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_4path___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_4path___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":270
 *     property path:
 *         def __get__(self):
 *             return self.fs.fs_path or None             # <<<<<<<<<<<<<<
 * 
 *     property refcount:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_self->fs->fs_path) {
  } else {
    __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_self->fs->fs_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(Py_None);
  __pyx_t_1 = Py_None;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":269
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_path or None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.path.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":273
 * 
 *     property refcount:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_ref_count
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_8refcount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_8OpenFile_8refcount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_8OpenFile_8refcount___get__(((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_8OpenFile_8refcount___get__(struct __pyx_obj_3bsd_4_bsd_OpenFile *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":274
 *     property refcount:
 *         def __get__(self):
 *             return self.fs.fs_ref_count             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->fs->fs_ref_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":273
 * 
 *     property refcount:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.fs.fs_ref_count
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenFile.refcount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":280
 *     cdef defs.vnstat vn
 * 
 *     cdef init(self):             # <<<<<<<<<<<<<<
 *         cdef char errbuf[defs._POSIX2_LINE_MAX]
 *         cdef int ret
 */

static PyObject *__pyx_f_3bsd_4_bsd_9OpenVnode_init(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  char __pyx_v_errbuf[_POSIX2_LINE_MAX];
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("init", 0);

  /* "bsd/_bsd.pyx":284
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = defs.procstat_get_vnode_info(self.ps, self.fs, &self.vn, errbuf)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":285
 * 
 *         with nogil:
 *             ret = defs.procstat_get_vnode_info(self.ps, self.fs, &self.vn, errbuf)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = procstat_get_vnode_info(__pyx_v_self->__pyx_base.ps, __pyx_v_self->__pyx_base.fs, (&__pyx_v_self->vn), __pyx_v_errbuf);
      }

      /* "bsd/_bsd.pyx":284
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = defs.procstat_get_vnode_info(self.ps, self.fs, &self.vn, errbuf)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":287
 *             ret = defs.procstat_get_vnode_info(self.ps, self.fs, &self.vn, errbuf)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {
  }

  /* "bsd/_bsd.pyx":280
 *     cdef defs.vnstat vn
 * 
 *     cdef init(self):             # <<<<<<<<<<<<<<
 *         cdef char errbuf[defs._POSIX2_LINE_MAX]
 *         cdef int ret
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":290
 *             pass
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         d = super(OpenVnode, self).__getstate__()
 *         d.update({
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9OpenVnode___getstate__(((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode___getstate__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "bsd/_bsd.pyx":291
 * 
 *     def __getstate__(self):
 *         d = super(OpenVnode, self).__getstate__()             # <<<<<<<<<<<<<<
 *         d.update({
 *             'devname': self.devname,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenVnode));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenVnode));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenVnode));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":292
 *     def __getstate__(self):
 *         d = super(OpenVnode, self).__getstate__()
 *         d.update({             # <<<<<<<<<<<<<<
 *             'devname': self.devname,
 *             'mntdir': self.mntdir,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/_bsd.pyx":293
 *         d = super(OpenVnode, self).__getstate__()
 *         d.update({
 *             'devname': self.devname,             # <<<<<<<<<<<<<<
 *             'mntdir': self.mntdir,
 *             'dev': self.dev,
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_devname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_devname, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":294
 *         d.update({
 *             'devname': self.devname,
 *             'mntdir': self.mntdir,             # <<<<<<<<<<<<<<
 *             'dev': self.dev,
 *             'fsid': self.fsid
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mntdir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mntdir, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":295
 *             'devname': self.devname,
 *             'mntdir': self.mntdir,
 *             'dev': self.dev,             # <<<<<<<<<<<<<<
 *             'fsid': self.fsid
 *         })
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dev); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dev, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":296
 *             'mntdir': self.mntdir,
 *             'dev': self.dev,
 *             'fsid': self.fsid             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fsid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fsid, __pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":299
 *         })
 * 
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     property devname:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":290
 *             pass
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         d = super(OpenVnode, self).__getstate__()
 *         d.update({
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.OpenVnode.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":302
 * 
 *     property devname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_devname or None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_7devname_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_7devname_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9OpenVnode_7devname___get__(((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_7devname___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":303
 *     property devname:
 *         def __get__(self):
 *             return self.vn.vn_devname or None             # <<<<<<<<<<<<<<
 * 
 *     property mntdir:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_self->vn.vn_devname) {
  } else {
    __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_self->vn.vn_devname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(Py_None);
  __pyx_t_1 = Py_None;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":302
 * 
 *     property devname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_devname or None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.OpenVnode.devname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":306
 * 
 *     property mntdir:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_mntdir or None
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_6mntdir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_6mntdir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9OpenVnode_6mntdir___get__(((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_6mntdir___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":307
 *     property mntdir:
 *         def __get__(self):
 *             return self.vn.vn_mntdir or None             # <<<<<<<<<<<<<<
 * 
 *     property dev:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_self->vn.vn_mntdir) {
  } else {
    __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_self->vn.vn_mntdir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(Py_None);
  __pyx_t_1 = Py_None;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":306
 * 
 *     property mntdir:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_mntdir or None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.OpenVnode.mntdir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":310
 * 
 *     property dev:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_dev
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_3dev_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_3dev_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9OpenVnode_3dev___get__(((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_3dev___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":311
 *     property dev:
 *         def __get__(self):
 *             return self.vn.vn_dev             # <<<<<<<<<<<<<<
 * 
 *     property fsid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->vn.vn_dev); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":310
 * 
 *     property dev:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_dev
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenVnode.dev.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":314
 * 
 *     property fsid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_fsid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_4fsid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_9OpenVnode_4fsid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9OpenVnode_4fsid___get__(((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9OpenVnode_4fsid___get__(struct __pyx_obj_3bsd_4_bsd_OpenVnode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":315
 *     property fsid:
 *         def __get__(self):
 *             return self.vn.vn_fsid             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_self->vn.vn_fsid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":314
 * 
 *     property fsid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.vn.vn_fsid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenVnode.fsid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":321
 *     cdef defs.sockstat ss
 * 
 *     cdef init(self):             # <<<<<<<<<<<<<<
 *         cdef char errbuf[defs._POSIX2_LINE_MAX]
 *         cdef int ret
 */

static PyObject *__pyx_f_3bsd_4_bsd_10OpenSocket_init(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  char __pyx_v_errbuf[_POSIX2_LINE_MAX];
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("init", 0);

  /* "bsd/_bsd.pyx":325
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = defs.procstat_get_socket_info(self.ps, self.fs, &self.ss, errbuf)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":326
 * 
 *         with nogil:
 *             ret = defs.procstat_get_socket_info(self.ps, self.fs, &self.ss, errbuf)             # <<<<<<<<<<<<<<
 * 
 *         if ret != 0:
 */
        __pyx_v_ret = procstat_get_socket_info(__pyx_v_self->__pyx_base.ps, __pyx_v_self->__pyx_base.fs, (&__pyx_v_self->ss), __pyx_v_errbuf);
      }

      /* "bsd/_bsd.pyx":325
 *         cdef int ret
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             ret = defs.procstat_get_socket_info(self.ps, self.fs, &self.ss, errbuf)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":328
 *             ret = defs.procstat_get_socket_info(self.ps, self.fs, &self.ss, errbuf)
 * 
 *         if ret != 0:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_1) {
  }

  /* "bsd/_bsd.pyx":321
 *     cdef defs.sockstat ss
 * 
 *     cdef init(self):             # <<<<<<<<<<<<<<
 *         cdef char errbuf[defs._POSIX2_LINE_MAX]
 *         cdef int ret
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":331
 *             pass
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         d = super(OpenSocket, self).__getstate__()
 *         d.update({
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_1__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket___getstate__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket___getstate__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "bsd/_bsd.pyx":332
 * 
 *     def __getstate__(self):
 *         d = super(OpenSocket, self).__getstate__()             # <<<<<<<<<<<<<<
 *         d.update({
 *             'dname': self.dname,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenSocket));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenSocket));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenSocket));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":333
 *     def __getstate__(self):
 *         d = super(OpenSocket, self).__getstate__()
 *         d.update({             # <<<<<<<<<<<<<<
 *             'dname': self.dname,
 *             'af': self.af,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/_bsd.pyx":334
 *         d = super(OpenSocket, self).__getstate__()
 *         d.update({
 *             'dname': self.dname,             # <<<<<<<<<<<<<<
 *             'af': self.af,
 *             'proto': self.proto,
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dname, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":335
 *         d.update({
 *             'dname': self.dname,
 *             'af': self.af,             # <<<<<<<<<<<<<<
 *             'proto': self.proto,
 *             'local_address': self.local_address,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_af); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_af, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":336
 *             'dname': self.dname,
 *             'af': self.af,
 *             'proto': self.proto,             # <<<<<<<<<<<<<<
 *             'local_address': self.local_address,
 *             'peer_address': self.peer_address
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_proto, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":337
 *             'af': self.af,
 *             'proto': self.proto,
 *             'local_address': self.local_address,             # <<<<<<<<<<<<<<
 *             'peer_address': self.peer_address
 *         })
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_local_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_local_address, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":338
 *             'proto': self.proto,
 *             'local_address': self.local_address,
 *             'peer_address': self.peer_address             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peer_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_peer_address, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":341
 *         })
 * 
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     cdef get_sock_address(self, defs.sockaddr_storage *ss):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":331
 *             pass
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         d = super(OpenSocket, self).__getstate__()
 *         d.update({
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":343
 *         return d
 * 
 *     cdef get_sock_address(self, defs.sockaddr_storage *ss):             # <<<<<<<<<<<<<<
 *         cdef defs.sockaddr_in *sin
 *         cdef defs.sockaddr_in6 *sin6
 */

static PyObject *__pyx_f_3bsd_4_bsd_10OpenSocket_get_sock_address(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self, struct sockaddr_storage *__pyx_v_ss) {
  struct sockaddr_in *__pyx_v_sin;
  struct sockaddr_in6 *__pyx_v_sin6;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("get_sock_address", 0);

  /* "bsd/_bsd.pyx":347
 *         cdef defs.sockaddr_in6 *sin6
 * 
 *         if self.af == socket.AF_INET:             # <<<<<<<<<<<<<<
 *             sin = <defs.sockaddr_in *>ss
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_af); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AF_INET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "bsd/_bsd.pyx":348
 * 
 *         if self.af == socket.AF_INET:
 *             sin = <defs.sockaddr_in *>ss             # <<<<<<<<<<<<<<
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)
 * 
 */
    __pyx_v_sin = ((struct sockaddr_in *)__pyx_v_ss);

    /* "bsd/_bsd.pyx":349
 *         if self.af == socket.AF_INET:
 *             sin = <defs.sockaddr_in *>ss
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)             # <<<<<<<<<<<<<<
 * 
 *         if self.af == socket.AF_INET6:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ipaddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ip_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ntohl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_uint32_t(__pyx_v_sin->sin_addr.s_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ntohs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyInt_From_in_port_t(__pyx_v_sin->sin_port); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":347
 *         cdef defs.sockaddr_in6 *sin6
 * 
 *         if self.af == socket.AF_INET:             # <<<<<<<<<<<<<<
 *             sin = <defs.sockaddr_in *>ss
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)
 */
  }

  /* "bsd/_bsd.pyx":351
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)
 * 
 *         if self.af == socket.AF_INET6:             # <<<<<<<<<<<<<<
 *             sin6 = <defs.sockaddr_in6 *>ss
 *             return ipaddress.ip_address(<bytes>sin6.sin6_addr.s6_addr[:16]), socket.ntohs(sin6.sin6_port)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_af); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AF_INET6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "bsd/_bsd.pyx":352
 * 
 *         if self.af == socket.AF_INET6:
 *             sin6 = <defs.sockaddr_in6 *>ss             # <<<<<<<<<<<<<<
 *             return ipaddress.ip_address(<bytes>sin6.sin6_addr.s6_addr[:16]), socket.ntohs(sin6.sin6_port)
 * 
 */
    __pyx_v_sin6 = ((struct sockaddr_in6 *)__pyx_v_ss);

    /* "bsd/_bsd.pyx":353
 *         if self.af == socket.AF_INET6:
 *             sin6 = <defs.sockaddr_in6 *>ss
 *             return ipaddress.ip_address(<bytes>sin6.sin6_addr.s6_addr[:16]), socket.ntohs(sin6.sin6_port)             # <<<<<<<<<<<<<<
 * 
 *     property dname:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ipaddress); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ip_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_sin6->sin6_addr.s6_addr) + 0, 16 - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(((PyObject*)__pyx_t_2));
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ntohs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyInt_From_in_port_t(__pyx_v_sin6->sin6_port); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":351
 *             return ipaddress.ip_address(socket.ntohl(sin.sin_addr.s_addr)), socket.ntohs(sin.sin_port)
 * 
 *         if self.af == socket.AF_INET6:             # <<<<<<<<<<<<<<
 *             sin6 = <defs.sockaddr_in6 *>ss
 *             return ipaddress.ip_address(<bytes>sin6.sin6_addr.s6_addr[:16]), socket.ntohs(sin6.sin6_port)
 */
  }

  /* "bsd/_bsd.pyx":343
 *         return d
 * 
 *     cdef get_sock_address(self, defs.sockaddr_storage *ss):             # <<<<<<<<<<<<<<
 *         cdef defs.sockaddr_in *sin
 *         cdef defs.sockaddr_in6 *sin6
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.get_sock_address", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":356
 * 
 *     property dname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.dname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_5dname_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_5dname_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket_5dname___get__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_5dname___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":357
 *     property dname:
 *         def __get__(self):
 *             return self.ss.dname             # <<<<<<<<<<<<<<
 * 
 *     property af:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->ss.dname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":356
 * 
 *     property dname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.dname
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.dname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":360
 * 
 *     property af:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.dom_family
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_2af_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_2af_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket_2af___get__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_2af___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":361
 *     property af:
 *         def __get__(self):
 *             return self.ss.dom_family             # <<<<<<<<<<<<<<
 * 
 *     property proto:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ss.dom_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":360
 * 
 *     property af:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.dom_family
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.af.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":364
 * 
 *     property proto:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.proto
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_5proto_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_5proto_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket_5proto___get__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_5proto___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":365
 *     property proto:
 *         def __get__(self):
 *             return self.ss.proto             # <<<<<<<<<<<<<<
 * 
 *     property local_address:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ss.proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":364
 * 
 *     property proto:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.ss.proto
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.proto.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":368
 * 
 *     property local_address:
 *         def __get__ (self):             # <<<<<<<<<<<<<<
 *             return self.get_sock_address(&self.ss.sa_local)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_13local_address_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_13local_address_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket_13local_address___get__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_13local_address___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":369
 *     property local_address:
 *         def __get__ (self):
 *             return self.get_sock_address(&self.ss.sa_local)             # <<<<<<<<<<<<<<
 * 
 *     property peer_address:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_3bsd_4_bsd_OpenSocket *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_sock_address(__pyx_v_self, (&__pyx_v_self->ss.sa_local)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":368
 * 
 *     property local_address:
 *         def __get__ (self):             # <<<<<<<<<<<<<<
 *             return self.get_sock_address(&self.ss.sa_local)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.local_address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":372
 * 
 *     property peer_address:
 *         def __get__ (self):             # <<<<<<<<<<<<<<
 *             return self.get_sock_address(&self.ss.sa_peer)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_12peer_address_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10OpenSocket_12peer_address_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10OpenSocket_12peer_address___get__(((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10OpenSocket_12peer_address___get__(struct __pyx_obj_3bsd_4_bsd_OpenSocket *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":373
 *     property peer_address:
 *         def __get__ (self):
 *             return self.get_sock_address(&self.ss.sa_peer)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_3bsd_4_bsd_OpenSocket *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_sock_address(__pyx_v_self, (&__pyx_v_self->ss.sa_peer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":372
 * 
 *     property peer_address:
 *         def __get__ (self):             # <<<<<<<<<<<<<<
 *             return self.get_sock_address(&self.ss.sa_peer)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.OpenSocket.peer_address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":382
 *     cdef bint free
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = False
 * 
 */

/* Python wrapper */
static int __pyx_pw_3bsd_4_bsd_7Process_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3bsd_4_bsd_7Process_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process___cinit__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3bsd_4_bsd_7Process___cinit__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "bsd/_bsd.pyx":383
 * 
 *     def __cinit__(self):
 *         self.free = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->free = 0;

  /* "bsd/_bsd.pyx":382
 *     cdef bint free
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.free = False
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":385
 *         self.free = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             defs.procstat_close(self.ps)
 */

/* Python wrapper */
static void __pyx_pw_3bsd_4_bsd_7Process_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3bsd_4_bsd_7Process_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3bsd_4_bsd_7Process_2__dealloc__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3bsd_4_bsd_7Process_2__dealloc__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "bsd/_bsd.pyx":386
 * 
 *     def __dealloc__(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             defs.procstat_close(self.ps)
 *             if self.free:
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":387
 *     def __dealloc__(self):
 *         with nogil:
 *             defs.procstat_close(self.ps)             # <<<<<<<<<<<<<<
 *             if self.free:
 *                 free(self.proc)
 */
        procstat_close(__pyx_v_self->ps);

        /* "bsd/_bsd.pyx":388
 *         with nogil:
 *             defs.procstat_close(self.ps)
 *             if self.free:             # <<<<<<<<<<<<<<
 *                 free(self.proc)
 * 
 */
        __pyx_t_1 = (__pyx_v_self->free != 0);
        if (__pyx_t_1) {

          /* "bsd/_bsd.pyx":389
 *             defs.procstat_close(self.ps)
 *             if self.free:
 *                 free(self.proc)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
          free(__pyx_v_self->proc);

          /* "bsd/_bsd.pyx":388
 *         with nogil:
 *             defs.procstat_close(self.ps)
 *             if self.free:             # <<<<<<<<<<<<<<
 *                 free(self.proc)
 * 
 */
        }
      }

      /* "bsd/_bsd.pyx":386
 * 
 *     def __dealloc__(self):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             defs.procstat_close(self.ps)
 *             if self.free:
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":385
 *         self.free = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             defs.procstat_close(self.ps)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "bsd/_bsd.pyx":391
 *                 free(self.proc)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_4__repr__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4__repr__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/_bsd.pyx":392
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":391
 *                 free(self.proc)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.Process.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":394
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.Process '{0}' pid {1}>".format(self.command, self.pid)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_6__str__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_6__str__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/_bsd.pyx":395
 * 
 *     def __str__(self):
 *         return "<bsd.Process '{0}' pid {1}>".format(self.command, self.pid)             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bsd_Process_0_pid_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_command); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":394
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.Process '{0}' pid {1}>".format(self.command, self.pid)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("bsd._bsd.Process.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":397
 *         return "<bsd.Process '{0}' pid {1}>".format(self.command, self.pid)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'pid': self.pid,
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_9__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_8__getstate__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_8__getstate__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__getstate__", 0);

  /* "bsd/_bsd.pyx":398
 * 
 *     def __getstate__(self):
 *         return {             # <<<<<<<<<<<<<<
 *             'pid': self.pid,
 *             'ppid': self.ppid,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "bsd/_bsd.pyx":399
 *     def __getstate__(self):
 *         return {
 *             'pid': self.pid,             # <<<<<<<<<<<<<<
 *             'ppid': self.ppid,
 *             'command': self.command,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pid, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":400
 *         return {
 *             'pid': self.pid,
 *             'ppid': self.ppid,             # <<<<<<<<<<<<<<
 *             'command': self.command,
 *             'path': self.path,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ppid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ppid, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":401
 *             'pid': self.pid,
 *             'ppid': self.ppid,
 *             'command': self.command,             # <<<<<<<<<<<<<<
 *             'path': self.path,
 *             'argv': list(self.argv),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_command); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_command, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":402
 *             'ppid': self.ppid,
 *             'command': self.command,
 *             'path': self.path,             # <<<<<<<<<<<<<<
 *             'argv': list(self.argv),
 *             'env': list(self.env),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_path, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":403
 *             'command': self.command,
 *             'path': self.path,
 *             'argv': list(self.argv),             # <<<<<<<<<<<<<<
 *             'env': list(self.env),
 *             'cwd': self.cwd,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_argv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_argv, __pyx_t_3) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bsd/_bsd.pyx":404
 *             'path': self.path,
 *             'argv': list(self.argv),
 *             'env': list(self.env),             # <<<<<<<<<<<<<<
 *             'cwd': self.cwd,
 *             'started_at': self.started_at,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_env); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_env, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":405
 *             'argv': list(self.argv),
 *             'env': list(self.env),
 *             'cwd': self.cwd,             # <<<<<<<<<<<<<<
 *             'started_at': self.started_at,
 *             'files': [i.__getstate__() for i in self.files]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cwd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_cwd, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":406
 *             'env': list(self.env),
 *             'cwd': self.cwd,
 *             'started_at': self.started_at,             # <<<<<<<<<<<<<<
 *             'files': [i.__getstate__() for i in self.files]
 *         }
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_started_at); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_started_at, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":407
 *             'cwd': self.cwd,
 *             'started_at': self.started_at,
 *             'files': [i.__getstate__() for i in self.files]             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_files); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 407, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 407, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_getstate); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_files, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":397
 *         return "<bsd.Process '{0}' pid {1}>".format(self.command, self.pid)
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         return {
 *             'pid': self.pid,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.Process.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":411
 * 
 *     property pid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_pid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3pid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3pid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_3pid___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3pid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":412
 *     property pid:
 *         def __get__(self):
 *             return self.proc.ki_pid             # <<<<<<<<<<<<<<
 * 
 *     property ppid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_pid_t(__pyx_v_self->proc->ki_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":411
 * 
 *     property pid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_pid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.Process.pid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":415
 * 
 *     property ppid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_ppid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4ppid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4ppid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_4ppid___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4ppid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":416
 *     property ppid:
 *         def __get__(self):
 *             return self.proc.ki_ppid             # <<<<<<<<<<<<<<
 * 
 *     property command:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_pid_t(__pyx_v_self->proc->ki_ppid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":415
 * 
 *     property ppid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_ppid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.Process.ppid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":419
 * 
 *     property command:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_comm
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_7command_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_7command_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_7command___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_7command___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":420
 *     property command:
 *         def __get__(self):
 *             return self.proc.ki_comm             # <<<<<<<<<<<<<<
 * 
 *     property uid:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->proc->ki_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":419
 * 
 *     property command:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_comm
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.Process.command.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":423
 * 
 *     property uid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_uid
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3uid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3uid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_3uid___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3uid___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":424
 *     property uid:
 *         def __get__(self):
 *             return self.proc.ki_uid             # <<<<<<<<<<<<<<
 * 
 *     property cwd:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uid_t(__pyx_v_self->proc->ki_uid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":423
 * 
 *     property uid:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.proc.ki_uid
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.Process.uid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":427
 * 
 *     property cwd:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for i in self.files:
 *                 if DescriptorUseFlags.CDIR in i.uflags:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3cwd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3cwd_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_3cwd___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3cwd___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":428
 *     property cwd:
 *         def __get__(self):
 *             for i in self.files:             # <<<<<<<<<<<<<<
 *                 if DescriptorUseFlags.CDIR in i.uflags:
 *                     return i.path
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_files); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 428, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":429
 *         def __get__(self):
 *             for i in self.files:
 *                 if DescriptorUseFlags.CDIR in i.uflags:             # <<<<<<<<<<<<<<
 *                     return i.path
 * 
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DescriptorUseFlags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CDIR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_uflags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "bsd/_bsd.pyx":430
 *             for i in self.files:
 *                 if DescriptorUseFlags.CDIR in i.uflags:
 *                     return i.path             # <<<<<<<<<<<<<<
 * 
 *             return None
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_i, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "bsd/_bsd.pyx":429
 *         def __get__(self):
 *             for i in self.files:
 *                 if DescriptorUseFlags.CDIR in i.uflags:             # <<<<<<<<<<<<<<
 *                     return i.path
 * 
 */
    }

    /* "bsd/_bsd.pyx":428
 *     property cwd:
 *         def __get__(self):
 *             for i in self.files:             # <<<<<<<<<<<<<<
 *                 if DescriptorUseFlags.CDIR in i.uflags:
 *                     return i.path
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":432
 *                     return i.path
 * 
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     property path:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":427
 * 
 *     property cwd:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             for i in self.files:
 *                 if DescriptorUseFlags.CDIR in i.uflags:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.Process.cwd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":435
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef defs.procstat *ps
 *             cdef char buf[defs._POSIX2_LINE_MAX]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4path_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_4path___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4path___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  char __pyx_v_buf[_POSIX2_LINE_MAX];
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":440
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = defs.procstat_getpathname(self.ps, self.proc, buf, sizeof(buf) - 1)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":441
 * 
 *             with nogil:
 *                 ret = defs.procstat_getpathname(self.ps, self.proc, buf, sizeof(buf) - 1)             # <<<<<<<<<<<<<<
 * 
 *             if ret < 0:
 */
        __pyx_v_ret = procstat_getpathname(__pyx_v_self->ps, __pyx_v_self->proc, __pyx_v_buf, ((sizeof(__pyx_v_buf)) - 1));
      }

      /* "bsd/_bsd.pyx":440
 *             cdef int ret
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 ret = defs.procstat_getpathname(self.ps, self.proc, buf, sizeof(buf) - 1)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":443
 *                 ret = defs.procstat_getpathname(self.ps, self.proc, buf, sizeof(buf) - 1)
 * 
 *             if ret < 0:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":444
 * 
 *             if ret < 0:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *             return buf
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":443
 *                 ret = defs.procstat_getpathname(self.ps, self.proc, buf, sizeof(buf) - 1)
 * 
 *             if ret < 0:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
  }

  /* "bsd/_bsd.pyx":446
 *                 return None
 * 
 *             return buf             # <<<<<<<<<<<<<<
 * 
 *     property argv:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":435
 * 
 *     property path:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef defs.procstat *ps
 *             cdef char buf[defs._POSIX2_LINE_MAX]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.Process.path.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_7Process_4argv_2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":449
 * 
 *     property argv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_argv
 *             cdef char *ptr
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4argv_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_4argv_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_4argv___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_4argv___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct____get__(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct____get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_7Process_4argv_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_Process___get); if (unlikely(!gen)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.Process.argv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_7Process_4argv_2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 449, __pyx_L1_error)

  /* "bsd/_bsd.pyx":453
 *             cdef char *ptr
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_argv = defs.procstat_getargv(self.ps, self.proc, 0)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":454
 * 
 *             with nogil:
 *                 c_argv = defs.procstat_getargv(self.ps, self.proc, 0)             # <<<<<<<<<<<<<<
 * 
 *             if c_argv == NULL:
 */
        __pyx_cur_scope->__pyx_v_c_argv = procstat_getargv(__pyx_cur_scope->__pyx_v_self->ps, __pyx_cur_scope->__pyx_v_self->proc, 0);
      }

      /* "bsd/_bsd.pyx":453
 *             cdef char *ptr
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_argv = defs.procstat_getargv(self.ps, self.proc, 0)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":456
 *                 c_argv = defs.procstat_getargv(self.ps, self.proc, 0)
 * 
 *             if c_argv == NULL:             # <<<<<<<<<<<<<<
 *                 raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_c_argv == NULL) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":457
 * 
 *             if c_argv == NULL:
 *                 raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *             i = 0
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 457, __pyx_L1_error)

    /* "bsd/_bsd.pyx":456
 *                 c_argv = defs.procstat_getargv(self.ps, self.proc, 0)
 * 
 *             if c_argv == NULL:             # <<<<<<<<<<<<<<
 *                 raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":459
 *                 raise OSError(errno, os.strerror(errno))
 * 
 *             i = 0             # <<<<<<<<<<<<<<
 *             while True:
 *                 ptr = c_argv[i]
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_cur_scope->__pyx_v_i = __pyx_int_0;

  /* "bsd/_bsd.pyx":460
 * 
 *             i = 0
 *             while True:             # <<<<<<<<<<<<<<
 *                 ptr = c_argv[i]
 *                 if ptr == NULL:
 */
  while (1) {

    /* "bsd/_bsd.pyx":461
 *             i = 0
 *             while True:
 *                 ptr = c_argv[i]             # <<<<<<<<<<<<<<
 *                 if ptr == NULL:
 *                     break
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_ptr = (__pyx_cur_scope->__pyx_v_c_argv[__pyx_t_8]);

    /* "bsd/_bsd.pyx":462
 *             while True:
 *                 ptr = c_argv[i]
 *                 if ptr == NULL:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_ptr == NULL) != 0);
    if (__pyx_t_1) {

      /* "bsd/_bsd.pyx":463
 *                 ptr = c_argv[i]
 *                 if ptr == NULL:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 yield ptr
 */
      goto __pyx_L9_break;

      /* "bsd/_bsd.pyx":462
 *             while True:
 *                 ptr = c_argv[i]
 *                 if ptr == NULL:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
    }

    /* "bsd/_bsd.pyx":465
 *                     break
 * 
 *                 yield ptr             # <<<<<<<<<<<<<<
 *                 i += 1
 * 
 */
    __pyx_t_3 = __Pyx_PyUnicode_FromString(__pyx_cur_scope->__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L11_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 465, __pyx_L1_error)

    /* "bsd/_bsd.pyx":466
 * 
 *                 yield ptr
 *                 i += 1             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L9_break:;

  /* "bsd/_bsd.pyx":468
 *                 i += 1
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 defs.procstat_freeargv(self.ps)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":469
 * 
 *             with nogil:
 *                 defs.procstat_freeargv(self.ps)             # <<<<<<<<<<<<<<
 * 
 *     property env:
 */
        procstat_freeargv(__pyx_cur_scope->__pyx_v_self->ps);
      }

      /* "bsd/_bsd.pyx":468
 *                 i += 1
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 defs.procstat_freeargv(self.ps)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
  }

  /* "bsd/_bsd.pyx":449
 * 
 *     property argv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_argv
 *             cdef char *ptr
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_7Process_3env_2generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":472
 * 
 *     property env:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_env
 *             cdef char *ptr
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3env_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_3env_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_3env___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_3env___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_1___get__(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_1___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_7Process_3env_2generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_Process___get); if (unlikely(!gen)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.Process.env.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_7Process_3env_2generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L11_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 472, __pyx_L1_error)

  /* "bsd/_bsd.pyx":476
 *             cdef char *ptr
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_env = defs.procstat_getenvv(self.ps, self.proc, 0)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":477
 * 
 *             with nogil:
 *                 c_env = defs.procstat_getenvv(self.ps, self.proc, 0)             # <<<<<<<<<<<<<<
 * 
 *             if c_env == NULL:
 */
        __pyx_cur_scope->__pyx_v_c_env = procstat_getenvv(__pyx_cur_scope->__pyx_v_self->ps, __pyx_cur_scope->__pyx_v_self->proc, 0);
      }

      /* "bsd/_bsd.pyx":476
 *             cdef char *ptr
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 c_env = defs.procstat_getenvv(self.ps, self.proc, 0)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":479
 *                 c_env = defs.procstat_getenvv(self.ps, self.proc, 0)
 * 
 *             if c_env == NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_c_env == NULL) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":480
 * 
 *             if c_env == NULL:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             i = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = NULL;
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":479
 *                 c_env = defs.procstat_getenvv(self.ps, self.proc, 0)
 * 
 *             if c_env == NULL:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
  }

  /* "bsd/_bsd.pyx":482
 *                 return
 * 
 *             i = 0             # <<<<<<<<<<<<<<
 *             while True:
 *                 ptr = c_env[i]
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_cur_scope->__pyx_v_i = __pyx_int_0;

  /* "bsd/_bsd.pyx":483
 * 
 *             i = 0
 *             while True:             # <<<<<<<<<<<<<<
 *                 ptr = c_env[i]
 *                 if ptr == NULL:
 */
  while (1) {

    /* "bsd/_bsd.pyx":484
 *             i = 0
 *             while True:
 *                 ptr = c_env[i]             # <<<<<<<<<<<<<<
 *                 if ptr == NULL:
 *                     break
 */
    __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error)
    __pyx_cur_scope->__pyx_v_ptr = (__pyx_cur_scope->__pyx_v_c_env[__pyx_t_2]);

    /* "bsd/_bsd.pyx":485
 *             while True:
 *                 ptr = c_env[i]
 *                 if ptr == NULL:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_ptr == NULL) != 0);
    if (__pyx_t_1) {

      /* "bsd/_bsd.pyx":486
 *                 ptr = c_env[i]
 *                 if ptr == NULL:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 yield ptr
 */
      goto __pyx_L9_break;

      /* "bsd/_bsd.pyx":485
 *             while True:
 *                 ptr = c_env[i]
 *                 if ptr == NULL:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
    }

    /* "bsd/_bsd.pyx":488
 *                     break
 * 
 *                 yield ptr             # <<<<<<<<<<<<<<
 *                 i += 1
 * 
 */
    __pyx_t_3 = __Pyx_PyUnicode_FromString(__pyx_cur_scope->__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L11_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 488, __pyx_L1_error)

    /* "bsd/_bsd.pyx":489
 * 
 *                 yield ptr
 *                 i += 1             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_cur_scope->__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L9_break:;

  /* "bsd/_bsd.pyx":491
 *                 i += 1
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 defs.procstat_freeenvv(self.ps)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":492
 * 
 *             with nogil:
 *                 defs.procstat_freeenvv(self.ps)             # <<<<<<<<<<<<<<
 * 
 *     property started_at:
 */
        procstat_freeenvv(__pyx_cur_scope->__pyx_v_self->ps);
      }

      /* "bsd/_bsd.pyx":491
 *                 i += 1
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 defs.procstat_freeenvv(self.ps)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
  }

  /* "bsd/_bsd.pyx":472
 * 
 *     property env:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char **c_env
 *             cdef char *ptr
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":495
 * 
 *     property started_at:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return datetime.fromtimestamp(convert_timeval(&self.proc.ki_start))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_10started_at_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_10started_at_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_10started_at___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_10started_at___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":496
 *     property started_at:
 *         def __get__(self):
 *             return datetime.fromtimestamp(convert_timeval(&self.proc.ki_start))             # <<<<<<<<<<<<<<
 * 
 *     property rusage:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_f_3bsd_4_bsd_convert_timeval((&__pyx_v_self->proc->ki_start))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":495
 * 
 *     property started_at:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return datetime.fromtimestamp(convert_timeval(&self.proc.ki_start))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.Process.started_at.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":499
 * 
 *     property rusage:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             ret = <object>self.proc.ki_rusage
 *             ret.update({
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_6rusage_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_6rusage_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_6rusage___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_6rusage___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":500
 *     property rusage:
 *         def __get__(self):
 *             ret = <object>self.proc.ki_rusage             # <<<<<<<<<<<<<<
 *             ret.update({
 *                 'ru_utime': convert_timeval(&self.proc.ki_rusage.ru_utime),
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__rusage(__pyx_v_self->proc->ki_rusage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ret = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":501
 *         def __get__(self):
 *             ret = <object>self.proc.ki_rusage
 *             ret.update({             # <<<<<<<<<<<<<<
 *                 'ru_utime': convert_timeval(&self.proc.ki_rusage.ru_utime),
 *                 'ru_stime': convert_timeval(&self.proc.ki_rusage.ru_stime),
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "bsd/_bsd.pyx":502
 *             ret = <object>self.proc.ki_rusage
 *             ret.update({
 *                 'ru_utime': convert_timeval(&self.proc.ki_rusage.ru_utime),             # <<<<<<<<<<<<<<
 *                 'ru_stime': convert_timeval(&self.proc.ki_rusage.ru_stime),
 *             })
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_f_3bsd_4_bsd_convert_timeval((&__pyx_v_self->proc->ki_rusage.ru_utime))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ru_utime, __pyx_t_4) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":503
 *             ret.update({
 *                 'ru_utime': convert_timeval(&self.proc.ki_rusage.ru_utime),
 *                 'ru_stime': convert_timeval(&self.proc.ki_rusage.ru_stime),             # <<<<<<<<<<<<<<
 *             })
 * 
 */
  __pyx_t_4 = PyFloat_FromDouble(__pyx_f_3bsd_4_bsd_convert_timeval((&__pyx_v_self->proc->ki_rusage.ru_stime))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ru_stime, __pyx_t_4) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":506
 *             })
 * 
 *             return ret             # <<<<<<<<<<<<<<
 * 
 *     property files:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":499
 * 
 *     property rusage:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             ret = <object>self.proc.ki_rusage
 *             ret.update({
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.Process.rusage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_7Process_5files_2generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":509
 * 
 *     property files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef OpenFile file
 *             cdef defs.filestat_list* fs_list
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_5files_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_7Process_5files_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_7Process_5files___get__(((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7Process_5files___get__(struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_self) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_2___get__(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_2___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_7Process_5files_2generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_Process___get); if (unlikely(!gen)) __PYX_ERR(0, 509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.Process.files.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_7Process_5files_2generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  struct filestat *__pyx_t_8;
  struct procstat *__pyx_t_9;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 509, __pyx_L1_error)

  /* "bsd/_bsd.pyx":515
 * 
 *             type_mapping = {
 *                 defs.PS_FST_TYPE_VNODE: OpenVnode,             # <<<<<<<<<<<<<<
 *                 defs.PS_FST_TYPE_SOCKET: OpenSocket
 *             }
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(PS_FST_TYPE_VNODE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenVnode)) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":516
 *             type_mapping = {
 *                 defs.PS_FST_TYPE_VNODE: OpenVnode,
 *                 defs.PS_FST_TYPE_SOCKET: OpenSocket             # <<<<<<<<<<<<<<
 *             }
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(PS_FST_TYPE_SOCKET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "bsd/_bsd.pyx":517
 *                 defs.PS_FST_TYPE_VNODE: OpenVnode,
 *                 defs.PS_FST_TYPE_SOCKET: OpenSocket
 *             }             # <<<<<<<<<<<<<<
 * 
 *             with nogil:
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenSocket)) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_type_mapping = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":519
 *             }
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 fs_list = defs.procstat_getfiles(self.ps, self.proc, 0)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":520
 * 
 *             with nogil:
 *                 fs_list = defs.procstat_getfiles(self.ps, self.proc, 0)             # <<<<<<<<<<<<<<
 * 
 *             if fs_list == <defs.filestat_list *>NULL:
 */
        __pyx_cur_scope->__pyx_v_fs_list = procstat_getfiles(__pyx_cur_scope->__pyx_v_self->ps, __pyx_cur_scope->__pyx_v_self->proc, 0);
      }

      /* "bsd/_bsd.pyx":519
 *             }
 * 
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 fs_list = defs.procstat_getfiles(self.ps, self.proc, 0)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":522
 *                 fs_list = defs.procstat_getfiles(self.ps, self.proc, 0)
 * 
 *             if fs_list == <defs.filestat_list *>NULL:             # <<<<<<<<<<<<<<
 *                 raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_fs_list == ((struct filestat_list *)NULL)) != 0);
  if (__pyx_t_3) {

    /* "bsd/_bsd.pyx":523
 * 
 *             if fs_list == <defs.filestat_list *>NULL:
 *                 raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *             fs = fs_list.stqh_first
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 523, __pyx_L1_error)

    /* "bsd/_bsd.pyx":522
 *                 fs_list = defs.procstat_getfiles(self.ps, self.proc, 0)
 * 
 *             if fs_list == <defs.filestat_list *>NULL:             # <<<<<<<<<<<<<<
 *                 raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":525
 *                 raise OSError(errno, os.strerror(errno))
 * 
 *             fs = fs_list.stqh_first             # <<<<<<<<<<<<<<
 *             while fs != NULL:
 *                 cls = type_mapping.get(fs.fs_type, OpenFile)
 */
  __pyx_t_8 = __pyx_cur_scope->__pyx_v_fs_list->stqh_first;
  __pyx_cur_scope->__pyx_v_fs = __pyx_t_8;

  /* "bsd/_bsd.pyx":526
 * 
 *             fs = fs_list.stqh_first
 *             while fs != NULL:             # <<<<<<<<<<<<<<
 *                 cls = type_mapping.get(fs.fs_type, OpenFile)
 *                 file = cls.__new__(cls)
 */
  while (1) {
    __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_fs != NULL) != 0);
    if (!__pyx_t_3) break;

    /* "bsd/_bsd.pyx":527
 *             fs = fs_list.stqh_first
 *             while fs != NULL:
 *                 cls = type_mapping.get(fs.fs_type, OpenFile)             # <<<<<<<<<<<<<<
 *                 file = cls.__new__(cls)
 *                 file.ps = self.ps
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fs->fs_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_cur_scope->__pyx_v_type_mapping, __pyx_t_2, ((PyObject *)__pyx_ptype_3bsd_4_bsd_OpenFile)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_cls);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_cls, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/_bsd.pyx":528
 *             while fs != NULL:
 *                 cls = type_mapping.get(fs.fs_type, OpenFile)
 *                 file = cls.__new__(cls)             # <<<<<<<<<<<<<<
 *                 file.ps = self.ps
 *                 file.fs = fs
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cls, __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_cls); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_cls);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_3bsd_4_bsd_OpenFile))))) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_file));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_file, ((struct __pyx_obj_3bsd_4_bsd_OpenFile *)__pyx_t_5));
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/_bsd.pyx":529
 *                 cls = type_mapping.get(fs.fs_type, OpenFile)
 *                 file = cls.__new__(cls)
 *                 file.ps = self.ps             # <<<<<<<<<<<<<<
 *                 file.fs = fs
 *                 file.init()
 */
    __pyx_t_9 = __pyx_cur_scope->__pyx_v_self->ps;
    __pyx_cur_scope->__pyx_v_file->ps = __pyx_t_9;

    /* "bsd/_bsd.pyx":530
 *                 file = cls.__new__(cls)
 *                 file.ps = self.ps
 *                 file.fs = fs             # <<<<<<<<<<<<<<
 *                 file.init()
 *                 yield file
 */
    __pyx_cur_scope->__pyx_v_file->fs = __pyx_cur_scope->__pyx_v_fs;

    /* "bsd/_bsd.pyx":531
 *                 file.ps = self.ps
 *                 file.fs = fs
 *                 file.init()             # <<<<<<<<<<<<<<
 *                 yield file
 * 
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile *)__pyx_cur_scope->__pyx_v_file->__pyx_vtab)->init(__pyx_cur_scope->__pyx_v_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "bsd/_bsd.pyx":532
 *                 file.fs = fs
 *                 file.init()
 *                 yield file             # <<<<<<<<<<<<<<
 * 
 *                 fs = fs.next.stqe_next
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_file));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_file);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L10_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 532, __pyx_L1_error)

    /* "bsd/_bsd.pyx":534
 *                 yield file
 * 
 *                 fs = fs.next.stqe_next             # <<<<<<<<<<<<<<
 * 
 * cdef class SwapDevice(object):
 */
    __pyx_t_8 = __pyx_cur_scope->__pyx_v_fs->next.stqe_next;
    __pyx_cur_scope->__pyx_v_fs = __pyx_t_8;
  }

  /* "bsd/_bsd.pyx":509
 * 
 *     property files:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef OpenFile file
 *             cdef defs.filestat_list* fs_list
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":539
 *     cdef defs.kvm_swap swap
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10SwapDevice___repr__(((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice___repr__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "bsd/_bsd.pyx":540
 * 
 *     def __repr__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":539
 *     cdef defs.kvm_swap swap
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.SwapDevice.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":542
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.SwapDevice '{0}'>".format(self.devname)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10SwapDevice_2__str__(((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_2__str__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "bsd/_bsd.pyx":543
 * 
 *     def __str__(self):
 *         return "<bsd.SwapDevice '{0}'>".format(self.devname)             # <<<<<<<<<<<<<<
 * 
 *     property devname:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bsd_SwapDevice_0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_devname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":542
 *         return str(self)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<bsd.SwapDevice '{0}'>".format(self.devname)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.SwapDevice.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":546
 * 
 *     property devname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_devname
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_7devname_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_7devname_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10SwapDevice_7devname___get__(((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_7devname___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":547
 *     property devname:
 *         def __get__(self):
 *             return self.swap.ksw_devname             # <<<<<<<<<<<<<<
 * 
 *     property used:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->swap.ksw_devname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":546
 * 
 *     property devname:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_devname
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.SwapDevice.devname.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":550
 * 
 *     property used:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_used
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_4used_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_4used_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10SwapDevice_4used___get__(((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_4used___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":551
 *     property used:
 *         def __get__(self):
 *             return self.swap.ksw_used             # <<<<<<<<<<<<<<
 * 
 *     property total:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->swap.ksw_used); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":550
 * 
 *     property used:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_used
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.SwapDevice.used.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":554
 * 
 *     property total:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_total
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_5total_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3bsd_4_bsd_10SwapDevice_5total_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_10SwapDevice_5total___get__(((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_10SwapDevice_5total___get__(struct __pyx_obj_3bsd_4_bsd_SwapDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "bsd/_bsd.pyx":555
 *     property total:
 *         def __get__(self):
 *             return self.swap.ksw_total             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->swap.ksw_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":554
 * 
 *     property total:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.swap.ksw_total
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("bsd._bsd.SwapDevice.total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_2generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":559
 * 
 * 
 * def getmntinfo():             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* mntbuf
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_1getmntinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_1getmntinfo = {"getmntinfo", (PyCFunction)__pyx_pw_3bsd_4_bsd_1getmntinfo, METH_NOARGS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_1getmntinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getmntinfo (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_getmntinfo(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_getmntinfo(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getmntinfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_2generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_getmntinfo, __pyx_n_s_getmntinfo); if (unlikely(!gen)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.getmntinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_2generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  long __pyx_t_9;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L10_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 559, __pyx_L1_error)

  /* "bsd/_bsd.pyx":564
 *     cdef int count
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         count = defs.getmntinfo(&mntbuf, defs.MNT_WAIT)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":565
 * 
 *     with nogil:
 *         count = defs.getmntinfo(&mntbuf, defs.MNT_WAIT)             # <<<<<<<<<<<<<<
 * 
 *     if count == 0:
 */
        __pyx_cur_scope->__pyx_v_count = getmntinfo((&__pyx_cur_scope->__pyx_v_mntbuf), MNT_WAIT);
      }

      /* "bsd/_bsd.pyx":564
 *     cdef int count
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         count = defs.getmntinfo(&mntbuf, defs.MNT_WAIT)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":567
 *         count = defs.getmntinfo(&mntbuf, defs.MNT_WAIT)
 * 
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_count == 0) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":568
 * 
 *     if count == 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(0, count):
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 568, __pyx_L1_error)

    /* "bsd/_bsd.pyx":567
 *         count = defs.getmntinfo(&mntbuf, defs.MNT_WAIT)
 * 
 *     if count == 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":570
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     for i in range(0, count):             # <<<<<<<<<<<<<<
 *         mnt = MountPoint.__new__(MountPoint)
 *         mnt.statfs = &mntbuf[i]
 */
  __pyx_t_8 = __pyx_cur_scope->__pyx_v_count;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_9;

    /* "bsd/_bsd.pyx":571
 * 
 *     for i in range(0, count):
 *         mnt = MountPoint.__new__(MountPoint)             # <<<<<<<<<<<<<<
 *         mnt.statfs = &mntbuf[i]
 *         yield mnt
 */
    __pyx_t_3 = __pyx_tp_new_3bsd_4_bsd_MountPoint(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_MountPoint), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3bsd_4_bsd_MountPoint)))) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_mnt));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_mnt, ((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "bsd/_bsd.pyx":572
 *     for i in range(0, count):
 *         mnt = MountPoint.__new__(MountPoint)
 *         mnt.statfs = &mntbuf[i]             # <<<<<<<<<<<<<<
 *         yield mnt
 * 
 */
    __pyx_cur_scope->__pyx_v_mnt->statfs = (&(__pyx_cur_scope->__pyx_v_mntbuf[__pyx_cur_scope->__pyx_v_i]));

    /* "bsd/_bsd.pyx":573
 *         mnt = MountPoint.__new__(MountPoint)
 *         mnt.statfs = &mntbuf[i]
 *         yield mnt             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_mnt));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_mnt);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_8;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_9;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L10_resume_from_yield:;
    __pyx_t_8 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_9 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 573, __pyx_L1_error)
  }

  /* "bsd/_bsd.pyx":559
 * 
 * 
 * def getmntinfo():             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* mntbuf
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("getmntinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":576
 * 
 * 
 * def statfs(path):             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* statfs
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_4statfs(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_4statfs = {"statfs", (PyCFunction)__pyx_pw_3bsd_4_bsd_4statfs, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_4statfs(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("statfs (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_3statfs(__pyx_self, ((PyObject *)__pyx_v_path));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_3statfs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  struct __pyx_obj_3bsd_4_bsd_MountPoint *__pyx_v_mnt = 0;
  struct statfs *__pyx_v_statfs;
  char const *__pyx_v_c_path;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("statfs", 0);
  __Pyx_INCREF(__pyx_v_path);

  /* "bsd/_bsd.pyx":582
 *     cdef int ret
 * 
 *     path = path.encode('utf-8')             # <<<<<<<<<<<<<<
 *     c_path = path
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":583
 * 
 *     path = path.encode('utf-8')
 *     c_path = path             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 583, __pyx_L1_error)
  __pyx_v_c_path = __pyx_t_3;

  /* "bsd/_bsd.pyx":585
 *     c_path = path
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         statfs = <defs.statfs*>malloc(cython.sizeof(defs.statfs))
 *         ret = defs.c_statfs(c_path, statfs)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":586
 * 
 *     with nogil:
 *         statfs = <defs.statfs*>malloc(cython.sizeof(defs.statfs))             # <<<<<<<<<<<<<<
 *         ret = defs.c_statfs(c_path, statfs)
 * 
 */
        __pyx_v_statfs = ((struct statfs *)malloc((sizeof(struct statfs))));

        /* "bsd/_bsd.pyx":587
 *     with nogil:
 *         statfs = <defs.statfs*>malloc(cython.sizeof(defs.statfs))
 *         ret = defs.c_statfs(c_path, statfs)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
        __pyx_v_ret = statfs(__pyx_v_c_path, __pyx_v_statfs);
      }

      /* "bsd/_bsd.pyx":585
 *     c_path = path
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         statfs = <defs.statfs*>malloc(cython.sizeof(defs.statfs))
 *         ret = defs.c_statfs(c_path, statfs)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":589
 *         ret = defs.c_statfs(c_path, statfs)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_4 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_4) {

    /* "bsd/_bsd.pyx":590
 * 
 *     if ret != 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     mnt = MountPoint.__new__(MountPoint)
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 590, __pyx_L1_error)

    /* "bsd/_bsd.pyx":589
 *         ret = defs.c_statfs(c_path, statfs)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":592
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     mnt = MountPoint.__new__(MountPoint)             # <<<<<<<<<<<<<<
 *     mnt.statfs = statfs
 *     mnt.free = True
 */
  __pyx_t_1 = __pyx_tp_new_3bsd_4_bsd_MountPoint(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_MountPoint), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3bsd_4_bsd_MountPoint)))) __PYX_ERR(0, 592, __pyx_L1_error)
  __pyx_v_mnt = ((struct __pyx_obj_3bsd_4_bsd_MountPoint *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":593
 * 
 *     mnt = MountPoint.__new__(MountPoint)
 *     mnt.statfs = statfs             # <<<<<<<<<<<<<<
 *     mnt.free = True
 *     return mnt
 */
  __pyx_v_mnt->statfs = __pyx_v_statfs;

  /* "bsd/_bsd.pyx":594
 *     mnt = MountPoint.__new__(MountPoint)
 *     mnt.statfs = statfs
 *     mnt.free = True             # <<<<<<<<<<<<<<
 *     return mnt
 * 
 */
  __pyx_v_mnt->free = 1;

  /* "bsd/_bsd.pyx":595
 *     mnt.statfs = statfs
 *     mnt.free = True
 *     return mnt             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_mnt));
  __pyx_r = ((PyObject *)__pyx_v_mnt);
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":576
 * 
 * 
 * def statfs(path):             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* statfs
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.statfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_mnt);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":598
 * 
 * 
 * def nmount(**kwargs):             # <<<<<<<<<<<<<<
 *     cdef defs.iovec* iov
 *     cdef int i
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_6nmount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_6nmount = {"nmount", (PyCFunction)__pyx_pw_3bsd_4_bsd_6nmount, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_6nmount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nmount (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("nmount", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "nmount", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_3bsd_4_bsd_5nmount(__pyx_self, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_5nmount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kwargs) {
  struct iovec *__pyx_v_iov;
  int __pyx_v_i;
  int __pyx_v_ret;
  int __pyx_v_flags;
  int __pyx_v_kwargs_len;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  char *__pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("nmount", 0);

  /* "bsd/_bsd.pyx":605
 *     cdef int kwargs_len
 * 
 *     flags = kwargs.pop('flags', 0)             # <<<<<<<<<<<<<<
 * 
 *     if 'source' in kwargs:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_flags = __pyx_t_3;

  /* "bsd/_bsd.pyx":607
 *     flags = kwargs.pop('flags', 0)
 * 
 *     if 'source' in kwargs:             # <<<<<<<<<<<<<<
 *         kwargs['from'] = kwargs.pop('source')
 * 
 */
  __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_source, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 607, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "bsd/_bsd.pyx":608
 * 
 *     if 'source' in kwargs:
 *         kwargs['from'] = kwargs.pop('source')             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_s_from, __pyx_t_1) < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":607
 *     flags = kwargs.pop('flags', 0)
 * 
 *     if 'source' in kwargs:             # <<<<<<<<<<<<<<
 *         kwargs['from'] = kwargs.pop('source')
 * 
 */
  }

  /* "bsd/_bsd.pyx":610
 *         kwargs['from'] = kwargs.pop('source')
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     args = []
 *     kwargs_len = len(kwargs)
 */
  __pyx_v_i = 0;

  /* "bsd/_bsd.pyx":611
 * 
 *     i = 0
 *     args = []             # <<<<<<<<<<<<<<
 *     kwargs_len = len(kwargs)
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":612
 *     i = 0
 *     args = []
 *     kwargs_len = len(kwargs)             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_6 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 612, __pyx_L1_error)
  __pyx_v_kwargs_len = __pyx_t_6;

  /* "bsd/_bsd.pyx":614
 *     kwargs_len = len(kwargs)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         iov = <defs.iovec*>malloc(cython.sizeof(defs.iovec) * kwargs_len * 2)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":615
 * 
 *     with nogil:
 *         iov = <defs.iovec*>malloc(cython.sizeof(defs.iovec) * kwargs_len * 2)             # <<<<<<<<<<<<<<
 * 
 *     for k, v in kwargs.items():
 */
        __pyx_v_iov = ((struct iovec *)malloc((((sizeof(struct iovec)) * __pyx_v_kwargs_len) * 2)));
      }

      /* "bsd/_bsd.pyx":614
 *     kwargs_len = len(kwargs)
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         iov = <defs.iovec*>malloc(cython.sizeof(defs.iovec) * kwargs_len * 2)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":617
 *         iov = <defs.iovec*>malloc(cython.sizeof(defs.iovec) * kwargs_len * 2)
 * 
 *     for k, v in kwargs.items():             # <<<<<<<<<<<<<<
 *         args.append(k.encode('utf-8', 'ignore'))
 *         args.append(v.encode('utf-8', 'ignore'))
 */
  __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 617, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 617, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 617, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 617, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 617, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "bsd/_bsd.pyx":618
 * 
 *     for k, v in kwargs.items():
 *         args.append(k.encode('utf-8', 'ignore'))             # <<<<<<<<<<<<<<
 *         args.append(v.encode('utf-8', 'ignore'))
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_k, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_9); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "bsd/_bsd.pyx":619
 *     for k, v in kwargs.items():
 *         args.append(k.encode('utf-8', 'ignore'))
 *         args.append(v.encode('utf-8', 'ignore'))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(0, len(args)):
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":617
 *         iov = <defs.iovec*>malloc(cython.sizeof(defs.iovec) * kwargs_len * 2)
 * 
 *     for k, v in kwargs.items():             # <<<<<<<<<<<<<<
 *         args.append(k.encode('utf-8', 'ignore'))
 *         args.append(v.encode('utf-8', 'ignore'))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":621
 *         args.append(v.encode('utf-8', 'ignore'))
 * 
 *     for i in range(0, len(args)):             # <<<<<<<<<<<<<<
 *         iov[i].iov_base = <void*>(<char*>args[i])
 *         iov[i].iov_len = len(args[i]) + 1
 */
  __pyx_t_6 = PyList_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 621, __pyx_L1_error)
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_6; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "bsd/_bsd.pyx":622
 * 
 *     for i in range(0, len(args)):
 *         iov[i].iov_base = <void*>(<char*>args[i])             # <<<<<<<<<<<<<<
 *         iov[i].iov_len = len(args[i]) + 1
 * 
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_args, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 622, __pyx_L1_error)
    (__pyx_v_iov[__pyx_v_i]).iov_base = ((void *)((char *)__pyx_t_13));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "bsd/_bsd.pyx":623
 *     for i in range(0, len(args)):
 *         iov[i].iov_base = <void*>(<char*>args[i])
 *         iov[i].iov_len = len(args[i]) + 1             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_args, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 623, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_iov[__pyx_v_i]).iov_len = (__pyx_t_14 + 1);
  }

  /* "bsd/_bsd.pyx":625
 *         iov[i].iov_len = len(args[i]) + 1
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.nmount(iov, i + 1, flags)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":626
 * 
 *     with nogil:
 *         ret = defs.nmount(iov, i + 1, flags)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
        __pyx_v_ret = nmount(__pyx_v_iov, (__pyx_v_i + 1), __pyx_v_flags);
      }

      /* "bsd/_bsd.pyx":625
 *         iov[i].iov_len = len(args[i]) + 1
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.nmount(iov, i + 1, flags)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L15;
        }
        __pyx_L15:;
      }
  }

  /* "bsd/_bsd.pyx":628
 *         ret = defs.nmount(iov, i + 1, flags)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         free(iov)
 *         raise OSError(errno, os.strerror(errno))
 */
  __pyx_t_5 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_5) {

    /* "bsd/_bsd.pyx":629
 * 
 *     if ret != 0:
 *         free(iov)             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
    free(__pyx_v_iov);

    /* "bsd/_bsd.pyx":630
 *     if ret != 0:
 *         free(iov)
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     free(iov)
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_strerror); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __pyx_t_10 = NULL;
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 630, __pyx_L1_error)

    /* "bsd/_bsd.pyx":628
 *         ret = defs.nmount(iov, i + 1, flags)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         free(iov)
 *         raise OSError(errno, os.strerror(errno))
 */
  }

  /* "bsd/_bsd.pyx":632
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     free(iov)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  free(__pyx_v_iov);

  /* "bsd/_bsd.pyx":598
 * 
 * 
 * def nmount(**kwargs):             # <<<<<<<<<<<<<<
 *     cdef defs.iovec* iov
 *     cdef int i
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("bsd._bsd.nmount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":635
 * 
 * 
 * def unmount(dir, flags=0):             # <<<<<<<<<<<<<<
 *     cdef const char *c_dir = dir
 *     cdef int c_flags = flags
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_8unmount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_8unmount = {"unmount", (PyCFunction)__pyx_pw_3bsd_4_bsd_8unmount, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_8unmount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dir = 0;
  PyObject *__pyx_v_flags = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unmount (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dir,&__pyx_n_s_flags,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unmount") < 0)) __PYX_ERR(0, 635, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dir = values[0];
    __pyx_v_flags = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unmount", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.unmount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_7unmount(__pyx_self, __pyx_v_dir, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_7unmount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dir, PyObject *__pyx_v_flags) {
  char const *__pyx_v_c_dir;
  int __pyx_v_c_flags;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("unmount", 0);

  /* "bsd/_bsd.pyx":636
 * 
 * def unmount(dir, flags=0):
 *     cdef const char *c_dir = dir             # <<<<<<<<<<<<<<
 *     cdef int c_flags = flags
 *     cdef int ret
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_dir); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
  __pyx_v_c_dir = __pyx_t_1;

  /* "bsd/_bsd.pyx":637
 * def unmount(dir, flags=0):
 *     cdef const char *c_dir = dir
 *     cdef int c_flags = flags             # <<<<<<<<<<<<<<
 *     cdef int ret
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_flags); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L1_error)
  __pyx_v_c_flags = __pyx_t_2;

  /* "bsd/_bsd.pyx":640
 *     cdef int ret
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.unmount(c_dir, c_flags)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":641
 * 
 *     with nogil:
 *         ret = defs.unmount(c_dir, c_flags)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
        __pyx_v_ret = unmount(__pyx_v_c_dir, __pyx_v_c_flags);
      }

      /* "bsd/_bsd.pyx":640
 *     cdef int ret
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.unmount(c_dir, c_flags)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":643
 *         ret = defs.unmount(c_dir, c_flags)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_3) {

    /* "bsd/_bsd.pyx":644
 * 
 *     if ret != 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 644, __pyx_L1_error)

    /* "bsd/_bsd.pyx":643
 *         ret = defs.unmount(c_dir, c_flags)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":635
 * 
 * 
 * def unmount(dir, flags=0):             # <<<<<<<<<<<<<<
 *     cdef const char *c_dir = dir
 *     cdef int c_flags = flags
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("bsd._bsd.unmount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":647
 * 
 * 
 * def kinfo_getproc(pid):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc* proc
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_10kinfo_getproc(PyObject *__pyx_self, PyObject *__pyx_v_pid); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_10kinfo_getproc = {"kinfo_getproc", (PyCFunction)__pyx_pw_3bsd_4_bsd_10kinfo_getproc, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_10kinfo_getproc(PyObject *__pyx_self, PyObject *__pyx_v_pid) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kinfo_getproc (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_9kinfo_getproc(__pyx_self, ((PyObject *)__pyx_v_pid));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_9kinfo_getproc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pid) {
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_ret = 0;
  struct kinfo_proc *__pyx_v_proc;
  struct procstat *__pyx_v_ps;
  int __pyx_v_c_pid;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("kinfo_getproc", 0);

  /* "bsd/_bsd.pyx":653
 *     cdef int c_pid
 * 
 *     c_pid = pid             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_pid); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_v_c_pid = __pyx_t_1;

  /* "bsd/_bsd.pyx":655
 *     c_pid = pid
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         proc = defs.kinfo_getproc(c_pid)
 *         ps = defs.procstat_open_sysctl()
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":656
 * 
 *     with nogil:
 *         proc = defs.kinfo_getproc(c_pid)             # <<<<<<<<<<<<<<
 *         ps = defs.procstat_open_sysctl()
 * 
 */
        __pyx_v_proc = kinfo_getproc(__pyx_v_c_pid);

        /* "bsd/_bsd.pyx":657
 *     with nogil:
 *         proc = defs.kinfo_getproc(c_pid)
 *         ps = defs.procstat_open_sysctl()             # <<<<<<<<<<<<<<
 * 
 *     if proc == NULL:
 */
        __pyx_v_ps = procstat_open_sysctl();
      }

      /* "bsd/_bsd.pyx":655
 *     c_pid = pid
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         proc = defs.kinfo_getproc(c_pid)
 *         ps = defs.procstat_open_sysctl()
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":659
 *         ps = defs.procstat_open_sysctl()
 * 
 *     if proc == NULL:             # <<<<<<<<<<<<<<
 *         raise LookupError("PID {0} not found".format(pid))
 * 
 */
  __pyx_t_2 = ((__pyx_v_proc == NULL) != 0);
  if (__pyx_t_2) {

    /* "bsd/_bsd.pyx":660
 * 
 *     if proc == NULL:
 *         raise LookupError("PID {0} not found".format(pid))             # <<<<<<<<<<<<<<
 * 
 *     if ps == NULL:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_PID_0_not_found, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_pid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_pid);
      __Pyx_GIVEREF(__pyx_v_pid);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_pid);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_LookupError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 660, __pyx_L1_error)

    /* "bsd/_bsd.pyx":659
 *         ps = defs.procstat_open_sysctl()
 * 
 *     if proc == NULL:             # <<<<<<<<<<<<<<
 *         raise LookupError("PID {0} not found".format(pid))
 * 
 */
  }

  /* "bsd/_bsd.pyx":662
 *         raise LookupError("PID {0} not found".format(pid))
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_2 = ((__pyx_v_ps == NULL) != 0);
  if (__pyx_t_2) {

    /* "bsd/_bsd.pyx":663
 * 
 *     if ps == NULL:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     ret = Process.__new__(Process)
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 663, __pyx_L1_error)

    /* "bsd/_bsd.pyx":662
 *         raise LookupError("PID {0} not found".format(pid))
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":665
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     ret = Process.__new__(Process)             # <<<<<<<<<<<<<<
 *     ret.proc = proc
 *     ret.ps = ps
 */
  __pyx_t_4 = __pyx_tp_new_3bsd_4_bsd_Process(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_Process), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_3bsd_4_bsd_Process)))) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_v_ret = ((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":666
 * 
 *     ret = Process.__new__(Process)
 *     ret.proc = proc             # <<<<<<<<<<<<<<
 *     ret.ps = ps
 * 
 */
  __pyx_v_ret->proc = __pyx_v_proc;

  /* "bsd/_bsd.pyx":667
 *     ret = Process.__new__(Process)
 *     ret.proc = proc
 *     ret.ps = ps             # <<<<<<<<<<<<<<
 * 
 *     return ret
 */
  __pyx_v_ret->ps = __pyx_v_ps;

  /* "bsd/_bsd.pyx":669
 *     ret.ps = ps
 * 
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":647
 * 
 * 
 * def kinfo_getproc(pid):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc* proc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.kinfo_getproc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":672
 * 
 * 
 * def opencore(filename):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc *proc
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_12opencore(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_12opencore = {"opencore", (PyCFunction)__pyx_pw_3bsd_4_bsd_12opencore, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_12opencore(PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("opencore (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_11opencore(__pyx_self, ((PyObject *)__pyx_v_filename));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_11opencore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename) {
  struct __pyx_obj_3bsd_4_bsd_Process *__pyx_v_ret = 0;
  struct kinfo_proc *__pyx_v_proc;
  struct procstat *__pyx_v_ps;
  char *__pyx_v_c_filename;
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_decoded_filename = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("opencore", 0);

  /* "bsd/_bsd.pyx":675
 *     cdef Process ret
 *     cdef defs.kinfo_proc *proc
 *     cdef defs.procstat *ps = NULL             # <<<<<<<<<<<<<<
 *     cdef char *c_filename
 *     cdef unsigned int count
 */
  __pyx_v_ps = NULL;

  /* "bsd/_bsd.pyx":679
 *     cdef unsigned int count
 * 
 *     decoded_filename = filename.encode('utf-8')             # <<<<<<<<<<<<<<
 *     c_filename = decoded_filename
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_decoded_filename = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":680
 * 
 *     decoded_filename = filename.encode('utf-8')
 *     c_filename = decoded_filename             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_decoded_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_v_c_filename = __pyx_t_3;

  /* "bsd/_bsd.pyx":682
 *     c_filename = decoded_filename
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ps = defs.procstat_open_core(c_filename)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":683
 * 
 *     with nogil:
 *         ps = defs.procstat_open_core(c_filename)             # <<<<<<<<<<<<<<
 * 
 *     if ps == NULL:
 */
        __pyx_v_ps = procstat_open_core(__pyx_v_c_filename);
      }

      /* "bsd/_bsd.pyx":682
 *     c_filename = decoded_filename
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ps = defs.procstat_open_core(c_filename)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":685
 *         ps = defs.procstat_open_core(c_filename)
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_4 = ((__pyx_v_ps == NULL) != 0);
  if (__pyx_t_4) {

    /* "bsd/_bsd.pyx":686
 * 
 *     if ps == NULL:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 686, __pyx_L1_error)

    /* "bsd/_bsd.pyx":685
 *         ps = defs.procstat_open_core(c_filename)
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":688
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         proc = defs.procstat_getprocs(ps, defs.KERN_PROC_PROC, 0, &count)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":689
 * 
 *     with nogil:
 *         proc = defs.procstat_getprocs(ps, defs.KERN_PROC_PROC, 0, &count)             # <<<<<<<<<<<<<<
 * 
 *     if count < 1:
 */
        __pyx_v_proc = procstat_getprocs(__pyx_v_ps, KERN_PROC_PROC, 0, (&__pyx_v_count));
      }

      /* "bsd/_bsd.pyx":688
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         proc = defs.procstat_getprocs(ps, defs.KERN_PROC_PROC, 0, &count)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L9;
        }
        __pyx_L9:;
      }
  }

  /* "bsd/_bsd.pyx":691
 *         proc = defs.procstat_getprocs(ps, defs.KERN_PROC_PROC, 0, &count)
 * 
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Process information not found in the core file')
 * 
 */
  __pyx_t_4 = ((__pyx_v_count < 1) != 0);
  if (__pyx_t_4) {

    /* "bsd/_bsd.pyx":692
 * 
 *     if count < 1:
 *         raise RuntimeError('Process information not found in the core file')             # <<<<<<<<<<<<<<
 * 
 *     ret = Process.__new__(Process)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 692, __pyx_L1_error)

    /* "bsd/_bsd.pyx":691
 *         proc = defs.procstat_getprocs(ps, defs.KERN_PROC_PROC, 0, &count)
 * 
 *     if count < 1:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Process information not found in the core file')
 * 
 */
  }

  /* "bsd/_bsd.pyx":694
 *         raise RuntimeError('Process information not found in the core file')
 * 
 *     ret = Process.__new__(Process)             # <<<<<<<<<<<<<<
 *     ret.proc = proc
 *     ret.ps = ps
 */
  __pyx_t_1 = __pyx_tp_new_3bsd_4_bsd_Process(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_Process), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3bsd_4_bsd_Process)))) __PYX_ERR(0, 694, __pyx_L1_error)
  __pyx_v_ret = ((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":695
 * 
 *     ret = Process.__new__(Process)
 *     ret.proc = proc             # <<<<<<<<<<<<<<
 *     ret.ps = ps
 *     return ret
 */
  __pyx_v_ret->proc = __pyx_v_proc;

  /* "bsd/_bsd.pyx":696
 *     ret = Process.__new__(Process)
 *     ret.proc = proc
 *     ret.ps = ps             # <<<<<<<<<<<<<<
 *     return ret
 * 
 */
  __pyx_v_ret->ps = __pyx_v_ps;

  /* "bsd/_bsd.pyx":697
 *     ret.proc = proc
 *     ret.ps = ps
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":672
 * 
 * 
 * def opencore(filename):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc *proc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.opencore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_decoded_filename);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_15generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":700
 * 
 * 
 * def getprocs(predicate, arg=0):             # <<<<<<<<<<<<<<
 *     cdef Process proc
 *     cdef defs.procstat *ps
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_14getprocs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_14getprocs = {"getprocs", (PyCFunction)__pyx_pw_3bsd_4_bsd_14getprocs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_14getprocs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_predicate = 0;
  PyObject *__pyx_v_arg = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getprocs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_predicate,&__pyx_n_s_arg,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_predicate)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getprocs") < 0)) __PYX_ERR(0, 700, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_predicate = values[0];
    __pyx_v_arg = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getprocs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 700, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.getprocs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_13getprocs(__pyx_self, __pyx_v_predicate, __pyx_v_arg);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_13getprocs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_arg) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getprocs", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_4_getprocs(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_4_getprocs, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_predicate = __pyx_v_predicate;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_predicate);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_predicate);
  __pyx_cur_scope->__pyx_v_arg = __pyx_v_arg;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_15generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_getprocs, __pyx_n_s_getprocs); if (unlikely(!gen)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.getprocs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_15generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  long __pyx_t_11;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L21_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 700, __pyx_L1_error)

  /* "bsd/_bsd.pyx":707
 *     cdef defs.kinfo_proc *tmp
 *     cdef unsigned int count
 *     cdef int c_predicate = 0             # <<<<<<<<<<<<<<
 *     cdef int c_arg = 0
 * 
 */
  __pyx_cur_scope->__pyx_v_c_predicate = 0;

  /* "bsd/_bsd.pyx":708
 *     cdef unsigned int count
 *     cdef int c_predicate = 0
 *     cdef int c_arg = 0             # <<<<<<<<<<<<<<
 * 
 *     if not isinstance(predicate, ProcessLookupPredicate):
 */
  __pyx_cur_scope->__pyx_v_c_arg = 0;

  /* "bsd/_bsd.pyx":710
 *     cdef int c_arg = 0
 * 
 *     if not isinstance(predicate, ProcessLookupPredicate):             # <<<<<<<<<<<<<<
 *         raise ValueError('predicate must be ProcessLookupPredicate')
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProcessLookupPredicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_predicate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_3) {

    /* "bsd/_bsd.pyx":711
 * 
 *     if not isinstance(predicate, ProcessLookupPredicate):
 *         raise ValueError('predicate must be ProcessLookupPredicate')             # <<<<<<<<<<<<<<
 * 
 *     c_predicate = predicate
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 711, __pyx_L1_error)

    /* "bsd/_bsd.pyx":710
 *     cdef int c_arg = 0
 * 
 *     if not isinstance(predicate, ProcessLookupPredicate):             # <<<<<<<<<<<<<<
 *         raise ValueError('predicate must be ProcessLookupPredicate')
 * 
 */
  }

  /* "bsd/_bsd.pyx":713
 *         raise ValueError('predicate must be ProcessLookupPredicate')
 * 
 *     c_predicate = predicate             # <<<<<<<<<<<<<<
 *     c_arg = arg
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_predicate); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L1_error)
  __pyx_cur_scope->__pyx_v_c_predicate = __pyx_t_4;

  /* "bsd/_bsd.pyx":714
 * 
 *     c_predicate = predicate
 *     c_arg = arg             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_arg); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 714, __pyx_L1_error)
  __pyx_cur_scope->__pyx_v_c_arg = __pyx_t_4;

  /* "bsd/_bsd.pyx":716
 *     c_arg = arg
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ps = defs.procstat_open_sysctl()
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":717
 * 
 *     with nogil:
 *         ps = defs.procstat_open_sysctl()             # <<<<<<<<<<<<<<
 * 
 *     if ps == NULL:
 */
        __pyx_cur_scope->__pyx_v_ps = procstat_open_sysctl();
      }

      /* "bsd/_bsd.pyx":716
 *     c_arg = arg
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ps = defs.procstat_open_sysctl()
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "bsd/_bsd.pyx":719
 *         ps = defs.procstat_open_sysctl()
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_ps == NULL) != 0);
  if (__pyx_t_3) {

    /* "bsd/_bsd.pyx":720
 * 
 *     if ps == NULL:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strerror); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_1 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 720, __pyx_L1_error)

    /* "bsd/_bsd.pyx":719
 *         ps = defs.procstat_open_sysctl()
 * 
 *     if ps == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":722
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.procstat_getprocs(ps, c_predicate, c_arg, &count)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":723
 * 
 *     with nogil:
 *         ret = defs.procstat_getprocs(ps, c_predicate, c_arg, &count)             # <<<<<<<<<<<<<<
 * 
 *     if ret == NULL:
 */
        __pyx_cur_scope->__pyx_v_ret = procstat_getprocs(__pyx_cur_scope->__pyx_v_ps, __pyx_cur_scope->__pyx_v_c_predicate, __pyx_cur_scope->__pyx_v_c_arg, (&__pyx_cur_scope->__pyx_v_count));
      }

      /* "bsd/_bsd.pyx":722
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.procstat_getprocs(ps, c_predicate, c_arg, &count)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
  }

  /* "bsd/_bsd.pyx":725
 *         ret = defs.procstat_getprocs(ps, c_predicate, c_arg, &count)
 * 
 *     if ret == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_ret == NULL) != 0);
  if (__pyx_t_3) {

    /* "bsd/_bsd.pyx":726
 * 
 *     if ret == NULL:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(0, count):
 */
    __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strerror); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 726, __pyx_L1_error)

    /* "bsd/_bsd.pyx":725
 *         ret = defs.procstat_getprocs(ps, c_predicate, c_arg, &count)
 * 
 *     if ret == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":728
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     for i in range(0, count):             # <<<<<<<<<<<<<<
 *         with nogil:
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))
 */
  __pyx_t_10 = __pyx_cur_scope->__pyx_v_count;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_11;

    /* "bsd/_bsd.pyx":729
 * 
 *     for i in range(0, count):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))
 *             memcpy(tmp, &ret[i], sizeof(defs.kinfo_proc))
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "bsd/_bsd.pyx":730
 *     for i in range(0, count):
 *         with nogil:
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))             # <<<<<<<<<<<<<<
 *             memcpy(tmp, &ret[i], sizeof(defs.kinfo_proc))
 *             tmp_ps = defs.procstat_open_sysctl()
 */
          __pyx_cur_scope->__pyx_v_tmp = ((struct kinfo_proc *)malloc((sizeof(struct kinfo_proc))));

          /* "bsd/_bsd.pyx":731
 *         with nogil:
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))
 *             memcpy(tmp, &ret[i], sizeof(defs.kinfo_proc))             # <<<<<<<<<<<<<<
 *             tmp_ps = defs.procstat_open_sysctl()
 * 
 */
          memcpy(__pyx_cur_scope->__pyx_v_tmp, (&(__pyx_cur_scope->__pyx_v_ret[__pyx_cur_scope->__pyx_v_i])), (sizeof(struct kinfo_proc)));

          /* "bsd/_bsd.pyx":732
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))
 *             memcpy(tmp, &ret[i], sizeof(defs.kinfo_proc))
 *             tmp_ps = defs.procstat_open_sysctl()             # <<<<<<<<<<<<<<
 * 
 *         if tmp_ps == NULL:
 */
          __pyx_cur_scope->__pyx_v_tmp_ps = procstat_open_sysctl();
        }

        /* "bsd/_bsd.pyx":729
 * 
 *     for i in range(0, count):
 *         with nogil:             # <<<<<<<<<<<<<<
 *             tmp = <defs.kinfo_proc *>malloc(sizeof(defs.kinfo_proc))
 *             memcpy(tmp, &ret[i], sizeof(defs.kinfo_proc))
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L19;
          }
          __pyx_L19:;
        }
    }

    /* "bsd/_bsd.pyx":734
 *             tmp_ps = defs.procstat_open_sysctl()
 * 
 *         if tmp_ps == NULL:             # <<<<<<<<<<<<<<
 *             raise OSError(errno, os.strerror(errno))
 * 
 */
    __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_tmp_ps == NULL) != 0);
    if (__pyx_t_3) {

      /* "bsd/_bsd.pyx":735
 * 
 *         if tmp_ps == NULL:
 *             raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *         proc = Process.__new__(Process)
 */
      __pyx_t_7 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      if (!__pyx_t_1) {
        __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
      __pyx_t_7 = 0;
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 735, __pyx_L1_error)

      /* "bsd/_bsd.pyx":734
 *             tmp_ps = defs.procstat_open_sysctl()
 * 
 *         if tmp_ps == NULL:             # <<<<<<<<<<<<<<
 *             raise OSError(errno, os.strerror(errno))
 * 
 */
    }

    /* "bsd/_bsd.pyx":737
 *             raise OSError(errno, os.strerror(errno))
 * 
 *         proc = Process.__new__(Process)             # <<<<<<<<<<<<<<
 *         proc.proc = tmp
 *         proc.free = True
 */
    __pyx_t_9 = __pyx_tp_new_3bsd_4_bsd_Process(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_Process), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (!(likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_3bsd_4_bsd_Process)))) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_proc, ((struct __pyx_obj_3bsd_4_bsd_Process *)__pyx_t_9));
    __Pyx_GIVEREF(__pyx_t_9);
    __pyx_t_9 = 0;

    /* "bsd/_bsd.pyx":738
 * 
 *         proc = Process.__new__(Process)
 *         proc.proc = tmp             # <<<<<<<<<<<<<<
 *         proc.free = True
 *         proc.ps = tmp_ps
 */
    __pyx_cur_scope->__pyx_v_proc->proc = __pyx_cur_scope->__pyx_v_tmp;

    /* "bsd/_bsd.pyx":739
 *         proc = Process.__new__(Process)
 *         proc.proc = tmp
 *         proc.free = True             # <<<<<<<<<<<<<<
 *         proc.ps = tmp_ps
 * 
 */
    __pyx_cur_scope->__pyx_v_proc->free = 1;

    /* "bsd/_bsd.pyx":740
 *         proc.proc = tmp
 *         proc.free = True
 *         proc.ps = tmp_ps             # <<<<<<<<<<<<<<
 * 
 *         yield proc
 */
    __pyx_cur_scope->__pyx_v_proc->ps = __pyx_cur_scope->__pyx_v_tmp_ps;

    /* "bsd/_bsd.pyx":742
 *         proc.ps = tmp_ps
 * 
 *         yield proc             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_proc);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_10;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_11;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L21_resume_from_yield:;
    __pyx_t_10 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_11 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 742, __pyx_L1_error)
  }

  /* "bsd/_bsd.pyx":744
 *         yield proc
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.procstat_freeprocs(ps, ret)
 *         defs.procstat_close(ps)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":745
 * 
 *     with nogil:
 *         defs.procstat_freeprocs(ps, ret)             # <<<<<<<<<<<<<<
 *         defs.procstat_close(ps)
 * 
 */
        procstat_freeprocs(__pyx_cur_scope->__pyx_v_ps, __pyx_cur_scope->__pyx_v_ret);

        /* "bsd/_bsd.pyx":746
 *     with nogil:
 *         defs.procstat_freeprocs(ps, ret)
 *         defs.procstat_close(ps)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        procstat_close(__pyx_cur_scope->__pyx_v_ps);
      }

      /* "bsd/_bsd.pyx":744
 *         yield proc
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.procstat_freeprocs(ps, ret)
 *         defs.procstat_close(ps)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L24;
        }
        __pyx_L24:;
      }
  }

  /* "bsd/_bsd.pyx":700
 * 
 * 
 * def getprocs(predicate, arg=0):             # <<<<<<<<<<<<<<
 *     cdef Process proc
 *     cdef defs.procstat *ps
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("getprocs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_3bsd_4_bsd_18generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "bsd/_bsd.pyx":749
 * 
 * 
 * def getswapinfo():             # <<<<<<<<<<<<<<
 *     cdef const char *c_name = "py-bsd"
 *     cdef SwapDevice swapdev
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_17getswapinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_17getswapinfo = {"getswapinfo", (PyCFunction)__pyx_pw_3bsd_4_bsd_17getswapinfo, METH_NOARGS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_17getswapinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getswapinfo (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_16getswapinfo(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_16getswapinfo(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getswapinfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(__pyx_ptype_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_4_bsd_18generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_getswapinfo, __pyx_n_s_getswapinfo); if (unlikely(!gen)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("bsd._bsd.getswapinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_3bsd_4_bsd_18generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *__pyx_cur_scope = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  long __pyx_t_9;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L19_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 749, __pyx_L1_error)

  /* "bsd/_bsd.pyx":750
 * 
 * def getswapinfo():
 *     cdef const char *c_name = "py-bsd"             # <<<<<<<<<<<<<<
 *     cdef SwapDevice swapdev
 *     cdef char errstr[128]
 */
  __pyx_cur_scope->__pyx_v_c_name = ((char const *)"py-bsd");

  /* "bsd/_bsd.pyx":757
 *     cdef int ret
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         kd = defs.kvm_open(NULL, NULL, NULL, 0, c_name)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":758
 * 
 *     with nogil:
 *         kd = defs.kvm_open(NULL, NULL, NULL, 0, c_name)             # <<<<<<<<<<<<<<
 * 
 *     if kd == NULL:
 */
        __pyx_cur_scope->__pyx_v_kd = kvm_open(NULL, NULL, NULL, 0, __pyx_cur_scope->__pyx_v_c_name);
      }

      /* "bsd/_bsd.pyx":757
 *     cdef int ret
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         kd = defs.kvm_open(NULL, NULL, NULL, 0, c_name)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "bsd/_bsd.pyx":760
 *         kd = defs.kvm_open(NULL, NULL, NULL, 0, c_name)
 * 
 *     if kd == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_kd == NULL) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":761
 * 
 *     if kd == NULL:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 761, __pyx_L1_error)

    /* "bsd/_bsd.pyx":760
 *         kd = defs.kvm_open(NULL, NULL, NULL, 0, c_name)
 * 
 *     if kd == NULL:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":763
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.kvm_getswapinfo(kd, swap, 1024, 0)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":764
 * 
 *     with nogil:
 *         ret = defs.kvm_getswapinfo(kd, swap, 1024, 0)             # <<<<<<<<<<<<<<
 * 
 *     if ret < 0:
 */
        __pyx_cur_scope->__pyx_v_ret = kvm_getswapinfo(__pyx_cur_scope->__pyx_v_kd, __pyx_cur_scope->__pyx_v_swap, 0x400, 0);
      }

      /* "bsd/_bsd.pyx":763
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.kvm_getswapinfo(kd, swap, 1024, 0)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
  }

  /* "bsd/_bsd.pyx":766
 *         ret = defs.kvm_getswapinfo(kd, swap, 1024, 0)
 * 
 *     if ret < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_ret < 0) != 0);
  if (__pyx_t_1) {

    /* "bsd/_bsd.pyx":767
 * 
 *     if ret < 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(0, ret):
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strerror); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 767, __pyx_L1_error)

    /* "bsd/_bsd.pyx":766
 *         ret = defs.kvm_getswapinfo(kd, swap, 1024, 0)
 * 
 *     if ret < 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":769
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     for i in range(0, ret):             # <<<<<<<<<<<<<<
 *         swapdev = SwapDevice.__new__(SwapDevice)
 *         with nogil:
 */
  __pyx_t_8 = __pyx_cur_scope->__pyx_v_ret;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_9;

    /* "bsd/_bsd.pyx":770
 * 
 *     for i in range(0, ret):
 *         swapdev = SwapDevice.__new__(SwapDevice)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             memcpy(&swapdev.swap, &swap[i], sizeof(defs.kvm_swap))
 */
    __pyx_t_5 = __pyx_tp_new_3bsd_4_bsd_SwapDevice(((PyTypeObject *)__pyx_ptype_3bsd_4_bsd_SwapDevice), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!(likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_3bsd_4_bsd_SwapDevice)))) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_swapdev));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_swapdev, ((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)__pyx_t_5));
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/_bsd.pyx":771
 *     for i in range(0, ret):
 *         swapdev = SwapDevice.__new__(SwapDevice)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             memcpy(&swapdev.swap, &swap[i], sizeof(defs.kvm_swap))
 * 
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        #endif
        /*try:*/ {

          /* "bsd/_bsd.pyx":772
 *         swapdev = SwapDevice.__new__(SwapDevice)
 *         with nogil:
 *             memcpy(&swapdev.swap, &swap[i], sizeof(defs.kvm_swap))             # <<<<<<<<<<<<<<
 * 
 *         yield swapdev
 */
          memcpy((&__pyx_cur_scope->__pyx_v_swapdev->swap), (&(__pyx_cur_scope->__pyx_v_swap[__pyx_cur_scope->__pyx_v_i])), (sizeof(struct kvm_swap)));
        }

        /* "bsd/_bsd.pyx":771
 *     for i in range(0, ret):
 *         swapdev = SwapDevice.__new__(SwapDevice)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             memcpy(&swapdev.swap, &swap[i], sizeof(defs.kvm_swap))
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L18;
          }
          __pyx_L18:;
        }
    }

    /* "bsd/_bsd.pyx":774
 *             memcpy(&swapdev.swap, &swap[i], sizeof(defs.kvm_swap))
 * 
 *         yield swapdev             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_swapdev));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_swapdev);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_8;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_9;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L19_resume_from_yield:;
    __pyx_t_8 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_9 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 774, __pyx_L1_error)
  }

  /* "bsd/_bsd.pyx":776
 *         yield swapdev
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.kvm_close(kd)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":777
 * 
 *     with nogil:
 *         defs.kvm_close(kd)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        kvm_close(__pyx_cur_scope->__pyx_v_kd);
      }

      /* "bsd/_bsd.pyx":776
 *         yield swapdev
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.kvm_close(kd)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L22;
        }
        __pyx_L22:;
      }
  }

  /* "bsd/_bsd.pyx":749
 * 
 * 
 * def getswapinfo():             # <<<<<<<<<<<<<<
 *     cdef const char *c_name = "py-bsd"
 *     cdef SwapDevice swapdev
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("getswapinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":780
 * 
 * 
 * def clock_gettime(clock):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_20clock_gettime(PyObject *__pyx_self, PyObject *__pyx_v_clock); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_20clock_gettime = {"clock_gettime", (PyCFunction)__pyx_pw_3bsd_4_bsd_20clock_gettime, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_20clock_gettime(PyObject *__pyx_self, PyObject *__pyx_v_clock) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clock_gettime (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_19clock_gettime(__pyx_self, ((PyObject *)__pyx_v_clock));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_19clock_gettime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_clock) {
  struct timespec __pyx_v_tp;
  clockid_t __pyx_v_clock_t;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  clockid_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("clock_gettime", 0);

  /* "bsd/_bsd.pyx":785
 *     cdef int ret
 * 
 *     clock_t = clock             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_1 = __Pyx_PyInt_As_clockid_t(__pyx_v_clock); if (unlikely((__pyx_t_1 == (clockid_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_v_clock_t = __pyx_t_1;

  /* "bsd/_bsd.pyx":787
 *     clock_t = clock
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.clock_gettime(clock_t, &tp)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":788
 * 
 *     with nogil:
 *         ret = defs.clock_gettime(clock_t, &tp)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
        __pyx_v_ret = clock_gettime(__pyx_v_clock_t, (&__pyx_v_tp));
      }

      /* "bsd/_bsd.pyx":787
 *     clock_t = clock
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.clock_gettime(clock_t, &tp)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":790
 *         ret = defs.clock_gettime(clock_t, &tp)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_2) {

    /* "bsd/_bsd.pyx":791
 * 
 *     if ret != 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 *     return tp.tv_sec + tp.tv_nsec * 1e-9
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 791, __pyx_L1_error)

    /* "bsd/_bsd.pyx":790
 *         ret = defs.clock_gettime(clock_t, &tp)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":793
 *         raise OSError(errno, os.strerror(errno))
 * 
 *     return tp.tv_sec + tp.tv_nsec * 1e-9             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_tp.tv_sec + (__pyx_v_tp.tv_nsec * 1e-9))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":780
 * 
 * 
 * def clock_gettime(clock):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.clock_gettime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":796
 * 
 * 
 * def clock_settime(clock, value):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_22clock_settime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_22clock_settime = {"clock_settime", (PyCFunction)__pyx_pw_3bsd_4_bsd_22clock_settime, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_22clock_settime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_clock = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clock_settime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_clock,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clock)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("clock_settime", 1, 2, 2, 1); __PYX_ERR(0, 796, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clock_settime") < 0)) __PYX_ERR(0, 796, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_clock = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clock_settime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 796, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.clock_settime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_21clock_settime(__pyx_self, __pyx_v_clock, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_21clock_settime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_clock, PyObject *__pyx_v_value) {
  struct timespec __pyx_v_tp;
  clockid_t __pyx_v_clock_t;
  int __pyx_v_ret;
  PyObject *__pyx_v_frac = NULL;
  PyObject *__pyx_v_rest = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  clockid_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  time_t __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("clock_settime", 0);

  /* "bsd/_bsd.pyx":801
 *     cdef int ret
 * 
 *     clock_t = clock             # <<<<<<<<<<<<<<
 * 
 *     frac, rest = math.modf(value)
 */
  __pyx_t_1 = __Pyx_PyInt_As_clockid_t(__pyx_v_clock); if (unlikely((__pyx_t_1 == (clockid_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
  __pyx_v_clock_t = __pyx_t_1;

  /* "bsd/_bsd.pyx":803
 *     clock_t = clock
 * 
 *     frac, rest = math.modf(value)             # <<<<<<<<<<<<<<
 *     tp.tv_sec = rest
 *     tp.tv_nsec = frac * 1e9
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 803, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
    index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 803, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 803, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_frac = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_rest = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "bsd/_bsd.pyx":804
 * 
 *     frac, rest = math.modf(value)
 *     tp.tv_sec = rest             # <<<<<<<<<<<<<<
 *     tp.tv_nsec = frac * 1e9
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_As_time_t(__pyx_v_rest); if (unlikely((__pyx_t_7 == (time_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L1_error)
  __pyx_v_tp.tv_sec = __pyx_t_7;

  /* "bsd/_bsd.pyx":805
 *     frac, rest = math.modf(value)
 *     tp.tv_sec = rest
 *     tp.tv_nsec = frac * 1e9             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_frac, __pyx_float_1e9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tp.tv_nsec = __pyx_t_8;

  /* "bsd/_bsd.pyx":807
 *     tp.tv_nsec = frac * 1e9
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.clock_settime(clock_t, &tp)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":808
 * 
 *     with nogil:
 *         ret = defs.clock_settime(clock_t, &tp)             # <<<<<<<<<<<<<<
 * 
 *     if ret != 0:
 */
        __pyx_v_ret = clock_settime(__pyx_v_clock_t, (&__pyx_v_tp));
      }

      /* "bsd/_bsd.pyx":807
 *     tp.tv_nsec = frac * 1e9
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.clock_settime(clock_t, &tp)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }

  /* "bsd/_bsd.pyx":810
 *         ret = defs.clock_settime(clock_t, &tp)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
  if (__pyx_t_9) {

    /* "bsd/_bsd.pyx":811
 * 
 *     if ret != 0:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_10) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 811, __pyx_L1_error)

    /* "bsd/_bsd.pyx":810
 *         ret = defs.clock_settime(clock_t, &tp)
 * 
 *     if ret != 0:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":796
 * 
 * 
 * def clock_settime(clock, value):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("bsd._bsd.clock_settime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_frac);
  __Pyx_XDECREF(__pyx_v_rest);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":814
 * 
 * 
 * def lchown(path, uid=-1, gid=-1, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchown(path, uid, gid)
 *     if not recursive:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_24lchown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_24lchown = {"lchown", (PyCFunction)__pyx_pw_3bsd_4_bsd_24lchown, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_24lchown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_uid = 0;
  PyObject *__pyx_v_gid = 0;
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lchown (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_uid,&__pyx_n_s_gid,&__pyx_n_s_recursive,0};
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_int_neg_1);
    values[2] = ((PyObject *)__pyx_int_neg_1);
    values[3] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uid);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gid);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lchown") < 0)) __PYX_ERR(0, 814, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_uid = values[1];
    __pyx_v_gid = values[2];
    __pyx_v_recursive = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lchown", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 814, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.lchown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_23lchown(__pyx_self, __pyx_v_path, __pyx_v_uid, __pyx_v_gid, __pyx_v_recursive);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_23lchown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_uid, PyObject *__pyx_v_gid, PyObject *__pyx_v_recursive) {
  PyObject *__pyx_v_root = NULL;
  PyObject *__pyx_v_dirs = NULL;
  PyObject *__pyx_v_files = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("lchown", 0);

  /* "bsd/_bsd.pyx":815
 * 
 * def lchown(path, uid=-1, gid=-1, recursive=False):
 *     os.lchown(path, uid, gid)             # <<<<<<<<<<<<<<
 *     if not recursive:
 *         return
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lchown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_2) {
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path);
  __Pyx_INCREF(__pyx_v_uid);
  __Pyx_GIVEREF(__pyx_v_uid);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_uid);
  __Pyx_INCREF(__pyx_v_gid);
  __Pyx_GIVEREF(__pyx_v_gid);
  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_gid);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":816
 * def lchown(path, uid=-1, gid=-1, recursive=False):
 *     os.lchown(path, uid, gid)
 *     if not recursive:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "bsd/_bsd.pyx":817
 *     os.lchown(path, uid, gid)
 *     if not recursive:
 *         return             # <<<<<<<<<<<<<<
 * 
 *     for root, dirs, files in os.walk(path):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":816
 * def lchown(path, uid=-1, gid=-1, recursive=False):
 *     os.lchown(path, uid, gid)
 *     if not recursive:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  }

  /* "bsd/_bsd.pyx":819
 *         return
 * 
 *     for root, dirs, files in os.walk(path):             # <<<<<<<<<<<<<<
 *         for n in files:
 *             os.lchown(os.path.join(root, n), uid, gid)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_walk); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_path);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 819, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 819, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 819, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_root, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dirs, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_files, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "bsd/_bsd.pyx":820
 * 
 *     for root, dirs, files in os.walk(path):
 *         for n in files:             # <<<<<<<<<<<<<<
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_files)) || PyTuple_CheckExact(__pyx_v_files)) {
      __pyx_t_1 = __pyx_v_files; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_files); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 820, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 820, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 820, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 820, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":821
 *     for root, dirs, files in os.walk(path):
 *         for n in files:
 *             os.lchown(os.path.join(root, n), uid, gid)             # <<<<<<<<<<<<<<
 * 
 *         for n in dirs:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lchown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_path); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_join); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_INCREF(__pyx_v_root);
      __Pyx_GIVEREF(__pyx_v_root);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_root);
      __Pyx_INCREF(__pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_n);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_3);
      __Pyx_INCREF(__pyx_v_uid);
      __Pyx_GIVEREF(__pyx_v_uid);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_uid);
      __Pyx_INCREF(__pyx_v_gid);
      __Pyx_GIVEREF(__pyx_v_gid);
      PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_v_gid);
      __pyx_t_3 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":820
 * 
 *     for root, dirs, files in os.walk(path):
 *         for n in files:             # <<<<<<<<<<<<<<
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":823
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 *         for n in dirs:             # <<<<<<<<<<<<<<
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_dirs)) || PyTuple_CheckExact(__pyx_v_dirs)) {
      __pyx_t_1 = __pyx_v_dirs; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 823, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 823, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 823, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 823, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":824
 * 
 *         for n in dirs:
 *             os.lchown(os.path.join(root, n), uid, gid)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lchown); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_14 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_v_root);
      __Pyx_GIVEREF(__pyx_v_root);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_v_root);
      __Pyx_INCREF(__pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_v_n);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_14 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_uid);
      __Pyx_GIVEREF(__pyx_v_uid);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_v_uid);
      __Pyx_INCREF(__pyx_v_gid);
      __Pyx_GIVEREF(__pyx_v_gid);
      PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_15, __pyx_v_gid);
      __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":823
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 *         for n in dirs:             # <<<<<<<<<<<<<<
 *             os.lchown(os.path.join(root, n), uid, gid)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":819
 *         return
 * 
 *     for root, dirs, files in os.walk(path):             # <<<<<<<<<<<<<<
 *         for n in files:
 *             os.lchown(os.path.join(root, n), uid, gid)
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/_bsd.pyx":814
 * 
 * 
 * def lchown(path, uid=-1, gid=-1, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchown(path, uid, gid)
 *     if not recursive:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("bsd._bsd.lchown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_dirs);
  __Pyx_XDECREF(__pyx_v_files);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":827
 * 
 * 
 * def lchmod(path, mode, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchmod(path, mode)
 *     if not recursive:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_26lchmod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_26lchmod = {"lchmod", (PyCFunction)__pyx_pw_3bsd_4_bsd_26lchmod, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_26lchmod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_recursive = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lchmod (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_mode,&__pyx_n_s_recursive,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lchmod", 0, 2, 3, 1); __PYX_ERR(0, 827, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recursive);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lchmod") < 0)) __PYX_ERR(0, 827, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_recursive = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lchmod", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 827, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.lchmod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_25lchmod(__pyx_self, __pyx_v_path, __pyx_v_mode, __pyx_v_recursive);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_25lchmod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_mode, PyObject *__pyx_v_recursive) {
  PyObject *__pyx_v_root = NULL;
  PyObject *__pyx_v_dirs = NULL;
  PyObject *__pyx_v_files = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("lchmod", 0);

  /* "bsd/_bsd.pyx":828
 * 
 * def lchmod(path, mode, recursive=False):
 *     os.lchmod(path, mode)             # <<<<<<<<<<<<<<
 *     if not recursive:
 *         return
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lchmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_2) {
    __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
  }
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path);
  __Pyx_INCREF(__pyx_v_mode);
  __Pyx_GIVEREF(__pyx_v_mode);
  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_mode);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":829
 * def lchmod(path, mode, recursive=False):
 *     os.lchmod(path, mode)
 *     if not recursive:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_recursive); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 829, __pyx_L1_error)
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (__pyx_t_7) {

    /* "bsd/_bsd.pyx":830
 *     os.lchmod(path, mode)
 *     if not recursive:
 *         return             # <<<<<<<<<<<<<<
 * 
 *     for root, dirs, files in os.walk(path):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "bsd/_bsd.pyx":829
 * def lchmod(path, mode, recursive=False):
 *     os.lchmod(path, mode)
 *     if not recursive:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  }

  /* "bsd/_bsd.pyx":832
 *         return
 * 
 *     for root, dirs, files in os.walk(path):             # <<<<<<<<<<<<<<
 *         for n in files:
 *             os.lchmod(os.path.join(root, n), mode)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_walk); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_path);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 832, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 832, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 832, __pyx_L1_error)
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 832, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_root, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dirs, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_files, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "bsd/_bsd.pyx":833
 * 
 *     for root, dirs, files in os.walk(path):
 *         for n in files:             # <<<<<<<<<<<<<<
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_files)) || PyTuple_CheckExact(__pyx_v_files)) {
      __pyx_t_1 = __pyx_v_files; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_files); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 833, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 833, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 833, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 833, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":834
 *     for root, dirs, files in os.walk(path):
 *         for n in files:
 *             os.lchmod(os.path.join(root, n), mode)             # <<<<<<<<<<<<<<
 * 
 *         for n in dirs:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lchmod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_path); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_join); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_INCREF(__pyx_v_root);
      __Pyx_GIVEREF(__pyx_v_root);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_root);
      __Pyx_INCREF(__pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_n);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_3);
      __Pyx_INCREF(__pyx_v_mode);
      __Pyx_GIVEREF(__pyx_v_mode);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_mode);
      __pyx_t_3 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":833
 * 
 *     for root, dirs, files in os.walk(path):
 *         for n in files:             # <<<<<<<<<<<<<<
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":836
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 *         for n in dirs:             # <<<<<<<<<<<<<<
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 */
    if (likely(PyList_CheckExact(__pyx_v_dirs)) || PyTuple_CheckExact(__pyx_v_dirs)) {
      __pyx_t_1 = __pyx_v_dirs; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dirs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 836, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 836, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 836, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 836, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":837
 * 
 *         for n in dirs:
 *             os.lchmod(os.path.join(root, n), mode)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lchmod); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_14 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(__pyx_v_root);
      __Pyx_GIVEREF(__pyx_v_root);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_v_root);
      __Pyx_INCREF(__pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_v_n);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
          __pyx_t_15 = 1;
        }
      }
      __pyx_t_14 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_15, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_mode);
      __Pyx_GIVEREF(__pyx_v_mode);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_15, __pyx_v_mode);
      __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "bsd/_bsd.pyx":836
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 *         for n in dirs:             # <<<<<<<<<<<<<<
 *             os.lchmod(os.path.join(root, n), mode)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":832
 *         return
 * 
 *     for root, dirs, files in os.walk(path):             # <<<<<<<<<<<<<<
 *         for n in files:
 *             os.lchmod(os.path.join(root, n), mode)
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "bsd/_bsd.pyx":827
 * 
 * 
 * def lchmod(path, mode, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchmod(path, mode)
 *     if not recursive:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("bsd._bsd.lchmod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_root);
  __Pyx_XDECREF(__pyx_v_dirs);
  __Pyx_XDECREF(__pyx_v_files);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":840
 * 
 * 
 * def closefrom(int lowfd):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         defs.closefrom(lowfd)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_28closefrom(PyObject *__pyx_self, PyObject *__pyx_arg_lowfd); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_28closefrom = {"closefrom", (PyCFunction)__pyx_pw_3bsd_4_bsd_28closefrom, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_28closefrom(PyObject *__pyx_self, PyObject *__pyx_arg_lowfd) {
  int __pyx_v_lowfd;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closefrom (wrapper)", 0);
  assert(__pyx_arg_lowfd); {
    __pyx_v_lowfd = __Pyx_PyInt_As_int(__pyx_arg_lowfd); if (unlikely((__pyx_v_lowfd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 840, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.closefrom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_27closefrom(__pyx_self, ((int)__pyx_v_lowfd));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_27closefrom(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_lowfd) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closefrom", 0);

  /* "bsd/_bsd.pyx":841
 * 
 * def closefrom(int lowfd):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.closefrom(lowfd)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":842
 * def closefrom(int lowfd):
 *     with nogil:
 *         defs.closefrom(lowfd)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        closefrom(__pyx_v_lowfd);
      }

      /* "bsd/_bsd.pyx":841
 * 
 * def closefrom(int lowfd):
 *     with nogil:             # <<<<<<<<<<<<<<
 *         defs.closefrom(lowfd)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":840
 * 
 * 
 * def closefrom(int lowfd):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         defs.closefrom(lowfd)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":845
 * 
 * 
 * def login_tty(fd):             # <<<<<<<<<<<<<<
 *     cdef int ret
 *     cdef int c_fd
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_30login_tty(PyObject *__pyx_self, PyObject *__pyx_v_fd); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_30login_tty = {"login_tty", (PyCFunction)__pyx_pw_3bsd_4_bsd_30login_tty, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_30login_tty(PyObject *__pyx_self, PyObject *__pyx_v_fd) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("login_tty (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_29login_tty(__pyx_self, ((PyObject *)__pyx_v_fd));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_29login_tty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fd) {
  int __pyx_v_ret;
  int __pyx_v_c_fd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("login_tty", 0);

  /* "bsd/_bsd.pyx":849
 *     cdef int c_fd
 * 
 *     c_fd = fd             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error)
  __pyx_v_c_fd = __pyx_t_1;

  /* "bsd/_bsd.pyx":851
 *     c_fd = fd
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.login_tty(c_fd)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "bsd/_bsd.pyx":852
 * 
 *     with nogil:
 *         ret = defs.login_tty(c_fd)             # <<<<<<<<<<<<<<
 * 
 *     if ret == -1:
 */
        __pyx_v_ret = login_tty(__pyx_v_c_fd);
      }

      /* "bsd/_bsd.pyx":851
 *     c_fd = fd
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         ret = defs.login_tty(c_fd)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "bsd/_bsd.pyx":854
 *         ret = defs.login_tty(c_fd)
 * 
 *     if ret == -1:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  __pyx_t_2 = ((__pyx_v_ret == -1L) != 0);
  if (__pyx_t_2) {

    /* "bsd/_bsd.pyx":855
 * 
 *     if ret == -1:
 *         raise OSError(errno, os.strerror(errno))             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 855, __pyx_L1_error)

    /* "bsd/_bsd.pyx":854
 *         ret = defs.login_tty(c_fd)
 * 
 *     if ret == -1:             # <<<<<<<<<<<<<<
 *         raise OSError(errno, os.strerror(errno))
 * 
 */
  }

  /* "bsd/_bsd.pyx":845
 * 
 * 
 * def login_tty(fd):             # <<<<<<<<<<<<<<
 *     cdef int ret
 *     cdef int c_fd
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.login_tty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":858
 * 
 * 
 * def setproctitle(title):             # <<<<<<<<<<<<<<
 *     defs.setproctitle(title.encode('utf-8'))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_32setproctitle(PyObject *__pyx_self, PyObject *__pyx_v_title); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_32setproctitle = {"setproctitle", (PyCFunction)__pyx_pw_3bsd_4_bsd_32setproctitle, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_32setproctitle(PyObject *__pyx_self, PyObject *__pyx_v_title) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setproctitle (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_31setproctitle(__pyx_self, ((PyObject *)__pyx_v_title));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_31setproctitle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  __Pyx_RefNannySetupContext("setproctitle", 0);

  /* "bsd/_bsd.pyx":859
 * 
 * def setproctitle(title):
 *     defs.setproctitle(title.encode('utf-8'))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 859, __pyx_L1_error)
  setproctitle(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":858
 * 
 * 
 * def setproctitle(title):             # <<<<<<<<<<<<<<
 *     defs.setproctitle(title.encode('utf-8'))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("bsd._bsd.setproctitle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":862
 * 
 * 
 * def bitmask_to_set(n, enumeration):             # <<<<<<<<<<<<<<
 *     result = set()
 *     while n:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_34bitmask_to_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_34bitmask_to_set = {"bitmask_to_set", (PyCFunction)__pyx_pw_3bsd_4_bsd_34bitmask_to_set, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_34bitmask_to_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_enumeration = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bitmask_to_set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_enumeration,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enumeration)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("bitmask_to_set", 1, 2, 2, 1); __PYX_ERR(0, 862, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bitmask_to_set") < 0)) __PYX_ERR(0, 862, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_n = values[0];
    __pyx_v_enumeration = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bitmask_to_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 862, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("bsd._bsd.bitmask_to_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3bsd_4_bsd_33bitmask_to_set(__pyx_self, __pyx_v_n, __pyx_v_enumeration);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_33bitmask_to_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_enumeration) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("bitmask_to_set", 0);
  __Pyx_INCREF(__pyx_v_n);

  /* "bsd/_bsd.pyx":863
 * 
 * def bitmask_to_set(n, enumeration):
 *     result = set()             # <<<<<<<<<<<<<<
 *     while n:
 *         b = n & (~n+1)
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":864
 * def bitmask_to_set(n, enumeration):
 *     result = set()
 *     while n:             # <<<<<<<<<<<<<<
 *         b = n & (~n+1)
 *         try:
 */
  while (1) {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_n); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 864, __pyx_L1_error)
    if (!__pyx_t_2) break;

    /* "bsd/_bsd.pyx":865
 *     result = set()
 *     while n:
 *         b = n & (~n+1)             # <<<<<<<<<<<<<<
 *         try:
 *             result.add(enumeration(b))
 */
    __pyx_t_1 = PyNumber_Invert(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_And(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "bsd/_bsd.pyx":866
 *     while n:
 *         b = n & (~n+1)
 *         try:             # <<<<<<<<<<<<<<
 *             result.add(enumeration(b))
 *         except ValueError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "bsd/_bsd.pyx":867
 *         b = n & (~n+1)
 *         try:
 *             result.add(enumeration(b))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
 */
        __Pyx_INCREF(__pyx_v_enumeration);
        __pyx_t_3 = __pyx_v_enumeration; __pyx_t_7 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 867, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_b);
          __Pyx_GIVEREF(__pyx_v_b);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_b);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_9 = PySet_Add(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 867, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "bsd/_bsd.pyx":866
 *     while n:
 *         b = n & (~n+1)
 *         try:             # <<<<<<<<<<<<<<
 *             result.add(enumeration(b))
 *         except ValueError:
 */
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "bsd/_bsd.pyx":868
 *         try:
 *             result.add(enumeration(b))
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_10) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "bsd/_bsd.pyx":866
 *     while n:
 *         b = n & (~n+1)
 *         try:             # <<<<<<<<<<<<<<
 *             result.add(enumeration(b))
 *         except ValueError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L12_try_end:;
    }

    /* "bsd/_bsd.pyx":871
 *             pass
 * 
 *         n ^= b             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyNumber_InPlaceXor(__pyx_v_n, __pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "bsd/_bsd.pyx":873
 *         n ^= b
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":862
 * 
 * 
 * def bitmask_to_set(n, enumeration):             # <<<<<<<<<<<<<<
 *     result = set()
 *     while n:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("bsd._bsd.bitmask_to_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":876
 * 
 * 
 * def set_to_bitmask(value):             # <<<<<<<<<<<<<<
 *     result = 0
 *     for i in value:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3bsd_4_bsd_36set_to_bitmask(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_3bsd_4_bsd_36set_to_bitmask = {"set_to_bitmask", (PyCFunction)__pyx_pw_3bsd_4_bsd_36set_to_bitmask, METH_O, 0};
static PyObject *__pyx_pw_3bsd_4_bsd_36set_to_bitmask(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_to_bitmask (wrapper)", 0);
  __pyx_r = __pyx_pf_3bsd_4_bsd_35set_to_bitmask(__pyx_self, ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3bsd_4_bsd_35set_to_bitmask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("set_to_bitmask", 0);

  /* "bsd/_bsd.pyx":877
 * 
 * def set_to_bitmask(value):
 *     result = 0             # <<<<<<<<<<<<<<
 *     for i in value:
 *         result |= int(i)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_result = __pyx_int_0;

  /* "bsd/_bsd.pyx":878
 * def set_to_bitmask(value):
 *     result = 0
 *     for i in value:             # <<<<<<<<<<<<<<
 *         result |= int(i)
 * 
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 878, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "bsd/_bsd.pyx":879
 *     result = 0
 *     for i in value:
 *         result |= int(i)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "bsd/_bsd.pyx":878
 * def set_to_bitmask(value):
 *     result = 0
 *     for i in value:             # <<<<<<<<<<<<<<
 *         result |= int(i)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":881
 *         result |= int(i)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":876
 * 
 * 
 * def set_to_bitmask(value):             # <<<<<<<<<<<<<<
 *     result = 0
 *     for i in value:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("bsd._bsd.set_to_bitmask", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "bsd/_bsd.pyx":884
 * 
 * 
 * cdef double convert_timeval(defs.timeval* tv):             # <<<<<<<<<<<<<<
 *     return tv.tv_sec + tv.tv_usec * 1e-6
 */

static double __pyx_f_3bsd_4_bsd_convert_timeval(struct timeval *__pyx_v_tv) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_timeval", 0);

  /* "bsd/_bsd.pyx":885
 * 
 * cdef double convert_timeval(defs.timeval* tv):
 *     return tv.tv_sec + tv.tv_usec * 1e-6             # <<<<<<<<<<<<<<
 */
  __pyx_r = (__pyx_v_tv->tv_sec + (__pyx_v_tv->tv_usec * 1e-6));
  goto __pyx_L0;

  /* "bsd/_bsd.pyx":884
 * 
 * 
 * cdef double convert_timeval(defs.timeval* tv):             # <<<<<<<<<<<<<<
 *     return tv.tv_sec + tv.tv_usec * 1e-6
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_3bsd_4_bsd_MountPoint(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_3bsd_4_bsd_10MountPoint_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd_MountPoint(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3bsd_4_bsd_10MountPoint_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_5flags_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_fstype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_6fstype_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_source(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_6source_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_dest(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_4dest_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_blocksize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_9blocksize_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_total_blocks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_12total_blocks_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_free_blocks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_11free_blocks_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_avail_blocks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_12avail_blocks_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_files(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_5files_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_free_files(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_10free_files_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_name_max(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_8name_max_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10MountPoint_fsid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10MountPoint_4fsid_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_MountPoint[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_3bsd_4_bsd_10MountPoint_9__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_MountPoint[] = {
  {(char *)"flags", __pyx_getprop_3bsd_4_bsd_10MountPoint_flags, 0, (char *)0, 0},
  {(char *)"fstype", __pyx_getprop_3bsd_4_bsd_10MountPoint_fstype, 0, (char *)0, 0},
  {(char *)"source", __pyx_getprop_3bsd_4_bsd_10MountPoint_source, 0, (char *)0, 0},
  {(char *)"dest", __pyx_getprop_3bsd_4_bsd_10MountPoint_dest, 0, (char *)0, 0},
  {(char *)"blocksize", __pyx_getprop_3bsd_4_bsd_10MountPoint_blocksize, 0, (char *)0, 0},
  {(char *)"total_blocks", __pyx_getprop_3bsd_4_bsd_10MountPoint_total_blocks, 0, (char *)0, 0},
  {(char *)"free_blocks", __pyx_getprop_3bsd_4_bsd_10MountPoint_free_blocks, 0, (char *)0, 0},
  {(char *)"avail_blocks", __pyx_getprop_3bsd_4_bsd_10MountPoint_avail_blocks, 0, (char *)0, 0},
  {(char *)"files", __pyx_getprop_3bsd_4_bsd_10MountPoint_files, 0, (char *)0, 0},
  {(char *)"free_files", __pyx_getprop_3bsd_4_bsd_10MountPoint_free_files, 0, (char *)0, 0},
  {(char *)"name_max", __pyx_getprop_3bsd_4_bsd_10MountPoint_name_max, 0, (char *)0, 0},
  {(char *)"fsid", __pyx_getprop_3bsd_4_bsd_10MountPoint_fsid, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_MountPoint = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.MountPoint", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_MountPoint), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_MountPoint, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3bsd_4_bsd_10MountPoint_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3bsd_4_bsd_10MountPoint_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_MountPoint, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_MountPoint, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_MountPoint, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile __pyx_vtable_3bsd_4_bsd_OpenFile;

static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenFile(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3bsd_4_bsd_OpenFile *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3bsd_4_bsd_OpenFile *)o);
  p->__pyx_vtab = __pyx_vtabptr_3bsd_4_bsd_OpenFile;
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd_OpenFile(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_4type_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_fflags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_6fflags_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_uflags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_6uflags_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_fd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_2fd_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_path(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_4path_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_8OpenFile_refcount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_8OpenFile_8refcount_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_OpenFile[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_3bsd_4_bsd_8OpenFile_5__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_OpenFile[] = {
  {(char *)"type", __pyx_getprop_3bsd_4_bsd_8OpenFile_type, 0, (char *)0, 0},
  {(char *)"fflags", __pyx_getprop_3bsd_4_bsd_8OpenFile_fflags, 0, (char *)0, 0},
  {(char *)"uflags", __pyx_getprop_3bsd_4_bsd_8OpenFile_uflags, 0, (char *)0, 0},
  {(char *)"fd", __pyx_getprop_3bsd_4_bsd_8OpenFile_fd, 0, (char *)0, 0},
  {(char *)"path", __pyx_getprop_3bsd_4_bsd_8OpenFile_path, 0, (char *)0, 0},
  {(char *)"refcount", __pyx_getprop_3bsd_4_bsd_8OpenFile_refcount, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_OpenFile = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.OpenFile", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_OpenFile), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_OpenFile, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3bsd_4_bsd_8OpenFile_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3bsd_4_bsd_8OpenFile_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_OpenFile, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_OpenFile, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_OpenFile, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenVnode __pyx_vtable_3bsd_4_bsd_OpenVnode;

static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenVnode(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3bsd_4_bsd_OpenVnode *p;
  PyObject *o = __pyx_tp_new_3bsd_4_bsd_OpenFile(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3bsd_4_bsd_OpenVnode *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile*)__pyx_vtabptr_3bsd_4_bsd_OpenVnode;
  return o;
}

static PyObject *__pyx_getprop_3bsd_4_bsd_9OpenVnode_devname(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_9OpenVnode_7devname_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_9OpenVnode_mntdir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_9OpenVnode_6mntdir_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_9OpenVnode_dev(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_9OpenVnode_3dev_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_9OpenVnode_fsid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_9OpenVnode_4fsid_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_OpenVnode[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_3bsd_4_bsd_9OpenVnode_1__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_OpenVnode[] = {
  {(char *)"devname", __pyx_getprop_3bsd_4_bsd_9OpenVnode_devname, 0, (char *)0, 0},
  {(char *)"mntdir", __pyx_getprop_3bsd_4_bsd_9OpenVnode_mntdir, 0, (char *)0, 0},
  {(char *)"dev", __pyx_getprop_3bsd_4_bsd_9OpenVnode_dev, 0, (char *)0, 0},
  {(char *)"fsid", __pyx_getprop_3bsd_4_bsd_9OpenVnode_fsid, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_OpenVnode = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.OpenVnode", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_OpenVnode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_OpenFile, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_3bsd_4_bsd_8OpenFile_1__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_3bsd_4_bsd_8OpenFile_3__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_OpenVnode, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_OpenVnode, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_OpenVnode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_3bsd_4_bsd_OpenSocket __pyx_vtable_3bsd_4_bsd_OpenSocket;

static PyObject *__pyx_tp_new_3bsd_4_bsd_OpenSocket(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_3bsd_4_bsd_OpenSocket *p;
  PyObject *o = __pyx_tp_new_3bsd_4_bsd_OpenFile(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3bsd_4_bsd_OpenSocket *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3bsd_4_bsd_OpenFile*)__pyx_vtabptr_3bsd_4_bsd_OpenSocket;
  return o;
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10OpenSocket_dname(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10OpenSocket_5dname_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10OpenSocket_af(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10OpenSocket_2af_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10OpenSocket_proto(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10OpenSocket_5proto_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10OpenSocket_local_address(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10OpenSocket_13local_address_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10OpenSocket_peer_address(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10OpenSocket_12peer_address_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_OpenSocket[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_3bsd_4_bsd_10OpenSocket_1__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_OpenSocket[] = {
  {(char *)"dname", __pyx_getprop_3bsd_4_bsd_10OpenSocket_dname, 0, (char *)0, 0},
  {(char *)"af", __pyx_getprop_3bsd_4_bsd_10OpenSocket_af, 0, (char *)0, 0},
  {(char *)"proto", __pyx_getprop_3bsd_4_bsd_10OpenSocket_proto, 0, (char *)0, 0},
  {(char *)"local_address", __pyx_getprop_3bsd_4_bsd_10OpenSocket_local_address, 0, (char *)0, 0},
  {(char *)"peer_address", __pyx_getprop_3bsd_4_bsd_10OpenSocket_peer_address, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_OpenSocket = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.OpenSocket", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_OpenSocket), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_OpenFile, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_3bsd_4_bsd_8OpenFile_1__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_3bsd_4_bsd_8OpenFile_3__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_OpenSocket, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_OpenSocket, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_OpenSocket, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_3bsd_4_bsd_Process(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_3bsd_4_bsd_7Process_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd_Process(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_3bsd_4_bsd_7Process_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_pid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_3pid_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_ppid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_4ppid_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_command(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_7command_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_uid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_3uid_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_cwd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_3cwd_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_path(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_4path_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_argv(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_4argv_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_env(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_3env_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_started_at(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_10started_at_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_rusage(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_6rusage_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_7Process_files(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_7Process_5files_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_Process[] = {
  {"__getstate__", (PyCFunction)__pyx_pw_3bsd_4_bsd_7Process_9__getstate__, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_Process[] = {
  {(char *)"pid", __pyx_getprop_3bsd_4_bsd_7Process_pid, 0, (char *)0, 0},
  {(char *)"ppid", __pyx_getprop_3bsd_4_bsd_7Process_ppid, 0, (char *)0, 0},
  {(char *)"command", __pyx_getprop_3bsd_4_bsd_7Process_command, 0, (char *)0, 0},
  {(char *)"uid", __pyx_getprop_3bsd_4_bsd_7Process_uid, 0, (char *)0, 0},
  {(char *)"cwd", __pyx_getprop_3bsd_4_bsd_7Process_cwd, 0, (char *)0, 0},
  {(char *)"path", __pyx_getprop_3bsd_4_bsd_7Process_path, 0, (char *)0, 0},
  {(char *)"argv", __pyx_getprop_3bsd_4_bsd_7Process_argv, 0, (char *)0, 0},
  {(char *)"env", __pyx_getprop_3bsd_4_bsd_7Process_env, 0, (char *)0, 0},
  {(char *)"started_at", __pyx_getprop_3bsd_4_bsd_7Process_started_at, 0, (char *)0, 0},
  {(char *)"rusage", __pyx_getprop_3bsd_4_bsd_7Process_rusage, 0, (char *)0, 0},
  {(char *)"files", __pyx_getprop_3bsd_4_bsd_7Process_files, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_Process = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.Process", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_Process), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_Process, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3bsd_4_bsd_7Process_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3bsd_4_bsd_7Process_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_Process, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_Process, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_Process, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_3bsd_4_bsd_SwapDevice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd_SwapDevice(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10SwapDevice_devname(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10SwapDevice_7devname_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10SwapDevice_used(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10SwapDevice_4used_1__get__(o);
}

static PyObject *__pyx_getprop_3bsd_4_bsd_10SwapDevice_total(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3bsd_4_bsd_10SwapDevice_5total_1__get__(o);
}

static PyMethodDef __pyx_methods_3bsd_4_bsd_SwapDevice[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3bsd_4_bsd_SwapDevice[] = {
  {(char *)"devname", __pyx_getprop_3bsd_4_bsd_10SwapDevice_devname, 0, (char *)0, 0},
  {(char *)"used", __pyx_getprop_3bsd_4_bsd_10SwapDevice_used, 0, (char *)0, 0},
  {(char *)"total", __pyx_getprop_3bsd_4_bsd_10SwapDevice_total, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3bsd_4_bsd_SwapDevice = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.SwapDevice", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd_SwapDevice), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd_SwapDevice, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3bsd_4_bsd_10SwapDevice_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3bsd_4_bsd_10SwapDevice_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3bsd_4_bsd_SwapDevice, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3bsd_4_bsd_SwapDevice, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd_SwapDevice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct____get__[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct____get__ = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct____get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct____get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct____get__[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct____get__];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct____get__(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct____get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct____get__[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct____get__++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct____get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct____get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_3bsd_4_bsd_Process *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct____get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct____get__", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct____get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct____get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct____get__, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct____get__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct____get__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_1___get__[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct_1___get__ = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_1___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_1___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_1___get__[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_1___get__];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_1___get__(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_1___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct_1___get__[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_1___get__++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_1___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_1___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_i);
  p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_3bsd_4_bsd_Process *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct_1___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct_1___get__", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_1___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_1___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_1___get__, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_1___get__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_1___get__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_2___get__[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct_2___get__ = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_2___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_2___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_2___get__[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_2___get__];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_2___get__(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_cls);
  Py_CLEAR(p->__pyx_v_file);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_type_mapping);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_2___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct_2___get__[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_2___get__++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_2___get__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)o;
  if (p->__pyx_v_cls) {
    e = (*v)(p->__pyx_v_cls, a); if (e) return e;
  }
  if (p->__pyx_v_file) {
    e = (*v)(((PyObject*)p->__pyx_v_file), a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_type_mapping) {
    e = (*v)(p->__pyx_v_type_mapping, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_2___get__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__ *)o;
  tmp = ((PyObject*)p->__pyx_v_cls);
  p->__pyx_v_cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_file);
  p->__pyx_v_file = ((struct __pyx_obj_3bsd_4_bsd_OpenFile *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_3bsd_4_bsd_Process *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_type_mapping);
  p->__pyx_v_type_mapping = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct_2___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct_2___get__", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_2___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_2___get__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_2___get__, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_2___get__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_2___get__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_mnt);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)o;
  if (p->__pyx_v_mnt) {
    e = (*v)(((PyObject*)p->__pyx_v_mnt), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo *)o;
  tmp = ((PyObject*)p->__pyx_v_mnt);
  p->__pyx_v_mnt = ((struct __pyx_obj_3bsd_4_bsd_MountPoint *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct_3_getmntinfo", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_4_getprocs[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct_4_getprocs = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_4_getprocs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_4_getprocs > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_4_getprocs[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_4_getprocs];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_4_getprocs(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_arg);
  Py_CLEAR(p->__pyx_v_predicate);
  Py_CLEAR(p->__pyx_v_proc);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_4_getprocs < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct_4_getprocs[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_4_getprocs++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_4_getprocs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)o;
  if (p->__pyx_v_arg) {
    e = (*v)(p->__pyx_v_arg, a); if (e) return e;
  }
  if (p->__pyx_v_predicate) {
    e = (*v)(p->__pyx_v_predicate, a); if (e) return e;
  }
  if (p->__pyx_v_proc) {
    e = (*v)(((PyObject*)p->__pyx_v_proc), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_4_getprocs(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs *)o;
  tmp = ((PyObject*)p->__pyx_v_arg);
  p->__pyx_v_arg = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_predicate);
  p->__pyx_v_predicate = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_proc);
  p->__pyx_v_proc = ((struct __pyx_obj_3bsd_4_bsd_Process *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct_4_getprocs = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct_4_getprocs", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_4_getprocs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_4_getprocs, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_4_getprocs, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_4_getprocs, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_4_getprocs, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo[8];
static int __pyx_freecount_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo = 0;

static PyObject *__pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo)))) {
    o = (PyObject*)__pyx_freelist_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo[--__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo];
    memset(o, 0, sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(PyObject *o) {
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_swapdev);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo)))) {
    __pyx_freelist_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo[__pyx_freecount_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo++] = ((struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)o;
  if (p->__pyx_v_swapdev) {
    e = (*v)(((PyObject*)p->__pyx_v_swapdev), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *p = (struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo *)o;
  tmp = ((PyObject*)p->__pyx_v_swapdev);
  p->__pyx_v_swapdev = ((struct __pyx_obj_3bsd_4_bsd_SwapDevice *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "bsd._bsd.__pyx_scope_struct_5_getswapinfo", /*tp_name*/
  sizeof(struct __pyx_obj_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo, /*tp_traverse*/
  __pyx_tp_clear_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "_bsd",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_ACLS, __pyx_k_ACLS, sizeof(__pyx_k_ACLS), 0, 0, 1, 1},
  {&__pyx_n_s_AF_INET, __pyx_k_AF_INET, sizeof(__pyx_k_AF_INET), 0, 0, 1, 1},
  {&__pyx_n_s_AF_INET6, __pyx_k_AF_INET6, sizeof(__pyx_k_AF_INET6), 0, 0, 1, 1},
  {&__pyx_n_s_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_APPEND, __pyx_k_APPEND, sizeof(__pyx_k_APPEND), 0, 0, 1, 1},
  {&__pyx_n_s_ASYNC, __pyx_k_ASYNC, sizeof(__pyx_k_ASYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CDIR, __pyx_k_CDIR, sizeof(__pyx_k_CDIR), 0, 0, 1, 1},
  {&__pyx_n_s_CREAT, __pyx_k_CREAT, sizeof(__pyx_k_CREAT), 0, 0, 1, 1},
  {&__pyx_n_s_CRYPTO, __pyx_k_CRYPTO, sizeof(__pyx_k_CRYPTO), 0, 0, 1, 1},
  {&__pyx_n_s_CTTY, __pyx_k_CTTY, sizeof(__pyx_k_CTTY), 0, 0, 1, 1},
  {&__pyx_n_s_ClockType, __pyx_k_ClockType, sizeof(__pyx_k_ClockType), 0, 0, 1, 1},
  {&__pyx_n_s_DIRECT, __pyx_k_DIRECT, sizeof(__pyx_k_DIRECT), 0, 0, 1, 1},
  {&__pyx_n_s_DescriptorFlags, __pyx_k_DescriptorFlags, sizeof(__pyx_k_DescriptorFlags), 0, 0, 1, 1},
  {&__pyx_n_s_DescriptorType, __pyx_k_DescriptorType, sizeof(__pyx_k_DescriptorType), 0, 0, 1, 1},
  {&__pyx_n_s_DescriptorUseFlags, __pyx_k_DescriptorUseFlags, sizeof(__pyx_k_DescriptorUseFlags), 0, 0, 1, 1},
  {&__pyx_n_s_EXCL, __pyx_k_EXCL, sizeof(__pyx_k_EXCL), 0, 0, 1, 1},
  {&__pyx_n_s_EXEC, __pyx_k_EXEC, sizeof(__pyx_k_EXEC), 0, 0, 1, 1},
  {&__pyx_n_s_EXLOCK, __pyx_k_EXLOCK, sizeof(__pyx_k_EXLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_FIFO, __pyx_k_FIFO, sizeof(__pyx_k_FIFO), 0, 0, 1, 1},
  {&__pyx_n_s_FORCE, __pyx_k_FORCE, sizeof(__pyx_k_FORCE), 0, 0, 1, 1},
  {&__pyx_n_s_GID, __pyx_k_GID, sizeof(__pyx_k_GID), 0, 0, 1, 1},
  {&__pyx_n_s_GJOURNAL, __pyx_k_GJOURNAL, sizeof(__pyx_k_GJOURNAL), 0, 0, 1, 1},
  {&__pyx_n_s_HASLOCK, __pyx_k_HASLOCK, sizeof(__pyx_k_HASLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_INC_THREAD, __pyx_k_INC_THREAD, sizeof(__pyx_k_INC_THREAD), 0, 0, 1, 1},
  {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
  {&__pyx_n_s_JAIL, __pyx_k_JAIL, sizeof(__pyx_k_JAIL), 0, 0, 1, 1},
  {&__pyx_n_s_KQUEUE, __pyx_k_KQUEUE, sizeof(__pyx_k_KQUEUE), 0, 0, 1, 1},
  {&__pyx_n_s_LookupError, __pyx_k_LookupError, sizeof(__pyx_k_LookupError), 0, 0, 1, 1},
  {&__pyx_n_s_MMAP, __pyx_k_MMAP, sizeof(__pyx_k_MMAP), 0, 0, 1, 1},
  {&__pyx_n_s_MONOTONIC, __pyx_k_MONOTONIC, sizeof(__pyx_k_MONOTONIC), 0, 0, 1, 1},
  {&__pyx_n_s_MONOTONIC_FAST, __pyx_k_MONOTONIC_FAST, sizeof(__pyx_k_MONOTONIC_FAST), 0, 0, 1, 1},
  {&__pyx_n_s_MONOTONIC_PRECISE, __pyx_k_MONOTONIC_PRECISE, sizeof(__pyx_k_MONOTONIC_PRECISE), 0, 0, 1, 1},
  {&__pyx_n_s_MQUEUE, __pyx_k_MQUEUE, sizeof(__pyx_k_MQUEUE), 0, 0, 1, 1},
  {&__pyx_n_s_MULTILABEL, __pyx_k_MULTILABEL, sizeof(__pyx_k_MULTILABEL), 0, 0, 1, 1},
  {&__pyx_n_s_MountFlags, __pyx_k_MountFlags, sizeof(__pyx_k_MountFlags), 0, 0, 1, 1},
  {&__pyx_n_s_NFS4ACLS, __pyx_k_NFS4ACLS, sizeof(__pyx_k_NFS4ACLS), 0, 0, 1, 1},
  {&__pyx_n_s_NOATIME, __pyx_k_NOATIME, sizeof(__pyx_k_NOATIME), 0, 0, 1, 1},
  {&__pyx_n_s_NOCLUSTERR, __pyx_k_NOCLUSTERR, sizeof(__pyx_k_NOCLUSTERR), 0, 0, 1, 1},
  {&__pyx_n_s_NOCLUSTERW, __pyx_k_NOCLUSTERW, sizeof(__pyx_k_NOCLUSTERW), 0, 0, 1, 1},
  {&__pyx_n_s_NOEXEC, __pyx_k_NOEXEC, sizeof(__pyx_k_NOEXEC), 0, 0, 1, 1},
  {&__pyx_n_s_NOFOLLOW, __pyx_k_NOFOLLOW, sizeof(__pyx_k_NOFOLLOW), 0, 0, 1, 1},
  {&__pyx_n_s_NONBLOCK, __pyx_k_NONBLOCK, sizeof(__pyx_k_NONBLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_NOSUID, __pyx_k_NOSUID, sizeof(__pyx_k_NOSUID), 0, 0, 1, 1},
  {&__pyx_n_s_NOSYMFOLLOW, __pyx_k_NOSYMFOLLOW, sizeof(__pyx_k_NOSYMFOLLOW), 0, 0, 1, 1},
  {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
  {&__pyx_n_s_PGRP, __pyx_k_PGRP, sizeof(__pyx_k_PGRP), 0, 0, 1, 1},
  {&__pyx_n_s_PID, __pyx_k_PID, sizeof(__pyx_k_PID), 0, 0, 1, 1},
  {&__pyx_kp_s_PID_0_not_found, __pyx_k_PID_0_not_found, sizeof(__pyx_k_PID_0_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_PIPE, __pyx_k_PIPE, sizeof(__pyx_k_PIPE), 0, 0, 1, 1},
  {&__pyx_n_s_PROC, __pyx_k_PROC, sizeof(__pyx_k_PROC), 0, 0, 1, 1},
  {&__pyx_n_s_PTS, __pyx_k_PTS, sizeof(__pyx_k_PTS), 0, 0, 1, 1},
  {&__pyx_n_s_ProcessLookupPredicate, __pyx_k_ProcessLookupPredicate, sizeof(__pyx_k_ProcessLookupPredicate), 0, 0, 1, 1},
  {&__pyx_n_s_Process___get, __pyx_k_Process___get, sizeof(__pyx_k_Process___get), 0, 0, 1, 1},
  {&__pyx_kp_s_Process_information_not_found_in, __pyx_k_Process_information_not_found_in, sizeof(__pyx_k_Process_information_not_found_in), 0, 0, 1, 0},
  {&__pyx_n_s_RDIR, __pyx_k_RDIR, sizeof(__pyx_k_RDIR), 0, 0, 1, 1},
  {&__pyx_n_s_RDONLY, __pyx_k_RDONLY, sizeof(__pyx_k_RDONLY), 0, 0, 1, 1},
  {&__pyx_n_s_READ, __pyx_k_READ, sizeof(__pyx_k_READ), 0, 0, 1, 1},
  {&__pyx_n_s_REALTIME, __pyx_k_REALTIME, sizeof(__pyx_k_REALTIME), 0, 0, 1, 1},
  {&__pyx_n_s_REALTIME_FAST, __pyx_k_REALTIME_FAST, sizeof(__pyx_k_REALTIME_FAST), 0, 0, 1, 1},
  {&__pyx_n_s_REALTIME_PRECISE, __pyx_k_REALTIME_PRECISE, sizeof(__pyx_k_REALTIME_PRECISE), 0, 0, 1, 1},
  {&__pyx_n_s_RGID, __pyx_k_RGID, sizeof(__pyx_k_RGID), 0, 0, 1, 1},
  {&__pyx_n_s_RUID, __pyx_k_RUID, sizeof(__pyx_k_RUID), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_SEM, __pyx_k_SEM, sizeof(__pyx_k_SEM), 0, 0, 1, 1},
  {&__pyx_n_s_SESSION, __pyx_k_SESSION, sizeof(__pyx_k_SESSION), 0, 0, 1, 1},
  {&__pyx_n_s_SHLOCK, __pyx_k_SHLOCK, sizeof(__pyx_k_SHLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_SHM, __pyx_k_SHM, sizeof(__pyx_k_SHM), 0, 0, 1, 1},
  {&__pyx_n_s_SOCKET, __pyx_k_SOCKET, sizeof(__pyx_k_SOCKET), 0, 0, 1, 1},
  {&__pyx_n_s_SOFTDEP, __pyx_k_SOFTDEP, sizeof(__pyx_k_SOFTDEP), 0, 0, 1, 1},
  {&__pyx_n_s_SUIDDIR, __pyx_k_SUIDDIR, sizeof(__pyx_k_SUIDDIR), 0, 0, 1, 1},
  {&__pyx_n_s_SYNC, __pyx_k_SYNC, sizeof(__pyx_k_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_SYNCHRONOUS, __pyx_k_SYNCHRONOUS, sizeof(__pyx_k_SYNCHRONOUS), 0, 0, 1, 1},
  {&__pyx_n_s_TEXT, __pyx_k_TEXT, sizeof(__pyx_k_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_TRACE, __pyx_k_TRACE, sizeof(__pyx_k_TRACE), 0, 0, 1, 1},
  {&__pyx_n_s_TRUNC, __pyx_k_TRUNC, sizeof(__pyx_k_TRUNC), 0, 0, 1, 1},
  {&__pyx_n_s_TTY, __pyx_k_TTY, sizeof(__pyx_k_TTY), 0, 0, 1, 1},
  {&__pyx_n_s_UID, __pyx_k_UID, sizeof(__pyx_k_UID), 0, 0, 1, 1},
  {&__pyx_n_s_UNION, __pyx_k_UNION, sizeof(__pyx_k_UNION), 0, 0, 1, 1},
  {&__pyx_n_s_UNKNOWN, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_UPTIME, __pyx_k_UPTIME, sizeof(__pyx_k_UPTIME), 0, 0, 1, 1},
  {&__pyx_n_s_UPTIME_FAST, __pyx_k_UPTIME_FAST, sizeof(__pyx_k_UPTIME_FAST), 0, 0, 1, 1},
  {&__pyx_n_s_UPTIME_PRECISE, __pyx_k_UPTIME_PRECISE, sizeof(__pyx_k_UPTIME_PRECISE), 0, 0, 1, 1},
  {&__pyx_n_s_VBAD, __pyx_k_VBAD, sizeof(__pyx_k_VBAD), 0, 0, 1, 1},
  {&__pyx_n_s_VBLK, __pyx_k_VBLK, sizeof(__pyx_k_VBLK), 0, 0, 1, 1},
  {&__pyx_n_s_VCHR, __pyx_k_VCHR, sizeof(__pyx_k_VCHR), 0, 0, 1, 1},
  {&__pyx_n_s_VDIR, __pyx_k_VDIR, sizeof(__pyx_k_VDIR), 0, 0, 1, 1},
  {&__pyx_n_s_VFIFO, __pyx_k_VFIFO, sizeof(__pyx_k_VFIFO), 0, 0, 1, 1},
  {&__pyx_n_s_VLNK, __pyx_k_VLNK, sizeof(__pyx_k_VLNK), 0, 0, 1, 1},
  {&__pyx_n_s_VNODE, __pyx_k_VNODE, sizeof(__pyx_k_VNODE), 0, 0, 1, 1},
  {&__pyx_n_s_VNON, __pyx_k_VNON, sizeof(__pyx_k_VNON), 0, 0, 1, 1},
  {&__pyx_n_s_VREG, __pyx_k_VREG, sizeof(__pyx_k_VREG), 0, 0, 1, 1},
  {&__pyx_n_s_VSOCK, __pyx_k_VSOCK, sizeof(__pyx_k_VSOCK), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VnodeType, __pyx_k_VnodeType, sizeof(__pyx_k_VnodeType), 0, 0, 1, 1},
  {&__pyx_n_s_WRITE, __pyx_k_WRITE, sizeof(__pyx_k_WRITE), 0, 0, 1, 1},
  {&__pyx_n_s_af, __pyx_k_af, sizeof(__pyx_k_af), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 0, 0, 1, 1},
  {&__pyx_n_s_avail_blocks, __pyx_k_avail_blocks, sizeof(__pyx_k_avail_blocks), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_bitmask_to_set, __pyx_k_bitmask_to_set, sizeof(__pyx_k_bitmask_to_set), 0, 0, 1, 1},
  {&__pyx_n_s_blocksize, __pyx_k_blocksize, sizeof(__pyx_k_blocksize), 0, 0, 1, 1},
  {&__pyx_kp_s_bsd_MountPoint_0_on_1_type_2, __pyx_k_bsd_MountPoint_0_on_1_type_2, sizeof(__pyx_k_bsd_MountPoint_0_on_1_type_2), 0, 0, 1, 0},
  {&__pyx_kp_s_bsd_OpenFile_path_0_type_1, __pyx_k_bsd_OpenFile_path_0_type_1, sizeof(__pyx_k_bsd_OpenFile_path_0_type_1), 0, 0, 1, 0},
  {&__pyx_kp_s_bsd_Process_0_pid_1, __pyx_k_bsd_Process_0_pid_1, sizeof(__pyx_k_bsd_Process_0_pid_1), 0, 0, 1, 0},
  {&__pyx_kp_s_bsd_SwapDevice_0, __pyx_k_bsd_SwapDevice_0, sizeof(__pyx_k_bsd_SwapDevice_0), 0, 0, 1, 0},
  {&__pyx_n_s_bsd__bsd, __pyx_k_bsd__bsd, sizeof(__pyx_k_bsd__bsd), 0, 0, 1, 1},
  {&__pyx_n_s_c_arg, __pyx_k_c_arg, sizeof(__pyx_k_c_arg), 0, 0, 1, 1},
  {&__pyx_n_s_c_dir, __pyx_k_c_dir, sizeof(__pyx_k_c_dir), 0, 0, 1, 1},
  {&__pyx_n_s_c_fd, __pyx_k_c_fd, sizeof(__pyx_k_c_fd), 0, 0, 1, 1},
  {&__pyx_n_s_c_filename, __pyx_k_c_filename, sizeof(__pyx_k_c_filename), 0, 0, 1, 1},
  {&__pyx_n_s_c_flags, __pyx_k_c_flags, sizeof(__pyx_k_c_flags), 0, 0, 1, 1},
  {&__pyx_n_s_c_name, __pyx_k_c_name, sizeof(__pyx_k_c_name), 0, 0, 1, 1},
  {&__pyx_n_s_c_path, __pyx_k_c_path, sizeof(__pyx_k_c_path), 0, 0, 1, 1},
  {&__pyx_n_s_c_pid, __pyx_k_c_pid, sizeof(__pyx_k_c_pid), 0, 0, 1, 1},
  {&__pyx_n_s_c_predicate, __pyx_k_c_predicate, sizeof(__pyx_k_c_predicate), 0, 0, 1, 1},
  {&__pyx_n_s_clock, __pyx_k_clock, sizeof(__pyx_k_clock), 0, 0, 1, 1},
  {&__pyx_n_s_clock_gettime, __pyx_k_clock_gettime, sizeof(__pyx_k_clock_gettime), 0, 0, 1, 1},
  {&__pyx_n_s_clock_settime, __pyx_k_clock_settime, sizeof(__pyx_k_clock_settime), 0, 0, 1, 1},
  {&__pyx_n_s_clock_t, __pyx_k_clock_t, sizeof(__pyx_k_clock_t), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_closefrom, __pyx_k_closefrom, sizeof(__pyx_k_closefrom), 0, 0, 1, 1},
  {&__pyx_n_s_command, __pyx_k_command, sizeof(__pyx_k_command), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_s_cwd, __pyx_k_cwd, sizeof(__pyx_k_cwd), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_decoded_filename, __pyx_k_decoded_filename, sizeof(__pyx_k_decoded_filename), 0, 0, 1, 1},
  {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1},
  {&__pyx_n_s_dev, __pyx_k_dev, sizeof(__pyx_k_dev), 0, 0, 1, 1},
  {&__pyx_n_s_devname, __pyx_k_devname, sizeof(__pyx_k_devname), 0, 0, 1, 1},
  {&__pyx_n_s_dir, __pyx_k_dir, sizeof(__pyx_k_dir), 0, 0, 1, 1},
  {&__pyx_n_s_dirs, __pyx_k_dirs, sizeof(__pyx_k_dirs), 0, 0, 1, 1},
  {&__pyx_n_s_dname, __pyx_k_dname, sizeof(__pyx_k_dname), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumeration, __pyx_k_enumeration, sizeof(__pyx_k_enumeration), 0, 0, 1, 1},
  {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1},
  {&__pyx_n_s_errstr, __pyx_k_errstr, sizeof(__pyx_k_errstr), 0, 0, 1, 1},
  {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
  {&__pyx_n_s_fflags, __pyx_k_fflags, sizeof(__pyx_k_fflags), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_frac, __pyx_k_frac, sizeof(__pyx_k_frac), 0, 0, 1, 1},
  {&__pyx_n_s_free_blocks, __pyx_k_free_blocks, sizeof(__pyx_k_free_blocks), 0, 0, 1, 1},
  {&__pyx_n_s_free_files, __pyx_k_free_files, sizeof(__pyx_k_free_files), 0, 0, 1, 1},
  {&__pyx_n_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 1},
  {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s_fsid, __pyx_k_fsid, sizeof(__pyx_k_fsid), 0, 0, 1, 1},
  {&__pyx_n_s_fstype, __pyx_k_fstype, sizeof(__pyx_k_fstype), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {&__pyx_n_s_getmntinfo, __pyx_k_getmntinfo, sizeof(__pyx_k_getmntinfo), 0, 0, 1, 1},
  {&__pyx_n_s_getprocs, __pyx_k_getprocs, sizeof(__pyx_k_getprocs), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_getswapinfo, __pyx_k_getswapinfo, sizeof(__pyx_k_getswapinfo), 0, 0, 1, 1},
  {&__pyx_n_s_gid, __pyx_k_gid, sizeof(__pyx_k_gid), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_ignore, __pyx_k_ignore, sizeof(__pyx_k_ignore), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_iov, __pyx_k_iov, sizeof(__pyx_k_iov), 0, 0, 1, 1},
  {&__pyx_n_s_ip_address, __pyx_k_ip_address, sizeof(__pyx_k_ip_address), 0, 0, 1, 1},
  {&__pyx_n_s_ipaddress, __pyx_k_ipaddress, sizeof(__pyx_k_ipaddress), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_kd, __pyx_k_kd, sizeof(__pyx_k_kd), 0, 0, 1, 1},
  {&__pyx_n_s_kinfo_getproc, __pyx_k_kinfo_getproc, sizeof(__pyx_k_kinfo_getproc), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs_len, __pyx_k_kwargs_len, sizeof(__pyx_k_kwargs_len), 0, 0, 1, 1},
  {&__pyx_n_s_lchmod, __pyx_k_lchmod, sizeof(__pyx_k_lchmod), 0, 0, 1, 1},
  {&__pyx_n_s_lchown, __pyx_k_lchown, sizeof(__pyx_k_lchown), 0, 0, 1, 1},
  {&__pyx_n_s_local_address, __pyx_k_local_address, sizeof(__pyx_k_local_address), 0, 0, 1, 1},
  {&__pyx_n_s_login_tty, __pyx_k_login_tty, sizeof(__pyx_k_login_tty), 0, 0, 1, 1},
  {&__pyx_n_s_lowfd, __pyx_k_lowfd, sizeof(__pyx_k_lowfd), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mnt, __pyx_k_mnt, sizeof(__pyx_k_mnt), 0, 0, 1, 1},
  {&__pyx_n_s_mntbuf, __pyx_k_mntbuf, sizeof(__pyx_k_mntbuf), 0, 0, 1, 1},
  {&__pyx_n_s_mntdir, __pyx_k_mntdir, sizeof(__pyx_k_mntdir), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_modf, __pyx_k_modf, sizeof(__pyx_k_modf), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_max, __pyx_k_name_max, sizeof(__pyx_k_name_max), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_nmount, __pyx_k_nmount, sizeof(__pyx_k_nmount), 0, 0, 1, 1},
  {&__pyx_n_s_ntohl, __pyx_k_ntohl, sizeof(__pyx_k_ntohl), 0, 0, 1, 1},
  {&__pyx_n_s_ntohs, __pyx_k_ntohs, sizeof(__pyx_k_ntohs), 0, 0, 1, 1},
  {&__pyx_n_s_opencore, __pyx_k_opencore, sizeof(__pyx_k_opencore), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_peer_address, __pyx_k_peer_address, sizeof(__pyx_k_peer_address), 0, 0, 1, 1},
  {&__pyx_n_s_pid, __pyx_k_pid, sizeof(__pyx_k_pid), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_ppid, __pyx_k_ppid, sizeof(__pyx_k_ppid), 0, 0, 1, 1},
  {&__pyx_n_s_predicate, __pyx_k_predicate, sizeof(__pyx_k_predicate), 0, 0, 1, 1},
  {&__pyx_kp_s_predicate_must_be_ProcessLookupP, __pyx_k_predicate_must_be_ProcessLookupP, sizeof(__pyx_k_predicate_must_be_ProcessLookupP), 0, 0, 1, 0},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_proc, __pyx_k_proc, sizeof(__pyx_k_proc), 0, 0, 1, 1},
  {&__pyx_n_s_proto, __pyx_k_proto, sizeof(__pyx_k_proto), 0, 0, 1, 1},
  {&__pyx_n_s_ps, __pyx_k_ps, sizeof(__pyx_k_ps), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_recursive, __pyx_k_recursive, sizeof(__pyx_k_recursive), 0, 0, 1, 1},
  {&__pyx_n_s_refcount, __pyx_k_refcount, sizeof(__pyx_k_refcount), 0, 0, 1, 1},
  {&__pyx_n_s_rest, __pyx_k_rest, sizeof(__pyx_k_rest), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_n_s_ru_idrss, __pyx_k_ru_idrss, sizeof(__pyx_k_ru_idrss), 0, 0, 1, 1},
  {&__pyx_n_s_ru_inblock, __pyx_k_ru_inblock, sizeof(__pyx_k_ru_inblock), 0, 0, 1, 1},
  {&__pyx_n_s_ru_isrss, __pyx_k_ru_isrss, sizeof(__pyx_k_ru_isrss), 0, 0, 1, 1},
  {&__pyx_n_s_ru_ixrss, __pyx_k_ru_ixrss, sizeof(__pyx_k_ru_ixrss), 0, 0, 1, 1},
  {&__pyx_n_s_ru_majflt, __pyx_k_ru_majflt, sizeof(__pyx_k_ru_majflt), 0, 0, 1, 1},
  {&__pyx_n_s_ru_maxrss, __pyx_k_ru_maxrss, sizeof(__pyx_k_ru_maxrss), 0, 0, 1, 1},
  {&__pyx_n_s_ru_minflt, __pyx_k_ru_minflt, sizeof(__pyx_k_ru_minflt), 0, 0, 1, 1},
  {&__pyx_n_s_ru_msgrcv, __pyx_k_ru_msgrcv, sizeof(__pyx_k_ru_msgrcv), 0, 0, 1, 1},
  {&__pyx_n_s_ru_msgsnd, __pyx_k_ru_msgsnd, sizeof(__pyx_k_ru_msgsnd), 0, 0, 1, 1},
  {&__pyx_n_s_ru_nivcsw, __pyx_k_ru_nivcsw, sizeof(__pyx_k_ru_nivcsw), 0, 0, 1, 1},
  {&__pyx_n_s_ru_nsignals, __pyx_k_ru_nsignals, sizeof(__pyx_k_ru_nsignals), 0, 0, 1, 1},
  {&__pyx_n_s_ru_nswap, __pyx_k_ru_nswap, sizeof(__pyx_k_ru_nswap), 0, 0, 1, 1},
  {&__pyx_n_s_ru_nvcsw, __pyx_k_ru_nvcsw, sizeof(__pyx_k_ru_nvcsw), 0, 0, 1, 1},
  {&__pyx_n_s_ru_oublock, __pyx_k_ru_oublock, sizeof(__pyx_k_ru_oublock), 0, 0, 1, 1},
  {&__pyx_n_s_ru_stime, __pyx_k_ru_stime, sizeof(__pyx_k_ru_stime), 0, 0, 1, 1},
  {&__pyx_n_s_ru_utime, __pyx_k_ru_utime, sizeof(__pyx_k_ru_utime), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_set_to_bitmask, __pyx_k_set_to_bitmask, sizeof(__pyx_k_set_to_bitmask), 0, 0, 1, 1},
  {&__pyx_n_s_setproctitle, __pyx_k_setproctitle, sizeof(__pyx_k_setproctitle), 0, 0, 1, 1},
  {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_started_at, __pyx_k_started_at, sizeof(__pyx_k_started_at), 0, 0, 1, 1},
  {&__pyx_n_s_statfs, __pyx_k_statfs, sizeof(__pyx_k_statfs), 0, 0, 1, 1},
  {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_swap, __pyx_k_swap, sizeof(__pyx_k_swap), 0, 0, 1, 1},
  {&__pyx_n_s_swapdev, __pyx_k_swapdev, sizeof(__pyx_k_swapdev), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
  {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1},
  {&__pyx_n_s_tmp_ps, __pyx_k_tmp_ps, sizeof(__pyx_k_tmp_ps), 0, 0, 1, 1},
  {&__pyx_n_s_total_blocks, __pyx_k_total_blocks, sizeof(__pyx_k_total_blocks), 0, 0, 1, 1},
  {&__pyx_n_s_tp, __pyx_k_tp, sizeof(__pyx_k_tp), 0, 0, 1, 1},
  {&__pyx_n_s_tv_sec, __pyx_k_tv_sec, sizeof(__pyx_k_tv_sec), 0, 0, 1, 1},
  {&__pyx_n_s_tv_usec, __pyx_k_tv_usec, sizeof(__pyx_k_tv_usec), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_uflags, __pyx_k_uflags, sizeof(__pyx_k_uflags), 0, 0, 1, 1},
  {&__pyx_n_s_uid, __pyx_k_uid, sizeof(__pyx_k_uid), 0, 0, 1, 1},
  {&__pyx_n_s_unmount, __pyx_k_unmount, sizeof(__pyx_k_unmount), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_k_usr_nas_source_py_bsd_bsd__bsd, sizeof(__pyx_k_usr_nas_source_py_bsd_bsd__bsd), 0, 0, 1, 0},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_walk, __pyx_k_walk, sizeof(__pyx_k_walk), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 291, __pyx_L1_error)
  __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 457, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 570, __pyx_L1_error)
  __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) __PYX_ERR(0, 660, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 711, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "bsd/_bsd.pyx":582
 *     cdef int ret
 * 
 *     path = path.encode('utf-8')             # <<<<<<<<<<<<<<
 *     c_path = path
 * 
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "bsd/_bsd.pyx":605
 *     cdef int kwargs_len
 * 
 *     flags = kwargs.pop('flags', 0)             # <<<<<<<<<<<<<<
 * 
 *     if 'source' in kwargs:
 */
  __pyx_tuple__2 = PyTuple_Pack(2, __pyx_n_s_flags, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "bsd/_bsd.pyx":608
 * 
 *     if 'source' in kwargs:
 *         kwargs['from'] = kwargs.pop('source')             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_source); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "bsd/_bsd.pyx":618
 * 
 *     for k, v in kwargs.items():
 *         args.append(k.encode('utf-8', 'ignore'))             # <<<<<<<<<<<<<<
 *         args.append(v.encode('utf-8', 'ignore'))
 * 
 */
  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_utf_8, __pyx_n_s_ignore); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "bsd/_bsd.pyx":619
 *     for k, v in kwargs.items():
 *         args.append(k.encode('utf-8', 'ignore'))
 *         args.append(v.encode('utf-8', 'ignore'))             # <<<<<<<<<<<<<<
 * 
 *     for i in range(0, len(args)):
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_utf_8, __pyx_n_s_ignore); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "bsd/_bsd.pyx":679
 *     cdef unsigned int count
 * 
 *     decoded_filename = filename.encode('utf-8')             # <<<<<<<<<<<<<<
 *     c_filename = decoded_filename
 * 
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "bsd/_bsd.pyx":692
 * 
 *     if count < 1:
 *         raise RuntimeError('Process information not found in the core file')             # <<<<<<<<<<<<<<
 * 
 *     ret = Process.__new__(Process)
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Process_information_not_found_in); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "bsd/_bsd.pyx":711
 * 
 *     if not isinstance(predicate, ProcessLookupPredicate):
 *         raise ValueError('predicate must be ProcessLookupPredicate')             # <<<<<<<<<<<<<<
 * 
 *     c_predicate = predicate
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_predicate_must_be_ProcessLookupP); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "bsd/_bsd.pyx":859
 * 
 * def setproctitle(title):
 *     defs.setproctitle(title.encode('utf-8'))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "bsd/_bsd.pyx":559
 * 
 * 
 * def getmntinfo():             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* mntbuf
 */
  __pyx_tuple__10 = PyTuple_Pack(4, __pyx_n_s_mnt, __pyx_n_s_mntbuf, __pyx_n_s_count, __pyx_n_s_i); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_getmntinfo, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 559, __pyx_L1_error)

  /* "bsd/_bsd.pyx":576
 * 
 * 
 * def statfs(path):             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* statfs
 */
  __pyx_tuple__12 = PyTuple_Pack(5, __pyx_n_s_path, __pyx_n_s_mnt, __pyx_n_s_statfs, __pyx_n_s_c_path, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_statfs, 576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 576, __pyx_L1_error)

  /* "bsd/_bsd.pyx":598
 * 
 * 
 * def nmount(**kwargs):             # <<<<<<<<<<<<<<
 *     cdef defs.iovec* iov
 *     cdef int i
 */
  __pyx_tuple__14 = PyTuple_Pack(9, __pyx_n_s_kwargs, __pyx_n_s_iov, __pyx_n_s_i, __pyx_n_s_ret, __pyx_n_s_flags, __pyx_n_s_kwargs_len, __pyx_n_s_args, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 9, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_nmount, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 598, __pyx_L1_error)

  /* "bsd/_bsd.pyx":635
 * 
 * 
 * def unmount(dir, flags=0):             # <<<<<<<<<<<<<<
 *     cdef const char *c_dir = dir
 *     cdef int c_flags = flags
 */
  __pyx_tuple__16 = PyTuple_Pack(5, __pyx_n_s_dir, __pyx_n_s_flags, __pyx_n_s_c_dir, __pyx_n_s_c_flags, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_unmount, 635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 635, __pyx_L1_error)

  /* "bsd/_bsd.pyx":647
 * 
 * 
 * def kinfo_getproc(pid):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc* proc
 */
  __pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_pid, __pyx_n_s_ret, __pyx_n_s_proc, __pyx_n_s_ps, __pyx_n_s_c_pid); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_kinfo_getproc, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 647, __pyx_L1_error)

  /* "bsd/_bsd.pyx":672
 * 
 * 
 * def opencore(filename):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc *proc
 */
  __pyx_tuple__20 = PyTuple_Pack(7, __pyx_n_s_filename, __pyx_n_s_ret, __pyx_n_s_proc, __pyx_n_s_ps, __pyx_n_s_c_filename, __pyx_n_s_count, __pyx_n_s_decoded_filename); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_opencore, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 672, __pyx_L1_error)

  /* "bsd/_bsd.pyx":700
 * 
 * 
 * def getprocs(predicate, arg=0):             # <<<<<<<<<<<<<<
 *     cdef Process proc
 *     cdef defs.procstat *ps
 */
  __pyx_tuple__22 = PyTuple_Pack(11, __pyx_n_s_predicate, __pyx_n_s_arg, __pyx_n_s_proc, __pyx_n_s_ps, __pyx_n_s_tmp_ps, __pyx_n_s_ret, __pyx_n_s_tmp, __pyx_n_s_count, __pyx_n_s_c_predicate, __pyx_n_s_c_arg, __pyx_n_s_i); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_getprocs, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 700, __pyx_L1_error)

  /* "bsd/_bsd.pyx":749
 * 
 * 
 * def getswapinfo():             # <<<<<<<<<<<<<<
 *     cdef const char *c_name = "py-bsd"
 *     cdef SwapDevice swapdev
 */
  __pyx_tuple__24 = PyTuple_Pack(7, __pyx_n_s_c_name, __pyx_n_s_swapdev, __pyx_n_s_errstr, __pyx_n_s_swap, __pyx_n_s_kd, __pyx_n_s_ret, __pyx_n_s_i); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(0, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_getswapinfo, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 749, __pyx_L1_error)

  /* "bsd/_bsd.pyx":780
 * 
 * 
 * def clock_gettime(clock):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */
  __pyx_tuple__26 = PyTuple_Pack(4, __pyx_n_s_clock, __pyx_n_s_tp, __pyx_n_s_clock_t, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_clock_gettime, 780, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 780, __pyx_L1_error)

  /* "bsd/_bsd.pyx":796
 * 
 * 
 * def clock_settime(clock, value):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */
  __pyx_tuple__28 = PyTuple_Pack(7, __pyx_n_s_clock, __pyx_n_s_value, __pyx_n_s_tp, __pyx_n_s_clock_t, __pyx_n_s_ret, __pyx_n_s_frac, __pyx_n_s_rest); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_clock_settime, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 796, __pyx_L1_error)

  /* "bsd/_bsd.pyx":814
 * 
 * 
 * def lchown(path, uid=-1, gid=-1, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchown(path, uid, gid)
 *     if not recursive:
 */
  __pyx_tuple__30 = PyTuple_Pack(8, __pyx_n_s_path, __pyx_n_s_uid, __pyx_n_s_gid, __pyx_n_s_recursive, __pyx_n_s_root, __pyx_n_s_dirs, __pyx_n_s_files, __pyx_n_s_n); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_lchown, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 814, __pyx_L1_error)

  /* "bsd/_bsd.pyx":827
 * 
 * 
 * def lchmod(path, mode, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchmod(path, mode)
 *     if not recursive:
 */
  __pyx_tuple__32 = PyTuple_Pack(7, __pyx_n_s_path, __pyx_n_s_mode, __pyx_n_s_recursive, __pyx_n_s_root, __pyx_n_s_dirs, __pyx_n_s_files, __pyx_n_s_n); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_lchmod, 827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 827, __pyx_L1_error)

  /* "bsd/_bsd.pyx":840
 * 
 * 
 * def closefrom(int lowfd):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         defs.closefrom(lowfd)
 */
  __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_lowfd, __pyx_n_s_lowfd); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_closefrom, 840, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 840, __pyx_L1_error)

  /* "bsd/_bsd.pyx":845
 * 
 * 
 * def login_tty(fd):             # <<<<<<<<<<<<<<
 *     cdef int ret
 *     cdef int c_fd
 */
  __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_fd, __pyx_n_s_ret, __pyx_n_s_c_fd); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_login_tty, 845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 845, __pyx_L1_error)

  /* "bsd/_bsd.pyx":858
 * 
 * 
 * def setproctitle(title):             # <<<<<<<<<<<<<<
 *     defs.setproctitle(title.encode('utf-8'))
 * 
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_title); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_setproctitle, 858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 858, __pyx_L1_error)

  /* "bsd/_bsd.pyx":862
 * 
 * 
 * def bitmask_to_set(n, enumeration):             # <<<<<<<<<<<<<<
 *     result = set()
 *     while n:
 */
  __pyx_tuple__40 = PyTuple_Pack(4, __pyx_n_s_n, __pyx_n_s_enumeration, __pyx_n_s_result, __pyx_n_s_b); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_bitmask_to_set, 862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 862, __pyx_L1_error)

  /* "bsd/_bsd.pyx":876
 * 
 * 
 * def set_to_bitmask(value):             # <<<<<<<<<<<<<<
 *     result = 0
 *     for i in value:
 */
  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_value, __pyx_n_s_result, __pyx_n_s_i); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_nas_source_py_bsd_bsd__bsd, __pyx_n_s_set_to_bitmask, 876, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_1e9 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_float_1e9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init_bsd(void); /*proto*/
PyMODINIT_FUNC init_bsd(void)
#else
PyMODINIT_FUNC PyInit__bsd(void); /*proto*/
PyMODINIT_FUNC PyInit__bsd(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__bsd(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_bsd", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_bsd___bsd) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "bsd._bsd")) {
      if (unlikely(PyDict_SetItemString(modules, "bsd._bsd", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_MountPoint) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_MountPoint.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "MountPoint", (PyObject *)&__pyx_type_3bsd_4_bsd_MountPoint) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_MountPoint = &__pyx_type_3bsd_4_bsd_MountPoint;
  __pyx_vtabptr_3bsd_4_bsd_OpenFile = &__pyx_vtable_3bsd_4_bsd_OpenFile;
  __pyx_vtable_3bsd_4_bsd_OpenFile.init = (PyObject *(*)(struct __pyx_obj_3bsd_4_bsd_OpenFile *))__pyx_f_3bsd_4_bsd_8OpenFile_init;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_OpenFile) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_OpenFile.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_3bsd_4_bsd_OpenFile.tp_dict, __pyx_vtabptr_3bsd_4_bsd_OpenFile) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "OpenFile", (PyObject *)&__pyx_type_3bsd_4_bsd_OpenFile) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_OpenFile = &__pyx_type_3bsd_4_bsd_OpenFile;
  __pyx_vtabptr_3bsd_4_bsd_OpenVnode = &__pyx_vtable_3bsd_4_bsd_OpenVnode;
  __pyx_vtable_3bsd_4_bsd_OpenVnode.__pyx_base = *__pyx_vtabptr_3bsd_4_bsd_OpenFile;
  __pyx_vtable_3bsd_4_bsd_OpenVnode.__pyx_base.init = (PyObject *(*)(struct __pyx_obj_3bsd_4_bsd_OpenFile *))__pyx_f_3bsd_4_bsd_9OpenVnode_init;
  __pyx_type_3bsd_4_bsd_OpenVnode.tp_base = __pyx_ptype_3bsd_4_bsd_OpenFile;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_OpenVnode) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_OpenVnode.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_3bsd_4_bsd_OpenVnode.tp_dict, __pyx_vtabptr_3bsd_4_bsd_OpenVnode) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "OpenVnode", (PyObject *)&__pyx_type_3bsd_4_bsd_OpenVnode) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_OpenVnode = &__pyx_type_3bsd_4_bsd_OpenVnode;
  __pyx_vtabptr_3bsd_4_bsd_OpenSocket = &__pyx_vtable_3bsd_4_bsd_OpenSocket;
  __pyx_vtable_3bsd_4_bsd_OpenSocket.__pyx_base = *__pyx_vtabptr_3bsd_4_bsd_OpenFile;
  __pyx_vtable_3bsd_4_bsd_OpenSocket.__pyx_base.init = (PyObject *(*)(struct __pyx_obj_3bsd_4_bsd_OpenFile *))__pyx_f_3bsd_4_bsd_10OpenSocket_init;
  __pyx_vtable_3bsd_4_bsd_OpenSocket.get_sock_address = (PyObject *(*)(struct __pyx_obj_3bsd_4_bsd_OpenSocket *, struct sockaddr_storage *))__pyx_f_3bsd_4_bsd_10OpenSocket_get_sock_address;
  __pyx_type_3bsd_4_bsd_OpenSocket.tp_base = __pyx_ptype_3bsd_4_bsd_OpenFile;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_OpenSocket) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_OpenSocket.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_3bsd_4_bsd_OpenSocket.tp_dict, __pyx_vtabptr_3bsd_4_bsd_OpenSocket) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "OpenSocket", (PyObject *)&__pyx_type_3bsd_4_bsd_OpenSocket) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_OpenSocket = &__pyx_type_3bsd_4_bsd_OpenSocket;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_Process) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_Process.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Process", (PyObject *)&__pyx_type_3bsd_4_bsd_Process) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_Process = &__pyx_type_3bsd_4_bsd_Process;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd_SwapDevice) < 0) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd_SwapDevice.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "SwapDevice", (PyObject *)&__pyx_type_3bsd_4_bsd_SwapDevice) < 0) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_ptype_3bsd_4_bsd_SwapDevice = &__pyx_type_3bsd_4_bsd_SwapDevice;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct____get__) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct____get__.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct____get__ = &__pyx_type_3bsd_4_bsd___pyx_scope_struct____get__;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct_1___get__) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct_1___get__.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct_1___get__ = &__pyx_type_3bsd_4_bsd___pyx_scope_struct_1___get__;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct_2___get__) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct_2___get__.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct_2___get__ = &__pyx_type_3bsd_4_bsd___pyx_scope_struct_2___get__;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo = &__pyx_type_3bsd_4_bsd___pyx_scope_struct_3_getmntinfo;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct_4_getprocs) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct_4_getprocs.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct_4_getprocs = &__pyx_type_3bsd_4_bsd___pyx_scope_struct_4_getprocs;
  if (PyType_Ready(&__pyx_type_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_type_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo.tp_print = 0;
  __pyx_ptype_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo = &__pyx_type_3bsd_4_bsd___pyx_scope_struct_5_getswapinfo;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "bsd/_bsd.pyx":28
 * #
 * 
 * import os             # <<<<<<<<<<<<<<
 * import enum
 * import math
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":29
 * 
 * import os
 * import enum             # <<<<<<<<<<<<<<
 * import math
 * import socket
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":30
 * import os
 * import enum
 * import math             # <<<<<<<<<<<<<<
 * import socket
 * import ipaddress
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":31
 * import enum
 * import math
 * import socket             # <<<<<<<<<<<<<<
 * import ipaddress
 * import cython
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_socket, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":32
 * import math
 * import socket
 * import ipaddress             # <<<<<<<<<<<<<<
 * import cython
 * from datetime import datetime
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ipaddress, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ipaddress, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "bsd/_bsd.pyx":34
 * import ipaddress
 * import cython
 * from datetime import datetime             # <<<<<<<<<<<<<<
 * from libc.errno cimport errno
 * from libc.stdlib cimport malloc, free
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":42
 * 
 * 
 * class MountFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     RDONLY = defs.MNT_RDONLY
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MountFlags, __pyx_n_s_MountFlags, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":43
 * 
 * class MountFlags(enum.IntEnum):
 *     RDONLY = defs.MNT_RDONLY             # <<<<<<<<<<<<<<
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS
 *     NOEXEC = defs.MNT_NOEXEC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_RDONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RDONLY, __pyx_t_4) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":44
 * class MountFlags(enum.IntEnum):
 *     RDONLY = defs.MNT_RDONLY
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS             # <<<<<<<<<<<<<<
 *     NOEXEC = defs.MNT_NOEXEC
 *     NOSUID = defs.MNT_NOSUID
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_SYNCHRONOUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SYNCHRONOUS, __pyx_t_4) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":45
 *     RDONLY = defs.MNT_RDONLY
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS
 *     NOEXEC = defs.MNT_NOEXEC             # <<<<<<<<<<<<<<
 *     NOSUID = defs.MNT_NOSUID
 *     NFS4ACLS = defs.MNT_NFS4ACLS
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOEXEC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOEXEC, __pyx_t_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":46
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS
 *     NOEXEC = defs.MNT_NOEXEC
 *     NOSUID = defs.MNT_NOSUID             # <<<<<<<<<<<<<<
 *     NFS4ACLS = defs.MNT_NFS4ACLS
 *     UNION = defs.MNT_UNION
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOSUID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOSUID, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":47
 *     NOEXEC = defs.MNT_NOEXEC
 *     NOSUID = defs.MNT_NOSUID
 *     NFS4ACLS = defs.MNT_NFS4ACLS             # <<<<<<<<<<<<<<
 *     UNION = defs.MNT_UNION
 *     ASYNC = defs.MNT_ASYNC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NFS4ACLS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NFS4ACLS, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":48
 *     NOSUID = defs.MNT_NOSUID
 *     NFS4ACLS = defs.MNT_NFS4ACLS
 *     UNION = defs.MNT_UNION             # <<<<<<<<<<<<<<
 *     ASYNC = defs.MNT_ASYNC
 *     FORCE = defs.MNT_FORCE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_UNION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UNION, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":49
 *     NFS4ACLS = defs.MNT_NFS4ACLS
 *     UNION = defs.MNT_UNION
 *     ASYNC = defs.MNT_ASYNC             # <<<<<<<<<<<<<<
 *     FORCE = defs.MNT_FORCE
 *     SUIDDIR = defs.MNT_SUIDDIR
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_ASYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ASYNC, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":50
 *     UNION = defs.MNT_UNION
 *     ASYNC = defs.MNT_ASYNC
 *     FORCE = defs.MNT_FORCE             # <<<<<<<<<<<<<<
 *     SUIDDIR = defs.MNT_SUIDDIR
 *     SOFTDEP = defs.MNT_SOFTDEP
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_FORCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_FORCE, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":51
 *     ASYNC = defs.MNT_ASYNC
 *     FORCE = defs.MNT_FORCE
 *     SUIDDIR = defs.MNT_SUIDDIR             # <<<<<<<<<<<<<<
 *     SOFTDEP = defs.MNT_SOFTDEP
 *     NOSYMFOLLOW = defs.MNT_NOSYMFOLLOW
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_SUIDDIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SUIDDIR, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":52
 *     FORCE = defs.MNT_FORCE
 *     SUIDDIR = defs.MNT_SUIDDIR
 *     SOFTDEP = defs.MNT_SOFTDEP             # <<<<<<<<<<<<<<
 *     NOSYMFOLLOW = defs.MNT_NOSYMFOLLOW
 *     GJOURNAL = defs.MNT_GJOURNAL
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_SOFTDEP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SOFTDEP, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":53
 *     SUIDDIR = defs.MNT_SUIDDIR
 *     SOFTDEP = defs.MNT_SOFTDEP
 *     NOSYMFOLLOW = defs.MNT_NOSYMFOLLOW             # <<<<<<<<<<<<<<
 *     GJOURNAL = defs.MNT_GJOURNAL
 *     MULTILABEL = defs.MNT_MULTILABEL
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOSYMFOLLOW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOSYMFOLLOW, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":54
 *     SOFTDEP = defs.MNT_SOFTDEP
 *     NOSYMFOLLOW = defs.MNT_NOSYMFOLLOW
 *     GJOURNAL = defs.MNT_GJOURNAL             # <<<<<<<<<<<<<<
 *     MULTILABEL = defs.MNT_MULTILABEL
 *     ACLS = defs.MNT_ACLS
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_GJOURNAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_GJOURNAL, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":55
 *     NOSYMFOLLOW = defs.MNT_NOSYMFOLLOW
 *     GJOURNAL = defs.MNT_GJOURNAL
 *     MULTILABEL = defs.MNT_MULTILABEL             # <<<<<<<<<<<<<<
 *     ACLS = defs.MNT_ACLS
 *     NOATIME = defs.MNT_NOATIME
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_MULTILABEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MULTILABEL, __pyx_t_4) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":56
 *     GJOURNAL = defs.MNT_GJOURNAL
 *     MULTILABEL = defs.MNT_MULTILABEL
 *     ACLS = defs.MNT_ACLS             # <<<<<<<<<<<<<<
 *     NOATIME = defs.MNT_NOATIME
 *     NOCLUSTERR = defs.MNT_NOCLUSTERR
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_ACLS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ACLS, __pyx_t_4) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":57
 *     MULTILABEL = defs.MNT_MULTILABEL
 *     ACLS = defs.MNT_ACLS
 *     NOATIME = defs.MNT_NOATIME             # <<<<<<<<<<<<<<
 *     NOCLUSTERR = defs.MNT_NOCLUSTERR
 *     NOCLUSTERW = defs.MNT_NOCLUSTERW
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOATIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOATIME, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":58
 *     ACLS = defs.MNT_ACLS
 *     NOATIME = defs.MNT_NOATIME
 *     NOCLUSTERR = defs.MNT_NOCLUSTERR             # <<<<<<<<<<<<<<
 *     NOCLUSTERW = defs.MNT_NOCLUSTERW
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOCLUSTERR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOCLUSTERR, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":59
 *     NOATIME = defs.MNT_NOATIME
 *     NOCLUSTERR = defs.MNT_NOCLUSTERR
 *     NOCLUSTERW = defs.MNT_NOCLUSTERW             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(MNT_NOCLUSTERW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOCLUSTERW, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":42
 * 
 * 
 * class MountFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     RDONLY = defs.MNT_RDONLY
 *     SYNCHRONOUS = defs.MNT_SYNCHRONOUS
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MountFlags, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MountFlags, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":62
 * 
 * 
 * class ClockType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     REALTIME = defs.CLOCK_REALTIME
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ClockType, __pyx_n_s_ClockType, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":63
 * 
 * class ClockType(enum.IntEnum):
 *     REALTIME = defs.CLOCK_REALTIME             # <<<<<<<<<<<<<<
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE
 *     REALTIME_FAST = defs.CLOCK_REALTIME_FAST
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_REALTIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_REALTIME, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":64
 * class ClockType(enum.IntEnum):
 *     REALTIME = defs.CLOCK_REALTIME
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE             # <<<<<<<<<<<<<<
 *     REALTIME_FAST = defs.CLOCK_REALTIME_FAST
 *     MONOTONIC = defs.CLOCK_MONOTONIC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_REALTIME_PRECISE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_REALTIME_PRECISE, __pyx_t_4) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":65
 *     REALTIME = defs.CLOCK_REALTIME
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE
 *     REALTIME_FAST = defs.CLOCK_REALTIME_FAST             # <<<<<<<<<<<<<<
 *     MONOTONIC = defs.CLOCK_MONOTONIC
 *     MONOTONIC_PRECISE = defs.CLOCK_MONOTONIC_PRECISE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_REALTIME_FAST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_REALTIME_FAST, __pyx_t_4) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":66
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE
 *     REALTIME_FAST = defs.CLOCK_REALTIME_FAST
 *     MONOTONIC = defs.CLOCK_MONOTONIC             # <<<<<<<<<<<<<<
 *     MONOTONIC_PRECISE = defs.CLOCK_MONOTONIC_PRECISE
 *     MONOTONIC_FAST = defs.CLOCK_MONOTONIC_FAST
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_MONOTONIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MONOTONIC, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":67
 *     REALTIME_FAST = defs.CLOCK_REALTIME_FAST
 *     MONOTONIC = defs.CLOCK_MONOTONIC
 *     MONOTONIC_PRECISE = defs.CLOCK_MONOTONIC_PRECISE             # <<<<<<<<<<<<<<
 *     MONOTONIC_FAST = defs.CLOCK_MONOTONIC_FAST
 *     UPTIME = defs.CLOCK_UPTIME
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_MONOTONIC_PRECISE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MONOTONIC_PRECISE, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":68
 *     MONOTONIC = defs.CLOCK_MONOTONIC
 *     MONOTONIC_PRECISE = defs.CLOCK_MONOTONIC_PRECISE
 *     MONOTONIC_FAST = defs.CLOCK_MONOTONIC_FAST             # <<<<<<<<<<<<<<
 *     UPTIME = defs.CLOCK_UPTIME
 *     UPTIME_PRECISE = defs.CLOCK_UPTIME_PRECISE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_MONOTONIC_FAST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MONOTONIC_FAST, __pyx_t_4) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":69
 *     MONOTONIC_PRECISE = defs.CLOCK_MONOTONIC_PRECISE
 *     MONOTONIC_FAST = defs.CLOCK_MONOTONIC_FAST
 *     UPTIME = defs.CLOCK_UPTIME             # <<<<<<<<<<<<<<
 *     UPTIME_PRECISE = defs.CLOCK_UPTIME_PRECISE
 *     UPTIME_FAST = defs.CLOCK_UPTIME_FAST
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_UPTIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UPTIME, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":70
 *     MONOTONIC_FAST = defs.CLOCK_MONOTONIC_FAST
 *     UPTIME = defs.CLOCK_UPTIME
 *     UPTIME_PRECISE = defs.CLOCK_UPTIME_PRECISE             # <<<<<<<<<<<<<<
 *     UPTIME_FAST = defs.CLOCK_UPTIME_FAST
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_UPTIME_PRECISE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UPTIME_PRECISE, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":71
 *     UPTIME = defs.CLOCK_UPTIME
 *     UPTIME_PRECISE = defs.CLOCK_UPTIME_PRECISE
 *     UPTIME_FAST = defs.CLOCK_UPTIME_FAST             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(CLOCK_UPTIME_FAST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UPTIME_FAST, __pyx_t_4) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":62
 * 
 * 
 * class ClockType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     REALTIME = defs.CLOCK_REALTIME
 *     REALTIME_PRECISE = defs.CLOCK_REALTIME_PRECISE
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ClockType, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ClockType, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":74
 * 
 * 
 * class DescriptorType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     VNODE = defs.PS_FST_TYPE_VNODE
 *     FIFO = defs.PS_FST_TYPE_FIFO
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DescriptorType, __pyx_n_s_DescriptorType, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":75
 * 
 * class DescriptorType(enum.IntEnum):
 *     VNODE = defs.PS_FST_TYPE_VNODE             # <<<<<<<<<<<<<<
 *     FIFO = defs.PS_FST_TYPE_FIFO
 *     SOCKET = defs.PS_FST_TYPE_SOCKET
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_VNODE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VNODE, __pyx_t_4) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":76
 * class DescriptorType(enum.IntEnum):
 *     VNODE = defs.PS_FST_TYPE_VNODE
 *     FIFO = defs.PS_FST_TYPE_FIFO             # <<<<<<<<<<<<<<
 *     SOCKET = defs.PS_FST_TYPE_SOCKET
 *     PIPE = defs.PS_FST_TYPE_PIPE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_FIFO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_FIFO, __pyx_t_4) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":77
 *     VNODE = defs.PS_FST_TYPE_VNODE
 *     FIFO = defs.PS_FST_TYPE_FIFO
 *     SOCKET = defs.PS_FST_TYPE_SOCKET             # <<<<<<<<<<<<<<
 *     PIPE = defs.PS_FST_TYPE_PIPE
 *     PTS = defs.PS_FST_TYPE_PTS
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_SOCKET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SOCKET, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":78
 *     FIFO = defs.PS_FST_TYPE_FIFO
 *     SOCKET = defs.PS_FST_TYPE_SOCKET
 *     PIPE = defs.PS_FST_TYPE_PIPE             # <<<<<<<<<<<<<<
 *     PTS = defs.PS_FST_TYPE_PTS
 *     KQUEUE = defs.PS_FST_TYPE_KQUEUE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_PIPE, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":79
 *     SOCKET = defs.PS_FST_TYPE_SOCKET
 *     PIPE = defs.PS_FST_TYPE_PIPE
 *     PTS = defs.PS_FST_TYPE_PTS             # <<<<<<<<<<<<<<
 *     KQUEUE = defs.PS_FST_TYPE_KQUEUE
 *     CRYPTO = defs.PS_FST_TYPE_CRYPTO
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_PTS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_PTS, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":80
 *     PIPE = defs.PS_FST_TYPE_PIPE
 *     PTS = defs.PS_FST_TYPE_PTS
 *     KQUEUE = defs.PS_FST_TYPE_KQUEUE             # <<<<<<<<<<<<<<
 *     CRYPTO = defs.PS_FST_TYPE_CRYPTO
 *     MQUEUE = defs.PS_FST_TYPE_MQUEUE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_KQUEUE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_KQUEUE, __pyx_t_4) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":81
 *     PTS = defs.PS_FST_TYPE_PTS
 *     KQUEUE = defs.PS_FST_TYPE_KQUEUE
 *     CRYPTO = defs.PS_FST_TYPE_CRYPTO             # <<<<<<<<<<<<<<
 *     MQUEUE = defs.PS_FST_TYPE_MQUEUE
 *     SHM = defs.PS_FST_TYPE_SHM
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_CRYPTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_CRYPTO, __pyx_t_4) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":82
 *     KQUEUE = defs.PS_FST_TYPE_KQUEUE
 *     CRYPTO = defs.PS_FST_TYPE_CRYPTO
 *     MQUEUE = defs.PS_FST_TYPE_MQUEUE             # <<<<<<<<<<<<<<
 *     SHM = defs.PS_FST_TYPE_SHM
 *     SEM = defs.PS_FST_TYPE_SEM
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_MQUEUE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MQUEUE, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":83
 *     CRYPTO = defs.PS_FST_TYPE_CRYPTO
 *     MQUEUE = defs.PS_FST_TYPE_MQUEUE
 *     SHM = defs.PS_FST_TYPE_SHM             # <<<<<<<<<<<<<<
 *     SEM = defs.PS_FST_TYPE_SEM
 *     UNKNOWN = defs.PS_FST_TYPE_UNKNOWN
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_SHM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SHM, __pyx_t_4) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":84
 *     MQUEUE = defs.PS_FST_TYPE_MQUEUE
 *     SHM = defs.PS_FST_TYPE_SHM
 *     SEM = defs.PS_FST_TYPE_SEM             # <<<<<<<<<<<<<<
 *     UNKNOWN = defs.PS_FST_TYPE_UNKNOWN
 *     NONE = defs.PS_FST_TYPE_NONE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_SEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SEM, __pyx_t_4) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":85
 *     SHM = defs.PS_FST_TYPE_SHM
 *     SEM = defs.PS_FST_TYPE_SEM
 *     UNKNOWN = defs.PS_FST_TYPE_UNKNOWN             # <<<<<<<<<<<<<<
 *     NONE = defs.PS_FST_TYPE_NONE
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UNKNOWN, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":86
 *     SEM = defs.PS_FST_TYPE_SEM
 *     UNKNOWN = defs.PS_FST_TYPE_UNKNOWN
 *     NONE = defs.PS_FST_TYPE_NONE             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_TYPE_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":74
 * 
 * 
 * class DescriptorType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     VNODE = defs.PS_FST_TYPE_VNODE
 *     FIFO = defs.PS_FST_TYPE_FIFO
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DescriptorType, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DescriptorType, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":89
 * 
 * 
 * class DescriptorFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     READ = defs.PS_FST_FFLAG_READ
 *     WRITE = defs.PS_FST_FFLAG_WRITE
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DescriptorFlags, __pyx_n_s_DescriptorFlags, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":90
 * 
 * class DescriptorFlags(enum.IntEnum):
 *     READ = defs.PS_FST_FFLAG_READ             # <<<<<<<<<<<<<<
 *     WRITE = defs.PS_FST_FFLAG_WRITE
 *     NONBLOCK = defs.PS_FST_FFLAG_NONBLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_READ, __pyx_t_4) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":91
 * class DescriptorFlags(enum.IntEnum):
 *     READ = defs.PS_FST_FFLAG_READ
 *     WRITE = defs.PS_FST_FFLAG_WRITE             # <<<<<<<<<<<<<<
 *     NONBLOCK = defs.PS_FST_FFLAG_NONBLOCK
 *     APPEND = defs.PS_FST_FFLAG_APPEND
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_WRITE, __pyx_t_4) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":92
 *     READ = defs.PS_FST_FFLAG_READ
 *     WRITE = defs.PS_FST_FFLAG_WRITE
 *     NONBLOCK = defs.PS_FST_FFLAG_NONBLOCK             # <<<<<<<<<<<<<<
 *     APPEND = defs.PS_FST_FFLAG_APPEND
 *     SHLOCK = defs.PS_FST_FFLAG_SHLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_NONBLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NONBLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":93
 *     WRITE = defs.PS_FST_FFLAG_WRITE
 *     NONBLOCK = defs.PS_FST_FFLAG_NONBLOCK
 *     APPEND = defs.PS_FST_FFLAG_APPEND             # <<<<<<<<<<<<<<
 *     SHLOCK = defs.PS_FST_FFLAG_SHLOCK
 *     EXLOCK = defs.PS_FST_FFLAG_EXLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_APPEND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_APPEND, __pyx_t_4) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":94
 *     NONBLOCK = defs.PS_FST_FFLAG_NONBLOCK
 *     APPEND = defs.PS_FST_FFLAG_APPEND
 *     SHLOCK = defs.PS_FST_FFLAG_SHLOCK             # <<<<<<<<<<<<<<
 *     EXLOCK = defs.PS_FST_FFLAG_EXLOCK
 *     ASYNC = defs.PS_FST_FFLAG_ASYNC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_SHLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SHLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":95
 *     APPEND = defs.PS_FST_FFLAG_APPEND
 *     SHLOCK = defs.PS_FST_FFLAG_SHLOCK
 *     EXLOCK = defs.PS_FST_FFLAG_EXLOCK             # <<<<<<<<<<<<<<
 *     ASYNC = defs.PS_FST_FFLAG_ASYNC
 *     SYNC = defs.PS_FST_FFLAG_SYNC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_EXLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_EXLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":96
 *     SHLOCK = defs.PS_FST_FFLAG_SHLOCK
 *     EXLOCK = defs.PS_FST_FFLAG_EXLOCK
 *     ASYNC = defs.PS_FST_FFLAG_ASYNC             # <<<<<<<<<<<<<<
 *     SYNC = defs.PS_FST_FFLAG_SYNC
 *     NOFOLLOW = defs.PS_FST_FFLAG_NOFOLLOW
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_ASYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ASYNC, __pyx_t_4) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":97
 *     EXLOCK = defs.PS_FST_FFLAG_EXLOCK
 *     ASYNC = defs.PS_FST_FFLAG_ASYNC
 *     SYNC = defs.PS_FST_FFLAG_SYNC             # <<<<<<<<<<<<<<
 *     NOFOLLOW = defs.PS_FST_FFLAG_NOFOLLOW
 *     CREAT = defs.PS_FST_FFLAG_CREAT
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":98
 *     ASYNC = defs.PS_FST_FFLAG_ASYNC
 *     SYNC = defs.PS_FST_FFLAG_SYNC
 *     NOFOLLOW = defs.PS_FST_FFLAG_NOFOLLOW             # <<<<<<<<<<<<<<
 *     CREAT = defs.PS_FST_FFLAG_CREAT
 *     TRUNC = defs.PS_FST_FFLAG_TRUNC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_NOFOLLOW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NOFOLLOW, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":99
 *     SYNC = defs.PS_FST_FFLAG_SYNC
 *     NOFOLLOW = defs.PS_FST_FFLAG_NOFOLLOW
 *     CREAT = defs.PS_FST_FFLAG_CREAT             # <<<<<<<<<<<<<<
 *     TRUNC = defs.PS_FST_FFLAG_TRUNC
 *     EXCL = defs.PS_FST_FFLAG_EXCL
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_CREAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_CREAT, __pyx_t_4) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":100
 *     NOFOLLOW = defs.PS_FST_FFLAG_NOFOLLOW
 *     CREAT = defs.PS_FST_FFLAG_CREAT
 *     TRUNC = defs.PS_FST_FFLAG_TRUNC             # <<<<<<<<<<<<<<
 *     EXCL = defs.PS_FST_FFLAG_EXCL
 *     DIRECT = defs.PS_FST_FFLAG_DIRECT
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_TRUNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TRUNC, __pyx_t_4) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":101
 *     CREAT = defs.PS_FST_FFLAG_CREAT
 *     TRUNC = defs.PS_FST_FFLAG_TRUNC
 *     EXCL = defs.PS_FST_FFLAG_EXCL             # <<<<<<<<<<<<<<
 *     DIRECT = defs.PS_FST_FFLAG_DIRECT
 *     EXEC = defs.PS_FST_FFLAG_EXEC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_EXCL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_EXCL, __pyx_t_4) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":102
 *     TRUNC = defs.PS_FST_FFLAG_TRUNC
 *     EXCL = defs.PS_FST_FFLAG_EXCL
 *     DIRECT = defs.PS_FST_FFLAG_DIRECT             # <<<<<<<<<<<<<<
 *     EXEC = defs.PS_FST_FFLAG_EXEC
 *     HASLOCK = defs.PS_FST_FFLAG_HASLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_DIRECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_DIRECT, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":103
 *     EXCL = defs.PS_FST_FFLAG_EXCL
 *     DIRECT = defs.PS_FST_FFLAG_DIRECT
 *     EXEC = defs.PS_FST_FFLAG_EXEC             # <<<<<<<<<<<<<<
 *     HASLOCK = defs.PS_FST_FFLAG_HASLOCK
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_EXEC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_EXEC, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":104
 *     DIRECT = defs.PS_FST_FFLAG_DIRECT
 *     EXEC = defs.PS_FST_FFLAG_EXEC
 *     HASLOCK = defs.PS_FST_FFLAG_HASLOCK             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_FFLAG_HASLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_HASLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":89
 * 
 * 
 * class DescriptorFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     READ = defs.PS_FST_FFLAG_READ
 *     WRITE = defs.PS_FST_FFLAG_WRITE
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DescriptorFlags, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DescriptorFlags, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":107
 * 
 * 
 * class DescriptorUseFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     RDIR = defs.PS_FST_UFLAG_RDIR
 *     CDIR = defs.PS_FST_UFLAG_CDIR
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DescriptorUseFlags, __pyx_n_s_DescriptorUseFlags, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":108
 * 
 * class DescriptorUseFlags(enum.IntEnum):
 *     RDIR = defs.PS_FST_UFLAG_RDIR             # <<<<<<<<<<<<<<
 *     CDIR = defs.PS_FST_UFLAG_CDIR
 *     JAIL = defs.PS_FST_UFLAG_JAIL
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_RDIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RDIR, __pyx_t_4) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":109
 * class DescriptorUseFlags(enum.IntEnum):
 *     RDIR = defs.PS_FST_UFLAG_RDIR
 *     CDIR = defs.PS_FST_UFLAG_CDIR             # <<<<<<<<<<<<<<
 *     JAIL = defs.PS_FST_UFLAG_JAIL
 *     TRACE = defs.PS_FST_UFLAG_TRACE
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_CDIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_CDIR, __pyx_t_4) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":110
 *     RDIR = defs.PS_FST_UFLAG_RDIR
 *     CDIR = defs.PS_FST_UFLAG_CDIR
 *     JAIL = defs.PS_FST_UFLAG_JAIL             # <<<<<<<<<<<<<<
 *     TRACE = defs.PS_FST_UFLAG_TRACE
 *     TEXT = defs.PS_FST_UFLAG_TEXT
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_JAIL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JAIL, __pyx_t_4) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":111
 *     CDIR = defs.PS_FST_UFLAG_CDIR
 *     JAIL = defs.PS_FST_UFLAG_JAIL
 *     TRACE = defs.PS_FST_UFLAG_TRACE             # <<<<<<<<<<<<<<
 *     TEXT = defs.PS_FST_UFLAG_TEXT
 *     MMAP = defs.PS_FST_UFLAG_MMAP
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_TRACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TRACE, __pyx_t_4) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":112
 *     JAIL = defs.PS_FST_UFLAG_JAIL
 *     TRACE = defs.PS_FST_UFLAG_TRACE
 *     TEXT = defs.PS_FST_UFLAG_TEXT             # <<<<<<<<<<<<<<
 *     MMAP = defs.PS_FST_UFLAG_MMAP
 *     CTTY = defs.PS_FST_UFLAG_CTTY
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_TEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TEXT, __pyx_t_4) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":113
 *     TRACE = defs.PS_FST_UFLAG_TRACE
 *     TEXT = defs.PS_FST_UFLAG_TEXT
 *     MMAP = defs.PS_FST_UFLAG_MMAP             # <<<<<<<<<<<<<<
 *     CTTY = defs.PS_FST_UFLAG_CTTY
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_MMAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MMAP, __pyx_t_4) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":114
 *     TEXT = defs.PS_FST_UFLAG_TEXT
 *     MMAP = defs.PS_FST_UFLAG_MMAP
 *     CTTY = defs.PS_FST_UFLAG_CTTY             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_UFLAG_CTTY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_CTTY, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":107
 * 
 * 
 * class DescriptorUseFlags(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     RDIR = defs.PS_FST_UFLAG_RDIR
 *     CDIR = defs.PS_FST_UFLAG_CDIR
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DescriptorUseFlags, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DescriptorUseFlags, __pyx_t_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":117
 * 
 * 
 * class VnodeType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     VNON = defs.PS_FST_VTYPE_VNON
 *     VREG = defs.PS_FST_VTYPE_VREG
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_VnodeType, __pyx_n_s_VnodeType, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":118
 * 
 * class VnodeType(enum.IntEnum):
 *     VNON = defs.PS_FST_VTYPE_VNON             # <<<<<<<<<<<<<<
 *     VREG = defs.PS_FST_VTYPE_VREG
 *     VDIR = defs.PS_FST_VTYPE_VDIR
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VNON); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VNON, __pyx_t_4) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":119
 * class VnodeType(enum.IntEnum):
 *     VNON = defs.PS_FST_VTYPE_VNON
 *     VREG = defs.PS_FST_VTYPE_VREG             # <<<<<<<<<<<<<<
 *     VDIR = defs.PS_FST_VTYPE_VDIR
 *     VBLK = defs.PS_FST_VTYPE_VBLK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VREG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VREG, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":120
 *     VNON = defs.PS_FST_VTYPE_VNON
 *     VREG = defs.PS_FST_VTYPE_VREG
 *     VDIR = defs.PS_FST_VTYPE_VDIR             # <<<<<<<<<<<<<<
 *     VBLK = defs.PS_FST_VTYPE_VBLK
 *     VCHR = defs.PS_FST_VTYPE_VCHR
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VDIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VDIR, __pyx_t_4) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":121
 *     VREG = defs.PS_FST_VTYPE_VREG
 *     VDIR = defs.PS_FST_VTYPE_VDIR
 *     VBLK = defs.PS_FST_VTYPE_VBLK             # <<<<<<<<<<<<<<
 *     VCHR = defs.PS_FST_VTYPE_VCHR
 *     VLNK = defs.PS_FST_VTYPE_VLNK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VBLK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VBLK, __pyx_t_4) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":122
 *     VDIR = defs.PS_FST_VTYPE_VDIR
 *     VBLK = defs.PS_FST_VTYPE_VBLK
 *     VCHR = defs.PS_FST_VTYPE_VCHR             # <<<<<<<<<<<<<<
 *     VLNK = defs.PS_FST_VTYPE_VLNK
 *     VSOCK = defs.PS_FST_VTYPE_VSOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VCHR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VCHR, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":123
 *     VBLK = defs.PS_FST_VTYPE_VBLK
 *     VCHR = defs.PS_FST_VTYPE_VCHR
 *     VLNK = defs.PS_FST_VTYPE_VLNK             # <<<<<<<<<<<<<<
 *     VSOCK = defs.PS_FST_VTYPE_VSOCK
 *     VFIFO = defs.PS_FST_VTYPE_VFIFO
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VLNK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VLNK, __pyx_t_4) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":124
 *     VCHR = defs.PS_FST_VTYPE_VCHR
 *     VLNK = defs.PS_FST_VTYPE_VLNK
 *     VSOCK = defs.PS_FST_VTYPE_VSOCK             # <<<<<<<<<<<<<<
 *     VFIFO = defs.PS_FST_VTYPE_VFIFO
 *     VBAD = defs.PS_FST_VTYPE_VBAD
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VSOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VSOCK, __pyx_t_4) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":125
 *     VLNK = defs.PS_FST_VTYPE_VLNK
 *     VSOCK = defs.PS_FST_VTYPE_VSOCK
 *     VFIFO = defs.PS_FST_VTYPE_VFIFO             # <<<<<<<<<<<<<<
 *     VBAD = defs.PS_FST_VTYPE_VBAD
 *     UNKNOWN = defs.PS_FST_VTYPE_UNKNOWN
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VFIFO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VFIFO, __pyx_t_4) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":126
 *     VSOCK = defs.PS_FST_VTYPE_VSOCK
 *     VFIFO = defs.PS_FST_VTYPE_VFIFO
 *     VBAD = defs.PS_FST_VTYPE_VBAD             # <<<<<<<<<<<<<<
 *     UNKNOWN = defs.PS_FST_VTYPE_UNKNOWN
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_VBAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_VBAD, __pyx_t_4) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":127
 *     VFIFO = defs.PS_FST_VTYPE_VFIFO
 *     VBAD = defs.PS_FST_VTYPE_VBAD
 *     UNKNOWN = defs.PS_FST_VTYPE_UNKNOWN             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(PS_FST_VTYPE_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UNKNOWN, __pyx_t_4) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":117
 * 
 * 
 * class VnodeType(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     VNON = defs.PS_FST_VTYPE_VNON
 *     VREG = defs.PS_FST_VTYPE_VREG
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VnodeType, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VnodeType, __pyx_t_4) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":130
 * 
 * 
 * class ProcessLookupPredicate(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     ALL = defs.KERN_PROC_ALL
 *     PID = defs.KERN_PROC_PID
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ProcessLookupPredicate, __pyx_n_s_ProcessLookupPredicate, (PyObject *) NULL, __pyx_n_s_bsd__bsd, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "bsd/_bsd.pyx":131
 * 
 * class ProcessLookupPredicate(enum.IntEnum):
 *     ALL = defs.KERN_PROC_ALL             # <<<<<<<<<<<<<<
 *     PID = defs.KERN_PROC_PID
 *     PGRP = defs.KERN_PROC_PGRP
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_ALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ALL, __pyx_t_4) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":132
 * class ProcessLookupPredicate(enum.IntEnum):
 *     ALL = defs.KERN_PROC_ALL
 *     PID = defs.KERN_PROC_PID             # <<<<<<<<<<<<<<
 *     PGRP = defs.KERN_PROC_PGRP
 *     SESSION = defs.KERN_PROC_SESSION
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_PID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_PID, __pyx_t_4) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":133
 *     ALL = defs.KERN_PROC_ALL
 *     PID = defs.KERN_PROC_PID
 *     PGRP = defs.KERN_PROC_PGRP             # <<<<<<<<<<<<<<
 *     SESSION = defs.KERN_PROC_SESSION
 *     TTY = defs.KERN_PROC_TTY
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_PGRP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_PGRP, __pyx_t_4) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":134
 *     PID = defs.KERN_PROC_PID
 *     PGRP = defs.KERN_PROC_PGRP
 *     SESSION = defs.KERN_PROC_SESSION             # <<<<<<<<<<<<<<
 *     TTY = defs.KERN_PROC_TTY
 *     UID = defs.KERN_PROC_UID
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_SESSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SESSION, __pyx_t_4) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":135
 *     PGRP = defs.KERN_PROC_PGRP
 *     SESSION = defs.KERN_PROC_SESSION
 *     TTY = defs.KERN_PROC_TTY             # <<<<<<<<<<<<<<
 *     UID = defs.KERN_PROC_UID
 *     RUID = defs.KERN_PROC_RUID
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_TTY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TTY, __pyx_t_4) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":136
 *     SESSION = defs.KERN_PROC_SESSION
 *     TTY = defs.KERN_PROC_TTY
 *     UID = defs.KERN_PROC_UID             # <<<<<<<<<<<<<<
 *     RUID = defs.KERN_PROC_RUID
 *     PROC = defs.KERN_PROC_PROC
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_UID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_UID, __pyx_t_4) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":137
 *     TTY = defs.KERN_PROC_TTY
 *     UID = defs.KERN_PROC_UID
 *     RUID = defs.KERN_PROC_RUID             # <<<<<<<<<<<<<<
 *     PROC = defs.KERN_PROC_PROC
 *     RGID = defs.KERN_PROC_RGID
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_RUID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RUID, __pyx_t_4) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":138
 *     UID = defs.KERN_PROC_UID
 *     RUID = defs.KERN_PROC_RUID
 *     PROC = defs.KERN_PROC_PROC             # <<<<<<<<<<<<<<
 *     RGID = defs.KERN_PROC_RGID
 *     GID = defs.KERN_PROC_GID
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_PROC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_PROC, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":139
 *     RUID = defs.KERN_PROC_RUID
 *     PROC = defs.KERN_PROC_PROC
 *     RGID = defs.KERN_PROC_RGID             # <<<<<<<<<<<<<<
 *     GID = defs.KERN_PROC_GID
 *     INC_THREAD = defs.KERN_PROC_INC_THREAD
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_RGID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RGID, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":140
 *     PROC = defs.KERN_PROC_PROC
 *     RGID = defs.KERN_PROC_RGID
 *     GID = defs.KERN_PROC_GID             # <<<<<<<<<<<<<<
 *     INC_THREAD = defs.KERN_PROC_INC_THREAD
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_GID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_GID, __pyx_t_4) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":141
 *     RGID = defs.KERN_PROC_RGID
 *     GID = defs.KERN_PROC_GID
 *     INC_THREAD = defs.KERN_PROC_INC_THREAD             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(KERN_PROC_INC_THREAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_INC_THREAD, __pyx_t_4) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "bsd/_bsd.pyx":130
 * 
 * 
 * class ProcessLookupPredicate(enum.IntEnum):             # <<<<<<<<<<<<<<
 *     ALL = defs.KERN_PROC_ALL
 *     PID = defs.KERN_PROC_PID
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ProcessLookupPredicate, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessLookupPredicate, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":559
 * 
 * 
 * def getmntinfo():             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* mntbuf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_1getmntinfo, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getmntinfo, __pyx_t_2) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":576
 * 
 * 
 * def statfs(path):             # <<<<<<<<<<<<<<
 *     cdef MountPoint mnt
 *     cdef defs.statfs* statfs
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_4statfs, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_statfs, __pyx_t_2) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":598
 * 
 * 
 * def nmount(**kwargs):             # <<<<<<<<<<<<<<
 *     cdef defs.iovec* iov
 *     cdef int i
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_6nmount, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nmount, __pyx_t_2) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":635
 * 
 * 
 * def unmount(dir, flags=0):             # <<<<<<<<<<<<<<
 *     cdef const char *c_dir = dir
 *     cdef int c_flags = flags
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_8unmount, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unmount, __pyx_t_2) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":647
 * 
 * 
 * def kinfo_getproc(pid):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc* proc
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_10kinfo_getproc, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_kinfo_getproc, __pyx_t_2) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":672
 * 
 * 
 * def opencore(filename):             # <<<<<<<<<<<<<<
 *     cdef Process ret
 *     cdef defs.kinfo_proc *proc
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_12opencore, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_opencore, __pyx_t_2) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":700
 * 
 * 
 * def getprocs(predicate, arg=0):             # <<<<<<<<<<<<<<
 *     cdef Process proc
 *     cdef defs.procstat *ps
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_14getprocs, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getprocs, __pyx_t_2) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":749
 * 
 * 
 * def getswapinfo():             # <<<<<<<<<<<<<<
 *     cdef const char *c_name = "py-bsd"
 *     cdef SwapDevice swapdev
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_17getswapinfo, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getswapinfo, __pyx_t_2) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":780
 * 
 * 
 * def clock_gettime(clock):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_20clock_gettime, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clock_gettime, __pyx_t_2) < 0) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":796
 * 
 * 
 * def clock_settime(clock, value):             # <<<<<<<<<<<<<<
 *     cdef defs.timespec tp
 *     cdef defs.clockid_t clock_t
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_22clock_settime, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clock_settime, __pyx_t_2) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":814
 * 
 * 
 * def lchown(path, uid=-1, gid=-1, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchown(path, uid, gid)
 *     if not recursive:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_24lchown, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lchown, __pyx_t_2) < 0) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":827
 * 
 * 
 * def lchmod(path, mode, recursive=False):             # <<<<<<<<<<<<<<
 *     os.lchmod(path, mode)
 *     if not recursive:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_26lchmod, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lchmod, __pyx_t_2) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":840
 * 
 * 
 * def closefrom(int lowfd):             # <<<<<<<<<<<<<<
 *     with nogil:
 *         defs.closefrom(lowfd)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_28closefrom, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_closefrom, __pyx_t_2) < 0) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":845
 * 
 * 
 * def login_tty(fd):             # <<<<<<<<<<<<<<
 *     cdef int ret
 *     cdef int c_fd
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_30login_tty, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_login_tty, __pyx_t_2) < 0) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":858
 * 
 * 
 * def setproctitle(title):             # <<<<<<<<<<<<<<
 *     defs.setproctitle(title.encode('utf-8'))
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_32setproctitle, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setproctitle, __pyx_t_2) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":862
 * 
 * 
 * def bitmask_to_set(n, enumeration):             # <<<<<<<<<<<<<<
 *     result = set()
 *     while n:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_34bitmask_to_set, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bitmask_to_set, __pyx_t_2) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":876
 * 
 * 
 * def set_to_bitmask(value):             # <<<<<<<<<<<<<<
 *     result = 0
 *     for i in value:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3bsd_4_bsd_36set_to_bitmask, NULL, __pyx_n_s_bsd__bsd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_to_bitmask, __pyx_t_2) < 0) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "bsd/_bsd.pyx":1
 * # cython: c_string_type=unicode, c_string_encoding=utf-8             # <<<<<<<<<<<<<<
 * #-
 * # Copyright (c) 2015 iXsystems, Inc.
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init bsd._bsd", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init bsd._bsd");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* KeywordStringCheck */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyObjectCallMethO */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyErrFetchRestore */
      #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
      #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyIntBinop */
        #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* dict_getitem_default */
        static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get_2, key, default_value, NULL);
    }
#endif
    return value;
}

/* ExtTypeTest */
        static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* UnpackUnboundCMethod */
        static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(PyObject_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_O | METH_NOARGS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
        static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
        static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* RaiseTooManyValuesToUnpack */
        static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
        static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
        static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
        static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* GetItemInt */
        static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* RaiseDoubleKeywords */
        static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
        static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* SaveResetException */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* SetVTable */
        static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* Import */
        static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
        static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
        static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
        static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CodeObjectCache */
        static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
        #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
        #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_in_port_t(in_port_t value) {
    const in_port_t neg_one = (in_port_t) -1, const_zero = (in_port_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(in_port_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(in_port_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(in_port_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(in_port_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(in_port_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(in_port_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_pid_t(pid_t value) {
    const pid_t neg_one = (pid_t) -1, const_zero = (pid_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(pid_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pid_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(pid_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(pid_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(pid_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(pid_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uid_t(uid_t value) {
    const uid_t neg_one = (uid_t) -1, const_zero = (uid_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uid_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uid_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uid_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uid_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uid_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uid_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_time_t(time_t value) {
    const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(time_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(time_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(time_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(time_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(time_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_suseconds_t(suseconds_t value) {
    const suseconds_t neg_one = (suseconds_t) -1, const_zero = (suseconds_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(suseconds_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(suseconds_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(suseconds_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(suseconds_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(suseconds_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(suseconds_t),
                                     little, !is_unsigned);
    }
}

static PyObject* __pyx_convert__to_py_struct__timeval(struct timeval s) {
          PyObject* res;
          PyObject* member;
          res = PyDict_New(); if (unlikely(!res)) return NULL;
          member = __Pyx_PyInt_From_time_t(s.tv_sec); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_tv_sec, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_suseconds_t(s.tv_usec); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_tv_usec, member) < 0)) goto bad;
          Py_DECREF(member);
          return res;
          bad:
          Py_XDECREF(member);
          Py_DECREF(res);
          return NULL;
        }
        /* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static PyObject* __pyx_convert__to_py_struct__rusage(struct rusage s) {
          PyObject* res;
          PyObject* member;
          res = PyDict_New(); if (unlikely(!res)) return NULL;
          member = __pyx_convert__to_py_struct__timeval(s.ru_utime); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_utime, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __pyx_convert__to_py_struct__timeval(s.ru_stime); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_stime, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_maxrss); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_maxrss, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_ixrss); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_ixrss, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_idrss); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_idrss, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_isrss); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_isrss, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_minflt); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_minflt, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_majflt); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_majflt, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_nswap); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_nswap, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_inblock); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_inblock, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_oublock); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_oublock, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_msgsnd); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_msgsnd, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_msgrcv); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_msgrcv, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_nsignals); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_nsignals, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_nvcsw); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_nvcsw, member) < 0)) goto bad;
          Py_DECREF(member);
          member = __Pyx_PyInt_From_long(s.ru_nivcsw); if (unlikely(!member)) goto bad;
          if (unlikely(PyDict_SetItem(res, __pyx_n_s_ru_nivcsw, member) < 0)) goto bad;
          Py_DECREF(member);
          return res;
          bad:
          Py_XDECREF(member);
          Py_DECREF(res);
          return NULL;
        }
        /* CIntToPy */
        static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
        static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
        static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
        static CYTHON_INLINE clockid_t __Pyx_PyInt_As_clockid_t(PyObject *x) {
    const clockid_t neg_one = (clockid_t) -1, const_zero = (clockid_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(clockid_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(clockid_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (clockid_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (clockid_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(clockid_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(clockid_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) >= 2 * PyLong_SHIFT) {
                            return (clockid_t) (((((clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(clockid_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) >= 3 * PyLong_SHIFT) {
                            return (clockid_t) (((((((clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(clockid_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) >= 4 * PyLong_SHIFT) {
                            return (clockid_t) (((((((((clockid_t)digits[3]) << PyLong_SHIFT) | (clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (clockid_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(clockid_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(clockid_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(clockid_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(clockid_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (clockid_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(clockid_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(clockid_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(clockid_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 2 * PyLong_SHIFT) {
                            return (clockid_t) (((clockid_t)-1)*(((((clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(clockid_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 2 * PyLong_SHIFT) {
                            return (clockid_t) ((((((clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(clockid_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 3 * PyLong_SHIFT) {
                            return (clockid_t) (((clockid_t)-1)*(((((((clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(clockid_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 3 * PyLong_SHIFT) {
                            return (clockid_t) ((((((((clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(clockid_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 4 * PyLong_SHIFT) {
                            return (clockid_t) (((clockid_t)-1)*(((((((((clockid_t)digits[3]) << PyLong_SHIFT) | (clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(clockid_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(clockid_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(clockid_t) - 1 > 4 * PyLong_SHIFT) {
                            return (clockid_t) ((((((((((clockid_t)digits[3]) << PyLong_SHIFT) | (clockid_t)digits[2]) << PyLong_SHIFT) | (clockid_t)digits[1]) << PyLong_SHIFT) | (clockid_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(clockid_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(clockid_t, long, PyLong_AsLong(x))
            } else if (sizeof(clockid_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(clockid_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            clockid_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (clockid_t) -1;
        }
    } else {
        clockid_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (clockid_t) -1;
        val = __Pyx_PyInt_As_clockid_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to clockid_t");
    return (clockid_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to clockid_t");
    return (clockid_t) -1;
}

/* CIntFromPy */
        static CYTHON_INLINE time_t __Pyx_PyInt_As_time_t(PyObject *x) {
    const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(time_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(time_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (time_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (time_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(time_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(time_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) >= 2 * PyLong_SHIFT) {
                            return (time_t) (((((time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(time_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) >= 3 * PyLong_SHIFT) {
                            return (time_t) (((((((time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(time_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) >= 4 * PyLong_SHIFT) {
                            return (time_t) (((((((((time_t)digits[3]) << PyLong_SHIFT) | (time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (time_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(time_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(time_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(time_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (time_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(time_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(time_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(time_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT) {
                            return (time_t) (((time_t)-1)*(((((time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(time_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT) {
                            return (time_t) ((((((time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT) {
                            return (time_t) (((time_t)-1)*(((((((time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(time_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT) {
                            return (time_t) ((((((((time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 4 * PyLong_SHIFT) {
                            return (time_t) (((time_t)-1)*(((((((((time_t)digits[3]) << PyLong_SHIFT) | (time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(time_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(time_t) - 1 > 4 * PyLong_SHIFT) {
                            return (time_t) ((((((((((time_t)digits[3]) << PyLong_SHIFT) | (time_t)digits[2]) << PyLong_SHIFT) | (time_t)digits[1]) << PyLong_SHIFT) | (time_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(time_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(time_t, long, PyLong_AsLong(x))
            } else if (sizeof(time_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(time_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            time_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (time_t) -1;
        }
    } else {
        time_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (time_t) -1;
        val = __Pyx_PyInt_As_time_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to time_t");
    return (time_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to time_t");
    return (time_t) -1;
}

/* FetchCommonType */
        static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* SwapException */
        #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectCallMethod1 */
        static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

/* CoroutineBase */
        #include <structmember.h>
#include <frameobject.h>
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
#if PY_VERSION_HEX >= 0x030300A0
        if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
#endif
        if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            } else if (PyTuple_Check(ev)) {
                if (PyTuple_GET_SIZE(ev) >= 1) {
                    PyObject *value;
#if CYTHON_COMPILING_IN_CPYTHON
                    value = PySequence_ITEM(ev, 0);
#else
                    value = PyTuple_GET_ITEM(ev, 0);
                    Py_INCREF(value);
#endif
                    Py_DECREF(ev);
                    ev = value;
                } else {
                    Py_INCREF(Py_None);
                    Py_DECREF(ev);
                    ev = Py_None;
                }
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
    PyObject *retval;
    __Pyx_PyThreadState_declare
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    __Pyx_PyThreadState_assign
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(__pyx_tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = __pyx_tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
    if (unlikely(!retval && !PyErr_Occurred())) {
        PyErr_SetNone(PyExc_StopIteration);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Coroutine_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value);
    }
    return __Pyx_Coroutine_MethodReturn(retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
            goto throw_here;
        }
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
}
static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Coroutine_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
            static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
            #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (!abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_VERSION_HEX >= 0x03030000) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
            static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Coroutine_del,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
            static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
            static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
