/* Generated by Cython 3.2.4 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "LIBEV_EMBED",
                "0"
            ],
            [
                "CYTHON_FAST_THREAD_STATE",
                "0"
            ]
        ],
        "depends": [
            "/usr/include/python3.14/Python.h",
            "/usr/include/python3.14/pythread.h",
            "deps/libev/ev++.h",
            "deps/libev/ev.c",
            "deps/libev/ev.h",
            "deps/libev/ev_epoll.c",
            "deps/libev/ev_iouring.c",
            "deps/libev/ev_kqueue.c",
            "deps/libev/ev_linuxaio.c",
            "deps/libev/ev_poll.c",
            "deps/libev/ev_port.c",
            "deps/libev/ev_select.c",
            "deps/libev/ev_vars.h",
            "deps/libev/ev_win32.c",
            "deps/libev/ev_wrap.h",
            "deps/libev/event.c",
            "deps/libev/event.h",
            "src/gevent/libev/callbacks.c",
            "src/gevent/libev/callbacks.h",
            "src/gevent/libev/check_valid_fd.c",
            "src/gevent/libev/libev.h",
            "src/gevent/libev/libev_vfd.h",
            "src/gevent/libev/stathelper.c"
        ],
        "include_dirs": [
            "src/gevent/libev",
            "/usr/include/python3.14",
            "/build/python-gevent/src/python-gevent/deps",
            "/build/python-gevent/src/python-gevent/src/gevent/libev"
        ],
        "libraries": [
            "ev"
        ],
        "name": "gevent.libev.corecext",
        "sources": [
            "src/gevent/libev/corecext.pyx",
            "src/gevent/libev/callbacks.c"
        ]
    },
    "module_name": "gevent.libev.corecext"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#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 < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_4"
#define CYTHON_HEX_VERSION 0x030204F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include "src/gevent/_generated_include/CModulePreamble_impl_67ff8da3bafbaee898fb2680a081f9cf07617f9b80d936bf5254c02966774c38.h"
/* CInitCode */
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

/* PythonCompatibility */
#include "src/gevent/_generated_include/PythonCompatibility_impl_9f6bc6a154e6d1f4d1d9250f48a0e6d407560d70233eabffbe0fccfe1f684e75.h"
/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__gevent__libev__corecext
#define __PYX_HAVE_API__gevent__libev__corecext
/* Early includes */
#include "libev_vfd.h"
#include "libev.h"
#include <string.h>
#include <stdio.h>
#include <errno.h>

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE PyObject *
    __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index)
    {
        PyObject *item = PyList_GetItem(list, index);
        Py_XINCREF(item);
        return item;
    }
    #else
    #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef
    #endif

    #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable)
    {
        return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable);
    }

    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Clear(PyObject *list)
    {
        return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);
    }
    #else
    #define __Pyx_CAPI_PyList_Extend PyList_Extend
    #define __Pyx_CAPI_PyList_Clear PyList_Clear
    #endif
    

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    
#include <stddef.h>

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result)
    {
        int res;
        PyObject *key_obj = PyUnicode_FromString(key);
        if (key_obj == NULL) {
            *result = NULL;
            return -1;
        }
        res = __Pyx_PyDict_GetItemRef(mp, key_obj, result);
        Py_DECREF(key_obj);
        return res;
    }
    #else
    #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef
    #endif
    #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000)
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
                        PyObject **result)
    {
        PyObject *value;
        if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) {
            // get error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (value != NULL) {
            // present
            if (result) {
                *result = value;
            }
            else {
                Py_DECREF(value);
            }
            return 1;
        }

        // missing: set the item
        if (PyDict_SetItem(d, key, default_value) < 0) {
            // set error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (result) {
            Py_INCREF(default_value);
            *result = default_value;
        }
        return 0;
    }
    #else
    #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef
    #endif
    

    #if PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
    {
        PyObject *obj = PyWeakref_GetObject(ref);
        if (obj == NULL) {
            // SystemError if ref is NULL
            *pobj = NULL;
            return -1;
        }
        if (obj == Py_None) {
            *pobj = NULL;
            return 0;
        }
        Py_INCREF(obj);
        *pobj = obj;
        return 1;
    }
    #else
    #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef
    #endif
    
#include "pythread.h"

    #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    
#include "callbacks.h"
#include "stathelper.c"
#include "check_valid_fd.c"

    #define CALLBACK_CHECK_COUNT 50
    

    #define FLAG_WATCHER_OWNS_PYREF  (1 << 0) /* 0x1 */
    #define FLAG_WATCHER_NEEDS_EVREF (1 << 1) /* 0x2 */
    #define FLAG_WATCHER_UNREF_BEFORE_START (1 << 2) /* 0x4 */
    #define FLAG_WATCHER_MASK_UNREF_NEEDS_REF 0x6
    
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_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)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#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)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_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 Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#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 CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const 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_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#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__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "src/gevent/libev/corecext.pyx",
  "cpython/contextvars.pxd",
  "cpython/type.pxd",
  "cpython/bool.pxd",
  "cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include "src/gevent/_generated_include/Atomics_proto_3c6d386cad499e8bf66734864569013c6cb59adf2353bb94c6c6798eea3c07cc.h"
/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

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

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType;
struct PyGeventCallbackObject;
struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO;
struct PyGeventLoopObject;
struct PyGeventWatcherObject;
struct PyGeventIOObject;
struct PyGeventTimerObject;
struct PyGeventSignalObject;
struct PyGeventIdleObject;
struct PyGeventPrepareObject;
struct PyGeventCheckObject;
struct PyGeventForkObject;
struct PyGeventAsyncObject;
struct PyGeventChildObject;
struct PyGeventStatObject;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_t_6gevent_5libev_8corecext_start_and_stop;

typedef void (*__pyx_t_6gevent_5libev_8corecext_start_stop_func)(struct ev_loop *, void *);

struct __pyx_t_6gevent_5libev_8corecext_start_and_stop {
  __pyx_t_6gevent_5libev_8corecext_start_stop_func start;
  __pyx_t_6gevent_5libev_8corecext_start_stop_func stop;
};

struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType {
  PyObject_HEAD
};


struct PyGeventCallbackObject {
  PyObject_HEAD
  PyObject *callback;
  PyObject *args;
  struct PyGeventCallbackObject *next;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCallback_Type;

struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO *__pyx_vtab;
  struct PyGeventCallbackObject *head;
  struct PyGeventCallbackObject *tail;
};


struct PyGeventLoopObject {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtab;
  struct ev_prepare _prepare;
  struct ev_timer _timer0;
  struct ev_async _threadsafe_async;
  struct ev_timer _periodic_signal_checker;
  PyObject *error_handler;
  struct ev_loop *_ptr;
  struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *_callbacks;
  int starting_timer_may_update_loop_time;
  int _default;
  double approx_timer_resolution;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;

struct PyGeventWatcherObject {
  PyObject_HEAD
  struct PyGeventLoopObject *loop;
  PyObject *_callback;
  PyObject *args;
  struct ev_watcher *_w_watcher;
  struct __pyx_t_6gevent_5libev_8corecext_start_and_stop *_w_ss;
  unsigned int _flags;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventWatcher_Type;

struct PyGeventIOObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_io _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIO_Type;

struct PyGeventTimerObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_timer _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventTimer_Type;

struct PyGeventSignalObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_signal _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventSignal_Type;

struct PyGeventIdleObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_idle _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIdle_Type;

struct PyGeventPrepareObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_prepare _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventPrepare_Type;

struct PyGeventCheckObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_check _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCheck_Type;

struct PyGeventForkObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_fork _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventFork_Type;

struct PyGeventAsyncObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_async _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventAsync_Type;

struct PyGeventChildObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_child _watcher;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventChild_Type;

struct PyGeventStatObject {
  struct PyGeventWatcherObject __pyx_base;
  struct ev_stat _watcher;
  PyObject *path;
  PyObject *_paths;
};

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventStat_Type;



struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO {
  PyObject *(*clear)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
  struct PyGeventCallbackObject *(*popleft)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
  PyObject *(*append)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *, struct PyGeventCallbackObject *);
  int (*has_callbacks)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
};
static struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO *__pyx_vtabptr_6gevent_5libev_8corecext_CallbackFIFO;
static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
static CYTHON_INLINE struct PyGeventCallbackObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *, struct PyGeventCallbackObject *);
static int __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;


struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop {
  PyObject *(*_run_callbacks)(struct PyGeventLoopObject *);
  PyObject *(*_stop_watchers)(struct PyGeventLoopObject *, struct ev_loop *);
  PyObject *(*handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_default_handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  ev_tstamp (*now)(struct PyGeventLoopObject *, int __pyx_skip_dispatch);
  void (*update_now)(struct PyGeventLoopObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtabptr_6gevent_5libev_8corecext_loop;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#include "src/gevent/_generated_include/Refnanny_proto_00d2ab1aa529311d487a88a16574063b4d3b8ffa11a25109d76165964b208920.h"
/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#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

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#include "src/gevent/_generated_include/PyErrFetchRestore_proto_b219ba96ee79f73e7240a9715dc835e7e817ccd9f4f99ab4145b09780817bd8a.h"
/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

/* BytesEquals.proto (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#include "src/gevent/_generated_include/fastcall_proto_66690a1464eb22fa574c56237a11be9953f14c69fdee2df9c4141aa9c5e2a76d.h"
/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

/* GCCDiagnostics.proto (used by CIntToPyUnicode) */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.export */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#include "src/gevent/_generated_include/PyDictVersioning_proto_fc9ab32633f390bb88d05edfc7599e60bc4df8ea122afe432e3adec504912045.h"
/* GetModuleGlobalName.proto */
#include "src/gevent/_generated_include/GetModuleGlobalName_proto_35020a92d25e00989051b6cce92e00e13fc50c1cb05740bd074404c24babc545.h"
/* 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_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyKeyError_Check.proto */
#define __Pyx_PyExc_KeyError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_KeyError)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#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

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

/* PyObjectFastCall.proto (used by PyObjectFastCallMethod) */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* GetItemInt.proto */
#include "src/gevent/_generated_include/GetItemInt_proto_3b42f7f7de85b71eab2f8b6ae51ddc7168a53d31d56dd1f1e34c94c36c959f55.h"
/* PyObjectCallOneArg.proto (used by ObjectGetItem) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#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

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

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

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#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

/* PyNumber_Hex.proto */
#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16)

/* PyObject_Unicode.proto */
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

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

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

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

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* 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);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* UnicodeConcatInPlace.proto */
#include "src/gevent/_generated_include/UnicodeConcatInPlace_proto_bad23f3f25a1a5b795c7c8780db690b4ca025f6fa980d8798c511f0283aef257.h"
/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  PY_VERSION_HEX >= 0x030C0000
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  #if __clang__ || __GNUC__
  __attribute__((no_sanitize("thread")))
  #endif
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* PySystemError_Check.proto */
#define __Pyx_PyExc_SystemError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_SystemError)

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_unsigned_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_unsigned_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_unsigned_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_unsigned_int(unsigned int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_unsigned_int(unsigned int value, Py_ssize_t width, char padding_char, char format_char);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* PyAttributeError_Check.proto */
#define __Pyx_PyExc_AttributeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AttributeError)

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

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

/* CallableCheck.proto */
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyCallable_Check(obj)   (Py_TYPE(obj)->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
#endif

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
#else
#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   __Pyx_PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_unsigned_long(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_unsigned_long(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_unsigned_long(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_unsigned_long(unsigned long value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_unsigned_long(unsigned long value, Py_ssize_t width, char padding_char, char format_char);

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* CallTypeTraverse.proto */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

/* PyObjectCallMethod0.proto (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
static int __Pyx_MergeVtables(PyTypeObject *type);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4
#define __PYX_HAVE_RT_ImportType_proto_3_2_4
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_4 {
   __Pyx_ImportType_CheckSize_Error_3_2_4 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size);
#endif

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

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

/* ListPack.proto */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#include "src/gevent/_generated_include/CythonFunctionShared_proto_cfd16e7b1cdcce8e6454094d94c7459b788326000c3b790f09af3662926ca152.h"
/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* FastTypeChecks.proto */
#include "src/gevent/_generated_include/FastTypeChecks_proto_b6a1eb5ffa2a3fc9ebedcc671e034de99427399b8e4cbe35bbcd118ac87e0e6e.h"
/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#include "src/gevent/_generated_include/CythonABIVersion_proto_6de230514e3c249dc5d32a29298796e6371a56c148e74d1832d78a4b882841b1.h"
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
#endif
static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto*/
static CYTHON_INLINE struct PyGeventCallbackObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self, struct PyGeventCallbackObject *__pyx_v_new_tail); /* proto*/
static int __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks(struct PyGeventLoopObject *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__stop_watchers(struct PyGeventLoopObject *__pyx_v_self, struct ev_loop *__pyx_v_ptr); /* proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch); /* proto*/
static ev_tstamp __pyx_f_6gevent_5libev_8corecext_4loop_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_6gevent_5libev_8corecext_4loop_update_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from "cython" */

/* Module declarations from "libev" */

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

/* Module declarations from "libc.stdio" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "cpython.version" */

/* Module declarations from "cpython.exc" */

/* Module declarations from "cpython.module" */

/* Module declarations from "cpython.mem" */

/* Module declarations from "cpython.tuple" */

/* Module declarations from "cpython.list" */

/* Module declarations from "cpython.sequence" */

/* Module declarations from "cpython.mapping" */

/* Module declarations from "cpython.iterator" */

/* Module declarations from "cpython.number" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.bool" */

/* Module declarations from "cpython.long" */

/* Module declarations from "cpython.float" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.complex" */

/* Module declarations from "libc.stddef" */

/* Module declarations from "cpython.unicode" */

/* Module declarations from "cpython.pyport" */

/* Module declarations from "cpython.dict" */

/* Module declarations from "cpython.instance" */

/* Module declarations from "cpython.function" */

/* Module declarations from "cpython.method" */

/* Module declarations from "cpython.weakref" */

/* Module declarations from "cpython.getargs" */

/* Module declarations from "cpython.pythread" */

/* Module declarations from "cpython.pystate" */

/* Module declarations from "cpython.set" */

/* Module declarations from "cpython.buffer" */

/* Module declarations from "cpython.bytes" */

/* Module declarations from "cpython.pycapsule" */

/* Module declarations from "cpython.contextvars" */

/* Module declarations from "cpython" */

/* Module declarations from "cpython.object" */

/* Module declarations from "cpython.ref" */

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

/* Module declarations from "gevent.libev.corecext" */
__PYX_EXTERN_C DL_EXPORT(PyObject) *GEVENT_CORE_EVENTS;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_io_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_timer_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_signal_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_idle_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_prepare_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_check_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_fork_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_async_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_child_ss;
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_6gevent_5libev_8corecext_stat_ss;
static PyObject *__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK = 0;
__PYX_EXTERN_C DL_EXPORT(PyObject) *_empty_tuple;
static PyObject *__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag;
static PyObject *__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string;
static PyObject *__pyx_f_6gevent_5libev_8corecext__flags_to_list(unsigned int, int __pyx_skip_dispatch); /*proto*/
static unsigned int __pyx_f_6gevent_5libev_8corecext__flags_to_int(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__str_hex(PyObject *); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__check_flags(unsigned int, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__events_to_str(int, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_6gevent_5libev_8corecext__check_loop(struct PyGeventLoopObject *); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext__python_incref(struct PyGeventWatcherObject *); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext__python_decref(struct PyGeventWatcherObject *); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext__libev_ref(struct PyGeventWatcherObject *); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext__libev_unref(struct PyGeventWatcherObject *); /*proto*/
static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_f_6gevent_5libev_8corecext_make_ss(void *, void *); /*proto*/
static int __pyx_f_6gevent_5libev_8corecext__watcher_start(struct PyGeventWatcherObject *, PyObject *, PyObject *); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext__syserr_cb(char *); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_set_syserr_cb(PyObject *, int __pyx_skip_dispatch); /*proto*/
__PYX_EXTERN_C void gevent_handle_error(struct PyGeventLoopObject *, PyObject *); /*proto*/
__PYX_EXTERN_C PyObject *gevent_loop_run_callbacks(struct PyGeventLoopObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "gevent.libev.corecext"
extern int __pyx_module_is_main_gevent__libev__corecext;
int __pyx_module_is_main_gevent__libev__corecext = 0;

/* Implementation of "gevent.libev.corecext" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_id;
/* #### Code section: string_decls ### */
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(CYTHON_UNUSED struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_get_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2get_header_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8_check_flags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_10_events_to_str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_events); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_12supported_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_14recommended_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_18time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback___init__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_2stop(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback_4__bool__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8_format(CYTHON_UNUSED struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO___init__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_2__bool__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_4__len__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_6__iter__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_8__repr__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop___cinit__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_default, intptr_t __pyx_v_ptr); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop_2__init__(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_flags, CYTHON_UNUSED PyObject *__pyx_v_default, CYTHON_UNUSED intptr_t __pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static void __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_14run(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_nowait, PyObject *__pyx_v_once); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_18ref(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_20unref(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_22break_(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_how); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_24verify(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_26now(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_28update_now(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_34closing_fd(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_36timer(struct PyGeventLoopObject *__pyx_v_self, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_38signal(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_signum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_40idle(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_42prepare(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_44check(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_46fork(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48async_(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50child(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52install_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54reset_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_58run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60run_callback_threadsafe(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62_format(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_64_format_details(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_66fileno(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_23approx_timer_resolution___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher___init__(struct PyGeventWatcherObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_3ref___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8callback___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8priority___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority_2__set__(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6active___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_7pending___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_2start(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4stop(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6feed(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8__repr__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_10_format(CYTHON_UNUSED struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_12close(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_14__enter__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_16__exit__(struct PyGeventWatcherObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_tb); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4loop___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_4__del__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4args___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_4__del__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6_flags___get__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_start(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_pass_events, PyObject *__pyx_v_args); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_2io_2__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED vfd_socket_t __pyx_v_fd, CYTHON_UNUSED int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_2io_4__cinit__(struct PyGeventIOObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, vfd_socket_t __pyx_v_fd, int __pyx_v_events, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static void __pyx_pf_6gevent_5libev_8corecext_2io_6__dealloc__(struct PyGeventIOObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(struct PyGeventIOObject *__pyx_v_self, long __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_events); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8_format(struct PyGeventIOObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5timer___cinit__(struct PyGeventTimerObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, double __pyx_v_after, double __pyx_v_repeat, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5timer_2__init__(struct PyGeventTimerObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED double __pyx_v_after, CYTHON_UNUSED double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4start(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6again(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_6signal___cinit__(struct PyGeventSignalObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_signalnum, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_6signal_2__init__(struct PyGeventSignalObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_signalnum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4idle___cinit__(struct PyGeventIdleObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_7prepare___cinit__(struct PyGeventPrepareObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5check___cinit__(struct PyGeventCheckObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4fork___cinit__(struct PyGeventForkObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__7pending___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_6async____cinit__(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__2send(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__4send_ignoring_arg(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__ignored); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5child___cinit__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_pid, int __pyx_v_trace, CYTHON_UNUSED PyObject *__pyx_v_ref); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5child_2__init__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_pid, CYTHON_UNUSED int __pyx_v_trace, PyObject *__pyx_v_ref); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4_format(struct PyGeventChildObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4stat___cinit__(struct PyGeventStatObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_path, float __pyx_v_interval, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority); /* proto */
static int __pyx_pf_6gevent_5libev_8corecext_4stat_2__init__(struct PyGeventStatObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_path, CYTHON_UNUSED float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext__EVENTSType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_callback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_CallbackFIFO(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_loop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_watcher(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_io(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_timer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_signal(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_idle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_prepare(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_fork(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_async_(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_child(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_stat(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyObject *__pyx_type_6gevent_5libev_8corecext__EVENTSType;
  PyObject *PyGeventCallback_Type;
  PyObject *__pyx_type_6gevent_5libev_8corecext_CallbackFIFO;
  PyObject *PyGeventLoop_Type;
  PyObject *PyGeventWatcher_Type;
  PyObject *PyGeventIO_Type;
  PyObject *PyGeventTimer_Type;
  PyObject *PyGeventSignal_Type;
  PyObject *PyGeventIdle_Type;
  PyObject *PyGeventPrepare_Type;
  PyObject *PyGeventCheck_Type;
  PyObject *PyGeventFork_Type;
  PyObject *PyGeventAsync_Type;
  PyObject *PyGeventChild_Type;
  PyObject *PyGeventStat_Type;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext__EVENTSType;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_callback;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_loop;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_watcher;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_io;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_timer;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_signal;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_idle;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_prepare;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_check;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_fork;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_async_;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_child;
  PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_stat;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  int __pyx_k__10;
  PyObject *__pyx_tuple[4];
  PyObject *__pyx_codeobj_tab[57];
  PyObject *__pyx_string_tab[373];
  PyObject *__pyx_number_tab[3];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_02d __pyx_string_tab[1]
#define __pyx_kp_u_Cannot_construct_a_bare_watcher __pyx_string_tab[2]
#define __pyx_kp_u_Cannot_set_priority_of_an_active __pyx_string_tab[3]
#define __pyx_kp_u_Child_watchers_are_not_supported __pyx_string_tab[4]
#define __pyx_kp_u_Expected_callable_not __pyx_string_tab[5]
#define __pyx_kp_u_Expected_callable_or_None_got __pyx_string_tab[6]
#define __pyx_kp_u_Invalid_backend_or_flag __pyx_string_tab[7]
#define __pyx_kp_u_Invalid_value_for_backend_0x_x __pyx_string_tab[8]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[9]
#define __pyx_kp_u_Possible_values __pyx_string_tab[10]
#define __pyx_kp_u_Unsupported_backend_s __pyx_string_tab[11]
#define __pyx_kp_u__11 __pyx_string_tab[12]
#define __pyx_kp_u__12 __pyx_string_tab[13]
#define __pyx_kp_u__2 __pyx_string_tab[14]
#define __pyx_kp_u__3 __pyx_string_tab[15]
#define __pyx_kp_u__4 __pyx_string_tab[16]
#define __pyx_kp_u__5 __pyx_string_tab[17]
#define __pyx_kp_u__6 __pyx_string_tab[18]
#define __pyx_kp_u__7 __pyx_string_tab[19]
#define __pyx_kp_u__8 __pyx_string_tab[20]
#define __pyx_kp_u__9 __pyx_string_tab[21]
#define __pyx_kp_u_active_2 __pyx_string_tab[22]
#define __pyx_kp_u_add_note __pyx_string_tab[23]
#define __pyx_kp_u_args_2 __pyx_string_tab[24]
#define __pyx_kp_u_at_0x __pyx_string_tab[25]
#define __pyx_kp_u_callback_2 __pyx_string_tab[26]
#define __pyx_kp_u_callbacks __pyx_string_tab[27]
#define __pyx_kp_u_child_watchers_are_only_availabl __pyx_string_tab[28]
#define __pyx_kp_u_default_2 __pyx_string_tab[29]
#define __pyx_kp_u_disable __pyx_string_tab[30]
#define __pyx_kp_u_enable __pyx_string_tab[31]
#define __pyx_kp_u_ev_default_loop __pyx_string_tab[32]
#define __pyx_kp_u_ev_loop_new __pyx_string_tab[33]
#define __pyx_kp_u_events_3 __pyx_string_tab[34]
#define __pyx_kp_u_failed __pyx_string_tab[35]
#define __pyx_kp_u_fd_2 __pyx_string_tab[36]
#define __pyx_kp_u_fd_must_be_non_negative_r __pyx_string_tab[37]
#define __pyx_kp_u_fileno_2 __pyx_string_tab[38]
#define __pyx_kp_u_gc __pyx_string_tab[39]
#define __pyx_kp_u_gevent_core_EVENTS __pyx_string_tab[40]
#define __pyx_kp_u_head __pyx_string_tab[41]
#define __pyx_kp_u_illegal_event_mask_r __pyx_string_tab[42]
#define __pyx_kp_u_illegal_signal_number_r __pyx_string_tab[43]
#define __pyx_kp_u_io_watcher_attribute_events_is __pyx_string_tab[44]
#define __pyx_kp_u_io_watcher_attribute_fd_is_read __pyx_string_tab[45]
#define __pyx_kp_u_isenabled __pyx_string_tab[46]
#define __pyx_kp_u_len __pyx_string_tab[47]
#define __pyx_kp_u_libev __pyx_string_tab[48]
#define __pyx_kp_u_native_0x __pyx_string_tab[49]
#define __pyx_kp_u_operation_on_destroyed_loop __pyx_string_tab[50]
#define __pyx_kp_u_pending_2 __pyx_string_tab[51]
#define __pyx_kp_u_pending_s __pyx_string_tab[52]
#define __pyx_kp_u_pid_2 __pyx_string_tab[53]
#define __pyx_kp_u_ref_2 __pyx_string_tab[54]
#define __pyx_kp_u_repeat_must_be_positive_or_zero __pyx_string_tab[55]
#define __pyx_kp_u_rstatus __pyx_string_tab[56]
#define __pyx_kp_u_src_gevent_libev_corecext_pyx __pyx_string_tab[57]
#define __pyx_kp_u_stopped __pyx_string_tab[58]
#define __pyx_kp_u_tail __pyx_string_tab[59]
#define __pyx_n_u_ASYNC __pyx_string_tab[60]
#define __pyx_n_u_BACKEND_DEVPOLL __pyx_string_tab[61]
#define __pyx_n_u_BACKEND_EPOLL __pyx_string_tab[62]
#define __pyx_n_u_BACKEND_IOURING __pyx_string_tab[63]
#define __pyx_n_u_BACKEND_KQUEUE __pyx_string_tab[64]
#define __pyx_n_u_BACKEND_LINUXAIO __pyx_string_tab[65]
#define __pyx_n_u_BACKEND_POLL __pyx_string_tab[66]
#define __pyx_n_u_BACKEND_PORT __pyx_string_tab[67]
#define __pyx_n_u_BACKEND_SELECT __pyx_string_tab[68]
#define __pyx_n_u_CHECK __pyx_string_tab[69]
#define __pyx_n_u_CHILD __pyx_string_tab[70]
#define __pyx_n_u_CLEANUP __pyx_string_tab[71]
#define __pyx_n_u_CUSTOM __pyx_string_tab[72]
#define __pyx_n_u_EMBED __pyx_string_tab[73]
#define __pyx_n_u_ERROR __pyx_string_tab[74]
#define __pyx_n_u_EVENTS __pyx_string_tab[75]
#define __pyx_n_u_EV_USE_4HEAP __pyx_string_tab[76]
#define __pyx_n_u_EV_USE_CLOCK_SYSCALL __pyx_string_tab[77]
#define __pyx_n_u_EV_USE_EVENTFD __pyx_string_tab[78]
#define __pyx_n_u_EV_USE_FLOOR __pyx_string_tab[79]
#define __pyx_n_u_EV_USE_INOTIFY __pyx_string_tab[80]
#define __pyx_n_u_EV_USE_MONOTONIC __pyx_string_tab[81]
#define __pyx_n_u_EV_USE_NANOSLEEP __pyx_string_tab[82]
#define __pyx_n_u_EV_USE_REALTIME __pyx_string_tab[83]
#define __pyx_n_u_EV_USE_SIGNALFD __pyx_string_tab[84]
#define __pyx_n_u_FORK __pyx_string_tab[85]
#define __pyx_n_u_FORKCHECK __pyx_string_tab[86]
#define __pyx_n_u_HubDestroyed __pyx_string_tab[87]
#define __pyx_n_u_ICallback __pyx_string_tab[88]
#define __pyx_n_u_IDLE __pyx_string_tab[89]
#define __pyx_n_u_ILoop __pyx_string_tab[90]
#define __pyx_n_u_IOFDSET __pyx_string_tab[91]
#define __pyx_n_u_LIBEV_EMBED __pyx_string_tab[92]
#define __pyx_n_u_MAXPRI __pyx_string_tab[93]
#define __pyx_n_u_MINPRI __pyx_string_tab[94]
#define __pyx_n_u_NOINOTIFY __pyx_string_tab[95]
#define __pyx_n_u_NONE __pyx_string_tab[96]
#define __pyx_n_u_NOSIGMASK __pyx_string_tab[97]
#define __pyx_n_u_NSIG __pyx_string_tab[98]
#define __pyx_n_u_PERIODIC __pyx_string_tab[99]
#define __pyx_n_u_PREPARE __pyx_string_tab[100]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[101]
#define __pyx_n_u_READ __pyx_string_tab[102]
#define __pyx_n_u_READWRITE __pyx_string_tab[103]
#define __pyx_n_u_SIGNAL __pyx_string_tab[104]
#define __pyx_n_u_SIGNALFD __pyx_string_tab[105]
#define __pyx_n_u_STAT __pyx_string_tab[106]
#define __pyx_n_u_TIMER __pyx_string_tab[107]
#define __pyx_n_u_UNDEF __pyx_string_tab[108]
#define __pyx_n_u_WRITE __pyx_string_tab[109]
#define __pyx_n_u_active __pyx_string_tab[110]
#define __pyx_n_u_activecnt __pyx_string_tab[111]
#define __pyx_n_u_after __pyx_string_tab[112]
#define __pyx_n_u_again __pyx_string_tab[113]
#define __pyx_n_u_all __pyx_string_tab[114]
#define __pyx_n_u_args __pyx_string_tab[115]
#define __pyx_n_u_async __pyx_string_tab[116]
#define __pyx_n_u_async_2 __pyx_string_tab[117]
#define __pyx_n_u_async__send __pyx_string_tab[118]
#define __pyx_n_u_async__send_ignoring_arg __pyx_string_tab[119]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[120]
#define __pyx_n_u_backend __pyx_string_tab[121]
#define __pyx_n_u_break __pyx_string_tab[122]
#define __pyx_n_u_callback __pyx_string_tab[123]
#define __pyx_n_u_callback__format __pyx_string_tab[124]
#define __pyx_n_u_callback_stop __pyx_string_tab[125]
#define __pyx_n_u_cb __pyx_string_tab[126]
#define __pyx_n_u_check __pyx_string_tab[127]
#define __pyx_n_u_check_flags __pyx_string_tab[128]
#define __pyx_n_u_child __pyx_string_tab[129]
#define __pyx_n_u_child__format __pyx_string_tab[130]
#define __pyx_n_u_class __pyx_string_tab[131]
#define __pyx_n_u_classImplements __pyx_string_tab[132]
#define __pyx_n_u_class_getitem __pyx_string_tab[133]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[134]
#define __pyx_n_u_close __pyx_string_tab[135]
#define __pyx_n_u_closing_fd __pyx_string_tab[136]
#define __pyx_n_u_context __pyx_string_tab[137]
#define __pyx_n_u_d __pyx_string_tab[138]
#define __pyx_n_u_decode __pyx_string_tab[139]
#define __pyx_n_u_default __pyx_string_tab[140]
#define __pyx_n_u_default_handle_error __pyx_string_tab[141]
#define __pyx_n_u_destroy __pyx_string_tab[142]
#define __pyx_n_u_destroyed __pyx_string_tab[143]
#define __pyx_n_u_dict __pyx_string_tab[144]
#define __pyx_n_u_embeddable_backends __pyx_string_tab[145]
#define __pyx_n_u_encode __pyx_string_tab[146]
#define __pyx_n_u_enter __pyx_string_tab[147]
#define __pyx_n_u_epoll __pyx_string_tab[148]
#define __pyx_n_u_errno __pyx_string_tab[149]
#define __pyx_n_u_events __pyx_string_tab[150]
#define __pyx_n_u_events_2 __pyx_string_tab[151]
#define __pyx_n_u_events_str __pyx_string_tab[152]
#define __pyx_n_u_events_to_str __pyx_string_tab[153]
#define __pyx_n_u_exc_info __pyx_string_tab[154]
#define __pyx_n_u_exit __pyx_string_tab[155]
#define __pyx_n_u_fd __pyx_string_tab[156]
#define __pyx_n_u_feed __pyx_string_tab[157]
#define __pyx_n_u_fileno __pyx_string_tab[158]
#define __pyx_n_u_flags __pyx_string_tab[159]
#define __pyx_n_u_flags_2 __pyx_string_tab[160]
#define __pyx_n_u_flags_str2int __pyx_string_tab[161]
#define __pyx_n_u_flags_to_int __pyx_string_tab[162]
#define __pyx_n_u_flags_to_list __pyx_string_tab[163]
#define __pyx_n_u_fork __pyx_string_tab[164]
#define __pyx_n_u_forkcheck __pyx_string_tab[165]
#define __pyx_n_u_format __pyx_string_tab[166]
#define __pyx_n_u_format_details __pyx_string_tab[167]
#define __pyx_n_u_func __pyx_string_tab[168]
#define __pyx_n_u_func_2 __pyx_string_tab[169]
#define __pyx_n_u_get_header_version __pyx_string_tab[170]
#define __pyx_n_u_get_version __pyx_string_tab[171]
#define __pyx_n_u_getfilesystemencoding __pyx_string_tab[172]
#define __pyx_n_u_getswitchinterval __pyx_string_tab[173]
#define __pyx_n_u_gevent __pyx_string_tab[174]
#define __pyx_n_u_gevent__interfaces __pyx_string_tab[175]
#define __pyx_n_u_gevent_exceptions __pyx_string_tab[176]
#define __pyx_n_u_gevent_libev_corecext __pyx_string_tab[177]
#define __pyx_n_u_handle_error __pyx_string_tab[178]
#define __pyx_n_u_handle_syserr __pyx_string_tab[179]
#define __pyx_n_u_how __pyx_string_tab[180]
#define __pyx_n_u_id __pyx_string_tab[181]
#define __pyx_n_u_idle __pyx_string_tab[182]
#define __pyx_n_u_ignored __pyx_string_tab[183]
#define __pyx_n_u_init __pyx_string_tab[184]
#define __pyx_n_u_install_sigchld __pyx_string_tab[185]
#define __pyx_n_u_interval __pyx_string_tab[186]
#define __pyx_n_u_io __pyx_string_tab[187]
#define __pyx_n_u_io__format __pyx_string_tab[188]
#define __pyx_n_u_io_start __pyx_string_tab[189]
#define __pyx_n_u_is_coroutine __pyx_string_tab[190]
#define __pyx_n_u_items __pyx_string_tab[191]
#define __pyx_n_u_keys __pyx_string_tab[192]
#define __pyx_n_u_kqueue __pyx_string_tab[193]
#define __pyx_n_u_linux_aio __pyx_string_tab[194]
#define __pyx_n_u_linux_iouring __pyx_string_tab[195]
#define __pyx_n_u_loop __pyx_string_tab[196]
#define __pyx_n_u_loop__default_handle_error __pyx_string_tab[197]
#define __pyx_n_u_loop__format __pyx_string_tab[198]
#define __pyx_n_u_loop__format_details __pyx_string_tab[199]
#define __pyx_n_u_loop__handle_syserr __pyx_string_tab[200]
#define __pyx_n_u_loop_async __pyx_string_tab[201]
#define __pyx_n_u_loop_break __pyx_string_tab[202]
#define __pyx_n_u_loop_check __pyx_string_tab[203]
#define __pyx_n_u_loop_child __pyx_string_tab[204]
#define __pyx_n_u_loop_closing_fd __pyx_string_tab[205]
#define __pyx_n_u_loop_destroy __pyx_string_tab[206]
#define __pyx_n_u_loop_fileno __pyx_string_tab[207]
#define __pyx_n_u_loop_fork __pyx_string_tab[208]
#define __pyx_n_u_loop_handle_error __pyx_string_tab[209]
#define __pyx_n_u_loop_idle __pyx_string_tab[210]
#define __pyx_n_u_loop_install_sigchld __pyx_string_tab[211]
#define __pyx_n_u_loop_io __pyx_string_tab[212]
#define __pyx_n_u_loop_now __pyx_string_tab[213]
#define __pyx_n_u_loop_prepare __pyx_string_tab[214]
#define __pyx_n_u_loop_ref __pyx_string_tab[215]
#define __pyx_n_u_loop_reinit __pyx_string_tab[216]
#define __pyx_n_u_loop_reset_sigchld __pyx_string_tab[217]
#define __pyx_n_u_loop_run __pyx_string_tab[218]
#define __pyx_n_u_loop_run_callback __pyx_string_tab[219]
#define __pyx_n_u_loop_run_callback_threadsafe __pyx_string_tab[220]
#define __pyx_n_u_loop_signal __pyx_string_tab[221]
#define __pyx_n_u_loop_stat __pyx_string_tab[222]
#define __pyx_n_u_loop_timer __pyx_string_tab[223]
#define __pyx_n_u_loop_unref __pyx_string_tab[224]
#define __pyx_n_u_loop_update_now __pyx_string_tab[225]
#define __pyx_n_u_loop_verify __pyx_string_tab[226]
#define __pyx_n_u_lower __pyx_string_tab[227]
#define __pyx_n_u_main __pyx_string_tab[228]
#define __pyx_n_u_message __pyx_string_tab[229]
#define __pyx_n_u_module __pyx_string_tab[230]
#define __pyx_n_u_msg __pyx_string_tab[231]
#define __pyx_n_u_name __pyx_string_tab[232]
#define __pyx_n_u_noenv __pyx_string_tab[233]
#define __pyx_n_u_noinotify __pyx_string_tab[234]
#define __pyx_n_u_nosigmask __pyx_string_tab[235]
#define __pyx_n_u_now __pyx_string_tab[236]
#define __pyx_n_u_nowait __pyx_string_tab[237]
#define __pyx_n_u_once __pyx_string_tab[238]
#define __pyx_n_u_origflags_int __pyx_string_tab[239]
#define __pyx_n_u_os __pyx_string_tab[240]
#define __pyx_n_u_pass_events __pyx_string_tab[241]
#define __pyx_n_u_path __pyx_string_tab[242]
#define __pyx_n_u_pending __pyx_string_tab[243]
#define __pyx_n_u_pending_after __pyx_string_tab[244]
#define __pyx_n_u_pending_before __pyx_string_tab[245]
#define __pyx_n_u_pendingcnt __pyx_string_tab[246]
#define __pyx_n_u_pid __pyx_string_tab[247]
#define __pyx_n_u_platform __pyx_string_tab[248]
#define __pyx_n_u_poll __pyx_string_tab[249]
#define __pyx_n_u_pop __pyx_string_tab[250]
#define __pyx_n_u_port __pyx_string_tab[251]
#define __pyx_n_u_prepare __pyx_string_tab[252]
#define __pyx_n_u_print_exc __pyx_string_tab[253]
#define __pyx_n_u_print_exception __pyx_string_tab[254]
#define __pyx_n_u_priority __pyx_string_tab[255]
#define __pyx_n_u_ptr __pyx_string_tab[256]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[257]
#define __pyx_n_u_qualname __pyx_string_tab[258]
#define __pyx_n_u_recommended_backends __pyx_string_tab[259]
#define __pyx_n_u_ref __pyx_string_tab[260]
#define __pyx_n_u_reinit __pyx_string_tab[261]
#define __pyx_n_u_repeat __pyx_string_tab[262]
#define __pyx_n_u_reset_sigchld __pyx_string_tab[263]
#define __pyx_n_u_revents __pyx_string_tab[264]
#define __pyx_n_u_rstatus_2 __pyx_string_tab[265]
#define __pyx_n_u_run __pyx_string_tab[266]
#define __pyx_n_u_run_callback __pyx_string_tab[267]
#define __pyx_n_u_run_callback_threadsafe __pyx_string_tab[268]
#define __pyx_n_u_select __pyx_string_tab[269]
#define __pyx_n_u_self __pyx_string_tab[270]
#define __pyx_n_u_send __pyx_string_tab[271]
#define __pyx_n_u_send_ignoring_arg __pyx_string_tab[272]
#define __pyx_n_u_set_name __pyx_string_tab[273]
#define __pyx_n_u_set_syserr_cb __pyx_string_tab[274]
#define __pyx_n_u_setdefault __pyx_string_tab[275]
#define __pyx_n_u_sigfd __pyx_string_tab[276]
#define __pyx_n_u_signal __pyx_string_tab[277]
#define __pyx_n_u_signalfd __pyx_string_tab[278]
#define __pyx_n_u_signalmodule __pyx_string_tab[279]
#define __pyx_n_u_signalnum __pyx_string_tab[280]
#define __pyx_n_u_signum __pyx_string_tab[281]
#define __pyx_n_u_split __pyx_string_tab[282]
#define __pyx_n_u_start __pyx_string_tab[283]
#define __pyx_n_u_stat __pyx_string_tab[284]
#define __pyx_n_u_stop __pyx_string_tab[285]
#define __pyx_n_u_strerror __pyx_string_tab[286]
#define __pyx_n_u_strip __pyx_string_tab[287]
#define __pyx_n_u_supported_backends __pyx_string_tab[288]
#define __pyx_n_u_sys __pyx_string_tab[289]
#define __pyx_n_u_t __pyx_string_tab[290]
#define __pyx_n_u_tb __pyx_string_tab[291]
#define __pyx_n_u_test __pyx_string_tab[292]
#define __pyx_n_u_time __pyx_string_tab[293]
#define __pyx_n_u_timer __pyx_string_tab[294]
#define __pyx_n_u_timer_again __pyx_string_tab[295]
#define __pyx_n_u_timer_start __pyx_string_tab[296]
#define __pyx_n_u_trace __pyx_string_tab[297]
#define __pyx_n_u_traceback __pyx_string_tab[298]
#define __pyx_n_u_type __pyx_string_tab[299]
#define __pyx_n_u_unref __pyx_string_tab[300]
#define __pyx_n_u_update __pyx_string_tab[301]
#define __pyx_n_u_update_now __pyx_string_tab[302]
#define __pyx_n_u_v __pyx_string_tab[303]
#define __pyx_n_u_value __pyx_string_tab[304]
#define __pyx_n_u_values __pyx_string_tab[305]
#define __pyx_n_u_verify __pyx_string_tab[306]
#define __pyx_n_u_version_info __pyx_string_tab[307]
#define __pyx_n_u_watcher __pyx_string_tab[308]
#define __pyx_n_u_watcher___enter __pyx_string_tab[309]
#define __pyx_n_u_watcher___exit __pyx_string_tab[310]
#define __pyx_n_u_watcher__format __pyx_string_tab[311]
#define __pyx_n_u_watcher_close __pyx_string_tab[312]
#define __pyx_n_u_watcher_feed __pyx_string_tab[313]
#define __pyx_n_u_watcher_start __pyx_string_tab[314]
#define __pyx_n_u_watcher_stop __pyx_string_tab[315]
#define __pyx_n_u_win32 __pyx_string_tab[316]
#define __pyx_n_u_x __pyx_string_tab[317]
#define __pyx_n_u_zope_interface __pyx_string_tab[318]
#define __pyx_kp_b_iso88591_0_uAV7_q __pyx_string_tab[319]
#define __pyx_kp_b_iso88591_1 __pyx_string_tab[320]
#define __pyx_kp_b_iso88591_1A_at7 __pyx_string_tab[321]
#define __pyx_kp_b_iso88591_31_1D_L_HA_AQ_1_q_E_AT_gQd_aq __pyx_string_tab[322]
#define __pyx_kp_b_iso88591_31_7_4uA_1_avZq __pyx_string_tab[323]
#define __pyx_kp_b_iso88591_4I_Na __pyx_string_tab[324]
#define __pyx_kp_b_iso88591_5Q __pyx_string_tab[325]
#define __pyx_kp_b_iso88591_6a __pyx_string_tab[326]
#define __pyx_kp_b_iso88591_7q __pyx_string_tab[327]
#define __pyx_kp_b_iso88591_8_1_A_avZq __pyx_string_tab[328]
#define __pyx_kp_b_iso88591_8_q_r_HE __pyx_string_tab[329]
#define __pyx_kp_b_iso88591_A __pyx_string_tab[330]
#define __pyx_kp_b_iso88591_A_1A_1D __pyx_string_tab[331]
#define __pyx_kp_b_iso88591_A_1A_81F_Kwaq_AT_q __pyx_string_tab[332]
#define __pyx_kp_b_iso88591_A_1A_8_Q_at7_a_7q_A_Rq __pyx_string_tab[333]
#define __pyx_kp_b_iso88591_A_1A_AT __pyx_string_tab[334]
#define __pyx_kp_b_iso88591_A_1A_G1D __pyx_string_tab[335]
#define __pyx_kp_b_iso88591_A_1A_at1 __pyx_string_tab[336]
#define __pyx_kp_b_iso88591_A_1A_q_A __pyx_string_tab[337]
#define __pyx_kp_b_iso88591_A_1D_1D_WAT __pyx_string_tab[338]
#define __pyx_kp_b_iso88591_A_1D_1_M_HA_F_q_E_A_aq __pyx_string_tab[339]
#define __pyx_kp_b_iso88591_A_1D_L_HA_AQ_1D_WD_Q_aq __pyx_string_tab[340]
#define __pyx_kp_b_iso88591_A_3m1Cs_gWA_M_5_IUVV __pyx_string_tab[341]
#define __pyx_kp_b_iso88591_A_4q_0_Q_s_Q_q __pyx_string_tab[342]
#define __pyx_kp_b_iso88591_A_4q_at1 __pyx_string_tab[343]
#define __pyx_kp_b_iso88591_A_4t1_1_a_4q_1_Rt1_t_1_q __pyx_string_tab[344]
#define __pyx_kp_b_iso88591_A_A __pyx_string_tab[345]
#define __pyx_kp_b_iso88591_A_D_5_1_6_q_7_2B_q_ay_gQ __pyx_string_tab[346]
#define __pyx_kp_b_iso88591_A_E __pyx_string_tab[347]
#define __pyx_kp_b_iso88591_A_F __pyx_string_tab[348]
#define __pyx_kp_b_iso88591_A_L_HA __pyx_string_tab[349]
#define __pyx_kp_b_iso88591_A_T_awa_1D_q_A_q __pyx_string_tab[350]
#define __pyx_kp_b_iso88591_A_T_d __pyx_string_tab[351]
#define __pyx_kp_b_iso88591_A_a_HA_1_y_AQ_q_q_s_a_Qa __pyx_string_tab[352]
#define __pyx_kp_b_iso88591_A_avZq __pyx_string_tab[353]
#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[354]
#define __pyx_kp_b_iso88591_A_q_4q_4_1 __pyx_string_tab[355]
#define __pyx_kp_b_iso88591_A_q_T_A_WA_82T_7_b_AQ_q __pyx_string_tab[356]
#define __pyx_kp_b_iso88591_A_t5 __pyx_string_tab[357]
#define __pyx_kp_b_iso88591_A_t6_Q __pyx_string_tab[358]
#define __pyx_kp_b_iso88591_A_vQfHE __pyx_string_tab[359]
#define __pyx_kp_b_iso88591_I_A_t1F_q __pyx_string_tab[360]
#define __pyx_kp_b_iso88591_Q_1A_1_1_WA __pyx_string_tab[361]
#define __pyx_kp_b_iso88591__13 __pyx_string_tab[362]
#define __pyx_kp_b_iso88591_a_t1F_q __pyx_string_tab[363]
#define __pyx_kp_b_iso88591_q_3j_1_uAV5_q __pyx_string_tab[364]
#define __pyx_kp_b_iso88591_q_7_A_WCq_4q_q_gQc_3e1A __pyx_string_tab[365]
#define __pyx_kp_b_iso88591_q_iq_6_1_4q_q_gQa_1 __pyx_string_tab[366]
#define __pyx_kp_b_iso88591_q_uAV5 __pyx_string_tab[367]
#define __pyx_kp_b_iso88591_t1_q_z_q_q_z_V1A_IQ_E_r_q_q_q_j __pyx_string_tab[368]
#define __pyx_kp_b_iso88591_t1_uF_j_2Q_uF_q_81Ct5_aq_j_32S __pyx_string_tab[369]
#define __pyx_kp_b_iso88591_vQfE __pyx_string_tab[370]
#define __pyx_kp_b_iso88591_wavU __pyx_string_tab[371]
#define __pyx_kp_b_iso88591_y_1_aq_awa_iq_q __pyx_string_tab[372]
#define __pyx_float_0_0 __pyx_number_tab[0]
#define __pyx_int_0 __pyx_number_tab[1]
#define __pyx_int_3 __pyx_number_tab[2]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_5libev_8corecext__EVENTSType);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_callback);
  Py_CLEAR(clear_module_state->PyGeventCallback_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_5libev_8corecext_CallbackFIFO);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_loop);
  Py_CLEAR(clear_module_state->PyGeventLoop_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  Py_CLEAR(clear_module_state->PyGeventWatcher_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_io);
  Py_CLEAR(clear_module_state->PyGeventIO_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_timer);
  Py_CLEAR(clear_module_state->PyGeventTimer_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_signal);
  Py_CLEAR(clear_module_state->PyGeventSignal_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_idle);
  Py_CLEAR(clear_module_state->PyGeventIdle_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_prepare);
  Py_CLEAR(clear_module_state->PyGeventPrepare_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_check);
  Py_CLEAR(clear_module_state->PyGeventCheck_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_fork);
  Py_CLEAR(clear_module_state->PyGeventFork_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_async_);
  Py_CLEAR(clear_module_state->PyGeventAsync_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_child);
  Py_CLEAR(clear_module_state->PyGeventChild_Type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_5libev_8corecext_stat);
  Py_CLEAR(clear_module_state->PyGeventStat_Type);
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<57; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<373; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_5libev_8corecext__EVENTSType);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_callback);
  Py_VISIT(traverse_module_state->PyGeventCallback_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_5libev_8corecext_CallbackFIFO);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_loop);
  Py_VISIT(traverse_module_state->PyGeventLoop_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  Py_VISIT(traverse_module_state->PyGeventWatcher_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_io);
  Py_VISIT(traverse_module_state->PyGeventIO_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_timer);
  Py_VISIT(traverse_module_state->PyGeventTimer_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_signal);
  Py_VISIT(traverse_module_state->PyGeventSignal_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_idle);
  Py_VISIT(traverse_module_state->PyGeventIdle_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_prepare);
  Py_VISIT(traverse_module_state->PyGeventPrepare_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_check);
  Py_VISIT(traverse_module_state->PyGeventCheck_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_fork);
  Py_VISIT(traverse_module_state->PyGeventFork_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_async_);
  Py_VISIT(traverse_module_state->PyGeventAsync_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_child);
  Py_VISIT(traverse_module_state->PyGeventChild_Type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_5libev_8corecext_stat);
  Py_VISIT(traverse_module_state->PyGeventStat_Type);
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<57; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<373; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */
PyObject *GEVENT_CORE_EVENTS = 0;
PyObject *_empty_tuple = 0;


#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/


#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/


#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {

  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  __pyx_v_value = NULL;

  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 122, __pyx_L1_error)

  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    goto __pyx_L3;
  }

  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/


#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {

  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  __pyx_v_value = NULL;

  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 141, __pyx_L1_error)

  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  Py_XDECREF(__pyx_v_value);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(((struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(CYTHON_UNUSED struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_gevent_core_EVENTS);
  __pyx_r = __pyx_mstate_global->__pyx_kp_u_gevent_core_EVENTS;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_1get_version = {"get_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_1get_version, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_version (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_get_version(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_get_version(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[4];
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_version", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(ev_version_major(), 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(ev_version_minor(), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_libev;
  __pyx_t_3[1] = __pyx_t_1;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_;
  __pyx_t_3[3] = __pyx_t_2;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent.libev.corecext.get_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_3get_header_version = {"get_header_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_3get_header_version, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_header_version (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2get_header_version(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2get_header_version(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[4];
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_header_version", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(EV_VERSION_MAJOR, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(EV_VERSION_MINOR, 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_libev;
  __pyx_t_3[1] = __pyx_t_1;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_;
  __pyx_t_3[3] = __pyx_t_2;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent.libev.corecext.get_header_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__flags_to_list(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_value = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flags_to_list", 0);

  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __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, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __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))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 196, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 196, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 196, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 196, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 196, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 196, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyNumber_And(__pyx_t_1, __pyx_v_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_9) {

      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_value); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 198, __pyx_L1_error)

    }

    __pyx_t_6 = __Pyx_PyLong_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyNumber_Invert(__pyx_v_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyNumber_InPlaceAnd(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyLong_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_flags = __pyx_t_11;

    __pyx_t_9 = (!(__pyx_v_flags != 0));
    if (__pyx_t_9) {

      goto __pyx_L4_break;

    }

  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L9_for_end;
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L9_for_end;
  __pyx_L9_for_end:;

  __pyx_t_9 = (__pyx_v_flags != 0);
  if (__pyx_t_9) {

    __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  }

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;


  /* 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_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5_flags_to_list = {"_flags_to_list", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_flags_to_list (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyLong_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(__pyx_self, ((unsigned int)__pyx_v_flags));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flags_to_list", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
static unsigned int __pyx_f_6gevent_5libev_8corecext__flags_to_int(PyObject *__pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  unsigned int __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_ex = NULL;
  unsigned int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  unsigned int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19[4];
  int __pyx_t_20;
  char const *__pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flags_to_int", 0);
  __Pyx_INCREF(__pyx_v_flags);

  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    __pyx_r = 0;
    goto __pyx_L0;

  }

  __pyx_t_2 = PyLong_Check(__pyx_v_flags); 
  if (__pyx_t_2) {

    __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_flags); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

  }

  __pyx_v_result = 0;

  __pyx_t_2 = PyUnicode_Check(__pyx_v_flags); 
  if (__pyx_t_2) {

    __pyx_t_5 = __pyx_v_flags;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u__2};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_split, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_4);
    __pyx_t_4 = 0;

  }

  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      if (likely(PyList_CheckExact(__pyx_v_flags)) || PyTuple_CheckExact(__pyx_v_flags)) {
        __pyx_t_4 = __pyx_v_flags; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 218, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 218, __pyx_L6_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_10;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 218, __pyx_L6_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_10);
            #endif
            ++__pyx_t_10;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L6_error)
        } else {
          __pyx_t_5 = __pyx_t_11(__pyx_t_4);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 218, __pyx_L6_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
        __pyx_t_5 = 0;

        __pyx_t_14 = __pyx_v_value;
        __Pyx_INCREF(__pyx_t_14);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
          __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 219, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
        }
        __pyx_t_12 = __pyx_t_13;
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5);
        __pyx_t_5 = 0;

        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 220, __pyx_L6_error)
        if (__pyx_t_2) {

          __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_flags_str2int); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 221, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_v_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 221, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = PyNumber_InPlaceOr(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 221, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_t_13); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_v_result = __pyx_t_3;

        }

      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError))));
    if (__pyx_t_15) {
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_12) < 0) __PYX_ERR(0, 222, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_13);
      __pyx_v_ex = __pyx_t_13;
      /*try:*/ {

        __pyx_t_14 = NULL;

        __pyx_t_16 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_ex), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_flags_str2int); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_keys); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = __Pyx_PyObject_CallNoArg(__pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_18 = PySequence_List(__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely((PyList_Sort(__pyx_t_18) < 0))) __PYX_ERR(0, 226, __pyx_L21_error)
        __pyx_t_17 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__3, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 226, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_19[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_backend_or_flag;
        __pyx_t_19[1] = __pyx_t_16;
        __pyx_t_19[2] = __pyx_mstate_global->__pyx_kp_u_Possible_values;
        __pyx_t_19[3] = __pyx_t_17;

        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_19, 4, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17));
        if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 225, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_18};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 225, __pyx_L21_error)
      }

      /*finally:*/ {
        __pyx_L21_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_27);
          __pyx_t_15 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21;
          goto __pyx_L8_except_error;
        }
      }
    }
    goto __pyx_L8_except_error;

    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L11_try_end:;
  }

  __pyx_r = __pyx_v_result;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_ex);
  __Pyx_XDECREF(__pyx_v_flags);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7_flags_to_int = {"_flags_to_int", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_flags_to_int (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(__pyx_self, ((PyObject *)__pyx_v_flags));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flags_to_int", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 1); if (unlikely(__pyx_t_1 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_f_6gevent_5libev_8corecext__str_hex(PyObject *__pyx_v_flag) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_str_hex", 0);

  __pyx_t_1 = PyLong_Check(__pyx_v_flag); 
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyNumber_Hex(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext._str_hex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__check_flags(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_as_list = 0;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_flags", 0);

  __pyx_v_flags = (__pyx_v_flags & EVBACKEND_MASK);

  __pyx_t_1 = (!(__pyx_v_flags != 0));
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

  }

  __pyx_t_1 = (!((__pyx_v_flags & EVBACKEND_ALL) != 0));
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Invalid_value_for_backend_0x_x, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 242, __pyx_L1_error)

  }

  __pyx_t_1 = (!((__pyx_v_flags & ev_supported_backends()) != 0));
  if (unlikely(__pyx_t_1)) {

    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 244, __pyx_L8_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_7;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7));
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7);
            #endif
            ++__pyx_t_7;
          }
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L8_error)
        } else {
          __pyx_t_5 = __pyx_t_8(__pyx_t_3);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 244, __pyx_L8_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __pyx_f_6gevent_5libev_8corecext__str_hex(__pyx_8genexpr1__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 244, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L12_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L12_exit_scope:;
    } /* exit inner scope */
    __pyx_v_as_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    __pyx_t_3 = NULL;
    __pyx_t_5 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__4, __pyx_v_as_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_backend_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 245, __pyx_L1_error)

  }


  /* 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_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_as_list);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_9_check_flags = {"_check_flags", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_9_check_flags, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_flags (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyLong_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8_check_flags(__pyx_self, ((unsigned int)__pyx_v_flags));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8_check_flags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_flags", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext__events_to_str(int __pyx_v_events, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_result = 0;
  int __pyx_v_c_flag;
  PyObject *__pyx_v_flag = NULL;
  PyObject *__pyx_v_string = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_events_to_str", 0);

  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __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, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __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))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 251, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 251, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 251, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 251, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_string, __pyx_t_6);
    __pyx_t_6 = 0;

    __pyx_t_9 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L1_error)
    __pyx_v_c_flag = __pyx_t_9;

    __pyx_t_10 = ((__pyx_v_events & __pyx_v_c_flag) != 0);
    if (__pyx_t_10) {

      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_string); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 254, __pyx_L1_error)

      __pyx_v_events = (__pyx_v_events & (~__pyx_v_c_flag));

    }

    __pyx_t_10 = (!(__pyx_v_events != 0));
    if (__pyx_t_10) {

      goto __pyx_L4_break;

    }

  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L9_for_end;
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L9_for_end;
  __pyx_L9_for_end:;

  __pyx_t_10 = (__pyx_v_events != 0);
  if (__pyx_t_10) {

    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyNumber_Hex(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__4, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* 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_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_flag);
  __Pyx_XDECREF(__pyx_v_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_11_events_to_str = {"_events_to_str", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_11_events_to_str, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events) {
  int __pyx_v_events;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_events_to_str (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_events); {
    __pyx_v_events = __Pyx_PyLong_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_10_events_to_str(__pyx_self, ((int)__pyx_v_events));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_10_events_to_str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_events) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_events_to_str", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_events, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_13supported_backends = {"supported_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_13supported_backends, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("supported_backends (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12supported_backends(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_12supported_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("supported_backends", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_supported_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.supported_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_15recommended_backends = {"recommended_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_15recommended_backends, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("recommended_backends (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_14recommended_backends(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_14recommended_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("recommended_backends", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_recommended_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.recommended_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends = {"embeddable_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("embeddable_backends (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("embeddable_backends", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_embeddable_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.embeddable_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_19time = {"time", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_19time, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_18time(__pyx_self);

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_18time(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(ev_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static int __pyx_f_6gevent_5libev_8corecext__check_loop(struct PyGeventLoopObject *__pyx_v_loop) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_loop", 0);

  __pyx_t_1 = (!(__pyx_v_loop->_ptr != 0));
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_operation_on_destroyed_loop};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 280, __pyx_L1_error)

  }

  __pyx_r = 1;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext._check_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_args,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 290, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 290, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 290, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 290, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 290, __pyx_L3_error)
    }
    __pyx_v_callback = values[0];
    __pyx_v_args = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 290, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback___init__(((struct PyGeventCallbackObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_8callback___init__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->callback);
  __Pyx_DECREF(__pyx_v_self->callback);
  __pyx_v_self->callback = __pyx_v_callback;

  __pyx_t_1 = __pyx_v_args;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_8callback_3stop = {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_3stop, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_2stop(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_2stop(struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop", 0);

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->callback);
  __Pyx_DECREF(__pyx_v_self->callback);
  __pyx_v_self->callback = Py_None;

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)Py_None);


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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4__bool__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_8callback_4__bool__(struct PyGeventCallbackObject *__pyx_v_self) {
  int __pyx_r;
  int __pyx_t_1;

  __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_self->callback != Py_None);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.callback.pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_v_format = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  __pyx_t_1 = (Py_ReprEnter(((PyObject *)__pyx_v_self)) != 0);
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
    __pyx_r = __pyx_mstate_global->__pyx_kp_u__5;
    goto __pyx_L0;

  }

  /*try:*/ {

    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_v_format = __pyx_t_2;
    __pyx_t_2 = 0;

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_format), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u__6;
    __pyx_t_6[1] = __pyx_t_2;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
    __pyx_t_6[3] = __pyx_t_5;
    __pyx_t_6[4] = __pyx_t_3;
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pending); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 319, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 319, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      __pyx_t_7 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u_pending_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

    }

    __pyx_t_1 = (__pyx_v_self->callback != Py_None);
    if (__pyx_t_1) {

      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_callback_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

    }

    __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
    if (__pyx_t_1) {

      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->args), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 324, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_args_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 324, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

    }

    __pyx_t_8 = (__pyx_v_self->callback == Py_None);
    if (__pyx_t_8) {
    } else {
      __pyx_t_1 = __pyx_t_8;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->args == ((PyObject*)Py_None));
    __pyx_t_1 = __pyx_t_8;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_1) {

      __pyx_t_7 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u_stopped); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

    }

    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L4_return;
  }

  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
      {
        Py_ReprLeave(((PyObject *)__pyx_v_self));
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      Py_ReprLeave(((PyObject *)__pyx_v_self));
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("gevent.libev.corecext.callback.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_8callback_9_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_9_format, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8_format(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8_format(CYTHON_UNUSED struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__8);
  __pyx_r = __pyx_mstate_global->__pyx_kp_u__8;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->callback);
  __pyx_r = __pyx_v_self->callback;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->callback);
  __Pyx_DECREF(__pyx_v_self->callback);
  __pyx_v_self->callback = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->callback);
  __Pyx_DECREF(__pyx_v_self->callback);
  __pyx_v_self->callback = Py_None;

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->args);
  __pyx_r = __pyx_v_self->args;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.callback.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)Py_None);

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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO___init__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO___init__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
  __Pyx_DECREF((PyObject *)__pyx_v_self->head);
  __pyx_v_self->head = ((struct PyGeventCallbackObject *)Py_None);

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
  __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
  __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);


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


static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear", 0);

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
  __Pyx_DECREF((PyObject *)__pyx_v_self->head);
  __pyx_v_self->head = ((struct PyGeventCallbackObject *)Py_None);

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
  __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
  __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);


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


static CYTHON_INLINE struct PyGeventCallbackObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  struct PyGeventCallbackObject *__pyx_v_head = 0;
  struct PyGeventCallbackObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("popleft", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
  __Pyx_DECREF((PyObject *)__pyx_v_self->head);
  __pyx_v_self->head = ((struct PyGeventCallbackObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_t_3 = (__pyx_v_self->head == __pyx_v_self->tail);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (((PyObject *)__pyx_v_self->head) == Py_None);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
    __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
    __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);

  }

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_head->next);
  __Pyx_DECREF((PyObject *)__pyx_v_head->next);
  __pyx_v_head->next = ((struct PyGeventCallbackObject *)Py_None);

  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_head);
  __pyx_r = __pyx_v_head;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_head);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self, struct PyGeventCallbackObject *__pyx_v_new_tail) {
  struct PyGeventCallbackObject *__pyx_v_old_tail = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_tail->next)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 365, __pyx_L1_error)
    __pyx_t_2 = (!__pyx_t_1);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 365, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 365, __pyx_L1_error)
  #endif

  __pyx_t_2 = (((PyObject *)__pyx_v_self->tail) == Py_None);
  if (__pyx_t_2) {

    __pyx_t_2 = (((PyObject *)__pyx_v_self->head) == Py_None);
    if (__pyx_t_2) {

      __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
      __Pyx_DECREF((PyObject *)__pyx_v_self->head);
      __pyx_v_self->head = __pyx_v_new_tail;

      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

    }

    __pyx_t_3 = ((PyObject *)__pyx_v_self->head);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
    __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
    __pyx_v_self->tail = ((struct PyGeventCallbackObject *)__pyx_t_3);
    __pyx_t_3 = 0;

  }

  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->head) != Py_None);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 374, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 374, __pyx_L1_error)
  #endif

  __pyx_t_3 = ((PyObject *)__pyx_v_self->tail);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_old_tail = ((struct PyGeventCallbackObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
  __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
  __Pyx_GOTREF((PyObject *)__pyx_v_old_tail->next);
  __Pyx_DECREF((PyObject *)__pyx_v_old_tail->next);
  __pyx_v_old_tail->next = __pyx_v_new_tail;

  __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
  __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
  __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
  __pyx_v_self->tail = __pyx_v_new_tail;


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_old_tail);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_2__bool__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_2__bool__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  int __pyx_r;
  int __pyx_t_1;

  __pyx_t_1 = (((PyObject *)__pyx_v_self->head) != Py_None);
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}


/* Python wrapper */
static Py_ssize_t __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_4__len__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_4__len__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  Py_ssize_t __pyx_v_count;
  struct PyGeventCallbackObject *__pyx_v_head = NULL;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__len__", 0);

  __pyx_v_count = 0;

  __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  while (1) {
    __pyx_t_2 = (((PyObject *)__pyx_v_head) != Py_None);
    if (!__pyx_t_2) break;

    __pyx_v_count = (__pyx_v_count + 1);

    __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_head, ((struct PyGeventCallbackObject *)__pyx_t_1));
    __pyx_t_1 = 0;
  }

  __pyx_r = __pyx_v_count;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_head);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_6__iter__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_6__iter__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  PyObject *__pyx_v_objects = 0;
  struct PyGeventCallbackObject *__pyx_v_head = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  while (1) {
    __pyx_t_2 = (((PyObject *)__pyx_v_head) != Py_None);
    if (!__pyx_t_2) break;

    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_objects, ((PyObject *)__pyx_v_head)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)

    __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_head, ((struct PyGeventCallbackObject *)__pyx_t_1));
    __pyx_t_1 = 0;
  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetIter(__pyx_v_objects); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_objects);
  __Pyx_XDECREF((PyObject *)__pyx_v_head);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static int __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->head)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.has_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_8__repr__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_8__repr__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
  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 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[9];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_3, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_v_self->head)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_v_self->tail)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_callbacks;
  __pyx_t_6[1] = __pyx_t_2;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_len;
  __pyx_t_6[3] = __pyx_t_1;
  __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_head;
  __pyx_t_6[5] = __pyx_t_4;
  __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u_tail;
  __pyx_t_6[7] = __pyx_t_5;
  __pyx_t_6[8] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 9, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;


  /* function exit code */
  __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_7);
  __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flags = 0;
  PyObject *__pyx_v_default = 0;
  intptr_t __pyx_v_ptr;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_flags_2,&__pyx_mstate_global->__pyx_n_u_default,&__pyx_mstate_global->__pyx_n_u_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 428, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 428, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_flags = values[0];
    __pyx_v_default = values[1];
    if (values[2]) {
      __pyx_v_ptr = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
    } else {
      __pyx_v_ptr = ((intptr_t)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 428, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop___cinit__(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_flags, __pyx_v_default, __pyx_v_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4loop___cinit__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_default, intptr_t __pyx_v_ptr) {
  unsigned int __pyx_v_c_flags;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  unsigned int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[3];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_default);

  __pyx_v_self->starting_timer_may_update_loop_time = 0;

  __pyx_v_self->_default = 0;

  ev_prepare_init((&__pyx_v_self->_prepare), ((void *)gevent_run_callbacks));

  ev_timer_init((&__pyx_v_self->_periodic_signal_checker), ((void *)gevent_periodic_signal_check), 0.3, 0.3);

  ev_timer_init((&__pyx_v_self->_timer0), ((void *)gevent_noop), 0.0, 0.0);

  ev_async_init((&__pyx_v_self->_threadsafe_async), ((void *)gevent_noop));

  __pyx_t_1 = (__pyx_v_ptr != 0);
  if (__pyx_t_1) {

    __pyx_v_self->_ptr = ((struct ev_loop *)__pyx_v_ptr);

    __pyx_v_self->_default = ev_is_default_loop(__pyx_v_self->_ptr);

    goto __pyx_L3;
  }

  /*else*/ {
    __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_2 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
    __pyx_v_c_flags = __pyx_t_2;

    __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_c_flags, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_NOENV);

    __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_FORKCHECK);

    __pyx_t_1 = (__pyx_v_default == Py_None);
    if (__pyx_t_1) {

      __Pyx_INCREF(Py_True);
      __Pyx_DECREF_SET(__pyx_v_default, Py_True);

    }

    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 453, __pyx_L1_error)
    if (__pyx_t_1) {

      __pyx_v_self->_default = 1;

      __pyx_v_self->_ptr = gevent_ev_default_loop(__pyx_v_c_flags);

      __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
      if (unlikely(__pyx_t_1)) {

        __pyx_t_4 = NULL;
        __pyx_t_5 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_c_flags, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_ev_default_loop;
        __pyx_t_6[1] = __pyx_t_5;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_failed;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8, 127);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_SystemError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 457, __pyx_L1_error)

      }

      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_platform); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_win32, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_1) {

        ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_periodic_signal_checker));

        ev_unref(__pyx_v_self->_ptr);

      }

      goto __pyx_L5;
    }

    /*else*/ {
      __pyx_v_self->_ptr = ev_loop_new(__pyx_v_c_flags);

      __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
      if (unlikely(__pyx_t_1)) {

        __pyx_t_3 = NULL;
        __pyx_t_4 = __Pyx_PyUnicode_From_unsigned_int(__pyx_v_c_flags, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_ev_loop_new;
        __pyx_t_6[1] = __pyx_t_4;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_failed;
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 8, 127);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_SystemError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 464, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 464, __pyx_L1_error)

      }
    }
    __pyx_L5:;

    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 465, __pyx_L1_error)
    if (!__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_9 = (__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK == Py_None);
    __pyx_t_1 = __pyx_t_9;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_syserr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    }
  }
  __pyx_L3:;

  ev_set_userdata(__pyx_v_self->_ptr, __pyx_v_self->_ptr);

  ev_prepare_start(__pyx_v_self->_ptr, (&__pyx_v_self->_prepare));

  ev_unref(__pyx_v_self->_ptr);

  ev_async_start(__pyx_v_self->_ptr, (&__pyx_v_self->_threadsafe_async));

  ev_unref(__pyx_v_self->_ptr);


  /* function exit code */
  __pyx_r = 0;
  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_7);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_default);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_flags = 0;
  CYTHON_UNUSED PyObject *__pyx_v_default = 0;
  CYTHON_UNUSED intptr_t __pyx_v_ptr;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_flags_2,&__pyx_mstate_global->__pyx_n_u_default,&__pyx_mstate_global->__pyx_n_u_ptr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 478, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 478, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 478, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_flags = values[0];
    __pyx_v_default = values[1];
    if (values[2]) {
      __pyx_v_ptr = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
    } else {
      __pyx_v_ptr = ((intptr_t)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 478, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_2__init__(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_flags, __pyx_v_default, __pyx_v_ptr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4loop_2__init__(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_flags, CYTHON_UNUSED PyObject *__pyx_v_default, CYTHON_UNUSED intptr_t __pyx_v_ptr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __Pyx_GIVEREF((PyObject *)__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
  __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_v_self->approx_timer_resolution = 0.00001;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks(struct PyGeventLoopObject *__pyx_v_self) {
  struct PyGeventCallbackObject *__pyx_v_cb = 0;
  int __pyx_v_count;
  ev_tstamp __pyx_v_now;
  ev_tstamp __pyx_v_expiration;
  PyObject *__pyx_v_cb_callable = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  ev_tstamp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_run_callbacks", 0);

  __pyx_v_count = CALLBACK_CHECK_COUNT;

  __pyx_v_self->starting_timer_may_update_loop_time = 1;

  __pyx_v_now = ev_now(__pyx_v_self->_ptr);

  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getswitchinterval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == ((ev_tstamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_expiration = (__pyx_v_now + ((ev_tstamp)__pyx_t_5));

  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = (!(PyErr_Occurred() != 0));
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 490, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 490, __pyx_L1_error)
  #endif

  /*try:*/ {

    ev_timer_stop(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));

    while (1) {
      __pyx_t_6 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
      if (!__pyx_t_6) break;

      __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(__pyx_v_self->_callbacks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_cb, ((struct PyGeventCallbackObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      ev_unref(__pyx_v_self->_ptr);

      __pyx_t_1 = __pyx_v_cb->callback;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_cb_callable, __pyx_t_1);
      __pyx_t_1 = 0;

      gevent_call(__pyx_v_self, __pyx_v_cb);

      __pyx_t_6 = (PyErr_Occurred() != 0);
      if (__pyx_t_6) {

        PyErr_WriteUnraisable(__pyx_v_cb_callable);

        PyErr_Clear();

      }

      __Pyx_INCREF(Py_None);
      __Pyx_DECREF_SET(__pyx_v_cb_callable, Py_None);

      __pyx_v_count = (__pyx_v_count - 1);

      __pyx_t_7 = (__pyx_v_count == 0);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_7 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
      __pyx_t_6 = __pyx_t_7;
      __pyx_L10_bool_binop_done:;
      if (__pyx_t_6) {

        __pyx_v_count = CALLBACK_CHECK_COUNT;

        ev_now_update(__pyx_v_self->_ptr);

        __pyx_t_6 = (ev_now(__pyx_v_self->_ptr) >= __pyx_v_expiration);
        if (__pyx_t_6) {

          __pyx_v_now = 0.0;

          goto __pyx_L7_break;

        }

      }
    }
    __pyx_L7_break:;

    __pyx_t_6 = (__pyx_v_now != 0.0);
    if (__pyx_t_6) {

      ev_now_update(__pyx_v_self->_ptr);

    }

    __pyx_t_6 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
    if (__pyx_t_6) {

      ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));

    }
  }

  /*finally:*/ {
    /*normal exit:*/{
      __pyx_v_self->starting_timer_may_update_loop_time = 0;
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        __pyx_v_self->starting_timer_may_update_loop_time = 0;
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }


  /* 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_AddTraceback("gevent.libev.corecext.loop._run_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cb);
  __Pyx_XDECREF(__pyx_v_cb_callable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__stop_watchers(struct PyGeventLoopObject *__pyx_v_self, struct ev_loop *__pyx_v_ptr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("_stop_watchers", 0);

  __pyx_t_1 = (!(__pyx_v_ptr != 0));
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

  }

  __pyx_t_1 = (ev_is_active((&__pyx_v_self->_prepare)) != 0);
  if (__pyx_t_1) {

    ev_ref(__pyx_v_ptr);

    ev_prepare_stop(__pyx_v_ptr, (&__pyx_v_self->_prepare));

  }

  __pyx_t_1 = (ev_is_active((&__pyx_v_self->_periodic_signal_checker)) != 0);
  if (__pyx_t_1) {

    ev_ref(__pyx_v_ptr);

    ev_timer_stop(__pyx_v_ptr, (&__pyx_v_self->_periodic_signal_checker));

  }

  __pyx_t_1 = (ev_is_active((&__pyx_v_self->_threadsafe_async)) != 0);
  if (__pyx_t_1) {

    ev_ref(__pyx_v_ptr);

    ev_async_stop(__pyx_v_ptr, (&__pyx_v_self->_threadsafe_async));

  }


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_5destroy = {"destroy", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(struct PyGeventLoopObject *__pyx_v_self) {
  struct ev_loop *__pyx_v_ptr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct ev_loop *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy", 0);

  __pyx_t_1 = __pyx_v_self->_ptr;
  __pyx_v_ptr = __pyx_t_1;

  __pyx_v_self->_ptr = NULL;

  __pyx_t_2 = (__pyx_v_ptr != 0);
  if (__pyx_t_2) {

    __pyx_t_2 = (!(ev_userdata(__pyx_v_ptr) != 0));
    if (__pyx_t_2) {

      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

    }

    __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_stop_watchers(__pyx_v_self, __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    ev_set_userdata(__pyx_v_ptr, NULL);

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_syserr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      __pyx_t_4 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    }

    ev_loop_destroy(__pyx_v_ptr);

  }


  /* 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_AddTraceback("gevent.libev.corecext.loop.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static void __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(struct PyGeventLoopObject *__pyx_v_self) {
  struct ev_loop *__pyx_v_ptr;
  __Pyx_RefNannyDeclarations
  struct ev_loop *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  __pyx_t_1 = __pyx_v_self->_ptr;
  __pyx_v_ptr = __pyx_t_1;

  __pyx_v_self->_ptr = NULL;

  __pyx_t_2 = (__pyx_v_ptr != NULL);
  if (__pyx_t_2) {

    __pyx_t_2 = (!(ev_userdata(__pyx_v_ptr) != 0));
    if (__pyx_t_2) {

      goto __pyx_L0;

    }

    __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_stop_watchers(__pyx_v_self, __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    __pyx_t_2 = (!__pyx_v_self->_default);
    if (__pyx_t_2) {

      ev_loop_destroy(__pyx_v_ptr);

      ev_set_userdata(__pyx_v_ptr, NULL);

    }

  }


  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("gevent.libev.corecext.loop.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_FromSize_t(((size_t)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __pyx_r = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.MAXPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(EV_MINPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.MINPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_9_handle_syserr = {"_handle_syserr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_v_errno = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_handle_syserr (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_message,&__pyx_mstate_global->__pyx_n_u_errno,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 592, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 592, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 592, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_syserr", 0) < (0)) __PYX_ERR(0, 592, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, i); __PYX_ERR(0, 592, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 592, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 592, __pyx_L3_error)
    }
    __pyx_v_message = values[0];
    __pyx_v_errno = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 592, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_message, __pyx_v_errno);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  size_t __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_handle_syserr", 0);
  __Pyx_INCREF(__pyx_v_message);

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    __pyx_t_1 = __pyx_v_message;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_2);
    __pyx_t_2 = 0;

  }

  __pyx_t_1 = NULL;
  __pyx_t_5 = PyNumber_Add(__pyx_v_message, __pyx_mstate_global->__pyx_kp_u__9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_strerror); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_errno};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_9 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_SystemError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_9 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->handle_error(__pyx_v_self, Py_None, ((PyObject *)(((PyTypeObject*)PyExc_SystemError))), __pyx_t_2, Py_None, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;


  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_handle_error = 0;
  PyObject *__pyx_v_error_handler = 0;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_error", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  __pyx_t_1 = __pyx_v_self->error_handler;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_error_handler = __pyx_t_1;
  __pyx_t_1 = 0;

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HubDestroyed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_v_type == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(__pyx_v_self->_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    __pyx_t_2 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_break, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

  }

  __pyx_t_6 = (__pyx_v_error_handler != Py_None);
  if (__pyx_t_6) {

    __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_error_handler, __pyx_mstate_global->__pyx_n_u_handle_error, __pyx_v_error_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_handle_error = __pyx_t_1;
    __pyx_t_1 = 0;

    __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_v_handle_error);
    __pyx_t_4 = __pyx_v_handle_error; 
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    goto __pyx_L4;
  }

  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;


  /* 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_4);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handle_error);
  __Pyx_XDECREF(__pyx_v_error_handler);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_11handle_error = {"handle_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_context = 0;
  PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_tb = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_error (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_context,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_tb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 597, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 597, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 597, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 597, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 597, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_error", 0) < (0)) __PYX_ERR(0, 597, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, i); __PYX_ERR(0, 597, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 597, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 597, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 597, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 597, __pyx_L3_error)
    }
    __pyx_v_context = values[0];
    __pyx_v_type = values[1];
    __pyx_v_value = values[2];
    __pyx_v_tb = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 597, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("handle_error", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_default_handle_error", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_default_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_traceback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_print_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_t_6 = (__pyx_v_self->_ptr != 0);
  if (__pyx_t_6) {

    ev_break(__pyx_v_self->_ptr, EVBREAK_ONE);

  }


  /* 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_4);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_13_default_handle_error = {"_default_handle_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_context = 0;
  PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_tb = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_default_handle_error (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_context,&__pyx_mstate_global->__pyx_n_u_type,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_tb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 612, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_default_handle_error", 0) < (0)) __PYX_ERR(0, 612, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, i); __PYX_ERR(0, 612, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 612, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 612, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 612, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 612, __pyx_L3_error)
    }
    __pyx_v_context = values[0];
    __pyx_v_type = values[1];
    __pyx_v_value = values[2];
    __pyx_v_tb = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 612, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_default_handle_error", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_15run = {"run", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_15run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_nowait = 0;
  PyObject *__pyx_v_once = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nowait,&__pyx_mstate_global->__pyx_n_u_once,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 619, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "run", 0) < (0)) __PYX_ERR(0, 619, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
    }
    __pyx_v_nowait = values[0];
    __pyx_v_once = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 619, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_14run(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_nowait, __pyx_v_once);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_14run(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_nowait, PyObject *__pyx_v_once) {
  unsigned int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("run", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 620, __pyx_L1_error)

  __pyx_v_flags = 0;

  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nowait); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 622, __pyx_L1_error)
  if (__pyx_t_1) {

    __pyx_v_flags = (__pyx_v_flags | EVRUN_NOWAIT);

  }

  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_once); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 624, __pyx_L1_error)
  if (__pyx_t_1) {

    __pyx_v_flags = (__pyx_v_flags | EVRUN_ONCE);

  }

  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        ev_run(__pyx_v_self->_ptr, __pyx_v_flags);
      }

      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L7;
        }
        __pyx_L7:;
      }
  }


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_17reinit = {"reinit", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reinit (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reinit", 0);

  __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  if (__pyx_t_1) {

    ev_loop_fork(__pyx_v_self->_ptr);

  }


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_19ref = {"ref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_19ref, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ref (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_18ref(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_18ref(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ref", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 634, __pyx_L1_error)

  ev_ref(__pyx_v_self->_ptr);


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_21unref = {"unref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_21unref, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unref (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_20unref(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_20unref(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unref", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 638, __pyx_L1_error)

  ev_unref(__pyx_v_self->_ptr);


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.unref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_23break_ = {"break_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_23break_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_how;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("break_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_how,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 641, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 641, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "break_", 0) < (0)) __PYX_ERR(0, 641, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 641, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_how = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_how == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
    } else {
      __pyx_v_how = __pyx_mstate_global->__pyx_k__10;
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("break_", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 641, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_22break_(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_how);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_22break_(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_how) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("break_", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 642, __pyx_L1_error)

  ev_break(__pyx_v_self->_ptr, __pyx_v_how);


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_25verify = {"verify", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_25verify, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("verify (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_24verify(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_24verify(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("verify", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 646, __pyx_L1_error)

  ev_verify(__pyx_v_self->_ptr);


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.verify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static ev_tstamp __pyx_f_6gevent_5libev_8corecext_4loop_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch) {
  ev_tstamp __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  ev_tstamp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("now", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_now); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_5libev_8corecext_4loop_27now)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == ((ev_tstamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  __pyx_t_7 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 650, __pyx_L1_error)

  __pyx_r = ev_now(__pyx_v_self->_ptr);
  goto __pyx_L0;


  /* 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("gevent.libev.corecext.loop.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_27now = {"now", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_27now, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_26now(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_26now(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ev_tstamp __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("now", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop_now(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_6gevent_5libev_8corecext_4loop_update_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_now", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_update_now); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_5libev_8corecext_4loop_29update_now)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  __pyx_t_6 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 654, __pyx_L1_error)

  ev_now_update(__pyx_v_self->_ptr);


  /* function exit 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);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.update_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_29update_now = {"update_now", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_now (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_28update_now(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_28update_now(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_now", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_f_6gevent_5libev_8corecext_4loop_update_now(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.update_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(struct PyGeventLoopObject *__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[7];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_4), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u__6;
  __pyx_t_5[1] = __pyx_t_1;
  __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
  __pyx_t_5[3] = __pyx_t_3;
  __pyx_t_5[4] = __pyx_mstate_global->__pyx_kp_u__11;
  __pyx_t_5[5] = __pyx_t_2;
  __pyx_t_5[6] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 7, 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;


  /* 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("gevent.libev.corecext.loop.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->_ptr != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.default.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 670, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(ev_iteration(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.iteration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 675, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(ev_depth(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 680, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(ev_backend(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.backend_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(struct PyGeventLoopObject *__pyx_v_self) {
  unsigned int __pyx_v_backend;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)

  __pyx_v_backend = ev_backend(__pyx_v_self->_ptr);

  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_4;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4));
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4);
        #endif
        ++__pyx_t_4;
      }
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 687, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_2);
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 687, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_7);
      } else {
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
      }
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 687, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 687, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_key, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;

    }

  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.backend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 694, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(ev_pending_count(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.pendingcnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_33io = {"io", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_33io, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  vfd_socket_t __pyx_v_fd;
  int __pyx_v_events;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("io (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fd,&__pyx_mstate_global->__pyx_n_u_events_2,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 697, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "io", 0) < (0)) __PYX_ERR(0, 697, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, i); __PYX_ERR(0, 697, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 697, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 697, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 697, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
    __pyx_v_events = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
    __pyx_v_ref = values[2];
    __pyx_v_priority = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 697, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_32io(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("io", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_events); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4, __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_io, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* 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("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_35closing_fd = {"closing_fd", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
  vfd_socket_t __pyx_v_fd;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closing_fd (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_fd); {
    __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(__pyx_arg_fd); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.closing_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_34closing_fd(((struct PyGeventLoopObject *)__pyx_v_self), ((vfd_socket_t)__pyx_v_fd));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_34closing_fd(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd) {
  int __pyx_v_pending_before;
  int __pyx_v_pending_after;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("closing_fd", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 701, __pyx_L1_error)

  __pyx_v_pending_before = ev_pending_count(__pyx_v_self->_ptr);

  ev_feed_fd_event(__pyx_v_self->_ptr, __pyx_v_fd, 0xFFFF);

  __pyx_v_pending_after = ev_pending_count(__pyx_v_self->_ptr);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_pending_after > __pyx_v_pending_before)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.closing_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37timer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_37timer = {"timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_37timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37timer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_after;
  double __pyx_v_repeat;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_after,&__pyx_mstate_global->__pyx_n_u_repeat,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 707, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "timer", 0) < (0)) __PYX_ERR(0, 707, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("timer", 0, 1, 4, i); __PYX_ERR(0, 707, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 707, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_after = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_repeat = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
    } else {
      __pyx_v_repeat = ((double)0.0);
    }
    __pyx_v_ref = values[2];
    __pyx_v_priority = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("timer", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 707, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_36timer(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_36timer(struct PyGeventLoopObject *__pyx_v_self, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timer", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_after); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4, __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_timer, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* 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("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39signal(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_39signal = {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_39signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39signal(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_signum;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("signal (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signum,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 710, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "signal", 0) < (0)) __PYX_ERR(0, 710, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("signal", 0, 1, 3, i); __PYX_ERR(0, 710, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 710, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 710, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_signum = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_signum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("signal", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 710, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_38signal(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_signum, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_38signal(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_signum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("signal", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_signum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_signal, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41idle(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_41idle = {"idle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_41idle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41idle(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("idle (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 713, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 713, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 713, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "idle", 0) < (0)) __PYX_ERR(0, 713, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 713, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 713, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ref = values[0];
    __pyx_v_priority = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("idle", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 713, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_40idle(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_40idle(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("idle", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_idle, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_43prepare = {"prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prepare (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 716, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 716, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 716, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prepare", 0) < (0)) __PYX_ERR(0, 716, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 716, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 716, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ref = values[0];
    __pyx_v_priority = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prepare", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 716, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_42prepare(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_42prepare(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("prepare", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_prepare, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45check(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_45check = {"check", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_45check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45check(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 719, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "check", 0) < (0)) __PYX_ERR(0, 719, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ref = values[0];
    __pyx_v_priority = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 719, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_44check(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_44check(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_check, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47fork(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_47fork = {"fork", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_47fork, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47fork(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fork (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 722, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 722, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 722, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fork", 0) < (0)) __PYX_ERR(0, 722, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 722, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 722, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ref = values[0];
    __pyx_v_priority = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fork", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 722, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_46fork(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_46fork(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fork", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_fork, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49async_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_49async_ = {"async_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_49async_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49async_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 725, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "async_", 0) < (0)) __PYX_ERR(0, 725, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ref = values[0];
    __pyx_v_priority = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("async_", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 725, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.async_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_48async_(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48async_(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_async_, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.async_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51child(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_51child = {"child", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_51child, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51child(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_pid;
  int __pyx_v_trace;
  PyObject *__pyx_v_ref = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("child (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pid,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_ref,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 731, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 731, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 731, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 731, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "child", 0) < (0)) __PYX_ERR(0, 731, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("child", 0, 1, 3, i); __PYX_ERR(0, 731, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 731, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 731, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 731, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
    }
    __pyx_v_pid = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_trace = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
    } else {
      __pyx_v_trace = ((int)0);
    }
    __pyx_v_ref = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("child", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 731, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_50child(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50child(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("child", 0);

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_win32, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_3)) {

    __pyx_t_1 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Child_watchers_are_not_supported};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 733, __pyx_L1_error)

  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_trace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_t_5, __pyx_t_6, __pyx_v_ref};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_child, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* 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_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_53install_sigchld = {"install_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("install_sigchld (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_52install_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52install_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("install_sigchld", 0);

  gevent_install_sigchld_handler();


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_55reset_sigchld = {"reset_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_sigchld (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_54reset_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54reset_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_sigchld", 0);

  gevent_reset_sigchld_handler();


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57stat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_57stat = {"stat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_57stat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57stat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_path = 0;
  float __pyx_v_interval;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_interval,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 742, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "stat", 0) < (0)) __PYX_ERR(0, 742, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("stat", 0, 1, 4, i); __PYX_ERR(0, 742, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 742, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_path = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_interval = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
    } else {
      __pyx_v_interval = ((float)0.0);
    }
    __pyx_v_ref = values[2];
    __pyx_v_priority = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stat", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 742, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyUnicode_Type), 1, "path", 1))) __PYX_ERR(0, 742, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_56stat(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stat", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_interval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_t_3, __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_stat, __pyx_callargs+__pyx_t_4, (6-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_59run_callback = {"run_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_callback (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_func,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 745, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "run_callback", 0) < (0)) __PYX_ERR(0, 745, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("run_callback", 0, 1, 1, i); __PYX_ERR(0, 745, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 745, __pyx_L3_error)
    }
    __pyx_v_func = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run_callback", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 745, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_58run_callback(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_58run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
  struct PyGeventCallbackObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("run_callback", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 746, __pyx_L1_error)

  __pyx_t_3 = NULL;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_func, __pyx_v_args};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __pyx_v_cb = ((struct PyGeventCallbackObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(__pyx_v_self->_callbacks, __pyx_v_cb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  ev_ref(__pyx_v_self->_ptr);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_cb);
  __pyx_r = ((PyObject *)__pyx_v_cb);
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe = {"run_callback_threadsafe", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_callback_threadsafe (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_func,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 752, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 752, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "run_callback_threadsafe", 0) < (0)) __PYX_ERR(0, 752, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("run_callback_threadsafe", 0, 1, 1, i); __PYX_ERR(0, 752, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 752, __pyx_L3_error)
    }
    __pyx_v_func = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run_callback_threadsafe", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 752, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_60run_callback_threadsafe(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60run_callback_threadsafe(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_cb = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("run_callback_threadsafe", 0);

  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_func) != (0)) __PYX_ERR(0, 754, __pyx_L1_error);
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cb = __pyx_t_2;
  __pyx_t_2 = 0;

  ev_async_send(__pyx_v_self->_ptr, (&__pyx_v_self->_threadsafe_async));

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cb);
  __pyx_r = __pyx_v_cb;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_63_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_63_format, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_62_format(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62_format(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_v_msg = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_destroyed);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_destroyed;
    goto __pyx_L0;

  }

  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_msg = __pyx_t_2;
  __pyx_t_2 = 0;

  if (__pyx_v_self->_default) {

    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_mstate_global->__pyx_kp_u_default_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
    __pyx_t_2 = 0;

  }

  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pendingcnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_pending_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
  __pyx_t_2 = 0;

  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format_details, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_3);
  __pyx_t_3 = 0;

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_65_format_details = {"_format_details", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format_details (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_64_format_details(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_64_format_details(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_v_msg = 0;
  PyObject *__pyx_v_fileno = 0;
  PyObject *__pyx_v_activecnt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format_details", 0);

  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__8);
  __pyx_v_msg = __pyx_mstate_global->__pyx_kp_u__8;

  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fileno, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_fileno = __pyx_t_1;
  __pyx_t_1 = 0;

  __Pyx_INCREF(Py_None);
  __pyx_v_activecnt = Py_None;

  {
    __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:*/ {

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_activecnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_activecnt, __pyx_t_1);
      __pyx_t_1 = 0;

    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError))));
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    __pyx_L5_except_error:;
    __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_L4_exception_handled:;
    __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_L8_try_end:;
  }

  __pyx_t_8 = (__pyx_v_activecnt != Py_None);
  if (__pyx_t_8) {

    __pyx_t_1 = PyObject_Repr(__pyx_v_activecnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_ref_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

  }

  __pyx_t_8 = (__pyx_v_fileno != Py_None);
  if (__pyx_t_8) {

    __pyx_t_1 = PyObject_Repr(__pyx_v_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_fileno_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

  }

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._format_details", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_fileno);
  __Pyx_XDECREF(__pyx_v_activecnt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_67fileno = {"fileno", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_66fileno(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_66fileno(struct PyGeventLoopObject *__pyx_v_self) {
  int __pyx_v_fd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fileno", 0);

  __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  if (__pyx_t_1) {

    __pyx_v_fd = gevent_ev_loop_backend_fd(__pyx_v_self->_ptr);

    __pyx_t_1 = (__pyx_v_fd >= 0);
    if (__pyx_t_1) {

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

    }

  }


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 791, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_int(gevent_ev_loop_activecnt(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.activecnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 796, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_int(gevent_ev_loop_sig_pending(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.sig_pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_origflags_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 805, __pyx_L1_error)

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(gevent_ev_loop_origflags(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self) {
  int __pyx_v_fd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error)

  __pyx_v_fd = gevent_ev_loop_sigfd(__pyx_v_self->_ptr);

  __pyx_t_1 = (__pyx_v_fd >= 0);
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

  }

  __pyx_t_3 = NULL;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sigfd};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 816, __pyx_L1_error)


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.sigfd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->error_handler);
  __pyx_r = __pyx_v_self->error_handler;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->error_handler);
  __Pyx_DECREF(__pyx_v_self->error_handler);
  __pyx_v_self->error_handler = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->error_handler);
  __Pyx_DECREF(__pyx_v_self->error_handler);
  __pyx_v_self->error_handler = Py_None;

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->_callbacks);
  __pyx_r = ((PyObject *)__pyx_v_self->_callbacks);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO))))) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
  __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop._callbacks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
  __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)Py_None);

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23approx_timer_resolution_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23approx_timer_resolution_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_23approx_timer_resolution___get__(((struct PyGeventLoopObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_23approx_timer_resolution___get__(struct PyGeventLoopObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->approx_timer_resolution); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.loop.approx_timer_resolution.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


static void __pyx_f_6gevent_5libev_8corecext__python_incref(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_t_1;

  __pyx_t_1 = (!((__pyx_v_self->_flags & FLAG_WATCHER_OWNS_PYREF) != 0));
  if (__pyx_t_1) {

    Py_INCREF(((PyObject *)__pyx_v_self));

    __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_OWNS_PYREF);

  }


  /* function exit code */
}


static void __pyx_f_6gevent_5libev_8corecext__python_decref(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_t_1;

  __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_OWNS_PYREF) != 0);
  if (__pyx_t_1) {

    Py_DECREF(((PyObject *)__pyx_v_self));

    __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_OWNS_PYREF));

  }


  /* function exit code */
}


static void __pyx_f_6gevent_5libev_8corecext__libev_ref(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_t_1;

  __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0);
  if (__pyx_t_1) {

    ev_ref(__pyx_v_self->loop->_ptr);

    __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_NEEDS_EVREF));

  }


  /* function exit code */
}


static void __pyx_f_6gevent_5libev_8corecext__libev_unref(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_t_1;

  __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_MASK_UNREF_NEEDS_REF) == FLAG_WATCHER_UNREF_BEFORE_START);
  if (__pyx_t_1) {

    ev_unref(__pyx_v_self->loop->_ptr);

    __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_NEEDS_EVREF);

  }


  /* function exit code */
}


static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_f_6gevent_5libev_8corecext_make_ss(void *__pyx_v_start, void *__pyx_v_stop) {
  struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_result;
  struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_r;
  struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_t_1;

  __pyx_t_1.start = ((__pyx_t_6gevent_5libev_8corecext_start_stop_func)__pyx_v_start);
  __pyx_t_1.stop = ((__pyx_t_6gevent_5libev_8corecext_start_stop_func)__pyx_v_stop);
  __pyx_v_result = __pyx_t_1;

  __pyx_r = __pyx_v_result;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}


static int __pyx_f_6gevent_5libev_8corecext__watcher_start(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  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;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_watcher_start", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_t_3 = (__pyx_v_callback == Py_None);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_3);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_callable_not, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __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, 896, __pyx_L1_error)

  }

  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->_callback);
  __Pyx_DECREF(__pyx_v_self->_callback);
  __pyx_v_self->_callback = __pyx_v_callback;

  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = __pyx_v_args;

  __pyx_f_6gevent_5libev_8corecext__libev_unref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)

  __pyx_f_6gevent_5libev_8corecext__python_incref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)

  __pyx_v_self->_w_ss->start(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)

  __pyx_r = 1;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("gevent.libev.corecext._watcher_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 949, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 949, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 949, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 949, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 949, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 949, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 949, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher___init__(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_7watcher___init__(struct PyGeventWatcherObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = (!(__pyx_v_self->_w_watcher != 0));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (!(__pyx_v_self->_w_ss->start != 0));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (!(__pyx_v_self->_w_ss->stop != 0));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_construct_a_bare_watcher};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 951, __pyx_L1_error)

  }

  __Pyx_INCREF((PyObject *)__pyx_v_loop);
  __Pyx_GIVEREF((PyObject *)__pyx_v_loop);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
  __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
  __pyx_v_self->loop = __pyx_v_loop;

  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 953, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_t_6 = 0;
  } else {
    __pyx_t_6 = FLAG_WATCHER_UNREF_BEFORE_START;
  }
  __pyx_v_self->_flags = __pyx_t_6;

  __pyx_t_1 = (__pyx_v_priority != Py_None);
  if (__pyx_t_1) {

    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_priority); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error)
    ev_set_priority(__pyx_v_self->_w_watcher, __pyx_t_7);

  }


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

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

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((__pyx_v_self->_flags & 4) != 0);
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  } else {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 964, __pyx_L1_error)
  if (__pyx_t_2) {

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      __pyx_r = 0;
      goto __pyx_L0;

    }

    __pyx_t_2 = ((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0);
    if (__pyx_t_2) {

      ev_ref(__pyx_v_self->loop->_ptr);

    }

    __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_MASK_UNREF_NEEDS_REF));

    goto __pyx_L3;
  }

  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (!__pyx_t_2);
    if (__pyx_t_3) {

      __pyx_r = 0;
      goto __pyx_L0;

    }

    __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_UNREF_BEFORE_START);

    __pyx_t_2 = (!((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0));
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_2 = (ev_is_active(__pyx_v_self->_w_watcher) != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_3) {

      ev_unref(__pyx_v_self->loop->_ptr);

      __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_NEEDS_EVREF);

    }
  }
  __pyx_L3:;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8callback___get__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_callback);
  __pyx_r = __pyx_v_self->_callback;
  goto __pyx_L0;


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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __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;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  __pyx_t_2 = (__pyx_v_callback != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_callable_not, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 989, __pyx_L1_error)

  }

  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->_callback);
  __Pyx_DECREF(__pyx_v_self->_callback);
  __pyx_v_self->_callback = __pyx_v_callback;


  /* function exit code */
  __pyx_r = 0;
  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_AddTraceback("gevent.libev.corecext.watcher.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8priority___get__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(ev_priority(__pyx_v_self->_w_watcher)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  int __pyx_v_priority;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_priority); {
    __pyx_v_priority = __Pyx_PyLong_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((int)__pyx_v_priority));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority_2__set__(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_priority) {
  struct ev_watcher *__pyx_v_w;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct ev_watcher *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  __pyx_t_1 = __pyx_v_self->_w_watcher;
  __pyx_v_w = __pyx_t_1;

  __pyx_t_2 = (ev_is_active(__pyx_v_w) != 0);
  if (unlikely(__pyx_t_2)) {

    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_set_priority_of_an_active};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1000, __pyx_L1_error)

  }

  ev_set_priority(__pyx_v_w, __pyx_v_priority);


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6active_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6active___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

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

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (ev_is_active(__pyx_v_self->_w_watcher) != 0);
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7pending_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_7pending___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

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

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (ev_is_pending(__pyx_v_self->_w_watcher) != 0);
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_3start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_3start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1011, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1011, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "start", 0) < (0)) __PYX_ERR(0, 1011, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, i); __PYX_ERR(0, 1011, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1011, __pyx_L3_error)
    }
    __pyx_v_callback = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1011, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_2start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_2start(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__watcher_start(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1012, __pyx_L1_error)


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_5stop = {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4stop(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4stop(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_f_6gevent_5libev_8corecext__libev_ref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1016, __pyx_L1_error)

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_callback);
  __Pyx_DECREF(__pyx_v_self->_callback);
  __pyx_v_self->_callback = Py_None;

  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)Py_None);

  __pyx_v_self->_w_ss->stop(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)

  __pyx_f_6gevent_5libev_8corecext__python_decref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_7feed = {"feed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_revents;
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_revents,&__pyx_mstate_global->__pyx_n_u_callback,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1024, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1024, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1024, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "feed", 0) < (0)) __PYX_ERR(0, 1024, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, i); __PYX_ERR(0, 1024, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1024, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1024, __pyx_L3_error)
    }
    __pyx_v_revents = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error)
    __pyx_v_callback = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1024, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6feed(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6feed(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("feed", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_callback, __pyx_v_callback) < (0)) __PYX_ERR(0, 1026, __pyx_L1_error)

  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = __pyx_v_args;

  __pyx_f_6gevent_5libev_8corecext__libev_unref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L1_error)

  ev_feed_event(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher, __pyx_v_revents);

  __pyx_f_6gevent_5libev_8corecext__python_incref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8__repr__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8__repr__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_v_format = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[7];
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  __pyx_t_1 = (Py_ReprEnter(((PyObject *)__pyx_v_self)) != 0);
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
    __pyx_r = __pyx_mstate_global->__pyx_kp_u__5;
    goto __pyx_L0;

  }

  /*try:*/ {

    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_v_format = __pyx_t_2;
    __pyx_t_2 = 0;

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1039, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    __pyx_t_3 = __Pyx_PyUnicode_From_unsigned_long(((unsigned long)__pyx_v_self->_w_watcher), 0, ' ', 'x'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);

    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_format), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1041, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u__6;
    __pyx_t_7[1] = __pyx_t_2;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
    __pyx_t_7[3] = __pyx_t_5;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_native_0x;
    __pyx_t_7[5] = __pyx_t_3;
    __pyx_t_7[6] = __pyx_t_6;

    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1037, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;

    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_active); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1043, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      __pyx_t_8 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u_active_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1044, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

    }

    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pending); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1045, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1045, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      __pyx_t_8 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u_pending_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1046, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

    }

    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_callback); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1047, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = (__pyx_t_8 != Py_None);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_callback); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1048, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_callback_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1048, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

    }

    __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
    if (__pyx_t_1) {

      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->args), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_args_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1050, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

    }

    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u__7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1051, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L4_return;
  }

  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
      {
        Py_ReprLeave(((PyObject *)__pyx_v_self));
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      Py_ReprLeave(((PyObject *)__pyx_v_self));
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_11_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_10_format(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_10_format(CYTHON_UNUSED struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__8);
  __pyx_r = __pyx_mstate_global->__pyx_kp_u__8;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_13close = {"close", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_13close, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_12close(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_12close(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_stop, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* 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("gevent.libev.corecext.watcher.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_15__enter__ = {"__enter__", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_14__enter__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_14__enter__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_17__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
  CYTHON_UNUSED PyObject *__pyx_v_v = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tb = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_t,&__pyx_mstate_global->__pyx_n_u_v,&__pyx_mstate_global->__pyx_n_u_tb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1064, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1064, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1064, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1064, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 1064, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(0, 1064, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1064, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1064, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1064, __pyx_L3_error)
    }
    __pyx_v_t = values[0];
    __pyx_v_v = values[1];
    __pyx_v_tb = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1064, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_16__exit__(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_t, __pyx_v_v, __pyx_v_tb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_16__exit__(struct PyGeventWatcherObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_tb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4loop___get__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->loop);
  __pyx_r = ((PyObject *)__pyx_v_self->loop);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
  __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
  __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_4__del__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_4__del__(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
  __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
  __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4args_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4args___get__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->args);
  __pyx_r = __pyx_v_self->args;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_4__del__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_4__del__(struct PyGeventWatcherObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->args);
  __Pyx_DECREF(__pyx_v_self->args);
  __pyx_v_self->args = ((PyObject*)Py_None);

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6_flags_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6_flags___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6_flags___get__(struct PyGeventWatcherObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.watcher._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_2io_1start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_2io_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_pass_events = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_pass_events,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1074, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1074, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "start", 0) < (0)) __PYX_ERR(0, 1074, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, i); __PYX_ERR(0, 1074, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1074, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_False));
    }
    __pyx_v_callback = values[0];
    __pyx_v_pass_events = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1074, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_start(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_pass_events, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_start(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_pass_events, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_INCREF(__pyx_v_args);

  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pass_events); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
  if (__pyx_t_1) {

    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(GEVENT_CORE_EVENTS);
    __Pyx_GIVEREF(GEVENT_CORE_EVENTS);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, GEVENT_CORE_EVENTS) != (0)) __PYX_ERR(0, 1076, __pyx_L1_error);
    __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

  }

  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__watcher_start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1077, __pyx_L1_error)


  /* 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_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_2io_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_2io_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED vfd_socket_t __pyx_v_fd;
  CYTHON_UNUSED int __pyx_v_events;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_fd,&__pyx_mstate_global->__pyx_n_u_events_2,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1079, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1079, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, i); __PYX_ERR(0, 1079, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1079, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1079, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1079, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1079, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
    __pyx_v_events = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1079, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2__init__(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_2io_2__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED vfd_socket_t __pyx_v_fd, CYTHON_UNUSED int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_2io_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_2io_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  vfd_socket_t __pyx_v_fd;
  int __pyx_v_events;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_fd,&__pyx_mstate_global->__pyx_n_u_events_2,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1082, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1082, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(0, 1082, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1082, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1082, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1082, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1082, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
    __pyx_v_events = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1082, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.io.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1082, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4__cinit__(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_2io_4__cinit__(struct PyGeventIOObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, vfd_socket_t __pyx_v_fd, int __pyx_v_events, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_v_vfd;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  __pyx_t_1 = (__pyx_v_fd < 0);
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_fd_must_be_non_negative_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1084, __pyx_L1_error)

  }

  __pyx_t_1 = ((__pyx_v_events & (~((EV__IOFDSET | EV_READ) | EV_WRITE))) != 0);
  if (unlikely(__pyx_t_1)) {

    __pyx_t_5 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_illegal_event_mask_r, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1086, __pyx_L1_error)

  }

  __pyx_t_7 = gevent_check_fd_valid(__pyx_v_fd); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1087, __pyx_L1_error)

  __pyx_t_7 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1089, __pyx_L1_error)
  __pyx_v_vfd = __pyx_t_7;

  ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_events);

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_io_ss);


  /* function exit code */
  __pyx_r = 0;
  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_AddTraceback("gevent.libev.corecext.io.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static void __pyx_pw_6gevent_5libev_8corecext_2io_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6gevent_5libev_8corecext_2io_7__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6gevent_5libev_8corecext_2io_6__dealloc__(((struct PyGeventIOObject *)__pyx_v_self));

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

static void __pyx_pf_6gevent_5libev_8corecext_2io_6__dealloc__(struct PyGeventIOObject *__pyx_v_self) {

  vfd_free(__pyx_v_self->_watcher.fd);


  /* function exit code */
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(((struct PyGeventIOObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(struct PyGeventIOObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromSsize_t(vfd_get(__pyx_v_self->_watcher.fd)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
  long __pyx_v_fd;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_fd); {
    __pyx_v_fd = __Pyx_PyLong_As_long(__pyx_arg_fd); if (unlikely((__pyx_v_fd == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((long)__pyx_v_fd));

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

static int __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(struct PyGeventIOObject *__pyx_v_self, long __pyx_v_fd) {
  int __pyx_v_vfd;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_io_watcher_attribute_fd_is_read};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1104, __pyx_L1_error)

  }

  __pyx_t_5 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1105, __pyx_L1_error)
  __pyx_v_vfd = __pyx_t_5;

  vfd_free(__pyx_v_self->_watcher.fd);

  ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_self->_watcher.events);


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(((struct PyGeventIOObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(struct PyGeventIOObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_watcher.events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.io.events.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events) {
  int __pyx_v_events;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_events); {
    __pyx_v_events = __Pyx_PyLong_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((int)__pyx_v_events));

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

static int __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_events) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_io_watcher_attribute_events_is};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1116, __pyx_L1_error)

  }

  ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_self->_watcher.fd, __pyx_v_events);


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(((struct PyGeventIOObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(struct PyGeventIOObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_self->_watcher.events, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.io.events_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_2io_9_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_9_format, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8_format(((struct PyGeventIOObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8_format(struct PyGeventIOObject *__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[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_events_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_fd_2;
  __pyx_t_4[1] = __pyx_t_2;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_events_3;
  __pyx_t_4[3] = __pyx_t_3;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.io._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5timer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5timer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  double __pyx_v_after;
  double __pyx_v_repeat;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_after,&__pyx_mstate_global->__pyx_n_u_repeat,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1132, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1132, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, i); __PYX_ERR(0, 1132, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1132, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1132, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    if (values[1]) {
      __pyx_v_after = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1132, __pyx_L3_error)
    } else {
      __pyx_v_after = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_repeat = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1132, __pyx_L3_error)
    } else {
      __pyx_v_repeat = ((double)0.0);
    }
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1132, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.timer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer___cinit__(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_5timer___cinit__(struct PyGeventTimerObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, double __pyx_v_after, double __pyx_v_repeat, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  __pyx_t_1 = (__pyx_v_repeat < 0.0);
  if (unlikely(__pyx_t_1)) {

    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_repeat_must_be_positive_or_zero, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1134, __pyx_L1_error)

  }

  ev_timer_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_timer), __pyx_v_after, __pyx_v_repeat);

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_timer_ss);


  /* function exit code */
  __pyx_r = 0;
  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_AddTraceback("gevent.libev.corecext.timer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5timer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5timer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED double __pyx_v_after;
  CYTHON_UNUSED double __pyx_v_repeat;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_after,&__pyx_mstate_global->__pyx_n_u_repeat,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1139, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1139, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, i); __PYX_ERR(0, 1139, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1139, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    if (values[1]) {
      __pyx_v_after = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1139, __pyx_L3_error)
    } else {
      __pyx_v_after = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_repeat = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1139, __pyx_L3_error)
    } else {
      __pyx_v_repeat = ((double)0.0);
    }
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1139, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2__init__(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_5timer_2__init__(struct PyGeventTimerObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED double __pyx_v_after, CYTHON_UNUSED double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5timer_5start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_update = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_update,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1142, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1142, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "start", 0) < (0)) __PYX_ERR(0, 1142, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, i); __PYX_ERR(0, 1142, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1142, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_callback = values[0];
    __pyx_v_update = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1142, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4start(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4start(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);
  __Pyx_INCREF(__pyx_v_update);

  __pyx_t_2 = (__pyx_v_update != Py_None);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_v_update);
    __pyx_t_1 = __pyx_v_update;
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.loop->starting_timer_may_update_loop_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_update, __pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1144, __pyx_L1_error)
  if (__pyx_t_2) {

    ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_base.loop->__pyx_vtab)->update_now(__pyx_v_self->__pyx_base.loop, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1145, __pyx_L1_error)

  }

  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__watcher_start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1146, __pyx_L1_error)


  /* 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_3);
  __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_update);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(((struct PyGeventTimerObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(struct PyGeventTimerObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.at); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.timer.at.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7again(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5timer_7again = {"again", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_7again, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7again(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_update = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("again (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_update,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1154, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1154, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "again", 0) < (0)) __PYX_ERR(0, 1154, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("again", 0, 1, 1, i); __PYX_ERR(0, 1154, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1154, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
    }
    __pyx_v_callback = values[0];
    __pyx_v_update = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("again", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1154, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_6again(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6again(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("again", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_callback, __pyx_v_callback) < (0)) __PYX_ERR(0, 1156, __pyx_L1_error)

  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.args);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.args);
  __pyx_v_self->__pyx_base.args = __pyx_v_args;

  __pyx_f_6gevent_5libev_8corecext__libev_unref(((struct PyGeventWatcherObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L1_error)

  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1159, __pyx_L1_error)
  if (__pyx_t_2) {

    ev_now_update(__pyx_v_self->__pyx_base.loop->_ptr);

  }

  ev_timer_again(__pyx_v_self->__pyx_base.loop->_ptr, (&__pyx_v_self->_watcher));

  __pyx_f_6gevent_5libev_8corecext__python_incref(((struct PyGeventWatcherObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1162, __pyx_L1_error)


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_6signal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_6signal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  int __pyx_v_signalnum;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_signalnum,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1172, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1172, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, i); __PYX_ERR(0, 1172, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1172, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1172, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1172, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_signalnum = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_signalnum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L3_error)
    __pyx_v_ref = values[2];
    __pyx_v_priority = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1172, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.signal.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal___cinit__(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_signalnum, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_6signal___cinit__(struct PyGeventSignalObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_signalnum, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;
  __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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  __pyx_t_2 = (__pyx_v_signalnum < 1);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_signalmodule); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NSIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    __pyx_t_5 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_illegal_signal_number_r, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1174, __pyx_L1_error)

  }

  ev_signal_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_signal), __pyx_v_signalnum);

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_signal_ss);


  /* function exit code */
  __pyx_r = 0;
  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_AddTraceback("gevent.libev.corecext.signal.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_6signal_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_6signal_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED int __pyx_v_signalnum;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_signalnum,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1184, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1184, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1184, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1184, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1184, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_signalnum = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_signalnum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1184, __pyx_L3_error)
    __pyx_v_ref = values[2];
    __pyx_v_priority = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1184, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1184, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_2__init__(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_signalnum, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_6signal_2__init__(struct PyGeventSignalObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_signalnum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4idle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4idle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1195, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1195, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(0, 1195, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1195, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1195, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.idle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1195, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle___cinit__(((struct PyGeventIdleObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4idle___cinit__(struct PyGeventIdleObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;

  ev_idle_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_idle));

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_idle_ss);


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_7prepare_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_7prepare_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1208, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1208, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(0, 1208, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1208, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1208, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.prepare.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1208, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare___cinit__(((struct PyGeventPrepareObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_7prepare___cinit__(struct PyGeventPrepareObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;

  ev_prepare_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_prepare));

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_prepare_ss);


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5check_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5check_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1221, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1221, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(0, 1221, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1221, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.check.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1221, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check___cinit__(((struct PyGeventCheckObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_5check___cinit__(struct PyGeventCheckObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;

  ev_check_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_check));

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_check_ss);


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4fork_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4fork_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1234, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1234, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(0, 1234, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1234, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1234, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.fork.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1234, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork___cinit__(((struct PyGeventForkObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4fork___cinit__(struct PyGeventForkObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;

  ev_fork_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_fork));

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_fork_ss);


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__7pending_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__7pending___get__(((struct PyGeventAsyncObject *)__pyx_v_self));

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

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

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (ev_async_pending((&__pyx_v_self->_watcher)) != 0);
  if (__pyx_t_2) {
    __Pyx_INCREF(Py_True);
    __pyx_t_1 = Py_True;
  } else {
    __Pyx_INCREF(Py_False);
    __pyx_t_1 = Py_False;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_6async__1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_6async__1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1251, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1251, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, i); __PYX_ERR(0, 1251, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1251, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_priority = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1251, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.async_.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1251, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async____cinit__(((struct PyGeventAsyncObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_6async____cinit__(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  int __pyx_r;

  ev_async_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_async));

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_async_ss);


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_6async__3send = {"send", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__3send, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__2send(((struct PyGeventAsyncObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__2send(struct PyGeventAsyncObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("send", 0);

  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.loop);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  ev_async_send(__pyx_v_self->__pyx_base.loop->_ptr, (&__pyx_v_self->_watcher));


  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.async_.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg(PyObject *__pyx_v_self, PyObject *__pyx_v__ignored); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_6async__5send_ignoring_arg = {"send_ignoring_arg", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg(PyObject *__pyx_v_self, PyObject *__pyx_v__ignored) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send_ignoring_arg (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__4send_ignoring_arg(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v__ignored));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__4send_ignoring_arg(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__ignored) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("send_ignoring_arg", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.async_.send_ignoring_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5child_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5child_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  int __pyx_v_pid;
  int __pyx_v_trace;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_pid,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_ref,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1272, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1272, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, i); __PYX_ERR(0, 1272, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_pid = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_trace = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L3_error)
    } else {
      __pyx_v_trace = ((int)0);
    }
    __pyx_v_ref = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1272, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.child.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1272, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child___cinit__(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_5child___cinit__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_pid, int __pyx_v_trace, CYTHON_UNUSED PyObject *__pyx_v_ref) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_win32, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_3)) {

    __pyx_t_1 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Child_watchers_are_not_supported};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AttributeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1274, __pyx_L1_error)

  }

  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_n_u_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  if (unlikely(__pyx_t_5)) {

    __pyx_t_1 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_child_watchers_are_only_availabl};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1276, __pyx_L1_error)

  }

  gevent_install_sigchld_handler();

  ev_child_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_child), __pyx_v_pid, __pyx_v_trace);

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_child_ss);


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.child.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5child_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5child_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED int __pyx_v_pid;
  CYTHON_UNUSED int __pyx_v_trace;
  PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_pid,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_ref,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1282, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1282, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1282, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1282, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1282, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_pid = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_trace = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L3_error)
    } else {
      __pyx_v_trace = ((int)0);
    }
    __pyx_v_ref = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1282, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1282, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_2__init__(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_5child_2__init__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_pid, CYTHON_UNUSED int __pyx_v_trace, PyObject *__pyx_v_ref) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, Py_None};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5child_5_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_5_format, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4_format(((struct PyGeventChildObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4_format(struct PyGeventChildObject *__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[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rstatus_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_pid_2;
  __pyx_t_4[1] = __pyx_t_2;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_rstatus;
  __pyx_t_4[3] = __pyx_t_3;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent.libev.corecext.child._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(((struct PyGeventChildObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(struct PyGeventChildObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_watcher.pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(((struct PyGeventChildObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(struct PyGeventChildObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_watcher.rpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyLong_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;

  __pyx_v_self->_watcher.rpid = __pyx_v_value;


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(((struct PyGeventChildObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(struct PyGeventChildObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_watcher.rstatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyLong_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;

  __pyx_v_self->_watcher.rstatus = __pyx_v_value;


  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4stat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4stat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
  PyObject *__pyx_v_path = 0;
  float __pyx_v_interval;
  CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_interval,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1317, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1317, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, i); __PYX_ERR(0, 1317, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1317, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1317, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_path = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_interval = __Pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
    } else {
      __pyx_v_interval = ((float)0.0);
    }
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1317, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.stat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1317, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyUnicode_Type), 1, "path", 1))) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat___cinit__(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4stat___cinit__(struct PyGeventStatObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_path, float __pyx_v_interval, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
  PyObject *__pyx_v_paths = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  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;
  size_t __pyx_t_8;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __Pyx_GOTREF(__pyx_v_self->path);
  __Pyx_DECREF(__pyx_v_self->path);
  __pyx_v_self->path = __pyx_v_path;

  __pyx_t_1 = PyUnicode_Check(__pyx_v_path); 
  if (__pyx_t_1) {

    __pyx_t_3 = __pyx_v_path;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_getfilesystemencoding); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_v_paths = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    __Pyx_INCREF(__pyx_v_paths);
    __Pyx_GIVEREF(__pyx_v_paths);
    __Pyx_GOTREF(__pyx_v_self->_paths);
    __Pyx_DECREF(__pyx_v_self->_paths);
    __pyx_v_self->_paths = __pyx_v_paths;

    goto __pyx_L3;
  }

  /*else*/ {
    __pyx_t_2 = __pyx_v_path;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_paths = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    __Pyx_INCREF(__pyx_v_paths);
    __Pyx_GIVEREF(__pyx_v_paths);
    __Pyx_GOTREF(__pyx_v_self->_paths);
    __Pyx_DECREF(__pyx_v_self->_paths);
    __pyx_v_self->_paths = __pyx_v_paths;
  }
  __pyx_L3:;

  if (unlikely(__pyx_v_paths == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1329, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_paths); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1329, __pyx_L1_error)
  ev_stat_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_stat), ((char *)__pyx_t_9), __pyx_v_interval);

  __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

  __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_stat_ss);


  /* function exit code */
  __pyx_r = 0;
  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("gevent.libev.corecext.stat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static int __pyx_pw_6gevent_5libev_8corecext_4stat_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_5libev_8corecext_4stat_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyGeventLoopObject *__pyx_v_loop = 0;
  CYTHON_UNUSED PyObject *__pyx_v_path = 0;
  CYTHON_UNUSED float __pyx_v_interval;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_priority = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_interval,&__pyx_mstate_global->__pyx_n_u_ref,&__pyx_mstate_global->__pyx_n_u_priority,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1333, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1333, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, i); __PYX_ERR(0, 1333, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1333, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_True));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
    __pyx_v_path = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_interval = __Pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error)
    } else {
      __pyx_v_interval = ((float)0.0);
    }
    __pyx_v_ref = values[3];
    __pyx_v_priority = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1333, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1333, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyUnicode_Type), 1, "path", 1))) __PYX_ERR(0, 1333, __pyx_L1_error)
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_2__init__(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_5libev_8corecext_4stat_2__init__(struct PyGeventStatObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_path, CYTHON_UNUSED float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;


  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(((struct PyGeventStatObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(struct PyGeventStatObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = (!(__pyx_v_self->_watcher.attr.st_nlink != 0));
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.attr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.stat.attr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(((struct PyGeventStatObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(struct PyGeventStatObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __pyx_t_1 = (!(__pyx_v_self->_watcher.prev.st_nlink != 0));
  if (__pyx_t_1) {

    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

  }

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.prev)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent.libev.corecext.stat.prev.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(((struct PyGeventStatObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(struct PyGeventStatObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.stat.interval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(((struct PyGeventStatObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(struct PyGeventStatObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->path);
  __pyx_r = __pyx_v_self->path;
  goto __pyx_L0;

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


/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(((struct PyGeventStatObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(struct PyGeventStatObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_paths);
  __pyx_r = __pyx_v_self->_paths;
  goto __pyx_L0;

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


static void __pyx_f_6gevent_5libev_8corecext__syserr_cb(char *__pyx_v_msg) {
  PyObject *__pyx_v_print_exc = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_syserr_cb", 0);

  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
      __pyx_t_6 = __pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK; 
      __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_int(errno); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /*except:*/ {
      __Pyx_AddTraceback("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1361, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_8);

      __pyx_t_7 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_traceback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1363, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_print_exc, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1363, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_print_exc = __pyx_t_5;
      __pyx_t_5 = 0;

      __pyx_t_10 = (__pyx_v_print_exc != Py_None);
      if (__pyx_t_10) {

        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_print_exc);
        __pyx_t_11 = __pyx_v_print_exc; 
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }

    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }


  /* function exit code */
  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_11);
  __Pyx_WriteUnraisable("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_print_exc);
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
}


static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_f_6gevent_5libev_8corecext_set_syserr_cb(PyObject *__pyx_v_callback, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_syserr_cb", 0);

  __pyx_t_1 = (__pyx_v_callback == Py_None);
  if (__pyx_t_1) {

    ev_set_syserr_cb(NULL);

    __Pyx_INCREF(Py_None);
    __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
    __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, Py_None);
    __Pyx_GIVEREF(Py_None);

    goto __pyx_L3;
  }

  __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1373, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    ev_set_syserr_cb(((void *)__pyx_f_6gevent_5libev_8corecext__syserr_cb));

    __Pyx_INCREF(__pyx_v_callback);
    __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
    __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, __pyx_v_callback);
    __Pyx_GIVEREF(__pyx_v_callback);

    goto __pyx_L3;
  }

  /*else*/ {
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_callable_or_None_got, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1377, __pyx_L1_error)
  }
  __pyx_L3:;


  /* 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_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_21set_syserr_cb = {"set_syserr_cb", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb, METH_O, 0};
static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_syserr_cb (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(__pyx_self, ((PyObject *)__pyx_v_callback));

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

static PyObject *__pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_syserr_cb", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_v_callback, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}


void gevent_handle_error(struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_context) {
  PyObject *__pyx_v_typep;
  PyObject *__pyx_v_valuep;
  PyObject *__pyx_v_tracebackp;
  PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_traceback = 0;
  __Pyx_RefNannyDeclarations
  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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gevent_handle_error", 0);

  __Pyx_INCREF(Py_None);
  __pyx_v_value = Py_None;

  __Pyx_INCREF(Py_None);
  __pyx_v_traceback = Py_None;

  PyErr_Fetch((&__pyx_v_typep), (&__pyx_v_valuep), (&__pyx_v_tracebackp));

  __pyx_t_1 = (!(__pyx_v_typep != 0));
  if (__pyx_t_1) {

    goto __pyx_L0;

  }

  PyErr_NormalizeException((&__pyx_v_typep), (&__pyx_v_valuep), (&__pyx_v_tracebackp));

  __pyx_t_1 = (__pyx_v_tracebackp != 0);
  if (__pyx_t_1) {

    PyException_SetTraceback(__pyx_v_valuep, __pyx_v_tracebackp); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1415, __pyx_L1_error)

  }

  __pyx_t_2 = ((PyObject *)__pyx_v_typep);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_type = __pyx_t_2;
  __pyx_t_2 = 0;

  Py_DECREF(__pyx_v_type);

  __pyx_t_1 = (__pyx_v_valuep != 0);
  if (__pyx_t_1) {

    __pyx_t_2 = ((PyObject *)__pyx_v_valuep);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    Py_DECREF(__pyx_v_value);

  }

  __pyx_t_1 = (__pyx_v_tracebackp != 0);
  if (__pyx_t_1) {

    __pyx_t_2 = ((PyObject *)__pyx_v_tracebackp);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_traceback, __pyx_t_2);
    __pyx_t_2 = 0;

    Py_DECREF(__pyx_v_traceback);

  }

  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_loop->__pyx_vtab)->handle_error(__pyx_v_loop, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_traceback, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /*except:*/ {
      __Pyx_AddTraceback("gevent.libev.corecext.gevent_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1439, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_print_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_13 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_12 = __Pyx_PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1449, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L8_exception_handled;
    }

    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L12_try_end:;
  }


  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("gevent.libev.corecext.gevent_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_type);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_traceback);
  __Pyx_RefNannyFinishContext();
}


PyObject *gevent_loop_run_callbacks(struct PyGeventLoopObject *__pyx_v_loop) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gevent_loop_run_callbacks", 0);

  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_loop->__pyx_vtab)->_run_callbacks(__pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;


  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent.libev.corecext.gevent_loop_run_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext__EVENTSType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext__EVENTSType[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6gevent_5libev_8corecext__EVENTSType_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType},
  {Py_tp_repr, (void *)__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext__EVENTSType},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext__EVENTSType},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_5libev_8corecext__EVENTSType_spec = {
  "gevent.libev.corecext._EVENTSType",
  sizeof(struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6gevent_5libev_8corecext__EVENTSType_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_5libev_8corecext__EVENTSType = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""_EVENTSType", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__, /*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_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_6gevent_5libev_8corecext__EVENTSType, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext__EVENTSType, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_callback(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct PyGeventCallbackObject *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct PyGeventCallbackObject *)o);
  p->callback = Py_None; Py_INCREF(Py_None);
  p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->next = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_callback(PyObject *o) {
  struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext_callback) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->callback);
  Py_CLEAR(p->args);
  Py_CLEAR(p->next);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_6gevent_5libev_8corecext_callback(PyObject *o, visitproc v, void *a) {
  int e;
  struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->callback) {
    e = (*v)(p->callback, a); if (e) return e;
  }
  if (p->args) {
    e = (*v)(p->args, a); if (e) return e;
  }
  if (p->next) {
    e = (*v)(((PyObject *)p->next), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_5libev_8corecext_callback(PyObject *o) {
  PyObject* tmp;
  struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  tmp = ((PyObject*)p->callback);
  p->callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->args);
  p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->next);
  p->next = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_pending(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_8callback_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_args(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_8callback_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_callback[] = {
  {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_3stop, METH_NOARGS, 0},
  {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_9_format, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_callback[] = {
  {"pending", __pyx_getprop_6gevent_5libev_8corecext_8callback_pending, 0, 0, 0},
  {"callback", __pyx_getprop_6gevent_5libev_8corecext_8callback_callback, __pyx_setprop_6gevent_5libev_8corecext_8callback_callback, 0, 0},
  {"args", __pyx_getprop_6gevent_5libev_8corecext_8callback_args, __pyx_setprop_6gevent_5libev_8corecext_8callback_args, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventCallback_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_callback},
  {Py_tp_repr, (void *)__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__},
  {Py_nb_bool, (void *)__pyx_pw_6gevent_5libev_8corecext_8callback_5__bool__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_callback},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_callback},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_callback},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_callback},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_8callback_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_callback},
  {0, 0},
};
static PyType_Spec PyGeventCallback_Type_spec = {
  "gevent.libev.corecext.callback",
  sizeof(struct PyGeventCallbackObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventCallback_Type_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_callback = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6gevent_5libev_8corecext_8callback_5__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

DL_EXPORT(PyTypeObject) PyGeventCallback_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""callback", /*tp_name*/
  sizeof(struct PyGeventCallbackObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_callback, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__, /*tp_repr*/
  &__pyx_tp_as_number_callback, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_callback, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_callback, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_callback, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_callback, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_callback, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO __pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO;

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_CallbackFIFO(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 1);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)o);
  p->__pyx_vtab = __pyx_vtabptr_6gevent_5libev_8corecext_CallbackFIFO;
  p->head = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  p->tail = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_CallbackFIFO(PyObject *o) {
  struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *p = (struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->head);
  Py_CLEAR(p->tail);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_6gevent_5libev_8corecext_CallbackFIFO(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *p = (struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->head) {
    e = (*v)(((PyObject *)p->head), a); if (e) return e;
  }
  if (p->tail) {
    e = (*v)(((PyObject *)p->tail), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_5libev_8corecext_CallbackFIFO(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *p = (struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)o;
  tmp = ((PyObject*)p->head);
  p->head = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->tail);
  p->tail = ((struct PyGeventCallbackObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_CallbackFIFO[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6gevent_5libev_8corecext_CallbackFIFO_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_CallbackFIFO},
  {Py_tp_repr, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__},
  {Py_nb_bool, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__bool__},
  {Py_sq_length, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__},
  {Py_mp_length, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_CallbackFIFO},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_CallbackFIFO},
  {Py_tp_iter, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_CallbackFIFO},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_CallbackFIFO},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_5libev_8corecext_CallbackFIFO_spec = {
  "gevent.libev.corecext.CallbackFIFO",
  sizeof(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_5libev_8corecext_CallbackFIFO_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_CallbackFIFO = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PySequenceMethods __pyx_tp_as_sequence_CallbackFIFO = {
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CallbackFIFO = {
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6gevent_5libev_8corecext_CallbackFIFO = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""CallbackFIFO", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_CallbackFIFO, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CallbackFIFO, /*tp_as_number*/
  &__pyx_tp_as_sequence_CallbackFIFO, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CallbackFIFO, /*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_6gevent_5libev_8corecext_CallbackFIFO, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_CallbackFIFO, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_CallbackFIFO, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_CallbackFIFO, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop __pyx_vtable_6gevent_5libev_8corecext_loop;

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_loop(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PyGeventLoopObject *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct PyGeventLoopObject *)o);
  p->__pyx_vtab = __pyx_vtabptr_6gevent_5libev_8corecext_loop;
  p->error_handler = Py_None; Py_INCREF(Py_None);
  p->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_4loop_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_loop(PyObject *o) {
  struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext_loop) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->error_handler);
  Py_CLEAR(p->_callbacks);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_6gevent_5libev_8corecext_loop(PyObject *o, visitproc v, void *a) {
  int e;
  struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->error_handler) {
    e = (*v)(p->error_handler, a); if (e) return e;
  }
  if (p->_callbacks) {
    e = (*v)(((PyObject *)p->_callbacks), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_5libev_8corecext_loop(PyObject *o) {
  PyObject* tmp;
  struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  tmp = ((PyObject*)p->error_handler);
  p->error_handler = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_callbacks);
  p->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_ptr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_WatcherType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_MAXPRI(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_MINPRI(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_default(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_iteration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_backend_int(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_backend(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_pendingcnt(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_activecnt(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_sig_pending(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_origflags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_origflags_int(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_sigfd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_error_handler(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_4loop_error_handler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop__callbacks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_4loop__callbacks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_approx_timer_resolution(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4loop_23approx_timer_resolution_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_loop[] = {
  {"destroy", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy, METH_NOARGS, 0},
  {"_handle_syserr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"run", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_15run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"reinit", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit, METH_NOARGS, 0},
  {"ref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_19ref, METH_NOARGS, 0},
  {"unref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_21unref, METH_NOARGS, 0},
  {"break_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_23break_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"verify", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_25verify, METH_NOARGS, 0},
  {"io", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_33io, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"closing_fd", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd, METH_O, 0},
  {"timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_37timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_39signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"idle", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_41idle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"check", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_45check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"fork", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_47fork, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"async_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_49async_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"child", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_51child, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"install_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld, METH_NOARGS, 0},
  {"reset_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld, METH_NOARGS, 0},
  {"stat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_57stat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"run_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"run_callback_threadsafe", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_63_format, METH_NOARGS, 0},
  {"_format_details", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details, METH_NOARGS, 0},
  {"fileno", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_loop[] = {
  {"ptr", __pyx_getprop_6gevent_5libev_8corecext_4loop_ptr, 0, 0, 0},
  {"WatcherType", __pyx_getprop_6gevent_5libev_8corecext_4loop_WatcherType, 0, 0, 0},
  {"MAXPRI", __pyx_getprop_6gevent_5libev_8corecext_4loop_MAXPRI, 0, 0, 0},
  {"MINPRI", __pyx_getprop_6gevent_5libev_8corecext_4loop_MINPRI, 0, 0, 0},
  {"default", __pyx_getprop_6gevent_5libev_8corecext_4loop_default, 0, 0, 0},
  {"iteration", __pyx_getprop_6gevent_5libev_8corecext_4loop_iteration, 0, 0, 0},
  {"depth", __pyx_getprop_6gevent_5libev_8corecext_4loop_depth, 0, 0, 0},
  {"backend_int", __pyx_getprop_6gevent_5libev_8corecext_4loop_backend_int, 0, 0, 0},
  {"backend", __pyx_getprop_6gevent_5libev_8corecext_4loop_backend, 0, 0, 0},
  {"pendingcnt", __pyx_getprop_6gevent_5libev_8corecext_4loop_pendingcnt, 0, 0, 0},
  {"activecnt", __pyx_getprop_6gevent_5libev_8corecext_4loop_activecnt, 0, 0, 0},
  {"sig_pending", __pyx_getprop_6gevent_5libev_8corecext_4loop_sig_pending, 0, 0, 0},
  {"origflags", __pyx_getprop_6gevent_5libev_8corecext_4loop_origflags, 0, 0, 0},
  {"origflags_int", __pyx_getprop_6gevent_5libev_8corecext_4loop_origflags_int, 0, 0, 0},
  {"sigfd", __pyx_getprop_6gevent_5libev_8corecext_4loop_sigfd, 0, 0, 0},
  {"error_handler", __pyx_getprop_6gevent_5libev_8corecext_4loop_error_handler, __pyx_setprop_6gevent_5libev_8corecext_4loop_error_handler, 0, 0},
  {"_callbacks", __pyx_getprop_6gevent_5libev_8corecext_4loop__callbacks, __pyx_setprop_6gevent_5libev_8corecext_4loop__callbacks, 0, 0},
  {"approx_timer_resolution", __pyx_getprop_6gevent_5libev_8corecext_4loop_approx_timer_resolution, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventLoop_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_loop},
  {Py_tp_repr, (void *)__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_loop},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_loop},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_loop},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_loop},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_4loop_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_loop},
  {0, 0},
};
static PyType_Spec PyGeventLoop_Type_spec = {
  "gevent.libev.corecext.loop",
  sizeof(struct PyGeventLoopObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventLoop_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventLoop_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""loop", /*tp_name*/
  sizeof(struct PyGeventLoopObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_loop, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_loop, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_loop, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_loop, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_loop, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_4loop_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_loop, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_watcher(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct PyGeventWatcherObject *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct PyGeventWatcherObject *)o);
  p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  p->_callback = Py_None; Py_INCREF(Py_None);
  p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(PyObject *o) {
  struct PyGeventWatcherObject *p = (struct PyGeventWatcherObject *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->loop);
  Py_CLEAR(p->_callback);
  Py_CLEAR(p->args);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_6gevent_5libev_8corecext_watcher(PyObject *o, visitproc v, void *a) {
  int e;
  struct PyGeventWatcherObject *p = (struct PyGeventWatcherObject *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->loop) {
    e = (*v)(((PyObject *)p->loop), a); if (e) return e;
  }
  if (p->_callback) {
    e = (*v)(p->_callback, a); if (e) return e;
  }
  if (p->args) {
    e = (*v)(p->args, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_5libev_8corecext_watcher(PyObject *o) {
  PyObject* tmp;
  struct PyGeventWatcherObject *p = (struct PyGeventWatcherObject *)o;
  tmp = ((PyObject*)p->loop);
  p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_callback);
  p->_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->args);
  p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_ref(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_7watcher_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_7watcher_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_priority(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_7watcher_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_active(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_6active_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_pending(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_7pending_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_loop(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_7watcher_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher_args(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_7watcher_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_3__set__(o, v);
  }
  else {
    return __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7watcher__flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_7watcher_6_flags_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_watcher[] = {
  {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_3start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop, METH_NOARGS, 0},
  {"feed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format, METH_NOARGS, 0},
  {"close", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_13close, METH_NOARGS, 0},
  {"__enter__", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_watcher[] = {
  {"ref", __pyx_getprop_6gevent_5libev_8corecext_7watcher_ref, __pyx_setprop_6gevent_5libev_8corecext_7watcher_ref, 0, 0},
  {"callback", __pyx_getprop_6gevent_5libev_8corecext_7watcher_callback, __pyx_setprop_6gevent_5libev_8corecext_7watcher_callback, 0, 0},
  {"priority", __pyx_getprop_6gevent_5libev_8corecext_7watcher_priority, __pyx_setprop_6gevent_5libev_8corecext_7watcher_priority, 0, 0},
  {"active", __pyx_getprop_6gevent_5libev_8corecext_7watcher_active, 0, 0, 0},
  {"pending", __pyx_getprop_6gevent_5libev_8corecext_7watcher_pending, 0, 0, 0},
  {"loop", __pyx_getprop_6gevent_5libev_8corecext_7watcher_loop, __pyx_setprop_6gevent_5libev_8corecext_7watcher_loop, 0, 0},
  {"args", __pyx_getprop_6gevent_5libev_8corecext_7watcher_args, __pyx_setprop_6gevent_5libev_8corecext_7watcher_args, 0, 0},
  {"_flags", __pyx_getprop_6gevent_5libev_8corecext_7watcher__flags, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventWatcher_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_repr, (void *)__pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("Abstract base class for all the watchers")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_watcher},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_watcher},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_watcher},
  {0, 0},
};
static PyType_Spec PyGeventWatcher_Type_spec = {
  "gevent.libev.corecext.watcher",
  sizeof(struct PyGeventWatcherObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventWatcher_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventWatcher_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""watcher", /*tp_name*/
  sizeof(struct PyGeventWatcherObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__, /*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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("Abstract base class for all the watchers"), /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_watcher, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_watcher, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_watcher, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_io(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_2io_5__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_io(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext_io) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6gevent_5libev_8corecext_2io_7__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_fd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_2io_fd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_events(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_2io_events(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_events_str(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_io[] = {
  {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_2io_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_9_format, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_io[] = {
  {"fd", __pyx_getprop_6gevent_5libev_8corecext_2io_fd, __pyx_setprop_6gevent_5libev_8corecext_2io_fd, 0, 0},
  {"events", __pyx_getprop_6gevent_5libev_8corecext_2io_events, __pyx_setprop_6gevent_5libev_8corecext_2io_events, 0, 0},
  {"events_str", __pyx_getprop_6gevent_5libev_8corecext_2io_events_str, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventIO_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_io},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_io},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_io},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_2io_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_io},
  {0, 0},
};
static PyType_Spec PyGeventIO_Type_spec = {
  "gevent.libev.corecext.io",
  sizeof(struct PyGeventIOObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventIO_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventIO_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""io", /*tp_name*/
  sizeof(struct PyGeventIOObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_io, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_io, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_io, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_2io_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_io, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_timer(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_5timer_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_at(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_timer[] = {
  {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"again", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_7again, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_timer[] = {
  {"at", __pyx_getprop_6gevent_5libev_8corecext_5timer_at, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventTimer_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_timer},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_timer},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_5timer_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_timer},
  {0, 0},
};
static PyType_Spec PyGeventTimer_Type_spec = {
  "gevent.libev.corecext.timer",
  sizeof(struct PyGeventTimerObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventTimer_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventTimer_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""timer", /*tp_name*/
  sizeof(struct PyGeventTimerObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_timer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_timer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_5timer_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_timer, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_signal(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_6signal_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_signal[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventSignal_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_signal},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_6signal_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_signal},
  {0, 0},
};
static PyType_Spec PyGeventSignal_Type_spec = {
  "gevent.libev.corecext.signal",
  sizeof(struct PyGeventSignalObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventSignal_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventSignal_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""signal", /*tp_name*/
  sizeof(struct PyGeventSignalObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_signal, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_6signal_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_signal, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_idle(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_4idle_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_idle[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventIdle_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_idle},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_idle},
  {0, 0},
};
static PyType_Spec PyGeventIdle_Type_spec = {
  "gevent.libev.corecext.idle",
  sizeof(struct PyGeventIdleObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventIdle_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventIdle_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""idle", /*tp_name*/
  sizeof(struct PyGeventIdleObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_idle, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_idle, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_prepare(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_7prepare_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_prepare[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventPrepare_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_prepare},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_prepare},
  {0, 0},
};
static PyType_Spec PyGeventPrepare_Type_spec = {
  "gevent.libev.corecext.prepare",
  sizeof(struct PyGeventPrepareObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventPrepare_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventPrepare_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""prepare", /*tp_name*/
  sizeof(struct PyGeventPrepareObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_prepare, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_prepare, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_check(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_5check_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_check[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventCheck_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_check},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_check},
  {0, 0},
};
static PyType_Spec PyGeventCheck_Type_spec = {
  "gevent.libev.corecext.check",
  sizeof(struct PyGeventCheckObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventCheck_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventCheck_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""check", /*tp_name*/
  sizeof(struct PyGeventCheckObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_check, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_check, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_fork(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_4fork_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_fork[] = {
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventFork_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_fork},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_fork},
  {0, 0},
};
static PyType_Spec PyGeventFork_Type_spec = {
  "gevent.libev.corecext.fork",
  sizeof(struct PyGeventForkObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventFork_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventFork_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""fork", /*tp_name*/
  sizeof(struct PyGeventForkObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_fork, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_fork, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_async_(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_6async__1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6async__pending(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_6async__7pending_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_async_[] = {
  {"send", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__3send, METH_NOARGS, 0},
  {"send_ignoring_arg", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_async_[] = {
  {"pending", __pyx_getprop_6gevent_5libev_8corecext_6async__pending, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventAsync_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_async_},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_async_},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_async_},
  {0, 0},
};
static PyType_Spec PyGeventAsync_Type_spec = {
  "gevent.libev.corecext.async_",
  sizeof(struct PyGeventAsyncObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventAsync_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventAsync_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""async_", /*tp_name*/
  sizeof(struct PyGeventAsyncObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_async_, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_async_, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_async_, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_child(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_5child_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_pid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_rpid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_5child_rpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_rstatus(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(o);
}

static int __pyx_setprop_6gevent_5libev_8corecext_5child_rstatus(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_child[] = {
  {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_5_format, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_child[] = {
  {"pid", __pyx_getprop_6gevent_5libev_8corecext_5child_pid, 0, 0, 0},
  {"rpid", __pyx_getprop_6gevent_5libev_8corecext_5child_rpid, __pyx_setprop_6gevent_5libev_8corecext_5child_rpid, 0, 0},
  {"rstatus", __pyx_getprop_6gevent_5libev_8corecext_5child_rstatus, __pyx_setprop_6gevent_5libev_8corecext_5child_rstatus, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventChild_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_watcher},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_child},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_child},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_5child_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_child},
  {0, 0},
};
static PyType_Spec PyGeventChild_Type_spec = {
  "gevent.libev.corecext.child",
  sizeof(struct PyGeventChildObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventChild_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventChild_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""child", /*tp_name*/
  sizeof(struct PyGeventChildObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_child, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_child, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_5child_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_child, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_stat(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PyGeventStatObject *p;
  PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PyGeventStatObject *)o);
  p->path = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_paths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6gevent_5libev_8corecext_4stat_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6gevent_5libev_8corecext_stat(PyObject *o) {
  struct PyGeventStatObject *p = (struct PyGeventStatObject *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6gevent_5libev_8corecext_stat) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->path);
  Py_CLEAR(p->_paths);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_attr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_prev(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_interval(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_path(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat__paths(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_stat[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_stat[] = {
  {"attr", __pyx_getprop_6gevent_5libev_8corecext_4stat_attr, 0, 0, 0},
  {"prev", __pyx_getprop_6gevent_5libev_8corecext_4stat_prev, 0, 0, 0},
  {"interval", __pyx_getprop_6gevent_5libev_8corecext_4stat_interval, 0, 0, 0},
  {"path", __pyx_getprop_6gevent_5libev_8corecext_4stat_path, 0, 0, 0},
  {"_paths", __pyx_getprop_6gevent_5libev_8corecext_4stat__paths, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot PyGeventStat_Type_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6gevent_5libev_8corecext_stat},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_5libev_8corecext_watcher},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_5libev_8corecext_watcher},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_5libev_8corecext_stat},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_5libev_8corecext_stat},
  {Py_tp_init, (void *)__pyx_pw_6gevent_5libev_8corecext_4stat_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_5libev_8corecext_stat},
  {0, 0},
};
static PyType_Spec PyGeventStat_Type_spec = {
  "gevent.libev.corecext.stat",
  sizeof(struct PyGeventStatObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  PyGeventStat_Type_slots,
};
#else

DL_EXPORT(PyTypeObject) PyGeventStat_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent.libev.corecext.""stat", /*tp_name*/
  sizeof(struct PyGeventStatObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_5libev_8corecext_stat, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6gevent_5libev_8corecext_7watcher_9__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*/
  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_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6gevent_5libev_8corecext_watcher, /*tp_traverse*/
  __pyx_tp_clear_6gevent_5libev_8corecext_watcher, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_5libev_8corecext_stat, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_5libev_8corecext_stat, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6gevent_5libev_8corecext_4stat_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_5libev_8corecext_stat, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  GEVENT_CORE_EVENTS = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK = Py_None; Py_INCREF(Py_None);
  _empty_tuple = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag = Py_None; Py_INCREF(Py_None);
  __pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6gevent_5libev_8corecext__EVENTSType_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType)) __PYX_ERR(0, 128, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6gevent_5libev_8corecext__EVENTSType_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType) < (0)) __PYX_ERR(0, 128, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType = &__pyx_type_6gevent_5libev_8corecext__EVENTSType;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType) < (0)) __PYX_ERR(0, 128, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventCallback_Type_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback)) __PYX_ERR(0, 285, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventCallback_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback) < (0)) __PYX_ERR(0, 285, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback = &PyGeventCallback_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback) < (0)) __PYX_ERR(0, 285, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_callback, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_callback) < (0)) __PYX_ERR(0, 285, __pyx_L1_error)
  __pyx_vtabptr_6gevent_5libev_8corecext_CallbackFIFO = &__pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO;
  __pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO.clear = (PyObject *(*)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *))__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear;
  __pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO.popleft = (struct PyGeventCallbackObject *(*)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *))__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft;
  __pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO.append = (PyObject *(*)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *, struct PyGeventCallbackObject *))__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append;
  __pyx_vtable_6gevent_5libev_8corecext_CallbackFIFO.has_callbacks = (int (*)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *))__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6gevent_5libev_8corecext_CallbackFIFO_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO)) __PYX_ERR(0, 342, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6gevent_5libev_8corecext_CallbackFIFO_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO) < (0)) __PYX_ERR(0, 342, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO = &__pyx_type_6gevent_5libev_8corecext_CallbackFIFO;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO) < (0)) __PYX_ERR(0, 342, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO, __pyx_vtabptr_6gevent_5libev_8corecext_CallbackFIFO) < (0)) __PYX_ERR(0, 342, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO) < (0)) __PYX_ERR(0, 342, __pyx_L1_error)
  __pyx_vtabptr_6gevent_5libev_8corecext_loop = &__pyx_vtable_6gevent_5libev_8corecext_loop;
  __pyx_vtable_6gevent_5libev_8corecext_loop._run_callbacks = (PyObject *(*)(struct PyGeventLoopObject *))__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks;
  __pyx_vtable_6gevent_5libev_8corecext_loop._stop_watchers = (PyObject *(*)(struct PyGeventLoopObject *, struct ev_loop *))__pyx_f_6gevent_5libev_8corecext_4loop__stop_watchers;
  __pyx_vtable_6gevent_5libev_8corecext_loop.handle_error = (PyObject *(*)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop_handle_error;
  __pyx_vtable_6gevent_5libev_8corecext_loop._default_handle_error = (PyObject *(*)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error;
  __pyx_vtable_6gevent_5libev_8corecext_loop.now = (ev_tstamp (*)(struct PyGeventLoopObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop_now;
  __pyx_vtable_6gevent_5libev_8corecext_loop.update_now = (void (*)(struct PyGeventLoopObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop_update_now;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventLoop_Type_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop)) __PYX_ERR(0, 405, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventLoop_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop) < (0)) __PYX_ERR(0, 405, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop = &PyGeventLoop_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop) < (0)) __PYX_ERR(0, 405, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_vtabptr_6gevent_5libev_8corecext_loop) < (0)) __PYX_ERR(0, 405, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop) < (0)) __PYX_ERR(0, 405, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_loop, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_loop) < (0)) __PYX_ERR(0, 405, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventWatcher_Type_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher)) __PYX_ERR(0, 904, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventWatcher_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher) < (0)) __PYX_ERR(0, 904, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher = &PyGeventWatcher_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher) < (0)) __PYX_ERR(0, 904, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_watcher, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_watcher) < (0)) __PYX_ERR(0, 904, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventIO_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io)) __PYX_ERR(0, 1070, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventIO_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io = &PyGeventIO_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_io->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_io, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_io) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventTimer_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer)) __PYX_ERR(0, 1128, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventTimer_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer = &PyGeventTimer_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_timer->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_timer, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_timer) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventSignal_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal)) __PYX_ERR(0, 1168, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventSignal_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal) < (0)) __PYX_ERR(0, 1168, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal = &PyGeventSignal_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_signal->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal) < (0)) __PYX_ERR(0, 1168, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_signal, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_signal) < (0)) __PYX_ERR(0, 1168, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventIdle_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle)) __PYX_ERR(0, 1191, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventIdle_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle) < (0)) __PYX_ERR(0, 1191, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle = &PyGeventIdle_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_idle->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle) < (0)) __PYX_ERR(0, 1191, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_idle, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_idle) < (0)) __PYX_ERR(0, 1191, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventPrepare_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare)) __PYX_ERR(0, 1204, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventPrepare_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare = &PyGeventPrepare_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_prepare->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_prepare, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_prepare) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventCheck_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check)) __PYX_ERR(0, 1217, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventCheck_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check) < (0)) __PYX_ERR(0, 1217, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check = &PyGeventCheck_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_check->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check) < (0)) __PYX_ERR(0, 1217, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_check, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_check) < (0)) __PYX_ERR(0, 1217, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventFork_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork)) __PYX_ERR(0, 1230, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventFork_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork) < (0)) __PYX_ERR(0, 1230, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork = &PyGeventFork_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_fork->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork) < (0)) __PYX_ERR(0, 1230, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_fork, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_fork) < (0)) __PYX_ERR(0, 1230, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventAsync_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_)) __PYX_ERR(0, 1242, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventAsync_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_) < (0)) __PYX_ERR(0, 1242, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_ = &PyGeventAsync_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_async_->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_) < (0)) __PYX_ERR(0, 1242, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_async, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_async_) < (0)) __PYX_ERR(0, 1242, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventChild_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child)) __PYX_ERR(0, 1268, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventChild_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child) < (0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child = &PyGeventChild_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_child->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child) < (0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_child, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_child) < (0)) __PYX_ERR(0, 1268, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &PyGeventStat_Type_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat)) __PYX_ERR(0, 1311, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&PyGeventStat_Type_spec, __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat) < (0)) __PYX_ERR(0, 1311, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat = &PyGeventStat_Type;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_stat->tp_base = __pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat) < (0)) __PYX_ERR(0, 1311, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat->tp_dictoffset && __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_stat, (PyObject *) __pyx_mstate->__pyx_ptype_6gevent_5libev_8corecext_stat) < (0)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(4, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_corecext(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_corecext},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "corecext",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_corecext(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_corecext(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#include "src/gevent/_generated_include/ModuleCreationPEP489_impl_e8e48a7033664eca332c0112edbc6a62057c1d998b2c8eee547bdd9088e6ab4c.h"

static CYTHON_SMALL_CODE int __pyx_pymod_exec_corecext(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyObject *(*__pyx_t_18)(PyObject *);
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'corecext' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "corecext" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_corecext", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_gevent__libev__corecext) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "gevent.libev.corecext")) {
      if (unlikely((PyDict_SetItemString(modules, "gevent.libev.corecext", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_traceback, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_traceback, __pyx_t_2) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_signal, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_signalmodule, __pyx_t_2) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_getswitchinterval};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_getswitchinterval};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HubDestroyed};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent_exceptions, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_HubDestroyed};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyList_Pack(7, __pyx_mstate_global->__pyx_n_u_get_version, __pyx_mstate_global->__pyx_n_u_get_header_version, __pyx_mstate_global->__pyx_n_u_supported_backends, __pyx_mstate_global->__pyx_n_u_recommended_backends, __pyx_mstate_global->__pyx_n_u_embeddable_backends, __pyx_mstate_global->__pyx_n_u_time, __pyx_mstate_global->__pyx_n_u_loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_UNDEF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UNDEF, __pyx_t_2) < (0)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_NONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NONE, __pyx_t_2) < (0)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_READ); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_READ, __pyx_t_2) < (0)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_WRITE, __pyx_t_2) < (0)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_TIMER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TIMER, __pyx_t_2) < (0)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PERIODIC, __pyx_t_2) < (0)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SIGNAL, __pyx_t_2) < (0)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_CHILD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CHILD, __pyx_t_2) < (0)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_STAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_STAT, __pyx_t_2) < (0)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_IDLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IDLE, __pyx_t_2) < (0)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_PREPARE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PREPARE, __pyx_t_2) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CHECK, __pyx_t_2) < (0)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_EMBED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EMBED, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_FORK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FORK, __pyx_t_2) < (0)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CLEANUP, __pyx_t_2) < (0)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_ASYNC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ASYNC, __pyx_t_2) < (0)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CUSTOM, __pyx_t_2) < (0)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ERROR, __pyx_t_2) < (0)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int((EV_READ | EV_WRITE)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_READWRITE, __pyx_t_2) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_MINPRI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MINPRI, __pyx_t_2) < (0)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MAXPRI, __pyx_t_2) < (0)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_SELECT, __pyx_t_2) < (0)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_POLL, __pyx_t_2) < (0)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_EPOLL, __pyx_t_2) < (0)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_KQUEUE, __pyx_t_2) < (0)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_DEVPOLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_DEVPOLL, __pyx_t_2) < (0)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_PORT, __pyx_t_2) < (0)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_LINUXAIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_LINUXAIO, __pyx_t_2) < (0)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_IOURING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BACKEND_IOURING, __pyx_t_2) < (0)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FORKCHECK, __pyx_t_2) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NOINOTIFY, __pyx_t_2) < (0)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SIGNALFD, __pyx_t_2) < (0)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NOSIGMASK, __pyx_t_2) < (0)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext__EVENTSType, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(GEVENT_CORE_EVENTS);
  __Pyx_DECREF_SET(GEVENT_CORE_EVENTS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EVENTS, GEVENT_CORE_EVENTS) < (0)) __PYX_ERR(0, 136, __pyx_L1_error)

  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_1get_version, 0, __pyx_mstate_global->__pyx_n_u_get_version, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_version, __pyx_t_2) < (0)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_3get_header_version, 0, __pyx_mstate_global->__pyx_n_u_get_header_version, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_header_version, __pyx_t_2) < (0)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_kqueue); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_IOURING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_linux_iouring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_LINUXAIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_linux_aio); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_epoll); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_poll); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_select); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_NOENV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_noenv); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_forkcheck); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_noinotify); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_15 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_signalfd); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyLong_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = PyTuple_Pack(2, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_nosigmask); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_t_2 = __Pyx_PyList_Pack(12, __pyx_t_4, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_16) < (0)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  { /* enter inner scope */
    __pyx_t_16 = PyDict_New(); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 167, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_16);

    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_15 = __pyx_t_2; __Pyx_INCREF(__pyx_t_15);
      __pyx_t_3 = 0;
      __pyx_t_17 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 170, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_17 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 170, __pyx_L4_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_17)) {
        if (likely(PyList_CheckExact(__pyx_t_15))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_15);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 170, __pyx_L4_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_15, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_15);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 170, __pyx_L4_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_3));
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_15, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L4_error)
      } else {
        __pyx_t_2 = __pyx_t_17(__pyx_t_15);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 170, __pyx_L4_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_2);
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 169, __pyx_L4_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_14);
          __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_13);
        } else {
          __pyx_t_14 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 169, __pyx_L4_error)
          __Pyx_XGOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 169, __pyx_L4_error)
          __Pyx_XGOTREF(__pyx_t_13);
        }
        #else
        __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 169, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 169, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_13);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 169, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_18 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12);
        index = 0; __pyx_t_14 = __pyx_t_18(__pyx_t_12); if (unlikely(!__pyx_t_14)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_14);
        index = 1; __pyx_t_13 = __pyx_t_18(__pyx_t_12); if (unlikely(!__pyx_t_13)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_13);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 169, __pyx_L4_error)
        __pyx_t_18 = NULL;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L8_unpacking_done;
        __pyx_L7_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_18 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 169, __pyx_L4_error)
        __pyx_L8_unpacking_done:;
      }

      __Pyx_XGOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag);
      __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      __pyx_t_14 = 0;
      __Pyx_XGOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string);
      __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      __pyx_t_13 = 0;

      if (unlikely(PyDict_SetItem(__pyx_t_16, (PyObject*)__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string, (PyObject*)__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag))) __PYX_ERR(0, 168, __pyx_L4_error)

    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag, Py_None);
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string, Py_None);
    goto __pyx_L10_exit_scope;
    __pyx_L4_error:;
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_flag, Py_None);
    __Pyx_GOTREF(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string);
    __Pyx_DECREF_SET(__pyx_7genexpr__pyx_v_6gevent_5libev_8corecext_string, Py_None);
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_flags_str2int, __pyx_t_16) < (0)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_READ); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_15 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_READ); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_WRITE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_2 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV__IOFDSET); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_13 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_IOFDSET); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_14 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_PERIODIC); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_12 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_SIGNAL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_CHILD); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_11 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_CHILD); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_STAT); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_10 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_STAT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_IDLE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_9 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_IDLE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_PREPARE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_8 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_PREPARE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_CHECK); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_7 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_CHECK); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_EMBED); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_6 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_EMBED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_FORK); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_FORK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_19 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_CLEANUP); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_ASYNC); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_20 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_ASYNC); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_21 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_CUSTOM); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyLong_From_int(EV_ERROR); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_22 = PyTuple_Pack(2, __pyx_t_16, __pyx_mstate_global->__pyx_n_u_ERROR); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  __pyx_t_16 = __Pyx_PyList_Pack(16, __pyx_t_15, __pyx_t_2, __pyx_t_13, __pyx_t_14, __pyx_t_12, __pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_6, __pyx_t_4, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_22 = PyList_AsTuple(((PyObject*)__pyx_t_16)); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_events, __pyx_t_22) < (0)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5_flags_to_list, 0, __pyx_mstate_global->__pyx_n_u_flags_to_list, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_flags_to_list, __pyx_t_22) < (0)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7_flags_to_int, 0, __pyx_mstate_global->__pyx_n_u_flags_to_int, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_flags_to_int, __pyx_t_22) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_9_check_flags, 0, __pyx_mstate_global->__pyx_n_u_check_flags, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_check_flags, __pyx_t_22) < (0)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_11_events_to_str, 0, __pyx_mstate_global->__pyx_n_u_events_to_str, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_events_to_str, __pyx_t_22) < (0)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_13supported_backends, 0, __pyx_mstate_global->__pyx_n_u_supported_backends, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_supported_backends, __pyx_t_22) < (0)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_15recommended_backends, 0, __pyx_mstate_global->__pyx_n_u_recommended_backends, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_recommended_backends, __pyx_t_22) < (0)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends, 0, __pyx_mstate_global->__pyx_n_u_embeddable_backends, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_embeddable_backends, __pyx_t_22) < (0)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_19time, 0, __pyx_mstate_global->__pyx_n_u_time, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_22) < (0)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_8callback_3stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_callback_stop, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_22) < (0)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __Pyx_GetNameInClass(__pyx_t_22, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_22) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_8callback_9_format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_callback__format, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_22) < (0)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_5destroy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_destroy, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_destroy, __pyx_t_22) < (0)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_9_handle_syserr, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop__handle_syserr, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_handle_syserr, __pyx_t_22) < (0)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_11handle_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_handle_error, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_handle_error, __pyx_t_22) < (0)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_13_default_handle_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop__default_handle_error, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_default_handle_error, __pyx_t_22) < (0)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_15run, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_run, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[0]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_run, __pyx_t_22) < (0)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_17reinit, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_reinit, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_reinit, __pyx_t_22) < (0)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_19ref, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_ref, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_ref, __pyx_t_22) < (0)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_21unref, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_unref, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_unref, __pyx_t_22) < (0)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_mstate_global->__pyx_k__10 = EVBREAK_ONE;
  __pyx_t_22 = __Pyx_PyLong_From_int(EVBREAK_ONE); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_16 = PyTuple_Pack(1, __pyx_t_22); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_23break_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_break, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_t_16);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_break, __pyx_t_22) < (0)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_25verify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_verify, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_verify, __pyx_t_22) < (0)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_27now, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_now, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_now, __pyx_t_22) < (0)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_29update_now, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_update_now, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_update_now, __pyx_t_22) < (0)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __Pyx_GetNameInClass(__pyx_t_22, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_update_now); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_update, __pyx_t_22) < (0)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_33io, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_io, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_io, __pyx_t_22) < (0)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_35closing_fd, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_closing_fd, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_closing_fd, __pyx_t_22) < (0)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_37timer, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_timer, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_timer, __pyx_t_22) < (0)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_39signal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_signal, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_signal, __pyx_t_22) < (0)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_41idle, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_idle, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_idle, __pyx_t_22) < (0)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_43prepare, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_prepare, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_prepare, __pyx_t_22) < (0)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_45check, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_check, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_check, __pyx_t_22) < (0)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_47fork, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_fork, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_fork, __pyx_t_22) < (0)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_49async_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_async, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_async, __pyx_t_22) < (0)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __Pyx_GetNameInClass(__pyx_t_22, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_async); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_async_2, __pyx_t_22) < (0)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_51child, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_child, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[3]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_child, __pyx_t_22) < (0)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_53install_sigchld, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_install_sigchld, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_install_sigchld, __pyx_t_22) < (0)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_55reset_sigchld, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_reset_sigchld, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_reset_sigchld, __pyx_t_22) < (0)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_57stat, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_stat, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_22, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_stat, __pyx_t_22) < (0)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_59run_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_run_callback, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_run_callback, __pyx_t_22) < (0)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_run_callback_threadsafe, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_run_callback_threadsafe, __pyx_t_22) < (0)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_63_format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop__format, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_22) < (0)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_65_format_details, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop__format_details, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_format_details, __pyx_t_22) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_67fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_loop_fileno, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_22) < (0)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_classImplements};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zope_interface, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
  }
  __pyx_t_22 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_22);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_classImplements};
    __pyx_t_3 = 0; {
      __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_22, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_16) < (0)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ILoop};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__interfaces, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  }
  __pyx_t_22 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_22);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ILoop};
    __pyx_t_3 = 0; {
      __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_22, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_16) < (0)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ICallback};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__interfaces, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
  }
  __pyx_t_22 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_22);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ICallback};
    __pyx_t_3 = 0; {
      __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_22, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_16) < (0)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_16 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_classImplements); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_ILoop); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_16, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_loop), __pyx_t_20};
    __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_21 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_classImplements); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_ICallback); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_21, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_callback), __pyx_t_16};
    __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_3start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher_start, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_22) < (0)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_5stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher_stop, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_22) < (0)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_7feed, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher_feed, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_feed, __pyx_t_22) < (0)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_11_format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher__format, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_22) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_13close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher_close, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_22) < (0)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_15__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher___enter, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_22) < (0)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_17__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_watcher___exit, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_22) < (0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_io_start), ((void *)ev_io_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1068, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_io_ss = __pyx_t_23;

  __pyx_t_22 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (PyDict_SetItem(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_pass_events, Py_False) < (0)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_2io_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_io_start, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_20, __pyx_t_22);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_io, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_20) < (0)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_2io_9_format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_io__format, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_io, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_20) < (0)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_timer_start), ((void *)ev_timer_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_timer_ss = __pyx_t_23;

  __pyx_t_20 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_update, Py_None) < (0)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __pyx_t_22 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5timer_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_timer_start, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_22);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_22, __pyx_t_20);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_timer, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_22) < (0)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  __pyx_t_22 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  if (PyDict_SetItem(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_update, Py_True) < (0)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5timer_7again, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_timer_again, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_20, __pyx_t_22);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_timer, __pyx_mstate_global->__pyx_n_u_again, __pyx_t_20) < (0)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_signal_start), ((void *)ev_signal_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_signal_ss = __pyx_t_23;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_idle_start), ((void *)ev_idle_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1189, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_idle_ss = __pyx_t_23;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_prepare_start), ((void *)ev_prepare_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_prepare_ss = __pyx_t_23;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_check_start), ((void *)ev_check_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_check_ss = __pyx_t_23;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_fork_start), ((void *)ev_fork_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1228, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_fork_ss = __pyx_t_23;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_async_start), ((void *)ev_async_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1240, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_async_ss = __pyx_t_23;

  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_6async__3send, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_async__send, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_async_, __pyx_mstate_global->__pyx_n_u_send, __pyx_t_20) < (0)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_6async__5send_ignoring_arg, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_async__send_ignoring_arg, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_async_, __pyx_mstate_global->__pyx_n_u_send_ignoring_arg, __pyx_t_20) < (0)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_async_2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_async_)) < (0)) __PYX_ERR(0, 1264, __pyx_L1_error)

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_child_start), ((void *)ev_child_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_child_ss = __pyx_t_23;

  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5child_5_format, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_child__format, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_5libev_8corecext_child, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_20) < (0)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_23 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_stat_start), ((void *)ev_stat_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1309, __pyx_L1_error)
  __pyx_v_6gevent_5libev_8corecext_stat_ss = __pyx_t_23;

  __Pyx_INCREF(Py_None);
  __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
  __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, Py_None);
  __Pyx_GIVEREF(Py_None);

  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_21set_syserr_cb, 0, __pyx_mstate_global->__pyx_n_u_set_syserr_cb, NULL, __pyx_mstate_global->__pyx_n_u_gevent_libev_corecext, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_20);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_syserr_cb, __pyx_t_20) < (0)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  ev_set_allocator(((void *)gevent_realloc));

  __pyx_t_20 = __Pyx_PyBool_FromLong((!(!(LIBEV_EMBED != 0)))); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LIBEV_EMBED, __pyx_t_20) < (0)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_FLOOR); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_FLOOR, __pyx_t_20) < (0)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_CLOCK_SYSCALL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_CLOCK_SYSCALL, __pyx_t_20) < (0)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_REALTIME); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_REALTIME, __pyx_t_20) < (0)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_MONOTONIC); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_MONOTONIC, __pyx_t_20) < (0)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_NANOSLEEP); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_NANOSLEEP, __pyx_t_20) < (0)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_INOTIFY); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_INOTIFY, __pyx_t_20) < (0)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_SIGNALFD); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_SIGNALFD, __pyx_t_20) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_EVENTFD); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_EVENTFD, __pyx_t_20) < (0)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __pyx_t_20 = __Pyx_PyLong_From_int(EV_USE_4HEAP); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EV_USE_4HEAP, __pyx_t_20) < (0)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_print_exception};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_traceback, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
  }
  __pyx_t_20 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_20);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_print_exception};
    __pyx_t_3 = 0; {
      __pyx_t_22 = __Pyx_ImportFrom(__pyx_t_20, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_22) < (0)) __PYX_ERR(0, 1394, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
  __Pyx_XGOTREF(_empty_tuple);
  __Pyx_DECREF_SET(_empty_tuple, __pyx_mstate_global->__pyx_empty_tuple);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_empty_tuple);

  __pyx_t_20 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_20) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init gevent.libev.corecext", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init gevent.libev.corecext");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(0, 318, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_False, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_float_0_0, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 8; } index[] = {{1},{3},{31},{40},{43},{23},{31},{25},{31},{179},{18},{23},{1},{1},{1},{2},{1},{5},{1},{1},{0},{2},{7},{8},{6},{6},{10},{11},{53},{8},{7},{6},{16},{12},{8},{8},{4},{27},{8},{2},{18},{6},{22},{25},{68},{64},{9},{5},{6},{10},{27},{8},{11},{5},{5},{35},{9},{29},{8},{6},{5},{15},{13},{15},{14},{16},{12},{12},{14},{5},{5},{7},{6},{5},{5},{6},{12},{20},{14},{12},{14},{16},{16},{15},{15},{4},{9},{12},{9},{4},{5},{8},{11},{6},{6},{9},{4},{9},{4},{8},{7},{20},{4},{9},{6},{8},{4},{5},{5},{5},{6},{9},{5},{5},{7},{4},{6},{5},{11},{24},{18},{7},{6},{8},{16},{13},{2},{5},{12},{5},{13},{9},{15},{17},{18},{5},{10},{7},{1},{6},{7},{21},{7},{9},{8},{19},{6},{9},{5},{5},{7},{6},{10},{14},{8},{8},{2},{4},{6},{6},{5},{14},{13},{14},{4},{9},{7},{15},{4},{8},{18},{11},{21},{17},{6},{18},{17},{21},{12},{14},{3},{2},{4},{8},{8},{15},{8},{2},{10},{8},{13},{5},{4},{6},{9},{13},{4},{26},{12},{20},{19},{11},{11},{10},{10},{15},{12},{11},{9},{17},{9},{20},{7},{8},{12},{8},{11},{18},{8},{17},{28},{11},{9},{10},{10},{15},{11},{5},{8},{7},{10},{3},{8},{5},{9},{9},{3},{6},{4},{13},{2},{11},{4},{7},{13},{14},{10},{3},{8},{4},{3},{4},{7},{9},{15},{8},{3},{14},{12},{20},{3},{6},{6},{13},{7},{7},{3},{12},{23},{6},{4},{4},{17},{12},{13},{10},{5},{6},{8},{12},{9},{6},{5},{5},{4},{4},{8},{5},{18},{3},{1},{2},{8},{4},{5},{11},{11},{5},{9},{4},{5},{6},{10},{1},{5},{6},{6},{12},{7},{17},{16},{15},{13},{12},{13},{12},{5},{1},{14},{26},{13},{23},{75},{47},{18},{14},{14},{14},{31},{24},{7},{18},{45},{55},{18},{20},{18},{18},{28},{60},{56},{62},{35},{18},{61},{7},{89},{9},{12},{16},{35},{16},{81},{13},{7},{36},{83},{11},{16},{22},{26},{53},{9},{20},{42},{89},{70},{20},{137},{97},{20},{20},{59}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2875 bytes) */
const char* const cstring = "(\265/\375`\025\024\215Y\000Zr\020\030G\360\220\272\001\314\300v\304V\301\324\211'\201|\246h\024\260&\314M\013Q\262\371\363\266\242\265\225\330F\211\336\034=\345\341\324\002\327m\234\360$\347Q&\325T/\362/9\240URn\310\366\037\217\321\365\247\354\\\016\312\001S\001f\001n\001\274\354\267sr\223\370E\346{\354\027\217\230\014\205!0\217\241\021\304\262Mv\216A\022\217\233fCH\327\014\260P\005y\006C\034\313@\246\364\222\225\262s\212\253\324\272\225\371\014\277\256*\212b\016\311T\325\312\343b\270\017&\367\367i}\255\320\326\267\205u\006\315\252\235\227\256\n\206!0\014\253\205\020\357\032\303p\255\020\303\332V\260\026\2461\317\340\270\267X\273X\336\020\203:_\330\325\373+\301E\204\372\255!\336\"\257\266 x+\210\021\"F|>\037\0211*\006\014$*?\3210\025\004\317\234\357\223\201\017\346\342%a2\2035\245\245\263\325;\367\233R5\346w\254\273c]\313-\253aW?\034\217\262^u\356b.Y\034s~\305\217\305]`\362\326\225\017+\031N\334\251j2W\231\210\373%1+\213\030\254<\313t\231\250\366+\323+\356\333\2439\241\331PA\220;\254\270\004\321\272b\010j<\363\201Y\2740\335\265\364\366*\271+\006,\262\256(\336\357\303#\r\307c\033\324\031E\325\273\202\270\223{\034\313\312A1\313\300r\377n\325\267\206\273\312z&w&\307\3321'\261\314\327o\254b\362\262\352\255\375+\311\316\365\376j\337Z_\021\250\262\341\023;\357\014\2122_\347=\353\234\301\034\3332\237\021\363\320\366\034\343\\\306\365\316\234\3040k\313\220cp\246\363,v\235U@\214C\3333\315\016?\032\274\273\265vkQ\334#iA\020[\320Zr\223$\266X\004\365\225\301\340\3760\010v\275?0\304|\213\370\273d\267.\334s\307-\027\026GWg-\377X_\277.r\207\366cg.&Y\034\353\334\313\2753\271-\2501\377\330O\313\370\265V\347\333\272$\356\341\355\372#q#\017&\265\332V*n\325\245P\214B\234\362l\377\362\210Fv\262\226Km'.u\022u#S\227\342N\236\213j{1y\234g\362L\236\327\275t\251S\212\355\305DWZq\252\021\251\324q\245Q'\352F\254\262\305%e\"\215H\245\315;\321\251\270\227nU\332\270\024\307\225T&o\363D\235g2\275\250 u+\223\327\231J\244\021\251T\332D*\025*\353\"2\225D\247\215kY\261\234\n\306\306p)S*\305\2158\023/""\334\213i\245\202\021\235`\274\215+\211F\245\256E\344\"\342ZD+\021W\342T\253\224\251\333R\300x]\211\203\341`P.'\274.\005c\352\270R\311t\212\341Fv\344q.\242\315\204\310S\241\332B\343\270;\2574\262\361\323i\360\247A\203\206\217\344\241\000\010\334\000\231&f\010\272:\267\023\305\037\260\275L\022\320\t\237\362284\224\024\205\243vO\n\247\207\337!tj(\232\010-%Myy\374\252S{\371\353c\246\213\311I\372\240\377\3017\330\374\221\007\371\006&\347\205\232\026\317\361(\246\307$_4>\266S\302yA$\025\331\320>\240\036\320\016(\224%B:\342G\314n\r/\224v\350\312_\341a\233\317\302\034`\202xl\264\022]AK\316\224\022\323\363B\301\023u\266\276\202\277\362\233w\320\251yN\356s\376\313G\360\324@\263\003\0345\224\010GKi\346\341G \224\003'5\351\3465G:\265\315\004\231\t8j&_\002'\005\321BLH'\034H\017pj\233\232\327yrV\370\036|\214\271\231\345\354\203\243\266\251\021\201\326\201n\340\244\037<\356\0274*\034t\216}8\014\177:\307\335ZV\037s\317\342\350*5\310Y\237\2656\354\037\0261'A\354rm\361\226\257\016\263}$\307=\366+\216`\036\273\3760fY\231\316\371\035\371ner\343O\357\236\357\326}\353\2745L\343\215]W[\333\342b\tn\334\272\234c\235\257+\026f\213\373\005\307R\227\330\225{\017/\227\351V\227d\307\234\274#&\307\330\326\237r\347\235\257\245)u\026q\211\313\327\014\227\341\031ny\266\235\014/\032\211\005\251\215\016\331\006&vj\360%\237\213pi(\332\000\232\nUA9\274\320\213\"8Y~\327\300 U\241\205`\220\"(;Bj6\264<!|\216\337|\274L\021\236ss~|\t\310\310'\375\210\347L\224\331\r\340\200l\274\230\365\n \335\274\376\207_pAf\210\331\301\3143\0023\016N\rs\276\326\014AM\001N\255#R\340\261\231\022<\246\007\306ld\326\301\261\301\342\371\233\3771C\274\000\357\242\202?\271\177\206I\302I7\236\303\004\021\361\324\020t\034x\006\234\324\000\211\206E\273\023\003'\rM\224\tC\355?\341\244\035\316\376S6\236\205\363Y>\204\307\247\230\036T\374\007\024&\010\220\217ZG]\371\007&\311\031\303\257x\023_\222\206\\\217\362\017@\270\217\360O\276\347\233xj\233\0173\304\003\300\300\r\324\337\276\207\227\201(|\t\n\316\325?\371H_\277\300\375\261\007""\346j\326\3510\271\032\024\255\205\022@e\377~\024\220\024\304\303\306\353,p\242|\006~\343\027\3200\241\222\222\370\r<ll>I\307,\340\371\035\374\001S\200\311r\216>\205\355\304\320\231\220 \355\327S\360%\034\t\314\016\362\220\200\324P\346\004\223\317><j(T\004\335\240\033F\322\327l\305\306V\323\302\2466&\215\201I\273\032\022j\004\250\301B#\204\306\002\026g\347\243\370\217\302\267\314\021\017\356E\256\031\207\016:\342\234$\237;1I/\263NG\202\222\250b\223\026\205\212\241\032\221\221\244 Ic2\030\010\036\r\003M\030\365\0012\352\242&9\032\031\005\005))dc;\225\201\033\201\271\334\213==\303n\354(\354\356\320c0\234\235\333\t\215.\r\255g\337V\002c\302\021\213\200\034|Oh\r\220\003\215/\247j&\261t\367\270\360\203\273Vh\354\263;\026\211\225\004\365@\207V<iQ\254/\250_-T\3649-p\235\230\213i>b\n'>\006:\271\2014\377\360\214\224A;\347\376C$\350\365\032\356\"\340\366\010\nz(81\335L\273(\276\376\374\020\342\314\225\304h\200*+}\323Il\353DU\022\004\241w\000\362\014@oaY\356`\024\276_\200\000\274\324\026\364tc\014\n*\001d\026\031Cr\253\375d\361\354@,\267\320\367\231\373jF\233D\237\2614T.\"\355U=W\300x\345\003X\352\2214\362\367\214t\226I\245A\315?\326\345\350\353\356\236\301(OF\245w\305*\274\010\005k80\371_\2338\255@i@\340$L\206S}>\247\372\212\2305\231\301\365\255\220\311\026\367#l\270\204\200\021\344\332]P+\334J\261\276\326R\355\200+W\370~=\211\340\350A\032~\366}eZf\246y\304?\252\026\273\210\200\252\260\231\220\345\203\022\346z\031\030\325|\234qj5Bc\201-\352s\032`0\325Iq^\360A\017,n\377\237\357LM\013at\274\337\253\3601\303\020b \225\332\357C\215\323\2251\333\227\300\016\232\345\257Z\361\244\205\217\320N\363\255\344<\025\242\341\305v\252hD\306\326\005+0\340\"U\277m\215\221g@cU\016\014\023B@\300\307\327w\001\232\376\373A\350\315P\364\212F\314\203iw\357~\305\307\367\032\344(h4\224l\316z\005\0018\000\235\253x\232,\251\204S\251\220tC\304\252\343t\371\266\\R\367\017\002\263\324{\2208\\ \272\346W\024\366\363\314\023\321\232\204\271\321\025\324\207\330\246I\260\343tD\375\202\013+\005\2652\260\230\244""\030\271\022\212}P_ |\303\253\317v\345J\212\022\215\001\306\256\240\327\361\004\035\233}\2538\203-\n\033}?a\352\250\311{\016\262\367\325\235\305\270\204\"n4\223:\214\017\240\264\014\332\271\004\3608(\334\355\300\316\201\200\244I\032G\275\030w}\032\304\3046\245\326\277\251\031K\np\031\206X\232\321\342\345\2270\221\211\252\3360U, Z9A-\376}H3;Mu\222\241i\345\353\023\200\231#\255\016\004\362)\351I\3614\033\347W!\337\251\2423\314L%F\325{\240@\376;\372\327N\372d\020\225\340\260&\342\203C\264\032\004\256_pf\225\316;\003*?\241\013\030\305\222@\354\343\273q\222\324\200\342\211\266uRT\212\204\354dx\201\377\316\223\362@6M\014@\230T\312\337>\306\220s0B\ty\303R/n\336\251c\247$A!\237^<j`\274S\266\236\006^\371\317\236\227\306Q\032T1+\257\216n\315\032*(*\330\250\307q\233\322\206]/^\367\230\335\n>\360\360\237'\241\017f\247M\205+\343uo\354 \31243\234\237\214\372Z\010\222\222\243\261\375k\261_\252\230;-5\240\245DT_\2135\214\214m\356j\355\021g\225\375\200\315\377\264>y\030\355\022AUi2O\233\257\201TA\333\340h\320\242\241\241\030+B\235P]\371\322Z\256`\253\345$\210rI3\316\037\341\222>\320!P\261\341u\274\351\271\347Z\200\372\351\216\014\340\024\207^\021\332R\021(\271\201AO\001\307V=\221@\271_\325\374\236\0202Q}W\006\\\317\304F]\\\366\340\036K1\0361:h#\375\032\033\254':\322\354\230\225\303\213\262\301\022\326\006\356(\362\200\341\203\205\341\032\344\314\350\234H\027\336\240\224\315\017\215\247\014\031\323\005\3056u\243$%L\201r\264\322W\220\361\t\303\260\252\276\276b\033\301\265\013\314\030\237!\237\222F\234\360X&^\330\000\342\300\206\r\337\005$\010\275O\000\272N\277\226\023y\\=D\177.\r\367\316\342J\005\213\330\257V\244\240\023\250\020G\305<\332\251xu\023\3506\205_1j\305\267{\201\306\3059\245\300\000\356\035\034\320\320w\371J\341zh\313\301\263j\372#\031Z8\372+\265\354\tu\032\207\307+^\207\230\211\366rb9$\244\317x\357b643\270\300\327\342\005\244\262\235k\267=\212\247\310\210\311G\353goV\017\324\251N9j\314\024\324\357\266/\304Z1Yo\323\325\271\357\260\346,\350\236\217\314[F\r\327\036L\334\327""\211\n\212\240\363\233\354\020\266\240\302\334\030D\306\240\020\275lz\236\372\255\220)*\363a\236\240\027\273\345\350\373N\002\343\246\226k\305\325\014F\006\205\006\220X\271\312\031.\033a\253\r\270\320]\220\324da\322&\2323m";
    PyObject *data = __Pyx_DecompressString(cstring, 2875, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2934 bytes) */
const char* const cstring = "BZh91AY&SY\312\250\266\350\000\001\226\177\377\377\377\377\377\377\367\377\337\377\357\377\370\377\377\377\375\300@@@@@@@@@@@@\000@\000`\013\0343\273\273\273\237mo\r(\032\351T4\321-\030AGn\260\017\001\251\350\2211\023)\344\3116\246i\246\247\204\232yOF)\350\3654\215\030\232\236\231\023 4\364\017P\236\241\247\246D\364\361D\332mSG\352\214\324\022\210\000 \020I\246\320\020\232\020i\345\006\206\203@h\000\000\000\000\000\001\220\000\032\230\005)\224z\203\t\241\241\3526\240\323 4\006\200\000\323\010\001\243&\232\032\r\000\000\014\200\004\246\210&\204F\220\302f\222y f\247\250\000\032h\000\364\200\000\000\032\000\320\000hzhjh@\311\204\300\t\223\000\000\230\201\200\000\000\023\002`\021\200\000\t\200\000\000\022\210I\223S\031(\332\237\244\364\210<\240a6\210\300\230\201\240\3100\214&F\201\241\243L\004\030\203@\n5\374>\356\377HL\216\016\237P\2117\003\003\302\234\230\341w\207w&\245\325%\376\261\326@\222C\t\0300\223\004\244\024.-\"\007\322?\346\353d\206\nP\253^\330!\204\231\220\206d\204\230fd\211\3171\013RW9\1772\374\245\t\214\220\314\201Y\3133\027\210\001Hf\313\000\032\321v\032\355\014e\330\256-t\331 \252\242\n\245\251\233\234E\"\326\251uNY\300HNw\275,\243\320x`\203\306\264\032\326\014V8\265\222\037\372]u\212\t\000c\014\206\262\2262q{\313i$\301Q\352\203:Yk\016AC\211\257!\253-\014;4\021\n\232\305z\300;\234\302;^\",\014X%?\033l3\326\314)\205\007$\324n\037\212\025.\351\233\373\250 \373_\030\260\004\275\024ZGR.\337\277'\227\376os\257\310[\316\350Ak\024\305$\275\016\013Yc\245\226\353\346\316\265tz4\226,7G\027N\272\332C\343\031\266Ok\332\254\310Pa\023ic\333\347\366x\227\307\341:\373\221\303P\214\314\331\001\261\203\332\233\021M\242\215\276\3107\013\202&-\204\332\240\325jj\215\246\212dWw\025\\\021s2\346\346\207\3443'*0d\210\251\027\025\t.c\326\326\200N\362\266&/e)a\351\227tq\026\314\022j\272z\317%\312w\004\237$\242$\354UB\022\033\230)\314z\273\206\256\315\267\355\036nL\346\266\366\237\201\261w' \003\201\022\357\323\245.X\240D\323\262K\223\356q=\372V\331\346\244\342\217\232\366W\221&""\347B\330\234G\231t\363\270nh\320{A\330\220\017_\306z*\325\222\255b\27728\322\362~q\263]\210\373\351\215\026\346k\262\014\355G\272t\343\001O\356\313w\366\000p\016K\303\324T\221b\367?\336\227\347\332]\202fx!\373-\317E\212*Q\371J\224pj4\335'\022*\230q\335\000\217|q\310\300\261\343\213\376\255\331j\346\000\377\264\000`\275j#rR\215q>c$\307y\373\3424\r\306p\263\000\340\310\246\026\010ZK\272\224>[\3122\260\265$d\255\261\262\002=\364\226u)\215\206\n\220\341\0172q\302\023\301\317\365z\237x\240>\335\377\027\217\211\304\342\220\303\222\351\303<9\027\260X\257\027\240\337GT\244P\304\274\255\327\350fl\207\1776\233\223]\271\355\324\367\212o\340\246|\274_.\033\320\025r\233#T\346nP\331\370\031\3174l\273XR\251\341\245\207II\300\2023\227\\@\214U\\\331\264r\363\271\034\330\355\362|\347f\247\177\2555b\367\237\277\r\210\305\t`g}2wr\346dV\202\353D\314\252\324\200\243=Z[L\"\250B\2723\337\231\317\022\222a\225\312\034\023U\016\3278N\352\255\233T\t;\242{\360|\242\330\353\331\2077AJ\026\275\344\347\225\354\336f\233\370\317\325\306t\315\003/h\356\252\314Du\203m\335qq\023\022\031\303EW\2443\303\341\027-\326\254OQ\210\303)\005H\215SB#\000j\233\220\334\253\001\377t\025\3336\365Q\262C\250\344\021\007X\251C\246\343L\347\353\213\005\244\250:\207\225J2!\215o\361\0309\n\004q\213\307\224UkI\276mV\250@{\210\271\222\250\266\264\212Fw\233\2265\274\220v\366Z\303\003A\345J1\343\346+\322\346\020\273\316^=\355\352\272G\nUjz\345]\350\201#\212\344\252\211\022u\254\367=\250\217\332\2547\361Y\374\252\215\305V@\370\234P\356Q\036}%\354X\202\247\370\320Q\"|\026\233\272\013\r[\006C\264\025S\206;n\226\224\303Z\241\260\005\r\353k\275\330SG6kQF\357Do\266\357v\240w\t\320\337#\234\344\360(\316\212\346\211z\247\r\350\344s\251\2760\216b\376CHU\022I`}\342|\234D*\253\305j,\236\206+\325\033@l\003\014\305\347\345\n\345`\017\355\246\367:Aj\005QQ\005P\242TZ\311\352\261\213\022\320\302}\025r\313\247\305.\022\31028\360\343l\254DF\261*\0172R\227\217F&\\]\310\262\214a\257\231(\2637\344\214\202\307\213== VL\306\250Uo;4\036\242\272J5""\254\260\321\302\221'\310\355\232.\274r\252\257\205\260cQ\314(\336\363\266x\355\271\231\322\310k\2549K\214]8X\344\016@a<%Aun\263#U\347\232\nVz\014y}I\221\362A\021\204Tq\006\026c.CH:u8\253\227&J\353\247$b+\346\031\341\023l\243XMD6\237\027#\023N`\030\246\252\0223\";\025\231;\006\025#\376\333\212ap\275\211$\2426$\364\327Y\231Z\224\304\366\nM\3658\250+\2062+%\205\247\232n\373o\350\210\236k+\262\251\226\215czU0\362\340\316\367\265g9\355\363(]\210\236\236-\262p\317\206]\204\032\334\233\244$\205M^\315#(\000\310>\265)\007v\247\200\211\005\206L\021\244\006\256Q\007\276L\027\n\353C\305y\222\025\020\311\227\252\n\246\342+~t\362#\204\243\022\026D\rP\n\352\034\221Pl\345H\202\213N<\214q\306\201\326k\344\262AU\022\250\271\235\210\213\330\034`\323\246BY\244\375,\0364\302\352L[\2121]\316t\263'\236kF\347\033\272\307I=\260t&\333\252\212X\232\323z\rf\023\334\330\\KN\371\342\253\201A\215\202\2502\227\"\344\3115\020\020\356\223\211\241\272$\212\247\020\034\206\346\21086UN\344`\247\025\315\022\356j@tuz:,\254\225y\267t\270\273\3707\205\230\210\223\034\305T\260\367\355\256\252\343\2573\307F\276\317w\026\357\244x\305\373\2378\312\275\232\005\345\236\212\273\304U`au\026z\322\340:1FxVar\322|:\373E\252\2605\360\262M5zN\212\004:\203\021\256\301[)p\232\252\255d\303!\254\341'\247\246\345\310\032B\032\347j\265qT\354\336\330\266\017\242%\n\351\336o\005\276\010\260\027\321\260\215\r\314\030\016c\006\261\002\272`\363a\374\006\241\244r(\344\205$\033`+\344\243\030\363\216+X\346\017\363X:\310`\371\022\000b)E\020\ty\335\215m\324\246*dQ0vl.5\036*\003\306H,AFO\335\273eC5\347\254\306\326\232\265:U\350d\210\006&]Cy\221\\ji\003)>\261\304\206\214\277\013\302M\306\3017\340\213\337\256\351\3038j\343\006\313\237\311\366\271y\376\202\372\361|\t\345k\005\035\243\266\234J$\363Jc\357\023\347Ru\245E!\310L\242K&\200\277\244\343\247w`\343&\022\316\362\207d\332\361\313e\250l\233\244\034mW\236\246\265\223\355\312\374\346\356[I\352\266\226\201 \321\206\202\231\221\310\274'\003QQ0;\246\034\206!\231\260\313+&\222v\236\032""\353AV\255\251\251\227H\310)\303\227\326N\215\267\321\307r\204\252\364H\204+t\034\351/fm\214bbn\353J\033\034&/\032\025\275\373c\276\223\tJ\222\276\023Z@\331\027\203W\031:\217\346\223wI\n)\027\270v%\242\250\266-\253\260{19\225\321\232\023\233\206,\035+\211$n|\334\303\314\216\327\214\332\317\223\205hw*\305\353\231%\223\210\002\260\216Lb\036{\362i!*\241\214\320\nZ\024\324\221\002\327\024d\250\256\261\314\242\251\234\031X\265\270]CWD\265\243\265\037\216$\223a\371d\216\024\025\326B\346\215\000\300\305\354\247l\325\225\224\010\013\354\302F(\245\365\272\261\014)W\236\255\3557\207I\300:\333\267\321\3650/\236J=z{\346\210\232\244C\234^i\261\214m\022\334\016EF\22352N\337\005P\303\010\213\314;\247\210\203\021\023<\271w\211\257f\0078K;\005\342l\375\354x@Qy]\210R\235\363\350b\275\314\353\026\342;\322\030\036NX\253+c0O\220\030d\272\002\261\3424\234\224\361\314\307\243\005F\206\254\264\023>\023\366\2151\332\007\t\006\\\377\246M\320\204\342\235\321*\304\224K\206c\376L\034\373}\007\034C\r\3666\330\231\217\224\363\356&\317\261\203F\"h\202\250\240\252\201\352S\202\333U\022\332\221_\024g\335t>)\232\323\361\273\021!\334\223\307k\367\260\332\302?iC\355:\221\267\343~\001\235\235\240:I\207A.\024\t\333\032\343;\354<$\177%\227\376\013A\203d\263D\003c\220\235\204\333Rl\0373C7\327?\315\304-\240\336e\320\022\027\017\267Ej\376\027G\020*F\2616\275\214%8\307\306\311?4B\313!\020hpx\260a\274Ymm\2726\234y\366\255\237\352\327\002\224c>\365\007\345\364\036\033K\245\014(\317\363\252X\346+\177\367\037\217w\227SH%\307\021]Tgv\320\337\206\035\355/\241F\372V t\3023\272\244Z\263\365\267\276Z\336;=\341\272\207\276J\010Z,Z\334FG\320\257\340J}\320\333\025\354\232\233\200\315{\232\270N\3477p\223\324\352?\261W\247J\276\177H\340\2223\352\n\230\023\245\215\315\262i\301\207\373\247\212\225\021Y\027V\215\332\02453\007Dd\035^\036\361\315\233o/\210]f\337\207\327\255G\2646\274Q|\376\212B\273\372\273&\276\024\307\033\375\261+:\226\244\252R\3728\267\261~yW!\235\315\241\3130k\315\313\333^sW\365O\250\217\000\216\317L\235<""\215\210\232\322\002\263pk\267\241T~]\007\256f\r5\253\2336\003\335\276\242\240\003%\3329 \226TXU\010p\313EB\r,\312\t\350\360\207&F\262\241Q\\)\222\2208\010\254\302\n\214A\210Q\t\030\350\320\350\212aI\224\007s\203\"\014HF\212\214\030\252@n\244\004\274\314$=\016\036\374\303\244\204\004\342\352\271\324WN\362km\377\027rE8P\220\312\250\266\350";
    PyObject *data = __Pyx_DecompressString(cstring, 2934, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2880 bytes) */
const char* const cstring = "x\332\215V\315W\333V\026\257\247N\003\r\004\234R\362\321\217\210$\204LO\342\004B>N\032\322ql\221\350`l0\206\264\323\205F\266\236\215\032[\262%\031p\247g&K/\265\324RK-\275d\231e\226^z\311\237\320?\241\277\373\236d\314\244=g8X\357\276\257\373\356\375\335{\177\357\245\037\254\350Y\3154-W\252Z\246\343\332\235\252+iRE\263\231t\250\271\325}fG\323\016s\245\226mX\266\341v%\253&i\246\244U]\343\340t\335\276\321\320\343\216#\221\006\276\257\323jY\266\313t\3112\2457\206\251[\207\216|\324bU\032\252j\215\206Vi\260\273|\351G\303\222eK\005\313\304t\035\323\212y\2405\014\035\306U\3372S\247\311ZC\253?\033M\340\333aR\r\343\321\222g\322\203\243\305\243\202\3452\311\335\327\\)\333u\367a\205\341H:k\030\025fk.kt%\270m\340\\\233\026\231\322\226\274uo\365\351*\034\324%\233\375\002\213\0348Q\25164\307a\016\271^\351\030\r\3270%\267\333bNZRjR\327\352H&\203\345\256%\265\260n|\203\273\317L\216\036\004i\211\203\251\271\206e\252\330n\230\365%I7l&\220\304\356u\255\341\260\364\347[\226\343\030\204\000\367\311y&\355\232\247@\216\274[t\244\037\356\336\225~{\236N\247_<\177\361L\212B\242\351\272j\222\327\232]w\326$x\376\340\210\203J;\327\236\307\222\363\217\352\3071\263L \242\035hF\024\001\223\333\255\263\232\326i\270R\303\262ZqG7\034Z\302L\376=P\243a\225\326\334A\237Z\325d\207w$v\300L\327Y\373\273T\203Z8P\323\327j\272\324\3548\256T\241,1\357\231\254\256\221\345\360\tQ\305\"\323Z\253W\353|c\272j\331,-\357\311\205\362\216\264\017\347\326\214F\003\353\033B\257\324\324\234\267\264/\036u\214\272\211\306\3544\021a\232X2\254\245\330I\200\201hW:\000gI\230\265D\371`C\355=\356\372! \031\3454M\tH\377JGM\377\377\366\033\216\300I\227\340\333\032%\337\301=\311\344>\257=8\262Z\224\213H\n\302[gHH\253KK\t\355\026B\215<\211\3335\004\275e\350k8\262\266f\263\026Ctc$[\226c\360DB\t\374\312l\213\243i;\310\267\216\263\346\330\325\373\002\320\373\374\370\373\004k\225\035\271\351V\367\0105`\265Z\224\300\210\320Zf\347\247B\366e&\273!\027rjN\336\333*\346\363qW\036\357(\305\335\222Rx\025w7\266w\345]9\356\345\225\302\356\217\031""\245\030\367\3077n\025K\345X\336\221\363r\266\234}-g7\262\257\225|.\233\2273\205\335\255\354\356N\271\270)o\276\224sr\251T,\211\004\220\367\324\335\035Y]}-g\266\"9\233/f7\324\235\237v\262\231|>\032\343\213\327sQo=_\244\375\\V\n\305\262\262\376S\324\333,\242[,(\331\250_\310\024\212;yY\216u\227\344L\276\254l\312QwGyU\310\344\327s\353\305\322\006\375\270\321\257;\225\\\0342%\033\325\226\222\313\313J\236*@)\256\347v\344r^y\t%\334\235\315\314\217[%eS)\340[(F\006\025\212\005\031g+\25763;\033\005\264[rI)\346\224\354VI\336\312\224dU\335\352\036\341\227\003U\251\005\204\255\304j\260.G\2777%\245,\013\333b\013w\312\2312\031^\332-\344\344u\276 \342\006\376\255\232\256V\003\345iu\3150U\025F\343\003\262\320\234\256YU\371W\210i\344\255>&\252(.\334\001f\235\226\363q\303\242\002\265:`D\346D\324TA=\274Uc\236\211\333\264\nnn\2422\342>%]\265\202B\251b1\377\022\241;\234\225\370'\336\241\252\234M\243Fi\266\032\254I\265\033\217\327\231k\270\254I]X\241\302%\327\326\252\214\037\336\260\034F\037\262\271\246\343\226s\001\236\256\263\252\245\263\230\262\342\026\374\2577\230\312l\333\262\2432\034U\243\252\352\004\275\312@+\272N\265\254F\336\002\027R\206)\350\266\321\264,P\221m\233\226*(f\374\253B]4\254\272\026\365\330Q\025\026\327,l<2p@M\257\341*\021$(\000\341\037!\322\206\025\303t\243\0364\234\3514\014\307\005do\351\027!*\000\214\032\235Q\201;\265\016\342\251\212/\260S\211Ua\371\001.\001\220\020\215\234\212d\210\323u\\B\034n\002F\014:\207\006\010\316 \177qC\tZ\211\330Z\345\2435\300\357D#p\220\265\210\335\342\001\316?\351\230\177\306A\217#\200\003\321\337\267\016\r\335\240>\317:\212\201a\022D\006\236*\224\263\240\372\352~C\217\3550,$c\344*$\254\261]\325p\324Q~R\2228oY\327y\333\356\260\016\336\000f\347H\325\014K\010\206\325\241\314&\326\245_\372O\323B\314\2103\306\345\030Z1v\306\r>$j\210\213\242:\270\310c\024I\310w!\215\222\225w\243\004\344\262H\n!\"\302\\\370\3108\002L\010gQ\022cb\267i\035\362\266\205\033\004\267>\227q\241D-\201\034\211x\270\234\331ow\314\270\035\325\367G\003\252\273O\027\242""\243\325\204fq#\013\321\215`s\215&\023\366v\314\370\344NK\307\213L\215\215C\016\03258~HE\325\344D\325d\216\243\325QjMK\3574\250u\352\252jjM\210\246\305\314\003\3232\360\362\3016\023 \326\351i\000m\370\327\014\3272\253\014\324U\027\305\202\234\261\034z\253E\305\330\322\334\375\350\212\215\032\2253d\334\2510 \316\242\036\350\023wp\253\241Q\2615\251\334[\026\177\235Ex\342\241\214\252D\336\217\004Q\000\361\003\272\005\016Pq\355\252\007.'\022\374\265;ZC\370\201\252\260\232(6\320\323\210a\200\220\010\213\270\361\317\304\305\026\016D\367<\3420\036\212\277\010\213\303\032\364\260e\215\232#\010\354,\261\253*\351\027\346\360\223x\036\253\325\n:QQ\340\360\232.\002+\276qODF\310x\203\221\200o\253a\270\274\036\311J\342}\">JYz|\267Fo\333\221\303\3048nEU]d?\276H\026\2360\374\223\346\267\226\020\271NN\366#\306\247g9\317)\221N\247Iu\300\037\323\342E-r+b9N\277\321\223-j\322#6\037\033\340\364<\352\213\272\217\273\374\236\211;D\340\261\314-<\355X\255C\303|\270r\364+\336|\351\021U\016\222\017\372\223\307\327?$\206\0233\275\216\227\361\366\374'\301\235p1l\277K\014\223\027\006\027n\016n~\177\274<H\336\010\026\206\023_x\313^f8=\357i\236\213u\013\203\344\303\376\262\030\316\371P1\325\313\213\3465\226M\314A\335\366p\342Boy\230\272\356\267\203d \207\251\341\364\327~\306/\007_\006\365p;\324\373\320J\352\332\221\252\224w\r\212\227\302k\375\325~\3478#vO\315z\347\274\237\203\204Xz\340\3773\030\263n\265\257\014\326\n\0374>\322{\341\317\017\256?\352o\217\365\036\367\307\347\236\364q\324\323\343D\244yn0\367]x#\314\214\251\246\351\231\367m\002\304\366R\336m?\351\277&\313\337\301\363\357\302\00541\016_\371\313~.H\234\216L|\345?\r\226\203\365p\201@\330\360\016}\315o\017\247\t\210\262\237\"\215\355\261\305K\203%\030r<w\274=\234\376\026+\335\340Ix+\324\206\023\267\007\267a\346q\222\374\237\351\375\307/\371c\333bmc\212\346\274W\377kI\024\243\345\261\221\313^\033\256d\342\021\nX\344\301\271\340M\230\t\313\375\324\370\334\304%o\301[\376\375\263O&\247{\233d|\024\325\251\336\272\267\310U\311\301\3450\031C\327>""\263\367\317\022a\354\260\\\177\032N\237\356\273\320{\330kb6\353;H\263\251y\257\356\277\t\370Y8\331\277\035L\207?\003\250+\357/\275\177\364\341o\037n|P\006\273{\203=u\240\376\353]\346\004\273W{m\354\032\314?\350'\372s\375\355\341\324L\317\361n\342\314\331\313\361\001\264$%P^\216G\\\017\031\000\233\207\023\327\374[\276\026/\023C\002x\254&\321\035|qSH\244n\372n\230\241\203o\005\271\220'\322#\357S\217\247\351\005\377q\220\"\341\274\007=\323d\333\013\377r\2208\231\372\212\352%\370a\260\362\362=<\274\342'\374\253\301\355\360|\330>\231\232\035\314\336\016\264\240\333\377\254_?\336~\307\375\226\275\324\273\010l\344\322\244\220O1\245\323\247{e\357\0338t\030h1\266\347\203\266\210H\224h3\203\231\305\240\034~IuF\375\033\301-,\026*ND\001\314\364\272\376T\220\t\266\177\377\374\223\324%\030\343\315\240T\023\303\324B\220\n\026\003x\001%\327\021\027\3329\373\215\277\r\234\370\034WxZ\217\361\241\2240\227\006|\005wo\204\3755\177\301_\365\177\0139\372\010\313p\342\033\320\300e\002P\242\322\236$T\220\237\303\231Y2\355\231\367\0062B\361\324_\301\272\024\321\317\205\336\023o\t\251\210\321\357\375\n\370\004f\237\372\212p>\362\023\221\333K\201\033>\246\\\030$\027\003\265\317\347\017\274m\257&jy\220\274\033*}\365}\264o\331[G\226}N\2647H^\365\277&\265Qm\335\020\007\003)80&M_\034\246(\212s\224\251\304/\263\336\204\237\030$/{\377%\210c\255\213>4\336\211\201x\330\373\305\377\324\207\206K^:H\004\251S\322}D\261#5@\346$9\331\233\357\375\233\216Ky)\341\366\r\330\202]\360\036\303S_\002\234,\017S\234\262\323\303\344\371w8\343b\257\016/\253|Y\222\016d\344F\244x\230\234\350}\3263<n\313c\357\222\267|\252\223\216\362\026\376B\237F\272p\t\\\361g\202\366\270\321\211\301'\010\336\t\326\272=Q\036\264\357W\250Z\212\370n\230\004\365\237\214\017\022\231\357!]3\303\3449\312E\005u:5\347\311\376\274o\007\363<\343\260m\366\232\237\016\023\270/p\362s\257Mi5\003\364\022>/\257$\226\243\254\202o\303\016bK\306\275\203\025`\254al\312$I\035\224\017?\363\"m\035\\\375\376x\005\274\023O\014\256\336\247\260\020\317=\345\344""\343\006\217\302\213}\255\337\036mx\330_\351\357\034\237;\336>\326(1\256\207\211\323D\222\003\244\3215\377~\310\035=\344\225\260\213\262H\220_8\243\313I\2013{\233\030fa8)0\346CT\2654x\202\243\020\221\301\225\037\216\333\177\0003e\007\366";
    PyObject *data = __Pyx_DecompressString(cstring, 2880, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (5397 bytes) */
const char* const bytes = ".02dCannot construct a bare watcherCannot set priority of an active watcherChild watchers are not supported on WindowsExpected callable, not Expected callable or None, got Invalid backend or flag: Invalid value for backend: 0x%xNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.\nPossible values: Unsupported backend: %s ?,, |<...><>:  activeadd_note args= at 0x callback=<callbacks@child watchers are only available on the default loop defaultdisableenableev_default_loop(ev_loop_new( events=) failed fd=fd must be non-negative: %r fileno=gcgevent.core.EVENTS head=illegal event mask: %rillegal signal number: %r'io' watcher attribute 'events' is read-only while watcher is active'io' watcher attribute 'fd' is read-only while watcher is activeisenabled len=libev- native=0xoperation on destroyed loop pending pending=%s pid= ref=repeat must be positive or zero: %r rstatus=src/gevent/libev/corecext.pyx stopped tail=ASYNCBACKEND_DEVPOLLBACKEND_EPOLLBACKEND_IOURINGBACKEND_KQUEUEBACKEND_LINUXAIOBACKEND_POLLBACKEND_PORTBACKEND_SELECTCHECKCHILDCLEANUPCUSTOMEMBEDERROREVENTSEV_USE_4HEAPEV_USE_CLOCK_SYSCALLEV_USE_EVENTFDEV_USE_FLOOREV_USE_INOTIFYEV_USE_MONOTONICEV_USE_NANOSLEEPEV_USE_REALTIMEEV_USE_SIGNALFDFORKFORKCHECKHubDestroyedICallbackIDLEILoop_IOFDSETLIBEV_EMBEDMAXPRIMINPRINOINOTIFYNONENOSIGMASKNSIGPERIODICPREPARE__Pyx_PyDict_NextRefREADREADWRITESIGNALSIGNALFDSTATTIMERUNDEFWRITEactiveactivecntafteragain__all__argsasync_asyncasync_.sendasync_.send_ignoring_argasyncio.coroutinesbackendbreak_callbackcallback._formatcallback.stopcbcheck_check_flagschildchild._format__class__classImplements__class_getitem__cline_in_tracebackcloseclosing_fdcontextddecodedefault_default_handle_errordestroydestroyed__dict__embeddable_backendsencode__enter__epollerrno_eventseventsevents_str_events_to_strexc_info__exit__fdfeedfileno_flagsflags_flags_str2int_flags_to_int_flags_to""_listforkforkcheck_format_format_detailsfunc__func__get_header_versionget_versiongetfilesystemencodinggetswitchintervalgeventgevent._interfacesgevent.exceptionsgevent.libev.corecexthandle_error_handle_syserrhowididle_ignored__init__install_sigchldintervalioio._formatio.start_is_coroutineitemskeyskqueuelinux_aiolinux_iouringlooploop._default_handle_errorloop._formatloop._format_detailsloop._handle_syserrloop.async_loop.break_loop.checkloop.childloop.closing_fdloop.destroyloop.filenoloop.forkloop.handle_errorloop.idleloop.install_sigchldloop.ioloop.nowloop.prepareloop.refloop.reinitloop.reset_sigchldloop.runloop.run_callbackloop.run_callback_threadsafeloop.signalloop.statloop.timerloop.unrefloop.update_nowloop.verifylower__main__message__module__msg__name__noenvnoinotifynosigmasknownowaitonceorigflags_intospass_eventspathpendingpending_afterpending_beforependingcntpidplatformpollpopportprepareprint_excprint_exceptionpriorityptr__pyx_vtable____qualname__recommended_backendsrefreinitrepeatreset_sigchldreventsrstatusrunrun_callbackrun_callback_threadsafeselectselfsendsend_ignoring_arg__set_name__set_syserr_cbsetdefaultsigfdsignalsignalfdsignalmodulesignalnumsignumsplitstartstatstopstrerrorstripsupported_backendssysttb__test__timetimertimer.againtimer.starttracetracebacktypeunrefupdateupdate_nowvvaluevaluesverifyversion_infowatcherwatcher.__enter__watcher.__exit__watcher._formatwatcher.closewatcher.feedwatcher.startwatcher.stopwin32xzope.interface\320\0040\260\t\270\037\310\001\330\010\017\210u\220A\220V\2307\240(\250%\250q\200\001\330\004\013\320\013#\320#;\2701\320\004\"\240!\330\010\023\2201\220A\330\r\026\220a\220t\2307\240!\320\0043\2601\330\010\023\2201\220D\230\001\330\010\014\210L\230\001\330\010\014\210H\220A\330\010\024\220A\220Q\330\010\013\2101\330\021\037\230q\240\004\240E\250\021\330\r\034\230A\230T\240\025\240g\250Q\250d\260!\330\010\026\220a\220q\320\0043\2601\330\010\021\220\032\2307\240'\250\032\2604\260u\270A\330\010\013\2101\330\014\020\220\005\220[""\240\001\330\010\026\220a\220v\230Z\240q\200\001\330\004\013\320\013#\320#4\260I\320=N\310a\200\001\330\004\013\210>\230\026\320\0375\260Q\200\001\330\004\013\210>\230\026\320\0376\260a\200\001\330\004\013\210>\230\026\320\0377\260q\320\0048\270\001\330\010\013\2101\330\014\024\320\024*\250\"\250A\330\010\026\220a\220v\230Z\240q\320\0048\270\017\300q\330\010\017\210r\220\021\220&\230\004\230H\240E\250\021\200A\330\r*\250!\200A\330\010\023\2201\220A\330\r\033\2301\230D\240\001\200A\330\010\023\2201\220A\330\010\033\2308\2401\240F\250!\330\010\014\210K\220w\230a\230q\330\r\024\220A\220T\230\021\330\010\017\210q\200A\330\010\023\2201\220A\330\010'\320'8\270\001\270\024\270Q\330\r\036\230a\230t\2407\250$\250a\330\010&\320&7\260q\270\004\270A\330\010\017\210~\230R\230q\200A\330\010\023\2201\220A\330\r\024\220A\220T\230\021\200A\330\010\023\2201\220A\330\010\024\220G\2301\230D\240\001\200A\330\010\023\2201\220A\330\r\026\220a\220t\2301\200A\330\010\023\2201\220A\330\r\027\220q\230\004\230A\200A\330\010\023\2201\220D\230\001\330\r\033\2301\230D\240\005\240W\250A\250T\260\021\200A\330\010\023\2201\220D\230\001\330\010\022\220!\2201\360\006\000\t\r\210M\230\021\330\010\014\210H\220A\330\010\014\210F\220%\220q\230\004\230E\240\027\250\004\250A\330\010\026\220a\220q\200A\330\010\023\2201\220D\230\001\330\010\014\210L\230\001\330\010\014\210H\220A\330\010\024\220A\220Q\330\r\033\2301\230D\240\005\240W\250D\260\r\270Q\330\010\026\220a\220q\200A\330\010\013\2103\210m\2301\230C\230s\240!\330\014\026\220g\230W\240A\330\010\014\210M\230\021\230&\240\r\250[\270\001\270\030\300\022\3005\310\002\310\"\310I\320UV\320V_\320_`\200A\340\010\013\2104\210q\330\014\026\320\0260\260\001\260\024\260Q\330\014\017\210s\220#\220Q\330\020\027\220q\200A\330\010\013\2104\210q\330\021\036\230a\230t\2401\200A\330\010\013\2104\210t\2201\330\014\023\2201\330\010\032\230$\230a\330\010\013\2104\210q\330\014\023\2201\330\010\017\210~\230R\230t\2401\330\010\017\210t\320\023#\2401\330\010\017\210q\200A\330""\r,\250A\200A\340\010$\240D\250\001\330\010\013\2105\220\003\2201\330\014\020\220\013\2306\240\021\330\014\020\220\007\220q\330\014\r\340\010\013\210>\230\027\240\001\340\014\033\2307\240!\240?\3202B\300!\330\014\030\230\001\230\031\240&\250\007\250q\340\014\020\320\020&\240a\240y\260\006\260g\270Q\200A\330\010\014\210E\220\021\200A\330\010\014\210F\220!\330\010\t\200A\330\010\014\210L\230\001\330\010\014\210H\220A\200A\340\010\r\210T\220\035\230a\230w\240a\330\r\033\2301\230D\240\007\240q\250\004\250A\330\010\017\210q\200A\330\010\017\320\017%\240T\250\025\250d\260!\200A\330\010\"\240$\240a\330\010\014\210H\220A\340\010\013\2101\330\014\017\210y\230\014\240A\240Q\360\n\000\021\022\340\014\020\220\017\230q\240\001\330\021!\240\021\240%\240q\330\014\017\320\017\037\230s\240$\240a\330\020\035\230Q\230a\330\021!\240\021\240!\200A\330\010\026\220a\220v\230Z\240q\200A\330\010\017\210q\200A\360\006\000\t\022\320\021!\240\021\240&\250\007\250q\330\010\013\2104\210q\330\021\032\230!\2304\230|\2501\200A\330\010\027\220q\330\010\035\230T\240\027\250\001\330\010 \240\001\330\010\t\330\014\030\230\004\230A\330\017\020\340\010\013\210:\220W\230A\330\014\023\2208\2302\230T\240\021\240!\330\010\013\2107\220'\230\021\330\014\023\220;\230b\240\004\240A\240Q\330\010\017\210q\200A\330\010\017\210t\2205\230\001\200A\330\010\017\320\017'\240t\2506\260\024\260Q\320\004%\240_\260A\330\010\017\210v\220Q\220f\230H\240E\250\021\320\004,\250I\260_\300A\330\010\017\210t\2201\220F\230&\240\n\250%\250q\320\004\031\230\034\240Q\330\010\023\2201\220A\330\010\"\240!\330\010\013\2101\330\014\032\230!\330\010\013\2101\330\014\032\230!\330\r\016\330\021\030\230\001\230\024\230W\240A\200\001\330\004\020\220\010\230\001\320\004\027\220\177\240a\330\010\017\210t\2201\220F\230%\230q\320\004(\250\007\250q\330\010\013\2103\210j\230\003\2301\330\014\022\220.\240\001\240\021\330\010\017\210u\220A\220V\2305\240\007\240q\200\001\330\004\027\220q\340\004\t\210\026\210{\230!\330\010\021\220\021\330\010\013\2107""\220\"\220A\330\014\022\220'\230\021\230!\330\014\025\220W\230C\230q\240\001\330\010\013\2104\210q\330\014\r\330\004\007\200q\330\010\016\210g\220Q\220c\230\021\230!\330\004\013\2103\210e\2201\220A\200\001\330\004\027\220q\330\004\010\210\006\210i\220q\330\010\013\2106\220\022\2201\330\014\022\220'\230\021\230!\330\010\021\220\021\220!\330\010\013\2104\210q\330\014\r\330\004\007\200q\330\010\016\210g\220Q\220a\330\004\013\2101\320\004\030\230\017\240q\330\010\017\210u\220A\220V\2305\240\001\320\000 \240\001\340\004\007\200t\2101\330\010\017\210q\330\004\007\200z\220\021\220'\230\021\330\010\017\210q\330\004\037\230q\340\004\007\200z\220\021\220'\230\021\330\010\020\220\005\220V\2301\230A\330\004\005\330\010\014\210I\220Q\330\014\024\220E\230\026\230r\240\026\240q\330\014\017\210q\330\020\032\230.\250\001\250\021\330\004\013\210<\220q\360\006\000\t\017\210j\230\001\230\021\330\014\020\220\004\220E\230\027\240\001\240\036\250u\260A\330\004\013\2101\200\001\340\004\022\220!\330\004\007\200t\2101\330\010\t\330\004\007\200u\210F\220'\230\021\330\010\016\210j\230\001\320\031;\2702\270Q\330\004\007\200u\210F\220'\320\031/\250q\330\010\022\220!\2208\2301\230C\230t\2405\250\016\260a\260q\330\010\016\210j\230\001\320\0313\2602\260S\270\005\270Q\270a\320\004\031\230\037\250\001\330\010\017\210v\220Q\220f\230E\240\021\320\004\032\230/\250\021\330\010\017\210w\220a\220v\230U\240!\200\001\330\004\005\330\004\007\200y\220\003\2201\330\r\036\230a\230q\330\010\032\230!\330\t\021\220\021\220!\330\r\036\230a\230w\240a\330\010\032\230!\340\010\016\210i\220q\320\030?\270q";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 319; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 60) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 319; i < 373; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 373; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 319;
      for (Py_ssize_t i=0; i<54; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        }
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab;
    double const c_constants[] = {0.0};
    for (int i = 0; i < 1; i++) {
      numbertab[i] = PyFloat_FromDouble(c_constants[i]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 1;
    int8_t const cint_constants_1[] = {0,3};
    for (int i = 0; i < 2; i++) {
      numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<3; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 3;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 3;
    unsigned int flags : 10;
    unsigned int first_line : 11;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 139};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_get_version, __pyx_mstate->__pyx_kp_b_iso88591_4I_Na, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 143};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_get_header_version, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags_2, __pyx_mstate->__pyx_n_u_flags_2};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_flags_to_list, __pyx_mstate->__pyx_kp_b_iso88591_q_iq_6_1_4q_q_gQa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags_2};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_flags_to_int, __pyx_mstate->__pyx_kp_b_iso88591_t1_q_z_q_q_z_V1A_IQ_E_r_q_q_q_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 236};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_flags_2, __pyx_mstate->__pyx_n_u_flags_2};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_check_flags, __pyx_mstate->__pyx_kp_b_iso88591_t1_uF_j_2Q_uF_q_81Ct5_aq_j_32S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 248};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_events_2, __pyx_mstate->__pyx_n_u_events_2};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_events_to_str, __pyx_mstate->__pyx_kp_b_iso88591_q_7_A_WCq_4q_q_gQc_3e1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 263};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_supported_backends, __pyx_mstate->__pyx_kp_b_iso88591_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 267};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_recommended_backends, __pyx_mstate->__pyx_kp_b_iso88591_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 271};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_embeddable_backends, __pyx_mstate->__pyx_kp_b_iso88591_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 275};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 294};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_L_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 331};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 545};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ptr};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_destroy, __pyx_mstate->__pyx_kp_b_iso88591_A_a_HA_1_y_AQ_q_q_s_a_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 592};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_errno};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_handle_syserr, __pyx_mstate->__pyx_kp_b_iso88591_A_3m1Cs_gWA_M_5_IUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 597};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_context, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_handle_error, __pyx_mstate->__pyx_kp_b_iso88591_A_D_5_1_6_q_7_2B_q_ay_gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 612};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_context, __pyx_mstate->__pyx_n_u_type, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_default_handle_error, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4q_4_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 619};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nowait, __pyx_mstate->__pyx_n_u_once, __pyx_mstate->__pyx_n_u_flags_2};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_run, __pyx_mstate->__pyx_kp_b_iso88591_Q_1A_1_1_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_reinit, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 633};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 637};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_unref, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 641};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_how};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_break, __pyx_mstate->__pyx_kp_b_iso88591_1A_at7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 645};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_verify, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 649};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_now, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_G1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 653};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_update_now, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 697};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_events_2, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_io, __pyx_mstate->__pyx_kp_b_iso88591_8_q_r_HE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 700};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_pending_before, __pyx_mstate->__pyx_n_u_pending_after};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_closing_fd, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_8_Q_at7_a_7q_A_Rq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 707};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_after, __pyx_mstate->__pyx_n_u_repeat, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_timer, __pyx_mstate->__pyx_kp_b_iso88591_0_uAV7_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 710};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signum, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_signal, __pyx_mstate->__pyx_kp_b_iso88591_A_vQfHE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 713};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_idle, __pyx_mstate->__pyx_kp_b_iso88591_a_t1F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 716};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_prepare, __pyx_mstate->__pyx_kp_b_iso88591_wavU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 719};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_check, __pyx_mstate->__pyx_kp_b_iso88591_q_uAV5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 722};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_fork, __pyx_mstate->__pyx_kp_b_iso88591_a_t1F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 725};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_async, __pyx_mstate->__pyx_kp_b_iso88591_vQfE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 731};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pid, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_ref};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_child, __pyx_mstate->__pyx_kp_b_iso88591_q_3j_1_uAV5_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 736};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_install_sigchld, __pyx_mstate->__pyx_kp_b_iso88591_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 739};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_reset_sigchld, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 742};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_interval, __pyx_mstate->__pyx_n_u_ref, __pyx_mstate->__pyx_n_u_priority};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_stat, __pyx_mstate->__pyx_kp_b_iso88591_I_A_t1F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 745};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_cb};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_run_callback, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_81F_Kwaq_AT_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 752};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_cb};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_run_callback_threadsafe, __pyx_mstate->__pyx_kp_b_iso88591_A_T_awa_1D_q_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 758};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_1_a_4q_1_Rt1_t_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 768};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_n_u_activecnt};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format_details, __pyx_mstate->__pyx_kp_b_iso88591_A_q_T_A_WA_82T_7_b_AQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_0_Q_s_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1011};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_A_avZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_1_M_HA_F_q_E_A_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1024};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_revents, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_feed, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_L_HA_AQ_1D_WD_Q_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1055};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1058};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_close, __pyx_mstate->__pyx_kp_b_iso88591_A_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1061};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1064};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_tb};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1074};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_pass_events, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_8_1_A_avZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1123};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_T_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1142};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_31_7_4uA_1_avZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1154};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_update, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_again, __pyx_mstate->__pyx_kp_b_iso88591_31_1D_L_HA_AQ_1_q_E_AT_gQd_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1257};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_send, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_1D_WAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1261};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ignored};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_send_ignoring_arg, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1286};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_kp_b_iso88591_A_t6_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1368};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_callback};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_gevent_libev_corecext_pyx, __pyx_mstate->__pyx_n_u_set_syserr_cb, __pyx_mstate->__pyx_kp_b_iso88591_y_1_aq_awa_iq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- 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(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#include "src/gevent/_generated_include/PyErrExceptionMatches_impl_7b4f377310190df92a521563db80ecc2f42d95506fc867b739186a972ce9c8f6.h"
/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#include "src/gevent/_generated_include/PyErrFetchRestore_impl_83072c493b1583a48ff3aad9f8dc7ade3be268831a2ab8ada440fe395cf916ad.h"
/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
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);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* TupleAndListFromArray (used by fastcall) */
#include "src/gevent/_generated_include/TupleAndListFromArray_impl_d69ed499f68cd42feaee4b5942c18d0f8efd9989393e455f897298c58b9fa8dd.h"
/* BytesEquals (used by UnicodeEquals) */
#include "src/gevent/_generated_include/BytesEquals_impl_d48b3ef06490e9921f32936be4dcafdc3250ac7ef2252e904b8f20e24a665cc0.h"
/* UnicodeEquals (used by fastcall) */
#include "src/gevent/_generated_include/UnicodeEquals_impl_836cabebedcde255d7b2e14d2d3ec8ae093224d9992c111dd33f6f1ba2aecbef.h"
/* fastcall */
#include "src/gevent/_generated_include/fastcall_impl_2d371982e998467e5c3fa3d5d125a44afb3a07b23828be3d6b5d120f6be5ca37.h"
/* CIntToDigits (used by CIntToPyUnicode) */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode (used by COrdinalToPyUnicode) */
#include "src/gevent/_generated_include/BuildPyUnicode_impl_39336659d3e7fa6e93f0316e0a04a30f8e9ee88a4ff7243bbd044712c15d9a95.h"
/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
#include "src/gevent/_generated_include/COrdinalToPyUnicode_impl_b9a3dd9d59ba195a7026008f8d4ba59db46533309847ef8b2804b042630ea937.h"
/* CIntToPyUnicode */
#include "src/gevent/_generated_include/CIntToPyUnicode_impl_60c990d69b3109107516df669b0496ea3c683ef15a8523feac6c3440ce8fe308.h"
/* JoinPyUnicode */
#include "src/gevent/_generated_include/JoinPyUnicode_impl_199e5554049cf0e6f79c238bd653d59e48f3389f2b94c2dd9cad4227096f0038.h"
/* PyDictVersioning (used by GetModuleGlobalName) */
#include "src/gevent/_generated_include/PyDictVersioning_impl_f179ad268abce9726a76569141f76d5dcd0550225ef9a9e9f73d478d7be0c345.h"
/* GetModuleGlobalName */
#include "src/gevent/_generated_include/GetModuleGlobalName_impl_b2394fa294c641220c991c48f5c953347ba392e1233755a6228b28d5e679fef0.h"
/* 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) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" 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

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" 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

/* PyObjectFastCall (used by PyObjectFastCallMethod) */
#include "src/gevent/_generated_include/PyObjectFastCall_impl_49781168209ae59e1c56f88d63362765f980ea90cc34bbbe49d64735688b114b.h"
/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* GetItemInt */
#include "src/gevent/_generated_include/GetItemInt_impl_057d6f270e739b86c6eeceee664d75d3caab665a9ec308b52b1fc08c260ccd28.h"
/* PyObjectCallOneArg (used by ObjectGetItem) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#include "src/gevent/_generated_include/SaveResetException_impl_b3e76ed9bc3819093e52b1558c2bbad485040cdc5a28b71844e50bfc92f51cf0.h"
/* GetException */
#include "src/gevent/_generated_include/GetException_impl_36bcd44414c3b1ebf6a1c0f320ee2c6e2baced19353f70d825d0fd0338e3c175.h"
/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* RaiseException */
#include "src/gevent/_generated_include/RaiseException_impl_5214b4470ab1cce407ca930811cfafb701053719a58763807254160af0a39f69.h"
/* SwapException */
#include "src/gevent/_generated_include/SwapException_impl_3529c43002b85b6a88333a1994598a58e361312e8462c9c4553bcc16b799892a.h"
/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#include "src/gevent/_generated_include/UnpackUnboundCMethod_impl_73fbc94f885e37a7810c861231fd30d7a9eae7cde8890c6786a4ce1f346a7810.h"
/* CallUnboundCMethod0 */
#include "src/gevent/_generated_include/CallUnboundCMethod0_impl_506503ba83409bc78d50e6c2a64d54ddd95a836cba396a015c59c17bbf915db5.h"
/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#include "src/gevent/_generated_include/CallUnboundCMethod2_impl_15aa7f0a5154a4d6051e84dd189b6dc929e7450de4be5cb5e9cc003766aec24d.h"
/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    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;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* 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);
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* UnicodeConcatInPlace */
#include "src/gevent/_generated_include/UnicodeConcatInPlace_impl_562c014431196ad62211d7fe3859078657d5010503175be72cc5e948c99124f2.h"
/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* CIntToPyUnicode */
#include "src/gevent/_generated_include/CIntToPyUnicode_impl_167f6be374ef26568fd035314c8058e705fbb3d6bd95d3c9ec031fbb7a197a20.h"
/* CIntToPyUnicode */
#include "src/gevent/_generated_include/CIntToPyUnicode_impl_4e09b312e8b4e01a8b97bb6e31c09461287bff2a9cc78ac7457e3b7bd375ac85.h"
/* WriteUnraisableException */
#include "src/gevent/_generated_include/WriteUnraisableException_impl_bf6608ff5bd702a181e41022924c10da4d6bcbcf8e60f057fafe6369af1f9b7f.h"
/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* CIntToPyUnicode */
#include "src/gevent/_generated_include/CIntToPyUnicode_impl_51a552447dce203488c8a36ae75f4312453f0ddbd5d8440117c5b5799ae2feb4.h"
/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#include "src/gevent/_generated_include/LimitedApiGetTypeDict_impl_fd5385b0b7d81c54e35b8e8be86f2a48fa376c140ad1a251d94cb50d5e2fb049.h"
/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
#include "src/gevent/_generated_include/FixUpExtensionType_impl_968625585c074793d4236a363113043104c99af679f80b0b7d0ea5e03b43f419.h"
/* PyObjectGetMethod (used by PyObjectCallMethod0) */
#include "src/gevent/_generated_include/PyObjectGetMethod_impl_e128eb9d3930413c3ed54abc40d4953c55ff9ea67a8c08ac7b5c2fd8494b6c00.h"
/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#include "src/gevent/_generated_include/ValidateBasesTuple_impl_3b9fdcb5e55f23d97a6405040c32f85cd06688a92f7d1964c3b28bc807f560c9.h"
/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
#include "src/gevent/_generated_include/MergeVTables_impl_cc0b823a0ed067bdca31ab6afca82ec940b10d68e9ecebbaec0a3d49b6244e8c.h"
/* TypeImport */
#include "src/gevent/_generated_include/TypeImport_impl_e30d056ae329ba5e94fee4709e4266a267c585bd5c229f7cd6121597afbfaa4e.h"
/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
#include "src/gevent/_generated_include/ImportImpl_impl_54add44d3961eb3adfb567f9d1292a4ce092acafbf7b2d11f026c8e90ea281d3.h"
/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* ListPack */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
    va_list va;
    PyObject *l = PyList_New(n);
    va_start(va, n);
    if (unlikely(!l)) goto end;
    for (Py_ssize_t i=0; i<n; ++i) {
        PyObject *arg = va_arg(va, PyObject*);
        Py_INCREF(arg);
        if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
            Py_CLEAR(l);
            goto end;
        }
    }
    end:
    va_end(va);
    return l;
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#include "src/gevent/_generated_include/AddModuleRef_impl_59efe7a55c2d1acdb632a2a6953f1ce31c634c9f98f262a8d338db6996845385.h"
/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#include "src/gevent/_generated_include/FetchCommonType_impl_8ddf5d6e0d45314935e4d87502d7fa32ec8f3d50d91ca9715a35d7f0fc2dda28.h"
/* CommonTypesMetaclass (used by CythonFunctionShared) */
#include "src/gevent/_generated_include/CommonTypesMetaclass_impl_5345023feb7cb35c8a99997be95973c1bfc904b959ef880ae7125f77d296af2b.h"
/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#include "src/gevent/_generated_include/PyVectorcallFastCallDict_impl_3616dfa798c1c336b0933a7ec9d88cb291d491f6315b48f846f69828df4619eb.h"
/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func_2);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
#include "src/gevent/_generated_include/CodeObjectCache_impl_ffc81bf87e547a82e6009d64a2466eb1a5f6677afcbab3333a029ea24e45c012.h"
/* AddTraceback */
#include "src/gevent/_generated_include/AddTraceback_impl_5c53b964023228d90bdfcfa91919f5c3c484446268d5ef056f29421d654f5af4.h"
/* 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;\
    }

/* PyObjectVectorCallKwBuilder (used by CIntToPy) */
#include "src/gevent/_generated_include/PyObjectVectorCallKwBuilder_impl_fd859cdb6cbc3b35f6b10f5733f06af41f621c00f218f3658f8b944bf821c5f8.h"
/* CIntToPy */
#include "src/gevent/_generated_include/CIntToPy_impl_04d273d7fd8d781e47c953336d9035c05b46b928eb9a876491735d34363bfe94.h"
/* CIntFromPy */
#include "src/gevent/_generated_include/CIntFromPy_impl_cf22304c44dd770a05b359b5d87b0d93f3ba3b7687e46b683f879e69eb065f27.h"
/* CIntFromPy */
#include "src/gevent/_generated_include/CIntFromPy_impl_ceb8d340f976d387a193f777f2c34549caaafc1e59b58b253b09ec2b16efbddf.h"
/* CIntFromPy */
#include "src/gevent/_generated_include/CIntFromPy_impl_b91de55768d50878c1454209403f531c1ef9ecfc0f5cfff0eb0b925c62c994e2.h"
/* CIntToPy */
#include "src/gevent/_generated_include/CIntToPy_impl_da54a5936606076cf9451a0a57e16cb19a13c3375d07529f14ab496937dae4f3.h"
/* CIntToPy */
#include "src/gevent/_generated_include/CIntToPy_impl_3a4503f42bed1a339a5a77cabbacbe22d845586eaf8fe2b8bf391ccbe75ae64a.h"
/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__12);
    }
    goto done;
}
#endif

/* FastTypeChecks */
#include "src/gevent/_generated_include/FastTypeChecks_impl_f9d18941833a215bcf3276e2b6a57d81e032bd85ed1fb021b834da49989898c9.h"
/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#include "src/gevent/_generated_include/NewCodeObj_impl_a437ae594518b78f515ea800eae13a23abf85c5a9a57d6d2c88c6b9b215ff54c.h"
/* DecompressString */
#include "src/gevent/_generated_include/DecompressString_impl_08916ce6b33dc899db1820b9329c4da53ddc4f977613e2296edf3d94850c4279.h"
#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(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
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        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 int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  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 (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      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 = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#include "src/gevent/_generated_include/MultiPhaseInitModuleState_impl_41d512917574f55c289a94dba0e3ef9c60f8de37a71dd41f0dd086494a351cae.h"
/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
